/* ============================================================
   CSS CUSTOM PROPERTIES — DARK MODE (default)
   ============================================================ */
:root {
  --bg: #0a0f1c;
  --card: #121a2b;
  --accent: #00f0ff;
  --text: #e6edf3;
  --muted: #8b9bb4;
  --border: rgba(0, 240, 255, 0.08);
  --border-strong: rgba(0, 240, 255, 0.2);
  --nav-bg: rgba(10, 15, 28, 0.85);
  --btn-primary-text: #0a0f1c;
  --wave-start-opacity: 0.22;
}

/* LIGHT MODE overrides */
[data-theme="light"] {
  --bg: #f8f9fa;
  --card: #ffffff;
  --accent: #0099aa;
  --text: #0a0f1c;
  --muted: #6b7280;
  --border: #e9ecef;
  --border-strong: #0099aa;
  --nav-bg: rgba(248, 249, 250, 0.88);
  --btn-primary-text: #ffffff;
  --wave-start-opacity: 0.08;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

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

/* ============================================================
   SIGNAL WAVE BACKGROUND
   ============================================================ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-canvas svg {
  width: 100%;
  height: 100%;
}

.wave-circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
  opacity: 0;
  animation: wave-expand 6s ease-out infinite;
}

.wave-group-1 .wave-circle:nth-child(1) { animation-delay: 0s; }
.wave-group-1 .wave-circle:nth-child(2) { animation-delay: 2s; }
.wave-group-1 .wave-circle:nth-child(3) { animation-delay: 4s; }

.wave-group-2 .wave-circle:nth-child(1) { animation-delay: 1s; }
.wave-group-2 .wave-circle:nth-child(2) { animation-delay: 3s; }
.wave-group-2 .wave-circle:nth-child(3) { animation-delay: 5s; }

@keyframes wave-expand {
  0%   { r: 0;   opacity: var(--wave-start-opacity); }
  100% { r: 600; opacity: 0; }
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

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

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.theme-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
  transition: background 0.2s;
}

.hamburger:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 100px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--btn-primary-text);
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: filter 0.2s, transform 0.2s;
}

.btn-primary:hover {
  filter: brightness(0.88);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.08);
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  margin: 70px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* ============================================================
   METRICS
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s;
}

.metric-card:hover {
  transform: translateY(-4px);
}

.metric-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.metric-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.metric-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: transform 0.2s;
}

.exp-card:hover {
  transform: translateY(-3px);
}

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

.exp-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.exp-meta {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}

.exp-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.proj-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s;
}

.proj-card:hover {
  transform: translateY(-4px);
}

.proj-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.proj-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.proj-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.skill-tag:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent);
}

.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.contact-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-val {
  font-size: 14px;
  color: var(--text);
  margin-top: 2px;
  word-break: break-word;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.12);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
}

.back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover {
  background: rgba(0, 240, 255, 0.1);
}

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
  }

  .hero {
    padding: 60px 0 50px;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary {
    width: 100%;
    justify-content: center;
  }

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

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

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

  .back-top {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
