@font-face { font-family: "Red Hat Display"; src: url("assets/fonts/redhat-display.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Red Hat Text"; src: url("assets/fonts/redhat-text.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("assets/fonts/redhat-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("assets/fonts/redhat-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #E9E6E0;
  --card: #F6F4F0;
  --ink: #1C1A18;
  --ink-2: #3A3632;
  --muted: #736D66;
  --faint: #A39C93;
  --hair: rgba(28, 26, 24, .08);
  --shell: rgba(28, 26, 24, .04);
  --olive: #56652B;
  --olive-light: #C2CF95;
  --live: #3F9D4E;
  --display: "Red Hat Display", system-ui, sans-serif;
  --text: "Red Hat Text", system-ui, sans-serif;
  --mono-font: "Red Hat Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --side: 470px;
  --gap: clamp(40px, 4vw, 72px);
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--ink); color: var(--card); }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono-font); font-size: 12.5px; letter-spacing: .01em; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--card); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 16px; }

/* Nested frames: a tinted tray holding a lighter plate. */
.shell { padding: 8px; border-radius: 30px; background: var(--shell); box-shadow: 0 0 0 1px var(--hair); }
.core { border-radius: 23px; overflow: hidden; background: var(--card); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), 0 30px 60px -38px rgba(40, 30, 20, .35); }

/* Pill buttons with a nested icon */
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 6px 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--card); font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .5s var(--ease), background .3s var(--ease);
}
.pill .ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 14px; transition: transform .5s var(--ease); }
.pill:hover .ic { transform: translate(2px, -1px) scale(1.06); }
.pill:active { transform: scale(.98); }
.pill.light { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.pill.light .ic { background: var(--shell); }
.pill.ghost { background: rgba(255, 255, 255, .06); color: var(--card); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.pill.ghost .ic { background: rgba(255, 255, 255, .1); }

/* Layout */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--gap); max-width: 1440px; margin: 0 auto; padding: 0 48px; }

/* Pinned identity column */
.side { position: sticky; top: 0; height: 100dvh; padding: 48px 0 40px; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.who { display: flex; align-items: center; gap: 12px; align-self: start; }
.mark { width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--card); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.who h1 { font: inherit; }
.who b { display: block; font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.2; }
.who small { font-size: 14px; color: var(--muted); }
.dock-txt i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(63, 157, 78, .5); animation: ping 2.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(63, 157, 78, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(63, 157, 78, 0); } }
/* Size tracks the sidebar width so "From first commit" always fits on one line. */
.title { margin-top: clamp(32px, 6vh, 56px); font-family: var(--display); font-size: clamp(34px, min(5.8vh, calc(var(--side) / 9.2)), 52px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; }
.title span { display: block; margin-top: .12em; font-size: .8em; color: var(--faint); }
.bio { margin-top: 20px; color: var(--muted); max-width: 36ch; }
.bio a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.menu { margin-top: clamp(24px, 4.5vh, 40px); display: grid; gap: 2px; align-self: start; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 6px 0; font-family: var(--mono-font); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); transition: color .4s var(--ease); }
.menu a::before { content: ""; width: 24px; height: 1px; background: var(--faint); transition: width .6s var(--ease), background .4s var(--ease); }
.menu a:hover, .menu a.on { color: var(--ink); }
.menu a:hover::before { width: 40px; }
.menu a.on::before { width: 60px; background: var(--ink); }
.side-foot { margin-top: auto; padding-top: 28px; display: grid; gap: 16px; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.links a:hover { color: var(--ink); }
.links .mono { color: var(--faint); }

/* Main column */
.main { padding: 48px 0 40px; min-width: 0; }
.sect { margin-top: clamp(96px, 12vw, 140px); }
.sect-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--hair); font-family: var(--display); font-size: clamp(26px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.02em; }
.sect-h .mono { color: var(--muted); font-family: var(--mono-font); font-weight: 400; letter-spacing: .01em; }
.note { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.meta { color: var(--olive); }
.lede { margin-top: 10px; color: var(--muted); }
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .78em; width: 8px; height: 1px; background: var(--ink); }
.tags { margin-top: 18px; color: var(--faint); }
.link { display: inline-flex; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--faint); padding-bottom: 1px; transition: border-color .3s var(--ease); }
.link:hover { border-color: var(--ink); }

