:root {
  --bg: #f6f8fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #94a3b8;
  --accent: #0e7490;
  --accent-2: #155e75;
  --accent-soft: rgba(14, 116, 144, .1);
  --on-accent: #ffffff;
  --ok: #16a34a;
  --term-bg: #0b1220;
  --term-text: #cbd5e1;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b14;
    --bg-2: #0b1220;
    --surface: #0f172a;
    --border: #1e293b;
    --text: #e2e8f0;
    --text-2: #94a3b8;
    --muted: #64748b;
    --accent: #22d3ee;
    --accent-2: #67e8f9;
    --accent-soft: rgba(34, 211, 238, .1);
    --on-accent: #04121a;
    --ok: #4ade80;
    --term-bg: #020617;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b14;
  --bg-2: #0b1220;
  --surface: #0f172a;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --muted: #64748b;
  --accent: #22d3ee;
  --accent-2: #67e8f9;
  --accent-soft: rgba(34, 211, 238, .1);
  --on-accent: #04121a;
  --ok: #4ade80;
  --term-bg: #020617;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  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);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { font-family: var(--mono); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); } }
.nav__links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; color: var(--text-2); }
.nav__links a:hover { color: var(--accent); }
.nav__actions { display: flex; gap: 8px; }
.chip {
  font: 600 13px/1 var(--mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  height: 36px; min-width: 36px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--icon { padding: 0; }
.chip svg { width: 18px; height: 18px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.nav__menu { display: none; }
@media (max-width: 767px) {
  .nav__menu { display: inline-flex; }
  .nav__actions { margin-left: auto; }
  .nav__links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; transition: .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn--primary, .btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(600px 300px at 85% 10%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 48px;
  background-blend-mode: normal;
  position: relative;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, var(--bg)); pointer-events: none; }
.hero__grid { display: grid; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.1fr 1fr; } }
.eyebrow { color: var(--accent); font-size: 14px; margin-bottom: 12px; }
.prompt { color: var(--accent); }
.hero h1 { font-size: clamp(40px, 7vw, 68px); font-weight: 800; letter-spacing: -.03em; }
.hero__role { font-family: var(--mono); font-size: clamp(15px, 2.2vw, 18px); color: var(--text-2); margin: 12px 0 20px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--text-2); max-width: 56ch; }
.lead strong { color: var(--text); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta--center { justify-content: center; }
.socials { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.socials a:hover { color: var(--accent); border-color: var(--accent); }

.terminal { background: var(--term-bg); border: 1px solid #1e293b; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.terminal__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #1e293b; }
.terminal__bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.terminal__bar span:nth-child(1) { background: #f87171; }
.terminal__bar span:nth-child(2) { background: #fbbf24; }
.terminal__bar span:nth-child(3) { background: #4ade80; }
.terminal__bar em { margin-left: 8px; font-style: normal; font-size: 12px; color: #64748b; }
.terminal pre { margin: 0; padding: 18px; color: var(--term-text); font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.terminal .prompt { color: #22d3ee; }
.terminal .ok { color: #4ade80; }
.cursor { display: inline-block; width: 8px; height: 15px; background: #22d3ee; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section__title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.num { font-size: 14px; color: var(--accent); font-weight: 600; }
.section__sub { color: var(--text-2); margin-bottom: 36px; max-width: 64ch; }

.about { display: grid; gap: 32px; align-items: start; }
@media (min-width: 768px) { .about { grid-template-columns: 160px 1fr; gap: 48px; } }
.avatar { width: 160px; height: 160px; border-radius: 20px; object-fit: cover; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
.about p { color: var(--text-2); max-width: 68ch; }
.tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 13px/1 var(--mono); padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.tags--sm li { font-size: 12px; padding: 6px 8px; }

/* Projects */
.projects { display: grid; gap: 24px; }
@media (min-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
  transition: border-color .15s, transform .15s;
}
.project:hover { border-color: var(--accent); transform: translateY(-2px); }
.project__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.project h3 { font-size: 22px; }
.stats { font-size: 13px; color: var(--text-2); display: inline-flex; gap: 12px; }
.project__tag { color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.project > p { color: var(--text-2); }
.features { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 6px; }
.features li { padding-left: 22px; position: relative; font-size: 15px; }
.features li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-family: var(--mono); font-weight: 600; }
.project .tags { margin-bottom: 24px; }
.project__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* Channels */
.channels { display: grid; gap: 20px; }
@media (min-width: 768px) { .channels { grid-template-columns: 1fr 1fr; } }
.channel {
  display: flex; gap: 18px; align-items: flex-start; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: .15s; position: relative; min-width: 0;
}
.channel > svg { width: 40px; height: 40px; }
.channel--yt > svg { color: #ef4444; }
.channel--fb > svg { color: #3b82f6; }
.channel strong { display: block; font-size: 18px; }
.channel .mono { font-size: 13px; color: var(--muted); word-break: break-all; }
.channel p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }
.channel__go { position: absolute; top: 24px; right: 24px; font-size: 14px; font-weight: 600; color: var(--accent); }
.channel:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 480px) { .channel__go { position: static; margin-top: 8px; } .channel { flex-wrap: wrap; } }

/* Series */
.series { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover img { transform: scale(1.04); }
.card h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.card:hover h3 { color: var(--accent); }
.badge, .count { position: absolute; font-size: 11px; font-weight: 600; padding: 4px 7px; border-radius: 6px; }
.badge { top: 8px; left: 8px; background: var(--accent); color: var(--on-accent); }
.count { bottom: 8px; right: 8px; background: rgba(2, 6, 23, .82); color: #fff; }
.center { text-align: center; margin-top: 40px; }

/* Contact */
.section--contact { text-align: center; background: radial-gradient(500px 240px at 50% 0%, var(--accent-soft), transparent 70%); }
.contact .section__title { justify-content: center; }
.contact .lead { margin: 0 auto; }

.footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: 13px; color: var(--text-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 480px) { .terminal pre { font-size: 11px; padding: 14px; } }
