/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --surface:   #18181f;
  --border:    #2a2a35;
  --text:      #e8e8f0;
  --muted:     #7070a0;
  --accent:    #00e5ff;
  --accent2:   #ff6b35;
  --tag-bg:    #1a1a28;
  --radius:    6px;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg:       #f5f4f0;
  --bg2:      #eeecea;
  --surface:  #ffffff;
  --border:   #d8d4cc;
  --text:     #1a1a2e;
  --muted:    #7a7a9a;
  --accent:   #0077cc;
  --accent2:  #e05520;
  --tag-bg:   #eaeaf5;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.7;
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ── Grid background ──────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}

/* ── Layout ───────────────────────────────────────────────────── */
.wrapper {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Nav ──────────────────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  transition: background var(--transition);
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 28px; }

nav a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover { color: var(--accent); }

/* ── Theme toggle ─────────────────────────────────────────────── */
.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 15px;
  flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--accent); transform: rotate(20deg); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { padding: 100px 0 80px; }

.hero-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.2s;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.35s;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.5s;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #000; font-weight: 500; }
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ── Divider ──────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 60%);
  margin: 0 0 80px;
  opacity: 0;
  animation: expandWidth 0.8s ease forwards 0.7s;
}

/* ── Sections ─────────────────────────────────────────────────── */
section { margin-bottom: 100px; }

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Skills ───────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-card {
  background: var(--surface);
  padding: 22px 20px;
  transition: background 0.2s;
}
.skill-card:hover { background: var(--bg2); }

.skill-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent2);
  margin-bottom: 12px;
}

.skill-card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px;
  padding: 3px 9px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  transition: all 0.15s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── Experience ───────────────────────────────────────────────── */
.exp-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.exp-item.visible { opacity: 1; transform: translateY(0); }

.exp-date {
  font-size: 11px;
  color: var(--muted);
  padding-top: 4px;
  line-height: 1.7;
}

.exp-content h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.exp-content p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
}

/* ── Certifications ───────────────────────────────────────────── */
.cert-list { display: flex; flex-direction: column; gap: 10px; }

.cert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s;
}
.cert-item:hover { border-color: var(--accent); }
.cert-icon { font-size: 16px; flex-shrink: 0; }

/* ── Social links ─────────────────────────────────────────────── */
.social-row { display: flex; gap: 12px; flex-wrap: wrap; }

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.social-link svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.social-link svg.stroke-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.footer-accent { color: var(--accent); }

/* ── Cursor blink ─────────────────────────────────────────────── */
.cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 3px;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes expandWidth {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to   { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Scroll reveal ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .skills-grid { grid-template-columns: 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: 6px; }
  .hero { padding: 60px 0 50px; }
  .social-row { gap: 8px; }

  /* Nav stacks: logo row on top, links row below */
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 0 12px;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }

  /* Show all nav links on mobile */
  nav a {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .nav-logo {
    font-size: 18px;
  }

  .theme-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}
