/* ===== Tokens ===== */
:root {
  --bg: #000000;
  --bg-2: #060607;
  --panel: rgba(13, 13, 16, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --txt: #f5f5f7;
  --muted: #8c8c94;
  --muted-2: #5a5a61;
  --white: #ffffff;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Background ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 420px at 50% -8%, rgba(255, 255, 255, 0.12), transparent 70%),
    radial-gradient(600px 600px at 85% 8%, rgba(255, 255, 255, 0.04), transparent 70%);
}

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 18px; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding: 0 16px;
}
.nav-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 7px 7px 14px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.scrolled .nav-pill { background: rgba(10, 10, 12, 0.85); border-color: var(--line-2); }
.nav-logo { display: inline-flex; align-items: center; gap: 9px; padding-right: 4px; }
.nav-brand { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.logo-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #8c8c94 75%, #4a4a50);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}
.nav-links { display: flex; gap: 2px; margin: 0 6px; }
.nav-link {
  display: block; font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 999px; transition: 0.2s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #000; font-weight: 600; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; transition: 0.2s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255, 255, 255, 0.25); }
.nav-cta .i { font-size: 16px; flex: none; }
.btn .arrow { flex: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14px; padding: 13px 22px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: 0.22s var(--ease);
}
.btn .i { font-size: 18px; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 255, 255, 0.18); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: #fff; border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-lg { padding: 16px 30px; font-size: 15px; border-radius: 14px; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 150px 20px 90px; overflow: hidden;
}
.hero-inner { position: relative; z-index: 5; text-align: center; max-width: 760px; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; color: #d4d4d8; letter-spacing: 0.02em;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 30px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}
.hero-title {
  display: block; max-width: 96vw; margin-left: auto; margin-right: auto;
  font-size: clamp(52px, 12.5vw, 150px); line-height: 0.9;
  font-weight: 800; letter-spacing: -0.035em; margin-bottom: 26px;
  background: linear-gradient(180deg, #fff 28%, #9a9aa0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.65;
  max-width: 560px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Floating cards ===== */
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.float-card {
  position: absolute; width: 234px; padding: 14px;
  background: var(--panel);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  will-change: transform; animation: floaty 7s ease-in-out infinite;
}
.fc-tl { top: 13%; left: 4%; }
.fc-bl { bottom: 15%; left: 6%; animation-delay: -2.2s; }
.fc-tr { top: 12%; right: 4%; width: 218px; animation-delay: -1.1s; }
.fc-br { bottom: 13%; right: 4%; width: 312px; animation-delay: -3.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.fc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.fc-label { font-size: 11px; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0.02em; }
.fc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.fc-dot.on { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }

.fc-list { display: flex; flex-direction: column; gap: 5px; }
.fc-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: #cfcfd4;
  padding: 8px 10px; border-radius: 9px; border: 1px solid transparent;
}
.fc-item .i { font-size: 15px; color: var(--muted); }
.fc-item.sel { background: rgba(255, 255, 255, 0.08); border-color: var(--line-2); color: #fff; }
.fc-item.sel .i { color: #fff; }
.fc-tag {
  margin-left: auto; font-size: 10px; color: var(--muted);
  border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
}

.flow { display: flex; flex-direction: column; gap: 7px; }
.flow-step {
  position: relative; font-size: 12px; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: #cfcfd4;
  font-family: "JetBrains Mono", monospace;
}
.flow-step.muted { color: var(--muted); }
.flow-step.active { background: rgba(255, 255, 255, 0.07); border-color: var(--line-2); color: #fff; }
.flow-step.add { color: var(--muted-2); border-style: dashed; }
.flow-badge {
  position: absolute; top: -9px; right: 10px;
  font-size: 9px; color: #000; background: #fff; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; font-family: "Inter", sans-serif;
}

.mini { display: flex; align-items: center; gap: 10px; padding: 9px 7px; border-radius: 10px; }
.mini + .mini { border-top: 1px solid var(--line); }
.mini-ico {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 16px;
}
.mini-t { font-size: 12.5px; font-weight: 600; color: #fff; }
.mini-s { font-size: 10.5px; color: var(--muted); font-family: "JetBrains Mono", monospace; }

/* terminal */
.term-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.term-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #fff; font-family: "JetBrains Mono", monospace; }
.blink { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.term-body { display: flex; flex-direction: column; gap: 4px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; line-height: 1.5; }
.term-line { display: flex; align-items: center; gap: 6px; color: #d0d0d4; white-space: nowrap; }
.t-time { color: var(--muted-2); }
.t-tag { color: #000; background: #b9b9bf; border-radius: 4px; padding: 1px 5px; font-size: 9.5px; font-weight: 700; }
.t-tag.info { background: #6c6c73; color: #fff; }
.t-tag.ok { background: #fff; }
.term-foot {
  display: flex; justify-content: space-between; margin-top: 11px; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); font-family: "JetBrains Mono", monospace;
}
.term-foot b { color: #fff; font-weight: 600; }

/* ===== Sections ===== */
.section { max-width: 1180px; margin: 0 auto; padding: 46px 20px; scroll-margin-top: 96px; }
.contact { scroll-margin-top: 96px; }
.sec-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #0a0a0c, #060607);
  border: 1px solid var(--line); border-radius: 30px;
  padding: 64px 48px;
}
.sec-card.alt { background: linear-gradient(180deg, #0c0c0e, #070708); }
.sec-watermark {
  position: absolute; bottom: -18px; left: 30px; z-index: 0;
  font-size: clamp(90px, 16vw, 190px); font-weight: 800; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.028); pointer-events: none; user-select: none; line-height: 1;
}
.sec-head {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 30px; margin-bottom: 44px; flex-wrap: wrap;
}
.sec-title { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.025em; max-width: 540px; line-height: 1.04; }
.sec-desc { color: var(--muted); max-width: 350px; font-size: 15px; line-height: 1.6; }

/* ===== Stack grid ===== */
.stack-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack-card {
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; transition: 0.28s var(--ease);
}
.stack-card:hover { transform: translateY(-5px); border-color: var(--line-2); background: rgba(255, 255, 255, 0.045); }
.sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.sc-icon {
  display: grid; place-items: center; width: 46px; height: 46px; font-size: 22px;
  border-radius: 13px; color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line-2);
}
.sc-num { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--muted-2); }
.sc-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.sc-text { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12px; color: #d4d4d8; font-family: "JetBrains Mono", monospace;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  padding: 5px 10px; border-radius: 8px;
}

/* ===== Portfolio ===== */
.pf-card { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; }
.pf-preview {
  aspect-ratio: 16 / 11; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(120% 100% at 50% 0%, #161618, #0a0a0c);
  display: grid; place-items: center; padding: 26px;
}
.pf-mock {
  width: 210px; background: #0e0e10; border: 1px solid var(--line-2);
  border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.pf-mock-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px; color: #fff; background: rgba(255, 255, 255, 0.03);
}
.pf-mock-back, .pf-mock-dots { color: var(--muted); }
.pf-mock-title { font-weight: 600; }
.pf-mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.pf-prod { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 10px; padding: 7px; }
.pf-prod-img { height: 36px; border-radius: 7px; background: linear-gradient(135deg, #2a2a2e, #141416); margin-bottom: 7px; }
.pf-prod-line { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.pf-prod-line.sm { width: 60%; margin-top: 5px; background: rgba(255, 255, 255, 0.09); }
.pf-mock-cta { margin: 0 12px 14px; text-align: center; font-size: 11px; font-weight: 700; color: #000; background: #fff; padding: 9px; border-radius: 9px; }
.pf-kind { display: inline-block; font-size: 11px; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; }
.pf-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.pf-text { color: var(--muted); font-size: 15px; line-height: 1.65; margin-bottom: 20px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; }
.pf-link { width: fit-content; }

/* ===== Contact ===== */
.contact { position: relative; text-align: center; padding: 90px 20px 70px; }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact .badge { margin-bottom: 24px; }
.contact-title {
  font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 16px;
  background: linear-gradient(180deg, #fff, #8f8f96); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-sub { color: var(--muted); font-size: 17px; margin-bottom: 34px; }

/* ===== Email form ===== */
.email-form {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: 520px; margin: 0 auto;
}
.email-input {
  flex: 1 1 260px; min-width: 0;
  font-family: inherit; font-size: 15px; color: #fff;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  transition: 0.2s var(--ease);
}
.email-input::placeholder { color: var(--muted-2); }
.email-input:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.07); }
.email-input.invalid { border-color: #ff6b6b; }
.email-submit { flex: 0 0 auto; }
.email-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.form-msg {
  min-height: 20px; margin-top: 16px; font-size: 14px; color: var(--muted);
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.form-msg.show { opacity: 1; }
.form-msg.ok { color: #6ee7a8; }
.form-msg.err { color: #ff8585; }

@media (max-width: 520px) {
  .email-form { flex-direction: column; }
  .email-input { flex: none; width: 100%; }
  .email-submit { width: 100%; justify-content: center; }
}

/* ===== Footer ===== */
.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  max-width: 1180px; margin: 0 auto; padding: 30px 20px 50px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.foot-mono { font-family: "JetBrains Mono", monospace; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stack-grid .reveal.in:nth-child(2) { transition-delay: 0.08s; }
.stack-grid .reveal.in:nth-child(3) { transition-delay: 0.16s; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .floaters { display: none; }
  .hero { min-height: auto; padding: 150px 20px 70px; }
}
@media (max-width: 920px) {
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .pf-card { grid-template-columns: 1fr; gap: 26px; }
  .pf-preview { max-width: 360px; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-pill { width: calc(100% - 0px); justify-content: space-between; }
  .hero { padding: 120px 18px 60px; }
  .hero-sub { font-size: 16px; }
  .sec-card { padding: 40px 22px; border-radius: 24px; }
  .stack-grid { grid-template-columns: 1fr; }
  .sec-head { margin-bottom: 30px; gap: 14px; }
  .sc-top { margin-bottom: 26px; }
  .section { padding: 30px 16px; }
  .contact { padding: 64px 18px 56px; }
  .footer { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .nav { top: 12px; padding: 0 12px; }
  .nav-pill { padding: 6px 6px 6px 12px; gap: 4px; }
  .nav-brand { font-size: 14px; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
  .nav-cta .arrow { display: none; }
  .hero { padding: 100px 16px 48px; }
  .hero-title { font-size: clamp(46px, 16vw, 84px); margin-bottom: 22px; }
  .badge { margin-bottom: 22px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .sec-card { padding: 30px 18px; }
  .sec-title { font-size: 28px; }
  .stack-card { padding: 20px; }
  .sc-top { margin-bottom: 22px; }
  .contact-sub { font-size: 15px; }
  .email-input { padding: 15px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .float-card { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
