:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --surface: #17191d;
  --surface-strong: #1d2025;
  --line: #2b2e33;
  --text: #f2f1ed;
  --muted: #a5a5a5;
  --soft: #77797c;
  --accent: #d9b487;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 36px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { color: #171411; background: var(--accent); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.site-shell { width: min(100% - 64px, 760px); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 76px;
}
.identity { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 37%;
  border: 1px solid #34383e;
}
.identity-copy { display: grid; min-width: 0; line-height: 1.35; }
.identity-copy strong { font-size: 16px; font-weight: 650; letter-spacing: -0.025em; }
.identity-copy span { color: var(--muted); font-size: 13px; }
.header-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease;
}
.header-icon:hover { color: var(--text); background: var(--surface); border-color: var(--line); }
.header-icon svg { width: 22px; height: 22px; }
.section { scroll-margin-top: 42px; }
.intro { padding-top: clamp(88px, 14vw, 150px); }
.section-kicker {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-kicker span { display: inline-block; margin-left: 5px; font-size: 16px; vertical-align: -1px; }
.intro-title, .contact-title {
  max-width: 750px;
  margin: 0;
  font-size: clamp(42px, 7.2vw, 72px);
  line-height: 1.09;
  letter-spacing: -.075em;
  font-weight: 620;
}
.intro-title em, .contact-title em { color: var(--accent); font-style: normal; }
.intro-copy {
  max-width: 610px;
  margin-top: 38px;
  color: #c3c3c1;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.75;
  letter-spacing: -.01em;
}
.intro-copy p { margin: 0 0 22px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 5px;
  color: var(--text);
  border-bottom: 1px solid #6b655d;
  font-size: 14px;
  font-weight: 600;
  transition: color .22s ease, border-color .22s ease;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link span, .contact-email span, .social-links span { transition: transform .22s ease; }
.text-link:hover span, .contact-email:hover span, .social-links a:hover span { transform: translate(2px, -2px); }
.work { padding-top: clamp(125px, 18vw, 210px); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 25px;
}
.section-heading h2 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.04em; }
.section-heading > span { color: var(--soft); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.project-list { border-top: 1px solid var(--line); }
.project-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 12px;
  padding: 28px 8px 29px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease, padding-left .25s ease;
}
.project-link:hover, .project-link:focus-visible { padding-left: 12px; background: #141619; }
.project-number { padding-top: 4px; color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.project-copy { display: grid; gap: 5px; }
.project-copy strong { font-size: 20px; font-weight: 620; line-height: 1.35; letter-spacing: -.035em; }
.project-copy > span { max-width: 510px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.project-arrow { color: var(--soft); font-size: 20px; line-height: 1.4; text-align: right; transition: color .22s ease, transform .22s ease; }
.project-link:hover .project-arrow { color: var(--accent); transform: translate(3px, -3px); }
.about { padding-top: clamp(145px, 18vw, 210px); }
.about-lead { max-width: 700px; margin: 0 0 23px; font-size: clamp(30px, 4vw, 42px); line-height: 1.3; letter-spacing: -.055em; font-weight: 500; }
.about-copy { max-width: 610px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 29px; }
.focus-tags span, .project-pills span {
  padding: 6px 12px;
  border: 1px solid #38393a;
  border-radius: 999px;
  color: #b8b8b6;
  font-size: 12px;
  line-height: 1.3;
}
.contact { padding-top: clamp(150px, 19vw, 230px); padding-bottom: 115px; }
.contact-title { font-size: clamp(46px, 7vw, 68px); }
.contact > p:not(.section-kicker) { margin: 24px 0 28px; color: var(--muted); font-size: 17px; }
.contact-email {
  display: inline-flex;
  align-items: baseline;
  gap: 15px;
  max-width: 100%;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  font-size: clamp(16px, 3vw, 24px);
  font-weight: 550;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  transition: color .22s ease;
}
.contact-email:hover { color: var(--accent); }
.contact-email span { flex: none; font-size: 18px; }
.social-links { display: flex; gap: 28px; margin-top: 33px; }
.social-links a { display: inline-flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: 14px; transition: color .22s ease; }
.social-links a:hover { color: var(--text); }
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 23px 0 140px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px;
}
.dock {
  position: fixed;
  z-index: 20;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid #383737;
  border-radius: 999px;
  background: rgba(24, 23, 23, .88);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.dock a {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #a5a4a2;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dock a:hover { color: var(--text); transform: translateY(-2px); }
.dock a[aria-current="location"] {
  border-color: #6a4c32;
  color: #eac59a;
  background: #2a211c;
  box-shadow: 0 0 19px rgba(206, 135, 66, .23);
}
.dock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.project-page .site-shell { width: min(100% - 64px, 760px); }
.project-main { padding-top: 84px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; transition: color .2s ease; }
.back-link:hover { color: var(--accent); }
.project-eyebrow { margin: 72px 0 15px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.project-title { margin: 0; font-size: clamp(48px, 8vw, 86px); line-height: 1.06; letter-spacing: -.075em; font-weight: 620; }
.project-summary { max-width: 630px; margin: 20px 0 0; color: #c6c5c1; font-size: clamp(18px, 2.5vw, 22px); line-height: 1.6; letter-spacing: -.015em; }
.project-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.project-feature {
  display: grid;
  place-items: center;
  min-height: 340px;
  margin: 62px 0 0;
  overflow: hidden;
  border: 1px solid #35383c;
  border-radius: var(--radius);
  background: #181b20;
}
.project-feature img { width: 100%; max-height: 560px; object-fit: contain; }
.project-feature figcaption { width: 100%; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--soft); font-size: 12px; }
.project-feature.terminal { padding: 50px 28px; background: #111820; }
.project-feature.terminal pre { width: 100%; max-width: 600px; margin: 0; color: #d8e6eb; font: 14px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.project-feature.terminal .prompt { color: #9bd1b1; }
.project-feature.network { min-height: 370px; padding: 40px; }
.network-diagram { display: grid; grid-template-columns: 1fr 90px 1fr; align-items: center; width: min(100%, 550px); gap: 12px; }
.network-clients { display: grid; gap: 14px; }
.network-node { padding: 16px; border: 1px solid #485057; border-radius: 10px; background: #20252a; color: #dce0df; font: 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.network-lines { height: 2px; background: linear-gradient(90deg, #527769, var(--accent)); }
.network-server { padding: 26px 12px; border-color: #a07c54; }
.project-story { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 64px 0 0; }
.project-story h2 { margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: -.03em; }
.project-story p, .project-story li { color: var(--muted); font-size: 16px; line-height: 1.8; }
.project-story p { margin: 0 0 18px; }
.project-story ul { margin: 0; padding-left: 19px; }
.project-story li + li { margin-top: 10px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 55px; }
.action-link { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid #514b42; border-radius: 999px; font-size: 14px; transition: border-color .2s ease, background-color .2s ease; }
.action-link:hover { border-color: var(--accent); background: #26221e; }
.next-project { display: flex; justify-content: space-between; gap: 20px; margin: 125px 0 95px; padding-top: 22px; border-top: 1px solid var(--line); }
.next-project span { color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.next-project a { font-size: 20px; font-weight: 600; letter-spacing: -.04em; transition: color .2s ease; }
.next-project a:hover { color: var(--accent); }

html.motion-ready .reveal { opacity: 0; transform: translate3d(0, 17px, 0); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
html.motion-ready .reveal.is-visible { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .site-shell, .project-page .site-shell { width: min(100% - 42px, 760px); }
  .site-header { padding-top: 37px; }
  .avatar { width: 44px; height: 44px; }
  .identity-copy strong { font-size: 14px; }
  .identity-copy span { font-size: 11px; }
  .intro { padding-top: 95px; }
  .intro-copy { margin-top: 28px; }
  .work { padding-top: 140px; }
  .project-link { grid-template-columns: 25px minmax(0, 1fr) 20px; gap: 8px; padding: 23px 0; }
  .project-copy strong { font-size: 18px; }
  .project-copy > span { font-size: 14px; }
  .about, .contact { padding-top: 150px; }
  .site-footer { padding-bottom: 120px; }
  .project-main { padding-top: 68px; }
  .project-eyebrow { margin-top: 58px; }
  .project-feature { margin-top: 43px; min-height: 240px; }
  .project-story { grid-template-columns: 1fr; gap: 11px; padding-top: 47px; }
  .network-diagram { grid-template-columns: 1fr 30px 1fr; gap: 4px; }
  .network-node { padding: 10px 4px; font-size: 10px; }
  .next-project { margin-top: 95px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html.motion-ready .reveal { opacity: 1; transform: none; }
}