/* Showreel */
.screen { position: relative; aspect-ratio: 16 / 10; background: #1B2536; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--ease); }
.screen video.on { opacity: 1; }
.reel-toggle { position: absolute; right: 14px; top: 14px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(20, 18, 16, .55); color: #fff; font-size: 12px; backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s var(--ease); }
.reel:hover .reel-toggle, .reel-toggle:focus-visible { opacity: 1; }
.reel-cap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; }
.reel-cap b { font-family: var(--display); font-size: 17px; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-ctl { display: flex; align-items: center; gap: 16px; flex: none; color: var(--muted); }
.segs { display: flex; gap: 5px; }
.segs button { width: 30px; height: 18px; display: grid; align-items: center; }
.segs i { position: relative; display: block; height: 3px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.segs i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.facts > div { padding: 22px 20px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.count { display: flex; font-family: var(--display); font-size: clamp(34px, 3vw, 44px); line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.count .col { display: inline-block; height: 1em; overflow: hidden; }
.count .col > span, .count .col > span > span { display: block; }
.count .col > span > span { height: 1em; }
.facts p { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.built { margin-top: 26px; font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--muted); line-height: 1.8; }
.built .mono { font-family: var(--mono-font); font-weight: 400; color: var(--faint); margin-right: 10px; }

/* Work */
.media { aspect-ratio: 16 / 10; overflow: hidden; background: #1B2536; }
.media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature { margin-top: 28px; }
.feature:hover .media video, .card:hover .media video { transform: scale(1.025); }
.feature-body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; padding: 26px 8px 0; }
.feature h3 { margin-top: 8px; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.card .core { height: 100%; display: flex; flex-direction: column; }
.card .media { border-radius: 0; }
.card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-top: 6px; font-family: var(--display); font-size: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.card .lede { font-size: 15px; }
.card .ticks { margin-top: 14px; }
.card .ticks li { font-size: 14px; }
.card .link { align-self: start; margin-top: auto; padding-top: 16px; border-bottom: 0; }
.card .link::after { content: none; }

/* What you get */
.how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.how > div { padding: 26px 26px 28px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.how .mono { color: var(--olive); }
.how h3 { margin: 12px 0 8px; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.how p { font-size: 15px; color: var(--muted); }

/* Experience */
.exp > li { border-bottom: 1px solid var(--hair); }
.exp summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 124px minmax(0, 1fr) 24px; gap: 20px; align-items: center; padding: 20px 0; transition: padding .5s var(--ease); }
.exp summary::-webkit-details-marker { display: none; }
.exp summary:hover { padding-left: 10px; }
.exp .yr { color: var(--muted); }
.exp .role b { display: block; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.exp .role small { font-size: 14px; color: var(--muted); }
.plus { position: relative; width: 20px; height: 20px; }
.plus::before, .plus::after { content: ""; position: absolute; left: 3px; right: 3px; top: 9px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease); }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0); }
details::details-content { height: 0; overflow: clip; transition: height .55s var(--ease), content-visibility .55s allow-discrete; }
details[open]::details-content { height: auto; }
.exp .ticks { padding: 0 0 24px 144px; }
.peek { position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; pointer-events: none; opacity: 0; transform: scale(.9); box-shadow: 0 0 0 6px rgba(246, 244, 240, .8), 0 30px 60px -20px rgba(40, 30, 20, .45); }
.peek video { width: 100%; height: 100%; object-fit: cover; }

/* About / FAQ: reuses the experience rows */
.about-lede { margin-top: 20px; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.faq { margin-top: 18px; }
.faq summary { grid-template-columns: minmax(0, 1fr) 24px; }
.faq .role b { font-size: 17px; }
.faq details p { padding: 0 44px 22px 0; color: var(--muted); max-width: 70ch; }

/* Stack */
.stack > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.stack dt { color: var(--muted); padding-top: 3px; }
.stack dd { font-size: 16px; color: var(--ink-2); }

/* Contact */
.contact .core.dark { background: var(--ink); color: var(--card); padding: clamp(36px, 5vw, 64px); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .08), 0 40px 80px -40px rgba(40, 30, 20, .5); }
.kicker { color: var(--olive-light); }
.contact h2 { margin: 14px 0 28px; font-family: var(--display); font-size: clamp(56px, 7.5vw, 104px); line-height: .95; font-weight: 800; letter-spacing: -.045em; }
.contact h2 span { color: var(--olive-light); }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.mail { font-family: var(--display); font-size: clamp(24px, 2.8vw, 36px); font-weight: 700; letter-spacing: -.02em; border-bottom: 2px solid rgba(255, 255, 255, .25); padding-bottom: 2px; overflow-wrap: anywhere; transition: border-color .3s var(--ease); }
.mail:hover { border-color: var(--olive-light); }
.copy { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--card); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); transition: background .3s var(--ease); }
.copy:hover { background: rgba(255, 255, 255, .08); }
.contact .btns { margin-top: 32px; }
.fine { margin-top: 36px; color: rgba(246, 244, 240, .55); line-height: 1.8; max-width: 62ch; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 56px; padding: 22px 4px 0; border-top: 1px solid var(--hair); font-size: 14px; color: var(--muted); }
.foot .mono { color: var(--faint); }
.foot a:hover { color: var(--ink); }

/* Mobile contact dock (hidden on desktop, where the sidebar keeps the CTAs visible) */
.dock { display: none; }

/* Intro guard until the entrance animation takes over (fallback timer in <head>) */
.js:not(.ready) .side > *, .js:not(.ready) .intro { opacity: 0; }

/* Responsive */
@media (max-width: 1180px) {
  :root { --side: 390px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .feature-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 1023px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 20px; gap: 0; }
  .side { position: static; height: auto; overflow: visible; padding: 28px 0 8px; }
  .title { font-size: clamp(34px, 9vw, 56px); }
  .menu { display: none; }
  .side-foot { margin-top: 28px; padding-top: 0; }
  .main { padding-top: 28px; }
  .cards, .how { grid-template-columns: minmax(0, 1fr); }
  .exp .ticks { padding-left: 0; }
  .peek { display: none; }
  .dock {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; align-items: center; justify-content: space-between; gap: 6px;
    padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--ink); color: var(--card); box-shadow: 0 20px 40px -14px rgba(40, 30, 20, .5);
    transform: translateY(140%); transition: transform .6s var(--ease);
  }
  .dock.show { transform: translateY(0); }
  .dock-txt { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
  .dock a { height: 38px; padding: 0 16px; display: grid; place-items: center; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .1); }
  .dock a:first-of-type { background: var(--card); color: var(--ink); }
  .foot { padding-bottom: 80px; }
}
@media (max-width: 560px) {
  .exp summary { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; }
  .exp .yr { grid-column: 1; }
  .exp .role { grid-column: 1; }
  .exp .plus { grid-column: 2; grid-row: 1 / span 2; }
  .stack > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .reel-cap { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
