:root {
  --bg: #08090A;
  --surface: #0D0E10;
  --surface-2: #0B0C0E;
  --surface-hover: #111215;
  --text: #EDEEF0;
  --text-strong: #F4F5F6;
  --text-2: #C4C8CE;
  --text-muted: #A0A6AF;
  --text-dim: #80868F;
  --accent: #7CF2C4;
  --accent-glow: rgba(124, 242, 196, 0.22);
  --amber: #F5C26B;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.08);
  --line-3: rgba(255, 255, 255, 0.1);
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.dim { color: var(--text-dim); font-size: 12px; }
.small { font-size: 11px; }
.muted { color: #8E949D; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drift {
  0% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-46%, 24px) scale(1.06); }
  100% { transform: translate(-50%, 0) scale(1); }
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 242, 196, .45); }
  70% { box-shadow: 0 0 0 7px rgba(124, 242, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 242, 196, 0); }
}
.rise { opacity: 0; animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; }
.d4 { animation-delay: .35s; } .d5 { animation-delay: .5s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px;
  font-size: 15px; font-weight: 500;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { color: var(--bg); box-shadow: 0 8px 30px -8px rgba(124, 242, 196, .55); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.02); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); }
.btn-sm { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; background: transparent; }
.btn-lg { height: 54px; padding: 0 26px; border-radius: 14px; font-size: 16px; gap: 12px; }
.arrow { transition: transform .2s ease; }
.btn:hover .arrow, .card:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 10, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.nav-link { color: var(--text-muted); transition: color .2s ease; }
.nav-link:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang {
  display: flex; padding: 3px; border: 1px solid var(--line-3); border-radius: 999px;
  background: #0F1012; font-family: var(--font-mono); font-size: 12px;
}
.lang button {
  min-width: 44px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px;
  cursor: pointer; font: inherit; background: transparent; color: var(--text-muted);
  transition: background-color .2s ease, color .2s ease;
}
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 120px 0 104px; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.glow {
  position: absolute; left: 50%; top: -260px; width: 980px; height: 620px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent);
  filter: blur(40px); pointer-events: none;
  animation: drift 14s ease-in-out infinite;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 10px;
  border: 1px solid var(--line-3); border-radius: 999px; background: rgba(15, 16, 18, 0.8);
  font-size: 13px; color: var(--text-muted); letter-spacing: 0.2px;
}
.eyebrow:hover { color: var(--text); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
.hero-h1 {
  margin-top: 28px; max-width: 920px;
  font-family: var(--font-display); font-weight: 600; font-size: 76px; line-height: 1.02; letter-spacing: -3px;
  color: var(--text-strong); text-wrap: balance;
}
.hero-h1 .line { display: block; text-wrap: balance; }
.hero-sub { margin-top: 28px; max-width: 620px; font-size: 18px; line-height: 1.65; color: var(--text-muted); }
.hero-ctas { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* command palette */
.palette {
  margin-top: 80px; width: 100%; max-width: 680px; text-align: left;
  border: 1px solid var(--line-3); border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 23, 26, 0.92), rgba(13, 14, 16, 0.92));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.palette-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.palette-prompt { font-size: 15px; color: var(--text); }
.caret { width: 2px; height: 18px; margin-left: -8px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.kbd { margin-left: auto; font-size: 11px; color: var(--text-dim); border: 1px solid var(--line-3); border-radius: 6px; padding: 2px 7px; }
.palette-body { padding: 8px; }
.palette-group { padding: 8px 10px 6px; font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-dim); }
.row-item { display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 10px; transition: background-color .15s ease; }
.row-item.is-active, .row-item:hover { background: rgba(255, 255, 255, 0.05); }
.row-num {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line-2); background: #16171A; font-size: 12px; color: var(--accent);
}
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-size: 14px; font-weight: 500; color: var(--text); }
.row-short { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-kbd { margin-left: auto; font-size: 11px; color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: 120px 0; border-top: 1px solid var(--line); }
.stack-56 { display: flex; flex-direction: column; gap: 56px; }
.sec-head { display: flex; flex-direction: column; gap: 20px; }
.sec-head.narrow { max-width: 720px; }
.label { font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent); }
.sec-h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 46px; line-height: 1.08; letter-spacing: -1.6px;
  color: var(--text-strong); text-wrap: balance;
}
.sec-sub { font-size: 17px; line-height: 1.65; color: var(--text-muted); }

/* about */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 64px; }
.about-copy { display: flex; flex-direction: column; gap: 20px; padding-top: 34px; }
.about-copy p { font-size: 17px; line-height: 1.7; color: var(--text-muted); }
.about-copy p.lead { color: var(--text-2); }
.principles {
  margin-top: 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; overflow: hidden;
}
.principle { padding: 32px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.principle h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.3px; color: var(--text); }
.principle p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }

/* cards */
.card {
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface);
  transition: border-color .25s ease, transform .25s ease, background-color .25s ease;
}
.card:hover { border-color: rgba(255, 255, 255, .18); transform: translateY(-2px); background-color: var(--surface-hover); }

