/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --subtle: #f6f6f4;
  --text: #141414;
  --muted: #5e5e5b;
  --faint: #8a8a86;
  --line: #e8e8e4;
  --line-strong: #d4d4cf;
  --green: #28b04f;

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
svg { display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.i { width: 1em; height: 1em; flex: none; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font-weight: 650; letter-spacing: -0.02em; text-decoration: none; font-size: 17px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--text); }
.nav-icon .i { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { padding-top: 96px; padding-bottom: 24px; }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); letter-spacing: -0.035em; }
.lead { margin-top: 20px; max-width: 620px; font-size: clamp(18px, 2.2vw, 20px); color: var(--muted); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: #333; border-color: #333; }
.btn .i { width: 17px; height: 17px; }

@media (max-width: 600px) { .hero { padding-top: 56px; } .section { padding-top: 72px; } }

/* ---------- Sections ---------- */
.section { padding-top: 96px; }
.section-head { margin-bottom: 28px; }
.section h2 { font-size: clamp(28px, 4vw, 38px); }
.note { margin-top: 20px; font-size: 14px; color: var(--faint); }

/* ---------- Project ---------- */
.project {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface);
}
@media (max-width: 860px) { .project { grid-template-columns: 1fr; } }

.project-preview { display: block; padding: 20px; background: var(--subtle); border-right: 1px solid var(--line); }
@media (max-width: 860px) { .project-preview { border-right: 0; border-bottom: 1px solid var(--line); } }

.project-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 600px) { .project-body { padding: 24px 20px 28px; } }
.project-kind { font-size: 14px; color: var(--muted); }
.project-body h3 { margin-top: 6px; font-size: 28px; letter-spacing: -0.025em; }
.project-body > p:not(.project-kind) { margin-top: 14px; color: var(--muted); }
.project-body .actions { margin-top: 28px; }

.tags { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* Mini desktop preview. Sizes use container units so it scales as one picture. */
.screen {
  position: relative; overflow: hidden; border-radius: 10px;
  aspect-ratio: 16 / 10; background: #2f4858;
  container-type: inline-size;
  border: 1px solid rgba(0, 0, 0, .08);
}
.wallpaper span { position: absolute; border-radius: 50%; }
.wallpaper span:nth-child(1) { width: 62%; aspect-ratio: 1; right: -14%; top: -30%; background: #e8a25a; }
.wallpaper span:nth-child(2) { width: 46%; aspect-ratio: 1; left: -10%; bottom: -36%; background: #d9d1bf; }
.wallpaper span:nth-child(3) { width: 18%; aspect-ratio: 1; left: 38%; top: 40%; background: #3f6a5b; }

.menubar {
  position: absolute; inset: 0 0 auto 0; height: 6cqw;
  display: flex; align-items: center; justify-content: space-between; padding: 0 2.6cqw;
  background: rgba(20, 24, 28, .32);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fff; font-size: 2.3cqw; white-space: nowrap;
}
.menubar-left { display: flex; gap: 2.6cqw; }
.menubar-left span { opacity: .9; }
.pir { font-weight: 600; padding: .1em .5em; border-radius: .3em; background: rgba(255,255,255,.18); }

.island {
  --ev: var(--green);
  position: absolute; left: 50%; top: 10cqw;
  width: 66cqw; height: 12cqw; padding: 0 3.4cqw 0 2.2cqw;
  display: flex; align-items: center; gap: 2cqw;
  border-radius: 999px;
  background: rgba(246, 246, 246, .6);
  backdrop-filter: blur(5cqw) saturate(1.7); -webkit-backdrop-filter: blur(5cqw) saturate(1.7);
  box-shadow: 0 1.4cqw 6cqw rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.35);
  color: #1d1d1f;
  transform: translateX(-50%);
  transition: transform .5s cubic-bezier(.3, .8, .2, 1);
}
.island.hide { transform: translateX(-50%) translateY(-26cqw); }
.island-icon {
  width: 7.5cqw; height: 7.5cqw; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  color: var(--ev); background: color-mix(in srgb, var(--ev) 18%, transparent);
}
.island-icon .i { width: 3.7cqw; height: 3.7cqw; }
.island-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.island-title { font-family: var(--font-round); font-weight: 600; font-size: 2.6cqw; }
.island-sub { font-size: 2cqw; color: rgba(0,0,0,.5); font-weight: 500; }
.island-pct { font-family: var(--font-round); font-weight: 600; font-size: 2.7cqw; font-variant-numeric: tabular-nums; }

.gauge {
  --level: .64; --tint: var(--green);
  position: relative; width: 6.5cqw; height: 3.1cqw; padding: .35cqw; margin-right: .5cqw;
  border: .2cqw solid rgba(0,0,0,.4); border-radius: 1cqw;
}
.gauge::after {
  content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  width: .4cqw; height: 1.1cqw; margin-left: .2cqw; border-radius: 0 2px 2px 0; background: rgba(0,0,0,.4);
}
.gauge-fill {
  display: block; height: 100%; width: calc(var(--level) * 100%); min-width: 12%;
  border-radius: .6cqw; background: var(--tint);
  transition: width .7s cubic-bezier(.3, .7, .2, 1);
}

/* ---------- About ---------- */
.about { padding-bottom: 96px; }
.about p { margin-top: 14px; max-width: 640px; color: var(--muted); font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.footer-inner a { text-underline-offset: 3px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.notfound h1 { font-size: clamp(36px, 6vw, 56px); }
.notfound p { color: var(--muted); }
