/* =========================
   Theme tokens
   ========================= */
:root{
  --bg-color:#0f172a;
  --text-main:#f3f4f6;
  --text-muted:#9ca3af;
  --accent:#3b82f6;
  --surface:#1e293b;
  --border:#334155;
  --gold:#d4af37;
  --max-w:1100px;

  --shadow:0 10px 30px rgba(0,0,0,.25);
  --radius:12px;

  /* Matrix background dots */
  --matrix-dot: rgba(255,255,255,0.06);
  --matrix-dot-strong: rgba(255,255,255,0.10);
}


body.theme-light{
  --bg-color:#ffffff;
  --text-main:#111827;
  --text-muted:#6b7280;
  --accent:#2563eb;
  --surface:#ffffff;
  --border:#e5e7eb;
  --shadow:0 10px 30px rgba(0,0,0,.08);

  /* Matrix background dots (darker on light mode) */
  --matrix-dot: rgba(0,0,0,0.035);
  --matrix-dot-strong: rgba(0,0,0,0.06);
}


/* =========================
   Base
   ========================= */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  line-height:1.6;
  overflow-x:hidden;
}

a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:10px;
  padding:10px 12px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: 10px;
  z-index: 200;
}
.skip-link:focus{ left:10px; }

/* =========================
   Navigation
   ========================= */
nav{
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
body.theme-light nav{
  background: rgba(255,255,255,.85);
}

.nav-wrapper{
  max-width: var(--max-w);
  margin: 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 15px 20px;
  gap: 20px;
}

.logo{
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--accent);
  text-decoration:none;
  border: 2px solid var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  line-height: 1;
}

.nav-links{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.lang-switch{
  display:flex;
  align-items:center;
  gap: 8px;
  padding-right: 14px;
  margin-right: 6px;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
}

.lang-switch a{
  color: var(--accent);
  text-decoration:none;
  font-size:.9rem;
  font-weight: 700;
}

.ext-link{
  color: var(--text-main);
  opacity: .9;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration:none;
}
.ext-link:hover{
  opacity:1;
  text-decoration:none;
  border-color: var(--accent);
}

.link{
  color: var(--text-muted);
  text-decoration:none;
}
.link:hover{ color: var(--accent); text-decoration:none; }

/* Tabs */
.tabs{ display:flex; align-items:center; gap: 6px; flex-wrap:wrap; }

.tab-link{
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: transform .15s ease, color .15s ease, background .15s ease;
}

.tab-link[aria-selected="true"]{
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.tab-link:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Theme toggle */
.theme-toggle{
  background: none;
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 10px;
}

/* =========================
   Layout
   ========================= */
.container{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 20px;
}

.page-header{
  margin-bottom: 24px;
}

h1{ font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 0 0 10px; color: var(--accent); }
h2{ margin: 0 0 10px; font-size: 1.8rem; }
h3{ margin: 22px 0 8px; font-size: 1.15rem; }

.muted{ color: var(--text-muted); }

/* Panels */
.tab-content{ animation: fadeIn .25s ease-in-out; }
.tab-content[hidden]{ display:none !important; }

/* Hero */
.hero{
  text-align:center;
  padding: 30px 0 56px;
}

.subtitle{
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  opacity: .95;
}

.bio{ max-width: 70ch; margin: 0 auto; color: var(--text-muted); }

.content-section{ margin-top: 18px; }
.content-section.spaced{ margin-top: 40px; }

/* Buttons */
.cta-buttons{
  margin-top: 28px;
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover{ transform: translateY(-1px); opacity:.95; text-decoration:none; }

.btn.btn-outline{
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}
.btn.btn-outline:hover{
  border-color: var(--accent);
}

/* Cards / grids */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: none;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover{
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card.wide{ width: 100%; }

.card.gold{ border-top: 4px solid var(--gold); }

.accent-orange{ border-left: 5px solid #ff8c00; }
.accent-amber{ border-left: 5px solid #fbbf24; }
.accent-emerald{ border-left: 5px solid #10b981; }
.accent-fuchsia{ border-left: 5px solid #d946ef; }

/* Projects page specifics */
.project-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  margin-top: 22px;
  box-shadow: var(--shadow);
}

.tech-stack{
  display:flex;
  gap: 10px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.tag{
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.tag-sec{
  background: rgba(220,38,38,.12);
  color: #dc2626;
  border: 1px solid rgba(220,38,38,.25);
}
.tag-ai{
  background: rgba(22,163,74,.12);
  color: #16a34a;
  border: 1px solid rgba(22,163,74,.25);
}

.list{
  padding-left: 18px;
  color: var(--text-muted);
}
.list li{ margin-bottom: 8px; }

pre{
  background: #1e293b;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid #334155;
}
body.theme-light pre{
  background: #0b1220;
  border-color: #0b1220;
}

/* Footer */
footer{
  text-align:center;
  padding: 54px 20px;
  color: var(--text-muted);
  font-size: .9rem;
  border-top: 1px solid var(--border);
}

/* Animation */
@keyframes fadeIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}
