:root {
  --paper: #131210;
  --ink: #ece8e0;
  --dim: #97907f;
  --faint: #4a463d;
  --line: #2b2924;
  --acc: #ff4d00;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.9'/></svg>");
}

::selection { background: var(--acc); color: var(--paper); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.1rem 4vw;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: .82rem;
}
.wordmark { text-decoration: none; font-weight: 500; }
.wordmark:hover { color: var(--acc); }
.top nav { display: flex; gap: 1.4rem; margin-right: auto; }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a:hover { color: var(--acc); }
.clock { color: var(--dim); display: flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- hero ---------- */
.hero { padding: 9vh 4vw 7vh; max-width: 76rem; }
.kicker {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--dim);
  letter-spacing: .02em;
  margin-bottom: 2rem;
}
.kicker::before { content: "● "; color: var(--acc); font-size: .6em; vertical-align: .2em; }

h1 {
  font-size: clamp(2.9rem, 8.4vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.015em;
  font-weight: 400;
}
h1 em { font-style: italic; font-weight: 300; color: var(--acc); }
.line { display: block; overflow: hidden; }
.line > span { display: block; transform: translateY(112%); animation: rise 1s cubic-bezier(.2, .7, .2, 1) forwards; }
.line:nth-child(2) > span { animation-delay: .1s; }
.line:nth-child(3) > span { animation-delay: .2s; }
@keyframes rise { to { transform: none; } }

.hero-foot { display: flex; gap: 1.4rem; margin-top: 3rem; max-width: 44rem; align-items: flex-start; }
.me {
  border-radius: 4px;
  filter: grayscale(1) contrast(1.08);
  border: 1px solid var(--line);
  flex: none;
  transition: filter .4s;
}
.me:hover { filter: none; }
.hero-foot p { font-size: 1.12rem; color: var(--ink); }
.links { margin-top: .9rem; font-family: var(--mono); font-size: .85rem; display: flex; gap: 1.3rem; }
.links a { color: var(--dim); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--faint); }
.links a:hover { color: var(--acc); text-decoration-color: var(--acc); }

/* ---------- sections ---------- */
.block { padding: 6vh 4vw; max-width: 76rem; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 420; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.prose { max-width: 42rem; font-size: 1.1rem; color: var(--ink); }

/* project index rows */
.index { list-style: none; margin-top: 2rem; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid;
  grid-template-columns: 3rem 1fr auto 2rem;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.3rem .8rem;
  text-decoration: none;
  transition: background .25s, color .25s, padding .25s;
}
.index a:hover { background: var(--acc); color: var(--paper); }
.index .n { font-family: var(--mono); font-size: .8rem; color: var(--dim); }
.index a:hover .n { color: var(--paper); }
.index .t strong { display: block; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; }
.index .t small { display: block; font-size: .98rem; margin-top: .15rem; opacity: .72; font-weight: 340; }
.index .m { font-family: var(--mono); font-size: .78rem; color: var(--dim); white-space: nowrap; }
.index a:hover .m { color: var(--paper); }
.index .a { font-family: var(--mono); transition: transform .25s; }
.index a:hover .a { transform: translateX(6px); }

/* spec table */
.specs { margin-top: 2rem; border-collapse: collapse; font-size: 1rem; max-width: 42rem; width: 100%; }
.specs td { padding: .7rem 0; border-bottom: 1px dotted var(--faint); vertical-align: top; }
.specs td:first-child { font-family: var(--mono); font-size: .8rem; color: var(--dim); width: 9rem; }

/* elsewhere list */
.plain { list-style: none; margin-top: 1.4rem; font-size: 1.15rem; }
.plain li { padding: .55rem 0; border-bottom: 1px dotted var(--faint); max-width: 44rem; color: var(--dim); }
.plain a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--acc); }
.plain a:hover { background: var(--acc); color: var(--paper); text-decoration-color: var(--acc); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 1.6rem 4vw 2.4rem; font-family: var(--mono); font-size: .78rem; color: var(--dim); }

/* scroll reveal */
.rise { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.rise.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .top nav { display: none; }
  .index a { grid-template-columns: 2rem 1fr 1.4rem; }
  .index .m { display: none; }
  .hero-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .line > span { transform: none; }
  .rise { opacity: 1; transform: none; }
}
