/* ═══════════════════════════════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg:          #0a0e1a;
  --bg-alt:      #0d1528;
  --card:        #0f1629;
  --card-hover:  #141e35;
  --border:      #1e293b;
  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --accent:      #00d4ff;
  --accent-2:    #7c3aed;
  --green:       #10b981;
  --orange:      #f59e0b;
  --red:         #ef4444;
  --nav-h:       64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ═══════════════════════════════════════════════════════════════
   HELPERS
   ═══════════════════════════════════════════════════════════════ */
.accent { color: var(--accent); }

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

.section        { padding: 6rem 0; }
.section-alt    { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 15% 35%, rgba(0,212,255,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 55% 65% at 85% 65%, rgba(124,58,237,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 50% 80%, rgba(16,185,129,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle grid overlay */
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,41,59,0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,41,59,0.25) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  z-index: 1;
  padding: 2rem 1.5rem;
  max-width: 820px;
  width: 100%;
}

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s ease forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  background: linear-gradient(140deg, #e2e8f0 55%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s ease forwards;
}

.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.95rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 2.2em;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s ease forwards;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s ease forwards;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 1s ease forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.3rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #060a14;
  font-weight: 600;
}
.btn-primary:hover {
  background: #00c4ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.25);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}
.btn-outline:hover {
  border-color: rgba(0,212,255,0.5);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  font-size: 0.975rem;
  line-height: 1.8;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-text em { color: var(--accent); font-style: normal; }

.stack-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  opacity: 0.7;
}

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}
.badge:hover { transform: translateY(-2px); }

.badge-blue   { color: #60a5fa; border-color: rgba(96,165,250,0.25);  background: rgba(96,165,250,0.06);  }
.badge-cyan   { color: #00d4ff; border-color: rgba(0,212,255,0.25);   background: rgba(0,212,255,0.06);   }
.badge-purple { color: #a78bfa; border-color: rgba(167,139,250,0.25); background: rgba(167,139,250,0.06); }
.badge-green  { color: #34d399; border-color: rgba(52,211,153,0.25);  background: rgba(52,211,153,0.06);  }
.badge-orange { color: #fb923c; border-color: rgba(251,146,60,0.25);  background: rgba(251,146,60,0.06);  }
.badge-red    { color: #f87171; border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.06); }
.badge-yellow { color: #fbbf24; border-color: rgba(251,191,36,0.25);  background: rgba(251,191,36,0.06);  }

/* ═══════════════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: border-color 0.3s, transform 0.35s, box-shadow 0.35s;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  border-color: rgba(0,212,255,0.4);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,212,255,0.07);
}

.project-diagram {
  background: #080c18;
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
}

.project-diagram svg {
  width: 100%;
  height: auto;
}

.project-content { padding: 1.5rem; }

.project-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.project-desc {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.2rem;
}

.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.685rem;
  padding: 0.2rem 0.55rem;
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: 4px;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}
.project-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   CERTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.cert-active {
  border-color: rgba(0,212,255,0.25);
}
.cert-active:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,212,255,0.08);
}

.cert-upcoming { opacity: 0.55; }

.cert-svg { width: 80px; height: 80px; }

.cert-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.cert-issuer {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.cert-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.cert-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
}

.cert-status-valid {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--green);
}

.cert-status-soon {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  color: #a78bfa;
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════════ */
.contact-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 440px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--accent);
  transform: translateX(5px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.06);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #070a12;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

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

.footer-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  margin-top: 0.4rem;
  opacity: 0.4;
}

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

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1);   }
  50%       { opacity: 1;   transform: scaleY(0.75); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid    { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(10,14,26,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s ease, opacity 0.32s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-cta { flex-direction: column; align-items: center; }
  .section  { padding: 4rem 0; }

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

@media (max-width: 480px) {
  .hero-name { letter-spacing: -0.03em; }
  .project-diagram svg { min-height: 80px; }
}
