/* ===== Design tokens ===== */
:root {
  --bg: #0a0a14;
  --bg-soft: #11111f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --text: #ececf5;
  --muted: #9a9ab5;
  --accent-1: #8b5cf6;   /* violet */
  --accent-2: #22d3ee;   /* cyan   */
  --accent-3: #f472b6;   /* pink   */
  --grad: linear-gradient(110deg, var(--accent-1), var(--accent-2));
  --grad-soft: linear-gradient(110deg, var(--accent-3), var(--accent-1), var(--accent-2));
  --radius: 18px;
  --maxw: 1080px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

a { color: inherit; text-decoration: none; }

/* ===== Animated background aurora ===== */
.bg-aurora {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 120vh;
  z-index: -1;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(139, 92, 246, 0.35), transparent 70%),
    radial-gradient(35% 35% at 80% 10%, rgba(34, 211, 238, 0.25), transparent 70%),
    radial-gradient(45% 45% at 60% 60%, rgba(244, 114, 182, 0.18), transparent 70%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -4%, 0) scale(1.1); }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 20, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(10, 10, 20, 0.8); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad);
  color: #0a0a14;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: .95rem;
  color: var(--muted);
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--grad);
  transition: width .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ===== Layout ===== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 24px;
}
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 48px; }
.section-index {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--accent-2);
  letter-spacing: .1em;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero-avatar {
  width: 110px; height: 110px;
  margin: 0 auto 28px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: #0a0a14;
  border-radius: 28px;
  background: var(--grad);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.45);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-eyebrow { color: var(--muted); letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 8px 0 6px;
  background: var(--grad-soft);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-tagline { max-width: 620px; margin: 0 auto 34px; color: var(--muted); font-size: 1.08rem; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 28px; color: var(--muted); font-size: .9rem; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s, background .2s;
  display: inline-block;
}
.btn-primary { background: var(--grad); color: #0a0a14; box-shadow: 0 8px 30px rgba(34, 211, 238, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(139, 92, 246, 0.5); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { transform: translateY(-3px); background: var(--surface-2); border-color: var(--accent-2); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }
.about-text em { color: var(--accent-2); font-style: normal; }
.about-facts {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 22px;
  backdrop-filter: blur(8px);
}
.about-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.about-facts li:last-child { border-bottom: 0; }
.fact-k { color: var(--muted); font-size: .9rem; }
.fact-v { font-family: var(--font-display); font-weight: 600; text-align: right; }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(8px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.skill-card:hover { transform: translateY(-5px); border-color: rgba(139,92,246,.5); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.skill-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags span {
  font-size: .85rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.tags span:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--accent-1), var(--accent-2), transparent);
}
.tl-item { position: relative; padding: 0 0 40px 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -28px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(139,92,246,.18);
}
.tl-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  backdrop-filter: blur(8px);
  transition: transform .25s, border-color .25s;
}
.tl-body:hover { transform: translateX(5px); border-color: rgba(34,211,238,.4); }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tl-body h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }
.tl-company { color: var(--accent-2); }
.tl-period { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.tl-loc { color: var(--muted); font-size: .85rem; margin: 2px 0 10px; }
.tl-body p:last-child { color: var(--muted); }

/* ===== Education ===== */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(8px);
  transition: transform .25s, border-color .25s;
}
.edu-card:hover { transform: translateY(-5px); border-color: rgba(244,114,182,.4); }
.edu-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.edu-sub { color: var(--muted); margin-bottom: 12px; }
.edu-year { font-family: var(--font-display); font-size: .85rem; color: var(--accent-2); }
.edu-certs { grid-column: 1 / -1; }

/* ===== Contact ===== */
.section-contact { display: grid; place-items: center; }
.contact-card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 56px 40px;
  backdrop-filter: blur(10px);
  max-width: 720px;
  width: 100%;
}
.contact-card .section-index { display: block; margin-bottom: 8px; }
.contact-card .section-title { margin-bottom: 14px; }
.contact-lead { color: var(--muted); max-width: 480px; margin: 0 auto 32px; }
.contact-links { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.contact-link {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-weight: 500;
  min-width: 280px;
  justify-content: center;
  transition: transform .2s, border-color .2s, color .2s;
}
.contact-link:hover { transform: translateY(-3px); border-color: var(--accent-2); color: var(--accent-2); }
.ci {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--grad); color: #0a0a14;
  font-size: .8rem; font-weight: 700;
}

/* ===== Footer ===== */
.footer { text-align: center; padding: 40px 24px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .about-grid, .skills-grid, .edu-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10,10,20,.96);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 16px 24px; border-top: 1px solid var(--border); }
  .section { padding: 70px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
