/* ---- Base ---- */

:root {
  --text: #111111;
  --muted: #555555;
  --bg: #ffffff;
  --line: #cccccc;
  --link: #1a56db;
  --link-hover: #143f9e;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrainsMono Nerd Font", "JetBrains Mono", "JetBrainsMono NF", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.wrap-wide {
  max-width: 880px;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 10px;
}

.logo {
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover {
  border-bottom: 1px solid var(--text);
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-weight: bold;
  line-height: 1.3;
  margin-top: 0;
}

h1 {
  font-size: 26px;
  margin-bottom: 10px;
}

h2 {
  font-size: 20px;
  margin-bottom: 18px;
}

h3 {
  font-size: 16px;
  margin-top: 32px;
  margin-bottom: 10px;
}

h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  padding: 5px 10px;
  margin-bottom: 20px;
}

.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
}

.lead {
  font-size: 16px;
  color: var(--muted);
}

.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---- Lists ---- */

ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 4px;
}

.grid-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.grid-list li {
  border: 1px solid var(--line);
  padding: 3px 9px;
  font-size: 14px;
  margin-bottom: 0;
}

.tech-list li {
  font-size: 14px;
}

/* ---- Sections ---- */

section {
  padding: 32px 0;
}

.hero {
  padding-top: 48px;
}

/* ---- Projects ---- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project {
  border: 1px solid var(--line);
  padding: 20px 22px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.project:hover,
.project:focus-within {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
  border-color: var(--text);
}

.project h3 {
  margin-top: 0;
}

.project p:last-of-type {
  margin-bottom: 0;
}

.project .grid-list:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- Buttons ---- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.btn {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: underline;
}

/* ---- Contact ---- */

.contact-list {
  margin: 0 0 28px 0;
}

.contact-list dt {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 16px;
}

.contact-list dt:first-child {
  margin-top: 0;
}

.contact-list dd {
  margin: 2px 0 0 0;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px 60px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .btn {
  margin-top: 8px;
  display: inline-block;
}

/* ---- Scroll offset for sticky header ---- */

section[id], main [id] {
  scroll-margin-top: 70px;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .top-nav {
    gap: 10px;
  }

  .top-nav a {
    font-size: 13px;
  }

  h1 {
    font-size: 26px;
  }
}
