:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #0a1a2f;
  --ink-2: #4a5a70;
  --muted: #8a96a8;
  --line: #e7e3dc;
  --navy: #003a70;
  --blue: #1565c0;
  --orange: #f47d30;
  --orange-2: #ff9a52;
  --grad: linear-gradient(120deg, #003a70 0%, #1565c0 38%, #f47d30 78%, #ffb37a 100%);
  --sans: 'Sora', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  --shadow: 0 24px 60px -24px rgba(10,26,47,.25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d17; --surface: #0f1726; --ink: #eef3fa; --ink-2: #aab6c7; --muted: #75839a; --line: #1e2a3d;
    --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --bg: #070d17; --surface: #0f1726; --ink: #eef3fa; --ink-2: #aab6c7; --muted: #75839a; --line: #1e2a3d;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* nav */
nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(1100px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 26px; }
.links { display: flex; gap: 6px; }
.links a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.links a:hover { background: var(--bg); color: var(--ink); }
.nav-r { display: flex; gap: 8px; align-items: center; }
.theme-t { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 600; font-size: 14.5px; padding: 11px 20px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-grad { background: var(--grad); color: #fff; background-size: 160% 100%; transition: background-position .5s, transform .15s, box-shadow .2s; }
.btn-grad:hover { background-position: 100% 0; box-shadow: 0 12px 30px -10px rgba(244,125,48,.6); transform: translateY(-1px); }
.btn-line { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }

/* hero */
.hero { position: relative; padding: 168px 0 96px; text-align: center; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; z-index: -1; animation: drift 18s ease-in-out infinite alternate; }
.blob.b1 { width: 520px; height: 520px; background: #1565c0; top: -120px; left: -140px; }
.blob.b2 { width: 480px; height: 480px; background: #f47d30; top: 40px; right: -160px; animation-delay: -6s; }
.blob.b3 { width: 380px; height: 380px; background: #ffb37a; bottom: -120px; left: 35%; opacity: .3; animation-delay: -11s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.badge { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); margin-bottom: 28px; box-shadow: 0 6px 20px -12px rgba(10,26,47,.3); }
.badge b { background: var(--grad); color: #fff; padding: 2px 9px; border-radius: 999px; font-weight: 500; font-size: 11px; }
h1 { font-size: clamp(44px, 7.4vw, 96px); line-height: .98; letter-spacing: -.045em; font-weight: 800; max-width: 1000px; margin: 0 auto 26px; }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 640px; margin: 0 auto 44px; }

/* ask box */
.ask { max-width: 760px; margin: 0 auto; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 8px; position: relative; }
.ask::before { content: ""; position: absolute; inset: -2px; border-radius: 26px; background: var(--grad); z-index: -1; opacity: .55; filter: blur(14px); }
.chat { max-height: 320px; overflow-y: auto; padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 12px; }
.chat:empty { display: none; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.55; animation: pop .35s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.u { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.msg.a { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.a .who { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.msg.a .who svg { width: 14px; height: 13px; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 4px; animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-4px); opacity: .4; } }
.ask-row { display: flex; gap: 8px; align-items: center; padding: 6px; }
.ask-row input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 12px 12px; outline: none; }
.ask-row input::placeholder { color: var(--muted); }
.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.chip { font-family: inherit; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s, transform .15s; }
.chip:hover { border-color: var(--orange); color: var(--ink); transform: translateY(-1px); }
.ask-note { text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 16px; }

/* scrolling skills bar */
.skills { padding: 48px 0 0; }
.skills p { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.ticker { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; width: max-content; animation: scroll 50s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { margin-right: 12px; white-space: nowrap; font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.ticker-track span::before { content: "◆"; color: var(--orange); font-size: 9px; margin-right: 8px; vertical-align: 2px; }
@keyframes scroll { to { transform: translateX(-50%); } }

section { padding: 120px 0; }
.sec-k { font-family: var(--mono); font-size: 12.5px; color: var(--orange); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; margin-bottom: 18px; }
.sec-p { font-size: 18px; color: var(--ink-2); max-width: 600px; }
.sec-head { margin-bottom: 56px; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(220px, auto); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile h3 { font-size: 24px; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 10px; }
.tile p { color: var(--ink-2); font-size: 15px; }
.tile .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 22px; background: var(--bg); border: 1px solid var(--line); }
.t1 { grid-column: span 4; grid-row: span 2; background: var(--navy); color: #fff; border-color: var(--navy); }
.t1 p { color: rgba(255,255,255,.75); }
.t1 .ico { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
.t2 { grid-column: span 2; }
.t3 { grid-column: span 2; }
.t4 { grid-column: span 3; }
.t5 { grid-column: span 3; background: var(--grad); color: #fff; border: 0; }
.t5 p { color: rgba(255,255,255,.88); }
.t5 .ico { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.25); }
/* mini flow inside t1 */
.flow { margin-top: 32px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12px; }
.flow div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 14px; text-align: center; }
.flow div b { display: block; font-family: var(--sans); font-size: 14px; margin-bottom: 4px; }
.flow i { font-style: normal; color: var(--orange-2); font-size: 18px; }
.flow .hot { border-color: var(--orange-2); box-shadow: 0 0 0 4px rgba(255,154,82,.15); }

/* numbers */
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.num { padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.num b { display: block; font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.num span { color: var(--ink-2); font-size: 14.5px; }

/* how it gets verified */
.vc { border-radius: 32px; border: 1px solid var(--line); background: var(--surface); padding: 56px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.vc h2 s { text-decoration-color: var(--orange); text-decoration-thickness: 5px; color: var(--muted); }
.vc p { color: var(--ink-2); font-size: 17px; margin-bottom: 14px; }
.vc-list { list-style: none; display: grid; gap: 10px; margin-top: 22px; }
.vc-list li { display: flex; gap: 12px; font-size: 15px; }
.vc-list li::before { content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--grad); }
.diff { border-radius: 20px; background: #0a1a2f; color: #dbe5f2; font-family: var(--mono); font-size: 12.5px; overflow: hidden; box-shadow: var(--shadow); }
.diff-h { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.1); color: #8aa0bb; flex-wrap: wrap; }
.diff-h b { color: var(--orange-2); font-weight: 500; }
.diff pre { padding: 10px 0; overflow-x: auto; line-height: 1.75; }
.diff pre span { display: block; padding: 0 18px; white-space: pre; }
.diff .d { background: rgba(255,90,90,.12); color: #ff9c9c; }
.diff .a { background: rgba(80,220,140,.1); color: #7fe3a8; }
.diff .note { margin: 6px 18px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border-left: 3px solid var(--orange); font-family: var(--sans); font-size: 13.5px; color: #c9d5e4; white-space: normal; }
.diff .note b { display: block; font-family: var(--mono); font-size: 11px; color: var(--orange-2); font-weight: 500; }
.diff-f { padding: 10px 18px; border-top: 1px solid rgba(255,255,255,.1); color: #6f86a3; font-size: 11px; }
@media (max-width: 980px) { .vc { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; } }

/* work */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wcard { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.wcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wcard .vis { height: 180px; position: relative; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: #fff; overflow: hidden; }
.v1 { background: linear-gradient(135deg, #003a70, #1565c0); }
.v2 { background: linear-gradient(135deg, #1565c0, #f47d30); }
.v3 { background: linear-gradient(135deg, #f47d30, #ffb37a); }
.vis pre { font-family: var(--mono); font-size: 12px; line-height: 1.6; opacity: .9; text-align: left; }
.wcard .body { padding: 26px; }
.wcard .tag { font-family: var(--mono); font-size: 11.5px; color: var(--orange); margin-bottom: 10px; letter-spacing: .06em; text-transform: uppercase; }
.wcard h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 10px; }
.wcard p { color: var(--ink-2); font-size: 14.5px; }

.wcard.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.15fr; text-decoration: none; color: inherit; }
.wcard.feature .body { padding: 40px; align-self: center; }
.wcard.feature h3 { font-size: 30px; }
.wcard .v4 { background: linear-gradient(135deg, #003a70, #1565c0 45%, #f47d30); height: auto; min-height: 300px; padding: 36px; }
.mini { width: 100%; max-width: 460px; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); background: #10141c; }
.mini-bar { display: flex; gap: 6px; align-items: center; padding: 9px 12px; background: #e9edf3; }
.mini-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c3cad6; display: block; }
.mini-bar span { margin-left: 8px; font-size: 11px; color: #5a6a80; background: #fff; border-radius: 999px; padding: 2px 10px; }
.mini img { display: block; width: 100%; height: auto; }
@media (max-width: 980px) { .wcard.feature { grid-template-columns: 1fr; } .wcard.feature .body { padding: 28px; } .wcard .v4 { min-height: 0; padding: 24px; } }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.about-img { position: relative; }
.about-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 32px; display: block; }
.about-img::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 32px; background: var(--grad); z-index: -1; }
.sticker { position: absolute; bottom: -22px; left: -16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.sticker b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.about p { font-size: 17.5px; color: var(--ink-2); margin-bottom: 18px; }
.about p strong { color: var(--ink); }

/* cta */
.cta { border-radius: 36px; background: var(--ink); color: var(--bg); padding: 80px 64px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; }
.cta::after { content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%; background: var(--grad); filter: blur(100px); opacity: .45; right: -200px; top: -260px; pointer-events: none; }
.cta h2 { color: var(--bg); position: relative; }
.cta > div > p { opacity: .75; font-size: 18px; position: relative; }
.cta form { position: relative; z-index: 1; display: grid; gap: 12px; }
.cta input, .cta textarea { background: color-mix(in srgb, var(--bg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); border-radius: 16px; padding: 15px 18px; font: inherit; font-size: 15px; outline: none; width: 100%; }
.cta input::placeholder, .cta textarea::placeholder { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.cta input:focus, .cta textarea:focus { border-color: var(--orange); }
.cta textarea { min-height: 120px; resize: vertical; }
.cta .btn { justify-self: start; }
.form-msg { font-size: 14px; color: var(--orange-2); min-height: 20px; }

footer { padding: 48px 0 64px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .links { display: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .t1, .t4, .t5 { grid-column: span 2; }
  .t1 { grid-row: auto; }
  .t2, .t3 { grid-column: span 1; }
  .nums { grid-template-columns: 1fr 1fr; }
  .work, .about, .cta { grid-template-columns: 1fr; }
  .about-img { max-width: 360px; }
  .cta { padding: 48px 28px; gap: 32px; }
  section { padding: 88px 0; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 132px; }
  .bento { grid-template-columns: 1fr; }
  .t1, .t2, .t3, .t4, .t5 { grid-column: auto; }
  .flow { grid-template-columns: 1fr; }
  .flow i { transform: rotate(90deg); justify-self: center; }
  .nav-r .btn { padding: 10px 14px; font-size: 13px; }
  .ticker-track span { font-size: 13.5px; padding: 7px 13px; }
  .tile { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker-track { width: auto; flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .ticker-track .dup { display: none; }
}

/* contact form: spam trap, result colors */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg[data-type="danger"] { color: #c0392b; }