/* services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.service { display: flex; flex-direction: column; gap: 18px; padding: 32px; }
.service-top { display: flex; align-items: center; justify-content: space-between; }
.icon-box {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line-3); background: #15161A;
}
.service h3 { margin-top: 8px; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.4px; color: var(--text-strong); }
.service p { font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.service ul {
  margin: 8px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; gap: 10px;
}
.service li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.service li::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 1px; background: var(--accent); }

/* projects */
.proj-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.proj-head .sec-head { max-width: 640px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-muted); }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; display: inline-block; }
.dot-live { background: var(--accent); }
.dot-dev { background: var(--amber); }
.dot-exp { border: 1.5px solid var(--text-muted); }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; overflow: hidden; color: var(--text); }
.project.is-live { --p-dot: var(--accent); --p-bar: rgba(124, 242, 196, 0.55); --p-glow: rgba(124, 242, 196, 0.28); }
.project.is-dev { --p-dot: var(--amber); --p-bar: rgba(245, 194, 107, 0.5); --p-glow: rgba(245, 194, 107, 0.22); }
.project.is-exp { --p-dot: transparent; --p-bar: rgba(255, 255, 255, 0.18); --p-glow: rgba(160, 166, 175, 0.16); }
.project.is-featured { grid-column: 1 / -1; }
.proj-visual {
  position: relative; height: 220px; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background-color: #0A0B0C; background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px; overflow: hidden;
}
.proj-glow {
  position: absolute; left: 50%; top: 100%; width: 420px; height: 260px; transform: translate(-50%, -55%);
  border-radius: 50%; background: radial-gradient(closest-side, var(--p-glow), transparent); filter: blur(20px);
}
.proj-window {
  position: absolute; left: 28px; right: 28px; top: 36px; bottom: -1px;
  border: 1px solid var(--line-3); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: rgba(17, 18, 21, 0.92); display: flex; flex-direction: column;
}
.proj-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.proj-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2A2C31; }
.proj-bar span { margin-left: 10px; font-size: 11px; color: var(--text-dim); }
.proj-lines { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 9px; }
.proj-lines span { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }
.proj-lines span:first-child { background: rgba(255, 255, 255, 0.12); }
.proj-lines span.accent { background: var(--p-bar); }
/* decorative line widths, varied per card (no inline styles: CSP) */
.proj-lines span:nth-child(4) { width: 46%; }
.project:nth-child(4n+1) .proj-lines span:nth-child(1) { width: 58%; }
.project:nth-child(4n+1) .proj-lines span:nth-child(2) { width: 80%; }
.project:nth-child(4n+1) .proj-lines span:nth-child(3) { width: 42%; }
.project:nth-child(4n+2) .proj-lines span:nth-child(1) { width: 62%; }
.project:nth-child(4n+2) .proj-lines span:nth-child(2) { width: 84%; }
.project:nth-child(4n+2) .proj-lines span:nth-child(3) { width: 38%; }
.project:nth-child(4n+3) .proj-lines span:nth-child(1) { width: 48%; }
.project:nth-child(4n+3) .proj-lines span:nth-child(2) { width: 72%; }
.project:nth-child(4n+3) .proj-lines span:nth-child(3) { width: 56%; }
.project:nth-child(4n) .proj-lines span:nth-child(1) { width: 54%; }
.project:nth-child(4n) .proj-lines span:nth-child(2) { width: 80%; }
.project:nth-child(4n) .proj-lines span:nth-child(3) { width: 44%; }
.proj-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.proj-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px;
  border: 1px solid var(--line-3); border-radius: 999px; font-size: 11px; color: var(--text-2);
}
.pill .dot { width: 6px; height: 6px; background: var(--p-dot); }
.project.is-exp .pill .dot { border: 1.5px solid var(--text-muted); }
.project h3 { margin-top: 6px; font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.4px; color: var(--text-strong); }
.project p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.proj-cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); }

/* contact */
.contact-section { padding-bottom: 96px; }
.contact-box {
  position: relative; padding: 72px 48px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 24px;
  background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.contact-box > *:not(.contact-glow) { position: relative; }
.contact-glow {
  position: absolute; left: 50%; bottom: -320px; width: 900px; height: 480px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, var(--accent-glow), transparent);
  filter: blur(30px); pointer-events: none;
}
.contact-h2 { max-width: 720px; font-size: 52px; line-height: 1.06; letter-spacing: -1.8px; }
.contact-box .sec-sub { max-width: 560px; }
.contact-box .btn { margin-top: 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  padding-top: 32px; padding-bottom: 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--text-dim);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }

/* 404 */
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 20px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding: 88px 0 80px; }
  .hero-h1 { font-size: 48px; letter-spacing: -1.8px; }
  .section { padding: 88px 0; }
  .sec-h2, .contact-h2 { font-size: 36px; letter-spacing: -1.2px; }
  .about-copy { padding-top: 0; }
  .palette { margin-top: 56px; }
  .contact-box { padding: 56px 32px; }
}
@media (max-width: 560px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .nav-actions .btn-sm { display: none; }
  .hero { padding: 64px 0; }
  .hero-h1 { font-size: 36px; letter-spacing: -1.2px; line-height: 1.08; }
  .hero-sub { font-size: 16px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { justify-content: center; }
  .palette { display: none; }
  .section { padding: 64px 0; }
  .sec-h2, .contact-h2 { font-size: 30px; letter-spacing: -0.9px; }
  .principle, .service { padding: 24px; }
  .proj-visual { height: 170px; }
  .proj-body { padding: 20px; }
  .contact-box { padding: 44px 20px; border-radius: 18px; }
  .contact-box .btn { width: 100%; justify-content: center; padding: 0 16px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .glow, .caret, .live-dot { animation: none !important; opacity: 1 !important; }
  .card:hover, .btn:hover { transform: none; }
}
