/* ============================================================
   SynkaiTech — shared design system
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-raise: #0b1120;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf4;
  --text-muted: #97a3ba;
  --text-faint: #5c6880;
  --accent-1: #38bdf8;
  --accent-2: #818cf8;
  --accent-3: #c084fc;
  --accent-grad: linear-gradient(100deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 16px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(129, 140, 248, 0.35); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- backdrop: dotted grid + glow ---- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 45% at 70% -8%, rgba(129, 140, 248, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 35% at 12% 8%, rgba(56, 189, 248, 0.10), transparent 60%),
    var(--bg);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 55%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 55%, transparent 90%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- nav ---- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 30px; height: 30px; flex: none;
}
.logo .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
nav.links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
nav.links a { color: var(--text-muted); transition: color 0.2s; }
nav.links a:hover { color: var(--text); }
nav.links a.cta {
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 8px 18px;
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
nav.links a.cta:hover { border-color: var(--accent-2); background: rgba(129, 140, 248, 0.1); }

/* ---- typography helpers ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent-grad);
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.03em; line-height: 1.12; }
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- hero ---- */
.hero { padding: 110px 0 90px; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  max-width: 850px;
  margin: 22px 0 26px;
}
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--text-muted);
  max-width: 640px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--accent-grad);
  color: #06090f;
  box-shadow: 0 8px 30px rgba(99, 130, 248, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99, 130, 248, 0.5); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); background: rgba(129, 140, 248, 0.08); }

/* ---- sections ---- */
section { padding: 88px 0; }
.section-head { margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  margin-top: 18px;
  max-width: 700px;
}
.section-head p { color: var(--text-muted); max-width: 620px; margin-top: 16px; }

/* ---- cards grid ---- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(192,132,252,0.14));
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.015em; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---- chips / tags ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 15px;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--accent-2); }

/* ---- stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

/* ---- timeline (portfolio) ---- */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2) 50%, transparent);
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 56px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-1);
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.12);
}
.tl-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent-1);
  text-transform: uppercase;
}
.tl-item h3 { font-size: 1.35rem; font-weight: 600; margin: 8px 0 4px; }
.tl-item .org { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 16px; }
.tl-item ul { list-style: none; display: grid; gap: 9px; }
.tl-item ul li {
  color: var(--text-muted);
  font-size: 0.96rem;
  padding-left: 22px;
  position: relative;
}
.tl-item ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}
.tl-tags { margin-top: 18px; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
footer a { color: var(--text-muted); transition: color 0.2s; }
footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 24px; }

/* ---- reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  nav.links a:not(.cta) { display: none; }
  .hero { padding: 70px 0 60px; }
  section { padding: 64px 0; }
}
