:root {
  /* Change --accent to recolour the whole site, including the particles. */
  --accent: #ff7a1a;
  --bg: #08090a;
  --panel: rgba(16, 18, 20, 0.78);
  --text: #f3f4f1;
  --muted: #9a9e98;
  --line: rgba(255, 255, 255, 0.11);
  --gutter: clamp(16px, 4vw, 56px);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--accent);
  color: #0b0d06;
  border-radius: 999px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

#signal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main, .footer { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* Navigation */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(760px, calc(100% - 32px));
  padding: 8px 8px 8px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.nav__logo { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.nav__logo span { color: var(--accent); }

.nav nav { display: flex; align-items: center; gap: 4px; }

.nav nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav nav a:hover, .nav nav a.is-active { color: var(--text); }

.nav nav .nav__cta { background: var(--text); color: var(--bg); font-weight: 500; }
.nav nav .nav__cta:hover { background: var(--accent); color: #0b0d06; }

/* Icons from the sprite at the end of index.html */
.i {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  padding: 128px var(--gutter) 72px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.status i {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

.hero__name {
  font-size: clamp(40px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.hero__name span { color: var(--accent); }

.hero__role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.pill .i { width: 13px; height: 13px; }

.hero__intro { margin-top: 22px; color: var(--muted); }
.hero__intro strong { font-weight: 600; color: var(--accent); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 6px 12px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.hero__more .i { transition: transform 0.2s; }
.hero__more:hover { color: var(--accent); }
.hero__more:hover .i { transform: translateX(4px); }

.hero__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(8, 9, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.hero__links a:hover { color: var(--accent); border-color: var(--accent); }
.hero__links .i { width: 14px; height: 14px; }

/* Soft edges so the image melts into the page instead of sitting in a box. */
.hero__art {
  width: 100%;
  height: auto;
  mask-image:
    linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
}

/* "Last played" card */
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-top: 22px;
  padding: 8px 10px 8px 8px;
  background: rgba(8, 9, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.track:hover { border-color: var(--accent); }
.track__art {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  overflow: hidden;
  background: #1a1c1e;
  border-radius: 6px;
  color: var(--muted);
}
.track__art img { width: 100%; height: 100%; object-fit: cover; }
.track__text { display: grid; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.track__text small { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.track__text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.track__text b { font-weight: 600; color: var(--text); }
.track__bars { display: flex; align-items: center; gap: 3px; height: 14px; }
.track__bars i {
  width: 2px;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleY(0.3);
  animation: bars 0.9s ease-in-out infinite alternate;
}
.track__bars i:nth-child(2n) { animation-duration: 0.6s; }
.track__bars i:nth-child(3n) { animation-duration: 1.2s; }
@keyframes bars { to { transform: scaleY(1); } }
.track__play {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: var(--text);
  border-radius: 50%;
  color: var(--bg);
}
.track__play .i { width: 11px; height: 11px; margin-left: 2px; fill: currentColor; stroke: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  background: #0d0e0f;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn:hover { border-color: var(--text); transform: translateY(-2px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #0b0d06; font-weight: 500; }
.btn--primary:hover { border-color: var(--accent); }

/* About: same column as the hero. The text stops short of the particle sphere on the right. */
.about {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 64px var(--gutter) 120px;
}

.statement {
  max-width: min(600px, 58vw);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
}
.statement span { white-space: nowrap; transition: opacity 0.25s; }

.highlights {
  max-width: min(600px, 58vw);
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.highlights li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.highlights strong { font-family: var(--mono); font-size: 13px; font-weight: 500; line-height: 1.9; color: var(--accent); }

/* Education: same column as About. The rows reuse the Experience list, with the
   degree and the college stacked so long names fit. */
.education {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px var(--gutter) 120px;
}
.education .rows li { grid-template-columns: 160px 1fr; }
.education .rows div { display: grid; gap: 6px; }
.education .rows em { text-align: left; }
.highlights span { color: #c4c7c1; }

/* Tools wheel */
.tech {
  --r: min(36vw, 62vh);
  --tile: 84px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(var(--r) * 2 + var(--tile) + 80px);
  padding: 64px var(--gutter);
  overflow: hidden;
  overflow: clip;
}
.tech::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--r) * 1.7);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tech__wheel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  animation: wheel 80s linear infinite;
}
.tech__wheel:hover, .tech__wheel:hover .tile { animation-play-state: paused; }

.tech__wheel li {
  --a: calc(360deg / var(--n) * var(--i));
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--tile);
  height: var(--tile);
  margin: calc(var(--tile) / -2) 0 0 calc(var(--tile) / -2);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}

/* Spins against the wheel so logos stay upright. */
.tile {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #121213;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 24%;
  box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 38%, transparent);
  animation: wheel 80s linear infinite reverse;
}
.tile__icon {
  width: 46%;
  height: 46%;
  background: var(--accent);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

@keyframes wheel { to { transform: rotate(360deg); } }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tech__copy {
  position: relative;
  max-width: 560px;
  text-align: center;
}
.tech__copy h2 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.tech__copy h2 span { display: block; color: var(--accent); }
.tech__copy p:last-child { color: #c4c7c1; }

/* Full tool list */
.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 var(--gutter) 48px;
}
.stack__group {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stack__group:first-child { grid-column: 1 / -1; }
.stack__group h3 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.stack .chips li { color: var(--text); }

/* Work */
.work-head {
  padding: 96px var(--gutter) 0;
}
.work-head h2, .experience h2, .education h2 {
  max-width: 16em;
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case {
  display: flex;
  align-items: center;
  min-height: 120vh;
  padding: 64px var(--gutter);
}
.case--flip { justify-content: flex-end; }

.case__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: min(480px, 100%);
}

.case h3 {
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.case__body > p:not(.eyebrow) { color: #c4c7c1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 12px;
  background: rgba(8, 9, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.chips b { font-weight: 500; color: var(--accent); }

.link {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}
.link span { display: inline-block; transition: transform 0.2s; }
.link:hover { color: var(--accent); border-color: var(--accent); }
.link:hover span { transform: translateX(4px); }

/* Experience */
.experience {
  padding: 140px var(--gutter);
}

.rows { margin-top: 48px; border-top: 1px solid var(--line); }
.rows li {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.rows span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.rows strong { font-size: clamp(20px, 2.2vw, 30px); font-weight: 500; letter-spacing: -0.01em; }
.rows em { font-style: normal; color: var(--muted); text-align: right; }

/* Bullet points under an Experience entry, kept to the middle column for readable lines. */
.project { grid-column: 2; margin-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.notes { grid-column: 2; display: grid; gap: 10px; margin-top: 8px; color: #c4c7c1; }
.notes code { font-family: var(--mono); font-size: 0.85em; color: var(--text); }
.rows .notes li { display: block; position: relative; padding: 0 0 0 18px; border: 0; }
.notes li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 100vh;
  padding: 120px var(--gutter) 64px;
  text-align: center;
}
.contact h2 {
  max-width: 11em;
  font-size: clamp(40px, 6.6vw, 96px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.contact__mail {
  font-family: var(--mono);
  font-size: clamp(17px, 2vw, 24px);
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact__mail:hover { border-color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.socials a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: rgba(8, 9, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.socials a:hover { border-color: var(--text); }

/* Footer and scroll readout */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.footer a { justify-self: end; transition: color 0.2s; }
.footer a:hover { color: var(--text); }

.hud {
  position: fixed;
  right: var(--gutter);
  bottom: 20px;
  z-index: 5;
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  transition: opacity 0.2s;
}
.hud #hud-index { color: var(--accent); }
.hud.is-hidden { opacity: 0; }

@media (max-width: 1000px) {
  .stack { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav { padding-left: 16px; gap: 8px; }
  .nav nav a { padding: 8px 10px; }
  .nav nav a[href="#about"], .nav nav a[href="#experience"] { display: none; }

  /* On phones the image goes on top. */
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 92px var(--gutter) 56px; }
  .hero__art { order: -1; max-width: 360px; justify-self: center; }

  .statement { max-width: none; }
  .highlights { max-width: none; }
  .highlights li { grid-template-columns: 1fr; gap: 4px; }

  /* On phones the ring passes above and below the heading, with its sides off-screen. */
  .tech { --r: 82vw; --tile: 64px; }
  .stack { grid-template-columns: 1fr; }

  .work-head { padding-top: 64px; }

  /* Shapes sit in the top half on phones, so the text gets its own panel below. */
  .case, .case--flip {
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 110vh;
    padding: 56vh 16px 48px;
  }
  .case__body {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .experience { padding: 96px var(--gutter); }
  .rows li, .education .rows li { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .rows em { text-align: left; }
  .notes, .project { grid-column: auto; }

  .footer { grid-template-columns: 1fr 1fr; }
  .footer #clock { display: none; }

  .hud { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
