/* ===================================================
   Design System & Variables
   =================================================== */
:root {
  /* --- Colors (Dark Theme) --- */
  --bg-page: #05080d;
  --bg-card: #0d121b;
  --bg-elevated: #161d29;
  --bg-surface: rgba(255, 255, 255, 0.03);
  
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(59, 130, 246, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  
  /* --- Typography --- */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --tracking-tight: -0.02em;
  --tracking-tighter: -0.04em;
  
  /* --- Layout --- */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --container-width: 1200px;
  --section-padding: 10rem;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-surface: rgba(0, 0, 0, 0.02);
  
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.05);
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(37, 99, 235, 0.2);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.12);
}

/* ===================================================
   Base & Reset
   =================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--tracking-tighter);
}

a { color: inherit; text-decoration: none; transition: all 0.2s ease; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; height: auto; }

/* ===================================================
   Utility Classes
   =================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.section { padding-block: var(--section-padding); }

.section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item { opacity: 0; transform: translateY(20px); transition: all 0.6s var(--transition-smooth); }
.stagger-item.visible { opacity: 1; transform: translateY(0); }

/* ===================================================
   Buttons
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--transition-smooth);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px var(--accent-glow);
}

.btn--outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.btn--outline:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent);
}

.btn--sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn--lg { padding: 1.25rem 2.5rem; font-size: 1rem; }

/* --- Header & Nav --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding-block: 1.5rem;
  transition: all var(--transition-smooth);
}

.header.scrolled {
  padding-block: 0.75rem;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tighter);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.375rem;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

.nav__link {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 100px;
  color: var(--text-secondary);
}

.nav__link:hover { color: var(--text-primary); }
.nav__link.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__theme {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav__theme:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 300px;
    background: var(--bg-card);
    flex-direction: column;
    padding: 6rem 2rem;
    align-items: flex-start;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    border-left: 1px solid var(--border-subtle);
    border-radius: 0;
    z-index: 100;
  }
  
  .nav__menu.open { transform: translateX(0); }
  
  .nav__link { width: 100%; font-size: 1.125rem; border-radius: 12px; }
  .nav__link.active { background: var(--bg-elevated); }
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  z-index: 1001;
}

@media (max-width: 768px) { .nav__toggle { display: flex; } }

.nav__toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav__toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===================================================
   Hero Section
   =================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero__bg-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero__headline {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: 1.25rem;
  max-width: 540px;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent, rgba(255,255,255,0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.profile-card__avatar {
  width: 120px; height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gradient);
  box-shadow: 0 0 20px var(--accent-glow);
}

.profile-card__img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
}

.profile-card__name { font-size: 1.5rem; margin-bottom: 0.5rem; }
.profile-card__location {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
}

.profile-card__socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.profile-card__social-link {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.profile-card__social-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.profile-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tag {
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag--blue { background: var(--accent-soft); color: var(--accent); }
.tag--neutral { background: var(--bg-surface); color: var(--text-secondary); }

/* ===================================================
   Bento Grid (About & Stats)
   =================================================== */
.about__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about__text { font-size: 1.125rem; margin-bottom: 1.5rem; }

.about__edu {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
}

.edu-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.edu-item svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; }
.edu-item strong { display: block; font-size: 1rem; margin-bottom: 0.25rem; }
.edu-item span { font-size: 0.875rem; color: var(--text-muted); }

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.stat-card__value {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: var(--tracking-tighter);
}

.stat-card__label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ===================================================
   Services Grid
   =================================================== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  transition: all var(--transition-smooth);
  height: 100%;
}

.service-card:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 48px; height: 48px;
  color: var(--accent);
  margin-bottom: 2rem;
}

.service-card__title { font-size: 1.25rem; margin-bottom: 1rem; }
.service-card__desc { font-size: 0.9375rem; color: var(--text-secondary); }

/* ===================================================
   Experience Timeline
   =================================================== */
.timeline {
  max-width: 800px;
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.timeline__item {
  position: relative;
  padding-bottom: 4rem;
}

.timeline__marker {
  position: absolute;
  left: -3rem; top: 0;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 8px var(--bg-page), 0 0 0 10px var(--accent-soft);
}

.timeline__period {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timeline__role { font-size: 1.5rem; margin-bottom: 0.25rem; }
.timeline__company { font-size: 1.125rem; color: var(--text-primary); font-weight: 600; margin-bottom: 1.5rem; }

.timeline__bullets {
  display: grid; gap: 0.75rem;
}

.timeline__bullets li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
}

.timeline__bullets li::before {
  content: '→';
  position: absolute;
  left: 0; color: var(--accent);
  font-weight: 700;
}

.timeline__tech {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.timeline__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

/* ===================================================
   Cards (Projects, Certs, Achievements)
   =================================================== */
.projects__grid, .certs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card, .cert-card, .achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--transition-smooth);
}

.project-card:hover, .cert-card:hover, .achievement-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.project-card__header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.project-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.project-card__category { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: var(--accent); }
.project-card__title { font-size: 1.5rem; margin-bottom: 1rem; }
.project-card__desc { margin-bottom: 2rem; }

.cert-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.cert-card__icon { width: 40px; height: 40px; color: var(--accent); flex-shrink: 0; }
.cert-card__title { font-size: 1rem; margin-bottom: 0.5rem; }
.cert-card__sub { font-size: 0.875rem; color: var(--accent); font-weight: 700; margin-bottom: 0.25rem; }

.achievement-card { display: flex; gap: 2rem; }
.achievement-card__type {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; color: var(--accent);
}
.achievement-card__type svg { width: 32px; height: 32px; }
.achievement-card__title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.achievement-card__meta { font-size: 0.875rem; margin-bottom: 1rem; }
.achievement-card__badges { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.ach-badge { padding: 0.25rem 0.75rem; border-radius: 100px; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 700; }

/* ===================================================
   AI Work Section
   =================================================== */
.ai-work {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  margin-inline: 2rem;
  position: relative;
  overflow: hidden;
}

.ai-work__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 6rem;
}

.ai-work__visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.ai-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}

/* ===================================================
   Contact Section
   =================================================== */
.contact { text-align: center; }
.contact__inner { max-width: 700px; }
.contact__text { font-size: 1.25rem; margin-bottom: 3rem; }
.contact__ctas { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ===================================================
   Footer
   =================================================== */
.footer {
  padding-block: 4rem;
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__links { display: flex; gap: 2rem; }
.footer__social { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.footer__social:hover { color: var(--accent); }

/* ===================================================
   Responsive Design
   =================================================== */
@media (max-width: 1024px) {
  :root { --section-padding: 7rem; }
  .hero__inner, .about__inner, .ai-work__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__headline { font-size: 4rem; }
  .hero__sub, .about__text { margin-inline: auto; }
  .hero__ctas, .about__stats { justify-content: center; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .ai-work { margin-inline: 1rem; }
  .ai-work__inner { padding: 4rem 2rem; }
}

@media (max-width: 768px) {
  .nav__menu { display: none; }
  .services__grid, .projects__grid, .certs__grid, .about__stats { grid-template-columns: 1fr; }
  .section-title { font-size: 2.5rem; }
  .hero { padding-top: 60px; }
  .footer__inner { flex-direction: column; gap: 2rem; text-align: center; }
}
