/* ═══════════════════════════════════════════
   CSS RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   THEME VARIABLES
   ═══════════════════════════════════════════ */
:root {
  /* Purple accent */
  --primary: #7C3AED;
  --primary-light: #8B5CF6;
  --primary-dark: #6D28D9;
  --primary-glow: rgba(124, 58, 237, 0.3);
  --primary-subtle: rgba(124, 58, 237, 0.1);

  /* Dark theme (default) */
  --bg: #0B0D17;
  --bg-secondary: #111427;
  --bg-card: #161933;
  --bg-card-hover: #1C2040;
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(124, 58, 237, 0.4);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(11, 13, 23, 0.85);
  --code-bg: #0F1221;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --text: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.2);
  --border-hover: rgba(124, 58, 237, 0.5);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(248, 250, 252, 0.85);
  --code-bg: #1E293B;
}

/* ═══════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--primary-light);
  border-color: var(--border-hover);
}

.icon-moon { display: block; }
.icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 24px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 100px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: purple;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-socials {
  display: flex;
  gap: 16px;
}

.hero-socials a {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.hero-socials a:hover {
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* Code Window */
.hero-visual {
  flex: 1;
  max-width: 420px;
}

.code-window {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }

.code-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-body {
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-body code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  color: var(--text-secondary);
}

.code-keyword { color: #C084FC; }
.code-var { color: #67E8F9; }
.code-prop { color: #93C5FD; }
.code-string { color: #86EFAC; }
.code-method { color: #FCD34D; }

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 56px;
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.skill-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-icon {
  color: var(--primary-light);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.skill-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  background: var(--primary-subtle);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════ */
.project-card {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s ease;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card:hover {
  border-color: var(--border-hover);
}

.project-card.reverse {
  flex-direction: row-reverse;
}

.project-images {
  flex: 1;
  min-width: 0;
}

.project-carousel {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.project-img {
  width: 100%;
  display: none;
  border-radius: 10px;
}

.project-img.active {
  display: block;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

.project-info {
  flex: 1;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--primary-subtle);
  color: var(--primary-light);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ═══════════════════════════════════════════
   CERTIFICATIONS
   ═══════════════════════════════════════════ */
.cert-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  transition: border-color 0.3s ease;
}

.cert-card:hover {
  border-color: var(--border-hover);
}

.cert-badge {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: var(--primary-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.cert-content {
  flex: 1;
}

.cert-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cert-issuer {
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.cert-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
  display: block;
}

.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.contact-icon {
  color: var(--primary-light);
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.contact-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-word;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding-top: 100px;
  }

  .hero-content { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-visual { max-width: 380px; width: 100%; }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-card,
  .project-card.reverse {
    flex-direction: column;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open {
    max-height: 300px;
    padding: 16px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cert-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px;
  }

  .section {
    padding: 72px 0;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero-name {
    font-size: 2.5rem;
  }

  .hero-title {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .project-card {
    padding: 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 11px 22px;
    font-size: 0.85rem;
  }
}
