:root {
  --bg: #0c0a09;
  --bg-2: #171210;
  --ink: #e98648;
  --muted: #b99d8d;
  --line: rgba(255, 179, 138, 0.26);
  --peach: #F9F9FB;
  --peach-2: #0284C7;
  --peach-3: #ffd2b8;
  --f-display: "Press Start 2P", "Courier New", monospace;
  --f-body: "Pixelify Sans", "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 19px; line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; }
.lab { font-family: var(--f-body); font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(16px, 3.6vw, 34px); line-height: 1.45; color: var(--peach); }
h3 { font-size: 13px; line-height: 1.7; color: var(--ink); }
p { margin: 0; max-width: 62ch; }

/* cursor canvas */
#swarm { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 50; pointer-events: none; image-rendering: pixelated; image-rendering: crisp-edges; }

/* top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: rgba(12, 10, 9, 0.9); backdrop-filter: blur(6px); border-bottom: 2px solid var(--line); }
.bar::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--peach); }
.bar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { font-family: var(--f-display); font-size: 13px; text-decoration: none; flex: none; color: var(--peach); }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-family: var(--f-body); font-weight: 600; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 9px 10px; white-space: nowrap; }
.nav a:hover { color: var(--bg); background: var(--peach); }
.clock { flex: none; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .clock { display: none; } }

/* hero */
.hero { position: relative; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 64px max(16px, env(safe-area-inset-left, 0px)) 64px; overflow: hidden; border-bottom: 2px solid var(--line); }
@media (max-width: 760px) { .hero { padding-bottom: 200px; } }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.hero-in { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; display: grid; gap: 26px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 2px solid var(--line); background: rgba(12, 10, 9, 0.7); font-family: var(--f-body); font-weight: 600; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.chip b { width: 8px; height: 8px; display: inline-block; background: var(--peach); }
.chip:nth-child(2) b { background: var(--peach-2); }
.chip:nth-child(3) b { background: var(--peach-3); }
.big-word { font-family: var(--f-display); font-size: clamp(20px, 9.6vw, 112px); line-height: 1.1; white-space: nowrap; cursor: default; user-select: none; }
.big-word span { display: inline-block; color: rgba(255, 179, 138, calc(var(--n, 0) * 0.85)); -webkit-text-stroke: 2px var(--peach); transform: translateY(calc(var(--n, 0) * -0.1em)); animation: drop 0.6s steps(6) backwards; animation-delay: calc(var(--i) * 80ms + 200ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-0.5em); } }
.hello { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hello .say { font-family: var(--f-body); font-weight: 700; font-size: clamp(22px, 3vw, 30px); color: var(--ink); }
.tagblock { display: inline-block; background: var(--peach); color: var(--bg); padding: 10px 16px; transform: rotate(-2deg); box-shadow: 5px 5px 0 var(--peach-2); }
.tagblock h1 { font-size: clamp(20px, 5vw, 44px); line-height: 1.2; color: var(--bg); }
.typed { font-family: var(--f-body); font-weight: 600; font-size: clamp(18px, 2.4vw, 24px); color: var(--peach); min-height: 1.6em; letter-spacing: 0.06em; }
.typed i { display: inline-block; width: 0.55em; height: 1em; background: var(--peach); vertical-align: -0.12em; margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.4; max-width: 34ch; }
.lede em { font-style: normal; color: var(--peach); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border: 2px solid var(--peach); text-decoration: none; font-family: var(--f-body); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; background: transparent; color: var(--peach); cursor: pointer; box-shadow: 4px 4px 0 var(--peach-2); transition: transform 0.12s steps(2), box-shadow 0.12s steps(2); }
.btn:hover { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--peach-2); }
.btn.primary { background: var(--peach); color: var(--bg); }

/* sections */
section { padding-block: 92px 8px; }
.head { display: grid; gap: 16px; margin-bottom: 40px; }
.head p { color: var(--muted); font-size: 20px; }

/* scroll reveal */
.rv-on .rv { opacity: 0; transform: translateY(28px); transition: opacity 0.6s steps(6), transform 0.6s steps(6); }
.rv-on .rv.in { opacity: 1; transform: none; }
.rv-on .split:not(.in) { visibility: hidden; }
.ghost { visibility: hidden; }
.caret { display: inline-block; width: 0.55em; height: 1em; background: var(--peach); vertical-align: -0.14em; margin-left: 2px; animation: blink 0.9s steps(1) infinite; }
.pop { animation: pop 0.35s steps(5) backwards; animation-delay: calc(var(--d, 0) * 60ms); }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* about */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-text { display: grid; gap: 18px; font-size: 20px; color: #f1d9c9; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.stat { background: var(--bg-2); padding: 22px 18px; display: grid; gap: 10px; min-width: 0; }
.stat strong { font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 3.2vw, 32px); color: var(--peach); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; gap: 32px; } }

