/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
:target, #top { scroll-margin-top: 72px; }
body, h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --rule: #e5e5e5;
  --accent: #1a1f2e;        /* deep neutral navy */
  --accent-hover: #000000;
  --container: 760px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-hover); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.header-link {
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
}
.header-link:hover { color: var(--text); }

/* ---------- Sections ---------- */
.hero { padding: 96px 0 64px; }
.about,
.portfolio,
.contact { padding: 64px 0; border-top: 1px solid var(--rule); }

h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.lede {
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  max-width: 60ch;
}

.about p + p { margin-top: 16px; }
.about p { max-width: 60ch; }

/* ---------- Portfolio ---------- */
.portfolio-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.portfolio-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px;
  background: var(--bg);
  transition: border-color 120ms ease;
}
.portfolio-card:hover { border-color: var(--text); }
.portfolio-card__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portfolio-card__tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}
.portfolio-card__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
}
.portfolio-card__link:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact p + p { margin-top: 8px; }
.muted { color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
