/* ---------- Tokens ---------- */
:root {
  --bg: #FAF7F0;
  --fg: #1A1815;
  --muted: #7A736B;
  --line: #E8E2D5;
  --card: #F2EDE0;
  --accent: #D9A441;
  --display: 'Instrument Serif', Georgia, serif;

  --section-gap: 200px;
  --h-pad: 6vw;
  --hero-pad: 14vh;
}

/* ---------- Reset + base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
em { font-style: italic; }

.site {
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  cursor: default;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px var(--h-pad);
  z-index: 50;
  mix-blend-mode: difference;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.nav-mark {
  font-family: var(--display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.01em;
  text-transform: none;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { position: relative; transition: opacity .2s; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding: var(--hero-pad) var(--h-pad) 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-top: 32px;
}
.meta-row { display: flex; gap: 8px; align-items: center; }
.meta-label { color: var(--fg); }
.meta-dot { color: var(--muted); }

.hero-title {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-top: auto;
  padding-top: 80px;
  max-width: 14ch;
}
.hero-name { display: block; }
.hero-em {
  display: inline-block;
  color: var(--accent);
  font-style: italic;
  margin-right: 0.2em;
  transform: translateY(-0.05em);
}
.hero-tag {
  font-style: italic;
  color: var(--muted);
  font-size: 0.55em;
  display: block;
  margin-top: 0.4em;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.hero-tag em { color: var(--accent); }

.hero-foot {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: end;
  margin-top: 80px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.hero-blurb {
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  max-width: 56ch;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  color: var(--muted);
  justify-self: end;
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  right: var(--h-pad);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: lowercase;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.scroll-line {
  display: block;
  width: 60px; height: 1px;
  background: var(--muted);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: slide 2.4s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Section heads ---------- */
.section-head {
  margin-bottom: 80px;
  max-width: 1100px;
}
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: inline-block;
  padding-right: 100px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(36px, 5.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 400;
  max-width: 22ch;
  text-wrap: balance;
}
.section-title em { color: inherit; }
.section-title .accent { color: var(--accent); }
.section-sub {
  font-family: var(--display);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
  margin-top: 28px;
  font-style: italic;
}

/* ---------- Projects (Specimen) ---------- */
.projects { padding: var(--section-gap) var(--h-pad); }
.projects-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proj-spec {
  background: var(--bg);
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 480px;
  transition: background .3s;
  position: relative;
}
.proj-spec:hover { background: var(--card); }
.proj-spec-head {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.proj-spec-display {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 24px 0;
}
.proj-spec-title {
  font-family: var(--display);
  font-size: clamp(48px, 6.5vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  font-style: italic;
  transition: color .3s;
}
.proj-spec:hover .proj-spec-title { color: var(--accent); }
.proj-spec-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.proj-spec-kv {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.proj-spec-kv span:first-child { color: var(--muted); }
.proj-spec-kv span:last-child { color: var(--fg); }
.proj-spec-blurb {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.4;
  color: var(--fg);
  max-width: 36ch;
}
.proj-spec-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-top: auto;
  color: var(--muted);
  transition: color .3s;
}
.proj-spec:hover .proj-spec-cta { color: var(--accent); }

/* ---------- Now ---------- */
.now {
  padding: var(--section-gap) var(--h-pad);
  background: var(--card);
}
.now-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
}
.now-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.now-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-4px);
}
.now-foot {
  margin-top: 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* ---------- About ---------- */
.about { padding: var(--section-gap) var(--h-pad); }
.about-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 56ch;
  font-family: var(--display);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.about-body p:first-child::first-letter {
  font-size: 1.8em;
  font-style: italic;
  color: var(--accent);
  line-height: 0.9;
  float: left;
  margin-right: 0.08em;
  margin-top: 0.08em;
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-gap) var(--h-pad) 48px;
  border-top: 1px solid var(--line);
}
.contact-title {
  font-family: var(--display);
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 400;
  margin-bottom: 80px;
}
.contact-title em { color: var(--accent); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 80px;
}
.contact-link {
  background: var(--bg);
  padding: 32px 28px;
  display: grid;
  grid-template-columns: 100px 1fr 24px;
  align-items: center;
  gap: 16px;
  transition: background .25s, padding-left .25s;
}
.contact-link:hover {
  background: var(--card);
  padding-left: 40px;
}
.contact-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.contact-val {
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.contact-arrow {
  font-family: var(--display);
  font-size: 24px;
  text-align: right;
  color: var(--accent);
  transition: transform .25s;
}
.contact-link:hover .contact-arrow { transform: translate(4px, -4px); }

.site-foot {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.reveal-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .status-dot, .scroll-line::after { animation: none; transition: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --section-gap: 120px; --h-pad: 5vw; --hero-pad: 10vh; }
  .nav-links { gap: 16px; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
  .hero-status { justify-self: start; }
  .projects-list { grid-template-columns: 1fr; }
  .proj-spec { padding: 40px 24px; min-height: 360px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-link { grid-template-columns: 80px 1fr 24px; padding: 24px 20px; }
}
