:root {
  --bg: #0c0d0c;
  --panel: #131513;
  --panel-2: #191c19;
  --line: #232723;
  --line-2: #323832;
  --text: #e8ebe6;
  --muted: #8c948b;
  --dim: #5a625a;
  --lime: #c6f432;
  --lime-dim: rgba(198,244,50,.12);
  --pink: #ff6ad5;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: "Space Grotesk", system-ui, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%); opacity: .6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
::selection { background: var(--lime); color: #000; }

header.top { position: sticky; top: 0; z-index: 30; background: rgba(12,13,12,.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: var(--mono); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.logo b { background: var(--lime); color: #000; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
header nav { display: flex; gap: 4px; font-family: var(--mono); font-size: 13px; }
header nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); transition: .2s; }
header nav a:hover { color: var(--text); background: var(--panel-2); }
header nav a span { color: var(--lime); }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 96px 0 72px; }
.tag { font-family: var(--mono); font-size: 12px; color: var(--lime); border: 1px solid rgba(198,244,50,.3); background: var(--lime-dim); padding: 5px 10px; border-radius: 6px; display: inline-flex; gap: 8px; align-items: center; }
.tag::before { content: ""; width: 6px; height: 6px; background: var(--lime); border-radius: 50%; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: .95; letter-spacing: -.045em; font-weight: 600; margin: 24px 0 20px; }
.hero h1 .hl { color: var(--lime); }
.hero h1 .stroke { -webkit-text-stroke: 1.5px var(--text); color: transparent; }
.hero p { color: var(--muted); font-size: 18px; max-width: 32em; }
.hero .cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.btn { font-family: var(--mono); font-size: 14px; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--line-2); display: inline-flex; gap: 8px; align-items: center; transition: .2s var(--ease); }
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn.go { background: var(--lime); color: #000; border-color: var(--lime); font-weight: 700; }
.btn.go:hover { box-shadow: 0 0 0 4px var(--lime-dim), 0 10px 30px -8px rgba(198,244,50,.5); }

.term { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(0,0,0,.4); font-family: var(--mono); font-size: 13.5px; }
.term .tb { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.term .tb i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.term .tb i:nth-child(1) { background: #ff5f57; } .term .tb i:nth-child(2) { background: #febc2e; } .term .tb i:nth-child(3) { background: #28c840; }
.term .tb span { margin-left: auto; margin-right: auto; color: var(--dim); font-size: 12px; transform: translateX(-20px); }
.term pre { padding: 20px; min-height: 340px; white-space: pre-wrap; line-height: 1.7; color: #cdd3cb; font-family: inherit; }
.term .p { color: var(--lime); } .term .k { color: var(--pink); } .term .c { color: var(--dim); } .term .s { color: #7dd3fc; }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--lime); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.sec { padding: 80px 0; }
.sec-h { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-h .lbl { font-family: var(--mono); font-size: 13px; color: var(--lime); margin-bottom: 8px; }
.sec-h h2 { font-size: clamp(32px, 4.5vw, 52px); letter-spacing: -.035em; line-height: 1; font-weight: 600; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.filters button { font: inherit; color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 7px 12px; border-radius: 7px; cursor: pointer; transition: .2s; }
.filters button:hover { color: var(--text); border-color: var(--line-2); }
.filters button.on { color: #000; background: var(--lime); border-color: var(--lime); }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.pc { grid-column: span 6; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, transform .4s var(--ease), opacity .3s; position: relative; }
.pc:hover { border-color: var(--line-2); transform: translateY(-3px); }
.pc.hide { display: none; }
.pc .media { aspect-ratio: 16/9; overflow: hidden; position: relative; background: #0a0b0a; border-bottom: 1px solid var(--line); }
.pc .media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease), filter .4s; filter: saturate(.85); }
.pc:hover .media img { transform: scale(1.04); filter: none; }
.pc .media .open { position: absolute; inset: auto 12px 12px auto; font-family: var(--mono); font-size: 12px; background: var(--lime); color: #000; padding: 6px 10px; border-radius: 6px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: .3s var(--ease); }
.pc:hover .media .open { opacity: 1; transform: none; }
.gen { width: 100%; height: 100%; display: grid; place-items: center; position: relative; overflow: hidden; font-family: var(--mono); color: var(--accent); background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 55%), #0a0b0a; }
.gen::before { content: attr(data-code); position: absolute; inset: 16px; font-size: 11px; line-height: 1.6; color: var(--dim); white-space: pre; overflow: hidden; opacity: .6; }
.gen span { position: relative; font-size: 15px; border: 1px solid currentColor; padding: 6px 12px; border-radius: 6px; background: rgba(0,0,0,.6); }
.pc .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.pc .row1 { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.st { display: inline-flex; align-items: center; gap: 6px; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.st.live { color: var(--lime); } .st.live::before { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.st.building { color: var(--pink); } .st.building::before { background: var(--pink); animation: blink 1.4s infinite; }
.pc h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 6px; font-weight: 600; }
.pc p { color: var(--muted); font-size: 15px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 16px; font-family: var(--mono); font-size: 11.5px; }
.stack span { color: var(--muted); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 5px; }
.pc .acts { display: flex; gap: 8px; margin-top: 16px; font-family: var(--mono); font-size: 12.5px; }
.pc .acts a { padding: 7px 11px; border-radius: 6px; border: 1px solid var(--line-2); transition: .2s; position: relative; z-index: 2; }
.pc .acts a:hover { border-color: var(--lime); color: var(--lime); }
.pc .acts a.live { background: var(--text); color: #000; border-color: var(--text); }
.pc .acts a.live:hover { background: var(--lime); border-color: var(--lime); color: #000; }
.pc > a.cover { position: absolute; inset: 0; z-index: 1; }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; position: relative; }
.box::before, .pc::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(360px circle at var(--mx, -100px) var(--my, -100px), rgba(198,244,50,.45), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 3; }
.box .bl { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-bottom: 16px; display: flex; justify-content: space-between; }
.me { grid-column: span 8; display: flex; gap: 28px; align-items: center; }
.me img { width: 120px; height: 120px; border-radius: 22px; object-fit: cover; border: 1px solid var(--line-2); flex-shrink: 0; }
.me .txt { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.me .who b { font-size: 20px; display: block; }
.me .who span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.me p { color: #c3c9c1; font-size: 17px; }
.kv { font-family: var(--mono); font-size: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kv div { border-top: 1px dashed var(--line-2); padding-top: 8px; display: grid; }
.kv span:first-child { color: var(--dim); font-size: 11px; }
.exp { grid-column: span 4; grid-row: span 2; }
.tl { list-style: none; position: relative; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl li { position: relative; padding-left: 28px; padding-bottom: 22px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-2); }
.tl li.now::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 12px var(--lime); }
.tl b { display: block; font-weight: 600; font-size: 15px; }
.tl span { font-size: 13px; color: var(--muted); }
.tl li.now span { color: var(--lime); }
.tl li.gap { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding-bottom: 14px; }
.tl li.gap::before { width: 11px; height: 1px; top: 7px; border: 0; border-radius: 0; background: var(--line-2); }
.tl em { display: block; font-style: normal; font-size: 12px; color: var(--dim); margin-top: 2px; }
.exp .bl + .tl + .bl { margin-top: 28px; }
.sk { grid-column: span 8; }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 28px; }
.skill-groups h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; transition: .2s; }
.chip:hover { border-color: var(--lime); color: var(--lime); }
.chip img { width: 16px; height: 16px; }
.chip img.inv { filter: invert(1); }
.chip .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 8px rgba(198,244,50,.5); }

.contact { text-align: center; padding: 120px 0; }
.contact h2 { font-size: clamp(40px, 7vw, 88px); letter-spacing: -.045em; line-height: 1; margin: 0 0 36px; font-weight: 600; }
.contact h2 span { color: var(--lime); }
.contact .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
footer { border-top: 1px solid var(--line); padding: 24px 0; font-family: var(--mono); font-size: 12px; color: var(--dim); }
footer .wrap { display: flex; justify-content: space-between; }

#case { display: none; }
body.case #home { display: none; }
body.case #case { display: block; }
.case-hero { padding: 56px 0 32px; }
.back { font-family: var(--mono); font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; margin-bottom: 32px; }
.back:hover { color: var(--lime); }
.case-hero h1 { font-size: clamp(40px, 7vw, 84px); letter-spacing: -.045em; line-height: .98; font-weight: 600; margin: 12px 0 16px; }
.case-hero p.lead { color: var(--muted); font-size: 20px; max-width: 36em; }
.meta-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; margin: 36px 0; overflow: hidden; }
.meta-row div { padding: 16px 18px; border-right: 1px solid var(--line); font-size: 15px; }
.meta-row div:last-child { border: 0; }
.meta-row small { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .08em; }
.gallery { display: grid; gap: 16px; }
.gallery figure { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gallery figure img, .gallery figure .gen { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; }
.gallery figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line); }
.gallery.multi { grid-template-columns: repeat(2, 1fr); }
.gallery.multi figure:first-child { grid-column: span 2; }
.case-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 48px 0; }
.case-cols h3 { font-family: var(--mono); font-size: 13px; color: var(--lime); font-weight: 500; margin-bottom: 14px; }
.case-cols p { font-size: 18px; color: #c3c9c1; }
.case-cols ul { list-style: none; display: grid; gap: 10px; }
.case-cols li { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; display: flex; gap: 12px; }
.case-cols li::before { content: "→"; color: var(--lime); font-family: var(--mono); }
.nextprev { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 32px 0 64px; gap: 16px; }
.nextprev a { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.nextprev a b { display: block; font-family: "Space Grotesk"; font-size: 22px; color: var(--text); margin-top: 4px; }
.nextprev a:hover b { color: var(--lime); }

.fade { animation: fade .6s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 960px) {
  .hero, .case-cols { grid-template-columns: 1fr; }
  .pc { grid-column: span 12; }
  .me, .exp, .sk { grid-column: span 12; grid-row: auto; }
  .me { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; }
  .meta-row { grid-template-columns: 1fr 1fr; }
  .meta-row div:nth-child(2) { border-right: 0; }
  .meta-row div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery.multi { grid-template-columns: 1fr; }
  .gallery.multi figure:first-child { grid-column: auto; }
  header nav a:not(:last-child) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
