:root {
  --bg: #fafaf9;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #1c1917;
  --accent-text: #fafaf9;
  --max: 880px;
}

:root[data-theme="dark"] {
  --bg: #121110;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --line: #2b2826;
  --accent: #f5f5f4;
  --accent-text: #121110;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
}

.logo { font-weight: 600; }

nav { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
nav a { color: var(--muted); transition: color 0.2s; }
nav a:hover { color: var(--text); }

#theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

main, .site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero { padding: 120px 0 100px; }

.eyebrow {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 14em;
}

.lead {
  margin: 28px 0 36px;
  max-width: 34em;
  font-size: 1.15rem;
  color: var(--muted);
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
  transition: transform 0.2s, opacity 0.2s;
}
.button:hover { transform: translateY(-2px); opacity: 0.9; }

.section { padding: 80px 0; border-top: 1px solid var(--line); }

h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 36px;
}

.projects { display: grid; gap: 0; }

.project {
  display: grid;
  grid-template-columns: 80px 1fr;
  column-gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s;
}
.project:first-child { border-top: 1px solid var(--line); }
.project:hover { padding-left: 12px; }

.project-year { color: var(--muted); font-size: 0.9rem; grid-row: span 2; padding-top: 4px; }
.project h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 1.8rem; }
.project p { color: var(--muted); max-width: 36em; }

.about-text p { max-width: 36em; font-size: 1.1rem; margin-bottom: 18px; }

.contact > p { color: var(--muted); margin-bottom: 8px; }
.email {
  display: inline-block;
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  transition: border-color 0.2s;
}
.email:hover { border-color: var(--text); }

.socials { list-style: none; display: flex; gap: 24px; }
.socials a { color: var(--muted); transition: color 0.2s; }
.socials a:hover { color: var(--text); }

.site-footer {
  padding-top: 32px;
  padding-bottom: 48px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 600px) {
  nav { gap: 16px; }
  .hero { padding: 80px 0 64px; }
  .project { grid-template-columns: 1fr; }
  .project-year { grid-row: auto; margin-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
