:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --brand: #38bdf8;
  --border: #1f2937;
  --shadow: 0 10px 30px rgba(2, 8, 23, 0.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 800px at 50% -25%, rgba(148, 163, 184, 0.06), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0a1120 55%, #0a0f1c 100%);
  line-height: 1.6;
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 18, 32, 0.7); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.3px; }
/* header logo is text again for simplicity */
.nav { display: flex; gap: 14px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background .2s ease, color .2s ease; }
.nav a:hover { background: var(--panel); color: #fff; }

/* Hero */
.hero { padding: 72px 0 32px; }
.hero-text { text-align: center; }
.hero-kicker { color: var(--muted); margin: 0 0 6px; font-size: 0.98rem; letter-spacing: 0.2px; }
.hero-text h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.accent { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 62ch; margin: 0 auto 18px; }
.metrics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; padding-left: 0; list-style: none; margin: 10px 0 0; }
.metrics li { background: rgba(34, 211, 238, 0.12); border: 1px solid #164e63; color: #a5f3fc; padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; padding-left: 0; list-style: none; margin: 16px 0 0; }
.meta li { background: #0b2545; border: 1px solid #103359; color: #cfeafe; padding: 6px 10px; border-radius: 999px; font-size: .9rem; }

/* (intro3d removed) */

.cta-row { display: flex; gap: 12px; margin: 18px 0 0; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid var(--border); transition: transform .06s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #081226; border-color: transparent; box-shadow: 0 8px 24px rgba(56, 189, 248, 0.28); }
.btn-primary:hover { background: #5cd0ff; box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.03); border-color: #2a3a55; }

/* Sections */
.section { padding: 64px 0; }
.section h2 { font-size: 1.8rem; margin: 0 0 28px; position: relative; }
.section h2::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 64px; height: 3px; background: linear-gradient(90deg, var(--accent), transparent); border-radius: 999px; opacity: 0.9; }
.section:not(:first-of-type) { border-top: 1px solid var(--border); }
.lang-switch { margin-left: 10px; font-size: 0.95rem; color: var(--muted); }
.lang-switch a { color: var(--text); text-decoration: none; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.lang-switch a:hover { background: var(--panel); }
.kicker { color: var(--muted); margin: 6px 0 0; font-size: 0.98rem; }
.disclaimer { color: var(--muted); margin-top: 16px; }

/* Note/Hint box */
.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; background: rgba(15, 23, 42, 0.65); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-size: 0.95rem; }
.note::before { content: "i"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0b2545; color: #cfeafe; font-weight: 700; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

/* Panel wrapper for highlighted sections */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }

/* Grid & Cards */
.grid { display: grid; gap: 20px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.skills { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.projects { grid-template-columns: 1fr; align-items: stretch; }
.stack { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

@media (min-width: 880px) {
  .projects { grid-template-columns: repeat(4, 1fr); }
}

.card, .project { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease; }
.project { display: flex; flex-direction: column; }
.project header { margin-bottom: 8px; }
.project header .external-link { float: none; display: inline-block; font-size: 0.95rem; color: #9cc9ff; text-decoration: none; margin-top: 6px; }
.project header .external-link:hover { text-decoration: underline; }
.project .tags { margin-top: auto; }
.terminal { background: #0a0f1c; border: 1px solid var(--border); border-radius: 12px; margin: 18px auto 0; max-width: 680px; box-shadow: var(--shadow); text-align: left; }
.terminal-header { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: rgba(15, 23, 42, 0.6); border-top-left-radius: 12px; border-top-right-radius: 12px; }
.terminal-header span { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.terminal-body { padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .95rem; color: #d1d5db; line-height: 1.45; white-space: pre-wrap; }
.card:hover, .project:hover { transform: translateY(-3px); border-color: #2a3a55; box-shadow: 0 16px 44px rgba(2, 8, 23, 0.72); }
.card h3, .project h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }
.project ul { margin: 12px 0 10px; padding-left: 18px; }
.project li { margin: 6px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { display: inline-block; font-size: 0.85rem; color: #cfeafe; background: #0b2545; border: 1px solid #103359; padding: 4px 8px; border-radius: 999px; }
.tags a { display: inline-block; font-size: 0.85rem; color: #cfeafe; background: transparent; border: 1px solid #103359; padding: 4px 8px; border-radius: 999px; text-decoration: none; }
.tags a:hover { background: #0b2545; color: #ffffff; }
.more-link { display: inline-block; margin-top: 10px; color: #9cc9ff; text-decoration: none; font-size: 0.95rem; }
.more-link:hover { text-decoration: underline; }

/* Stack cards */
.stack-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.stack-card h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.stack-note { margin-top: 8px; color: var(--muted); font-size: 0.95rem; margin-left: 18px; }

/* Ensure legal pages have same top spacing as hero */
.page-top-match { padding-top: 72px !important; }

/* Lists */
.bullets { margin: 10px 0 0; padding-left: 18px; }
.bullets li { margin: 6px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.to-top { position: fixed; right: 20px; bottom: 20px; color: #cfeafe; background: rgba(11, 37, 69, 0.85); border: 1px solid #103359; text-decoration: none; padding: 10px 12px; border-radius: 999px; box-shadow: var(--shadow); backdrop-filter: blur(6px); transition: background .2s ease, color .2s ease, border-color .2s ease; }
.to-top:hover { color: #fff; background: rgba(16, 51, 89, 0.95); border-color: #184472; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .footer-inner { flex-direction: column; gap: 10px; }
  .section { padding: 52px 0; }
}

@media (max-width: 880px) {
  body { background: #0b1220; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .card, .project { transition: none; }
  .btn:hover, .card:hover, .project:hover { transform: none; }
}

 