/* portrait */
.side { display: grid; gap: 20px; min-width: 0; }
.portrait { margin: 0; display: grid; gap: 10px; min-width: 0; }
.portrait canvas { width: 100%; aspect-ratio: 4 / 5; display: block; border: 2px solid var(--peach); background: var(--peach-2); box-shadow: 6px 6px 0 var(--peach-2); image-rendering: pixelated; image-rendering: crisp-edges; }
.portrait figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.upl { font-family: var(--f-body); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 10px; border: 2px solid var(--line); background: transparent; color: var(--peach); cursor: pointer; }
.upl:hover { background: var(--peach); color: var(--bg); border-color: var(--peach); }

/* flight log */
.log { border-top: 2px solid var(--line); }
.entry { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 28px 0; border-bottom: 2px solid var(--line); }
.entry .what { display: grid; gap: 12px; min-width: 0; }
.entry .what p { color: var(--muted); }
.tag { display: inline-block; justify-self: start; padding: 3px 10px; font-family: var(--f-body); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; background: var(--peach); color: var(--bg); }
.tag.b { background: var(--peach-2); } .tag.c { background: var(--peach-3); }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; gap: 8px; } }

/* projects */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filters button { font-family: var(--f-body); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 14px; border: 2px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.filters button:hover { color: var(--ink); border-color: var(--peach); }
.filters button[aria-pressed="true"] { background: var(--peach); color: var(--bg); border-color: var(--peach); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card { position: relative; padding: 24px; border: 2px solid var(--line); background: var(--bg-2); display: grid; gap: 14px; align-content: start; min-width: 0; box-shadow: 6px 6px 0 rgba(255, 143, 102, 0.35); transition: transform 0.15s steps(3), box-shadow 0.15s steps(3), border-color 0.15s; }
.card:hover { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--peach-2); border-color: var(--peach); }
.card .meta { display: flex; justify-content: space-between; gap: 10px; }
.card p { color: var(--muted); font-size: 18px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { font-family: var(--f-body); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; padding: 2px 8px; border: 2px solid var(--line); color: var(--peach-3); }
.card a.go { font-family: var(--f-body); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--peach); justify-self: start; border-bottom: 2px solid var(--peach); }
.card a.go:hover { color: var(--bg); background: var(--peach); }

/* skills */
.bench { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.bench > div { padding: 22px; border: 2px solid var(--line); display: grid; gap: 16px; align-content: start; min-width: 0; }
.bench ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bench li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 18px; }
.dots { display: inline-flex; gap: 3px; flex: none; }
.dots i { width: 9px; height: 9px; background: rgba(255, 179, 138, 0.2); }
.dots i.on { background: var(--peach); }

/* bulletin */
.bulletin { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.lead { padding: 30px; border: 2px solid var(--peach); background: linear-gradient(180deg, rgba(255, 179, 138, 0.16), rgba(255, 143, 102, 0.04)); display: grid; gap: 16px; align-content: end; min-height: 300px; box-shadow: 6px 6px 0 var(--peach-2); }
.lead h3 { font-size: clamp(14px, 2vw, 18px); line-height: 1.7; }
.lead p { color: #f1d9c9; }
.feed { display: grid; gap: 14px; align-content: start; }
.feed article { padding: 18px 20px; border: 2px solid var(--line); display: grid; gap: 8px; }
.feed article p { color: var(--muted); font-size: 18px; }
@media (max-width: 800px) { .bulletin { grid-template-columns: 1fr; } .lead { min-height: 0; } }

/* faq */
.faq { border-top: 2px solid var(--line); }
details { border-bottom: 2px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-display); font-size: clamp(10px, 1.7vw, 13px); line-height: 1.8; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--peach); flex: none; }
details[open] summary::after { content: "-"; }
details p { padding: 0 0 22px; color: var(--muted); }

/* contact */
.contact { display: grid; gap: 22px; padding: 44px; border: 2px solid var(--peach); background: var(--bg-2); box-shadow: 8px 8px 0 var(--peach-2); }
.contact h2 { max-width: 18ch; }
.mail { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mail code { font-family: var(--f-body); font-weight: 600; font-size: 17px; padding: 10px 16px; border: 2px dashed var(--line); user-select: all; overflow-wrap: anywhere; color: var(--peach-3); }
.social { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.social a { font-family: var(--f-body); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 2px solid var(--line); }
.social a:hover { color: var(--bg); background: var(--peach); border-color: var(--peach); }
@media (max-width: 560px) { .contact { padding: 26px 18px; } }

/* footer */
footer { margin-top: 96px; padding-block: 32px 40px; border-top: 2px solid var(--line); display: grid; gap: 28px; }
.big { font-family: var(--f-display); font-size: clamp(36px, 16vw, 210px); line-height: 1.1; color: transparent; -webkit-text-stroke: 2px rgba(255, 179, 138, 0.5); cursor: default; white-space: nowrap; overflow: hidden; padding-bottom: 0.1em; }
.big span { display: inline-block; transition: transform 0.2s steps(3), color 0.2s steps(2), -webkit-text-stroke-color 0.2s; }
.big span:hover { transform: translateY(-0.12em); color: var(--peach); -webkit-text-stroke-color: var(--peach); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.calm { scroll-behavior: auto; }
.calm *, .calm *::before, .calm *::after { transition: none !important; animation: none !important; }
.calm #swarm { display: none; }