:root {
  --paper: #e8ede7;
  --paper-deep: #dbe3da;
  --ink: #0f2e27;
  --ink-soft: #46605a;
  --line: #9bb1a6;
  --rule: #c3d0c6;
  --accent: #2b3fa0;
  --map-tint: grayscale(1) sepia(.25) hue-rotate(70deg) saturate(.6) contrast(.95) brightness(1.02);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0f211c;
  --paper-deep: #142a24;
  --ink: #dfe8e1;
  --ink-soft: #9fb3aa;
  --line: #3d5d52;
  --rule: #22403a;
  --accent: #9fb0ff;
  --map-tint: invert(.88) hue-rotate(180deg) grayscale(.7) sepia(.3) hue-rotate(60deg) saturate(.8) brightness(.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 12px; }

.field { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; color: var(--line); pointer-events: none; opacity: .55; }
.field path { fill: none; stroke: currentColor; stroke-width: .6; }
main, .footer { position: relative; z-index: 1; }
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  background: linear-gradient(var(--paper) 55%, transparent);
}
.nav-name { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.nav nav a { text-decoration: none; color: var(--ink-soft); }
.nav nav a:hover { color: var(--ink); }
.theme { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); }
.theme svg { width: 20px; height: 20px; transition: transform .6s var(--ease); }
.theme:hover svg { transform: rotate(180deg); }

.hero {
  position: relative; min-height: 100dvh;
  display: grid; align-items: end;
  padding: 120px var(--gutter) clamp(48px, 8vh, 96px);
  overflow: hidden;
}
.rosette {
  position: absolute; z-index: 0;
  width: min(118vh, 92vw); height: min(118vh, 92vw);
  right: max(-18vw, -260px); top: 50%; transform: translateY(-52%);
  color: var(--line); overflow: visible;
}
.rosette path { fill: none; stroke: currentColor; stroke-width: .7; vector-effect: non-scaling-stroke; }
.rosette path.strong { stroke: var(--ink); stroke-width: 1; opacity: .55; }
.rosette .micro text { fill: var(--ink); font-size: 10.5px; font-weight: 500; font-stretch: 125%; letter-spacing: .08em; opacity: .72; }
.rosette .micro .micro-in { fill: var(--ink-soft); font-size: 9px; opacity: .6; }
.hero-copy { position: relative; z-index: 1; max-width: 60rem; }
.name {
  font-stretch: 125%; font-weight: 300;
  font-size: clamp(3.4rem, 12.5vw, 11.5rem); line-height: .86; letter-spacing: -0.035em;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.name-line { display: block; }
.name-line:nth-child(2) { font-weight: 700; padding-left: .55em; }
.intro { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.45; max-width: 34em; }
.now { margin-top: 14px; color: var(--ink-soft); }

.section { padding: clamp(80px, 14vh, 150px) var(--gutter); }
.section h2 { font-stretch: 112%; font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1; }
.section-note { margin-top: 14px; color: var(--ink-soft); max-width: 40em; }

.projects { list-style: none; padding: 0; margin-top: clamp(36px, 6vh, 60px); border-top: 1px solid var(--rule); }
.project { border-bottom: 1px solid var(--rule); }
.project-head {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr auto 28px; align-items: baseline; gap: 8px 32px;
  padding: clamp(22px, 3.4vh, 34px) 0;
}
.project-title {
  font-stretch: 118%; font-weight: 500; font-size: clamp(1.5rem, 3.6vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em;
  transition: transform .6s var(--ease), color .3s;
}
.project-head:hover .project-title { transform: translateX(12px); color: var(--accent); }
.project-sub { color: var(--ink-soft); white-space: nowrap; }
.project-sign { position: relative; width: 18px; height: 18px; align-self: center; justify-self: end; }
.project-sign::before, .project-sign::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.project-sign::after { transform: rotate(90deg); }
.project-head[aria-expanded="true"] .project-sign::after { transform: rotate(0deg); }
.project-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.project-head[aria-expanded="true"] + .project-panel { grid-template-rows: 1fr; }
.project-inner { overflow: hidden; }
.project-inner > * { max-width: 46rem; }
.project-lead { font-size: 1.2rem; padding-top: 4px; }
.project ul { margin: 18px 0 0; padding-left: 1.1em; display: grid; gap: 10px; color: var(--ink-soft); }
.project li::marker { content: "\2013\00a0\00a0"; color: var(--line); }
.stack { margin: 22px 0 clamp(28px, 4vh, 40px); font-size: .95rem; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(32px, 5vh, 52px); }
.about-text { display: grid; gap: 18px; font-size: 1.15rem; max-width: 36em; }
.facts { display: grid; gap: 22px; align-content: start; }
.facts dt { font-weight: 600; margin-bottom: 4px; }
.facts dd { color: var(--ink-soft); }
.sub-h { margin-top: clamp(64px, 10vh, 110px); font-stretch: 112%; font-weight: 600; font-size: 1.5rem; }
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); margin-top: 28px; }
.tools h4 { font-weight: 600; margin-bottom: 6px; }
.tools p { color: var(--ink-soft); }

.place { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.place > .thread { grid-column: 1 / -1; }
.place-text { display: grid; gap: 18px; max-width: 30em; }
.clock { color: var(--ink-soft); }
.clock span { display: block; color: var(--ink); font-stretch: 125%; font-weight: 300; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; margin-bottom: 6px; }
.map-plate { position: relative; padding: 18px; }
.map-border { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--line); overflow: visible; }
.map-border path { fill: none; stroke: currentColor; stroke-width: .8; vector-effect: non-scaling-stroke; }
.map-frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
.map-frame iframe { position: absolute; left: 0; top: -110px; width: 100%; height: calc(100% + 140px); border: 0; filter: var(--map-tint); }
.map-frame .gmap { position: absolute; inset: 0; }
.thread { display: block; width: 100%; height: 26px; color: var(--line); margin-bottom: clamp(36px, 6vh, 64px); overflow: visible; }
.thread path { fill: none; stroke: currentColor; stroke-width: .8; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease); }
.thread path:nth-child(odd) { stroke: var(--ink); opacity: .35; }
.thread.drawn path, .static .thread path { stroke-dashoffset: 0; }
.map figcaption { margin-top: 12px; text-align: right; font-size: .95rem; }

.contact { padding-bottom: clamp(60px, 10vh, 120px); }
.contact-note { margin-top: 14px; color: var(--ink-soft); }
.email-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; margin-top: clamp(36px, 6vh, 60px); }
.email {
  font-stretch: 118%; font-weight: 400; font-size: clamp(1.7rem, 5.4vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.05;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .7s var(--ease), color .3s;
  overflow-wrap: anywhere;
}
.email:hover { background-size: 100% 2px; }
.copy { color: var(--ink-soft); text-decoration: underline; text-underline-offset: .2em; }
.copy:hover { color: var(--accent); }
.elsewhere { display: flex; gap: 28px; margin-top: 30px; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px var(--gutter) 36px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .95rem; }

@media (max-width: 900px) {
  .about-grid, .place, .tools { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }
  .rosette { width: 130vw; height: 130vw; right: -55vw; top: 34%; opacity: .8; }
}
@media (max-width: 640px) {
  .project-head { grid-template-columns: 1fr 24px; }
  .project-sub { grid-column: 1; grid-row: 2; white-space: normal; }
  .project-sign { grid-row: 1 / 3; grid-column: 2; }
  .tools { grid-template-columns: 1fr; }
  .name-line:nth-child(2) { padding-left: 0; }
  .nav nav a[href="#about"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
