/* ==========================================================
   CSS CUSTOM PROPERTIES
   ========================================================== */
:root {
  --bg: #050d1a;
  --bg-alt: #030810;
  --bg-card: #0a1628;
  --accent: #3b82f6;
  --accent-2: #00f5d4;
  --accent-green: #39ff14;
  --accent-glow: rgba(59, 130, 246, .28);
  --accent-2-glow: rgba(0, 245, 212, .18);
  --green-glow: rgba(57, 255, 20, .15);
  --text: #e2eaf6;
  --text-muted: #7a90b0;
  --card-bg: rgba(10, 22, 44, .6);
  --card-border: rgba(59, 130, 246, .12);
  --nav-bg: rgba(5, 13, 26, .9);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 32px rgba(0, 0, 0, .6);
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Smooth focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================
   LAYOUT UTILITIES
   ========================================================== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
  position: relative;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--card-border);
  box-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--accent);
}

.logo-bracket {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}

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

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

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

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: .4rem 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

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

.nav-cta:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: #7375f5;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ==========================================================
   SECTION HEADER
   ========================================================== */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

/* Background grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

/* Radial glow */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, .15) 0%, transparent 70%);
  top: 10%;
  right: -100px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(34, 211, 238, .08);
  border: 1px solid rgba(34, 211, 238, .2);
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1.5rem;
  letter-spacing: .03em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.typewriter {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 1rem;
  min-width: 16ch;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 50ch;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--card-border);
}

/* Terminal Card */
.terminal-card {
  background: rgba(10, 16, 32, .92);
  border: 1px solid rgba(99, 102, 241, .2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6), 0 0 0 1px var(--card-border), inset 0 1px 0 rgba(255, 255, 255, .05);
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.7;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: rgba(99, 102, 241, .07);
  border-bottom: 1px solid var(--card-border);
}

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

.t-red {
  background: #ff5f57;
}

.t-yellow {
  background: #febc2e;
}

.t-green {
  background: #28c840;
}

.t-title {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: .5rem;
}

.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.t-prompt {
  color: var(--accent-2);
}

.t-cmd {
  color: var(--text);
}

.t-out {
  color: var(--text-muted);
  padding-left: 1rem;
}

.t-green-text {
  color: #4ade80;
}

.t-accent {
  color: var(--accent-2);
}

.t-warn {
  color: #fbbf24;
}

.t-muted {
  color: rgba(148, 163, 184, .5);
}

.blink-cursor {
  animation: blink 1.1s step-end infinite;
  color: var(--accent-2);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 3px;
  animation: scrollDot 2s ease infinite;
}

@keyframes scrollDot {
  0% {
    top: 4px;
    opacity: 1;
  }

  80% {
    top: 16px;
    opacity: 0;
  }

  100% {
    top: 4px;
    opacity: 0;
  }
}

/* ==========================================================
   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.25rem;
  font-size: 1.02rem;
}

.about-text strong {
  color: var(--text);
}

.about-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.about-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.info-card:hover {
  border-color: rgba(99, 102, 241, .3);
  transform: translateY(-3px);
}

.info-card-icon {
  color: var(--accent);
  margin-bottom: .75rem;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.info-card ul {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.info-card li {
  font-size: .88rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.info-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .7rem;
  top: .1em;
}

/* ==========================================================
   SKILLS
   ========================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-color: rgba(99, 102, 241, .35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.skill-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.skill-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.skill-name {
  font-size: .8rem;
  color: var(--text-muted);
}

.skill-bar {
  height: 5px;
  background: rgba(255, 255, 255, .06);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition: width 1.2s cubic-bezier(.4, 0, .2, 1);
}

.skill-fill.animated {
  width: var(--pct);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.tag {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: .3rem .85rem;
  transition: all var(--transition);
  cursor: default;
}

.tag:hover {
  color: var(--accent-2);
  border-color: rgba(34, 211, 238, .4);
  background: var(--accent-2-glow);
}

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

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: rgba(99, 102, 241, .4);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .35);
}

.project-card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-type {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent-2);
  background: rgba(34, 211, 238, .08);
  border: 1px solid rgba(34, 211, 238, .2);
  border-radius: 4px;
  padding: .2rem .55rem;
  letter-spacing: .03em;
}

.project-links {
  display: flex;
  gap: .5rem;
}

.project-link-icon {
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  transition: all var(--transition);
}

.project-link-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .75rem;
  line-height: 1.3;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.project-tags li {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 4px;
  padding: .2rem .55rem;
  border: 1px solid rgba(99, 102, 241, .2);
}

/* ==========================================================
   CERTIFICATES
   ========================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}

.cert-card:hover {
  border-color: rgba(99, 102, 241, .35);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}

.cert-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.cert-badge-accent {
  background: var(--accent-2-glow);
  color: var(--accent-2);
}

.cert-badge-muted {
  background: rgba(255, 255, 255, .04);
  color: var(--text-muted);
}

.cert-info h3 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

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

.cert-status {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .2rem .55rem;
}

.cert-earned {
  color: #4ade80;
  background: rgba(74, 222, 128, .1);
  border: 1px solid rgba(74, 222, 128, .2);
}

.cert-inprogress {
  color: #fbbf24;
  background: rgba(251, 191, 36, .1);
  border: 1px solid rgba(251, 191, 36, .2);
}

/* ==========================================================
   CONTACT
   ========================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-text p {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-text strong {
  color: var(--text);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .95rem;
  color: var(--text-muted);
  padding: .9rem 1.1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  transition: all var(--transition);
}

.contact-method:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateX(4px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .03em;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .95rem;
  padding: .75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(148, 163, 184, .4);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-note {
  font-size: .85rem;
  text-align: center;
  min-height: 1.2em;
  transition: color var(--transition);
}

.form-note.success {
  color: #4ade80;
}

.form-note.error {
  color: #f87171;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  border-top: 1px solid var(--card-border);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: .85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ==========================================================
   ANIMATIONS – INTERSECTION OBSERVER
   ========================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Stagger for children */
.projects-grid .project-card.fade-in:nth-child(1) {
  transition-delay: .05s;
}

.projects-grid .project-card.fade-in:nth-child(2) {
  transition-delay: .1s;
}

.projects-grid .project-card.fade-in:nth-child(3) {
  transition-delay: .15s;
}

.projects-grid .project-card.fade-in:nth-child(4) {
  transition-delay: .2s;
}

.projects-grid .project-card.fade-in:nth-child(5) {
  transition-delay: .25s;
}

.projects-grid .project-card.fade-in:nth-child(6) {
  transition-delay: .3s;
}

/* ==========================================================
   RESPONSIVE – TABLET (≤ 900px)
   ========================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge,
  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .hero-desc {
    margin-inline: auto;
  }

  .hero-tagline {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

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

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

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

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

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

/* ==========================================================
   RESPONSIVE – MOBILE (≤ 540px)
   ========================================================== */
@media (max-width: 540px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset-block-start: 68px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 16, 32, .97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

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

  .nav-link {
    padding-block: .85rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 1rem;
  }

  .nav-cta {
    margin-top: .75rem;
    text-align: center;
  }

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

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-stats {
    gap: 1rem;
  }
}

/* ==========================================================
   SELECTION COLOR
   ========================================================== */
::selection {
  background: var(--accent-glow);
  color: var(--text);
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, .4);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================
   SCAN-LINE + NOISE OVERLAY
   ========================================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, .055) 2px, rgba(0, 0, 0, .055) 4px);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* ==========================================================
   HERO GRID – ANIMATED
   ========================================================== */
.hero::before {
  background-image: linear-gradient(rgba(59, 130, 246, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 130, 246, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridShift 24s linear infinite;
}

@keyframes gridShift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 48px 48px;
  }
}

.hero::after {
  background: radial-gradient(circle, rgba(0, 245, 212, .1) 0%, rgba(59, 130, 246, .09) 40%, transparent 70%);
  width: 700px;
  height: 700px;
}

/* Section edge glow */
.section-alt {
  border-top: 1px solid rgba(59, 130, 246, .08);
  border-bottom: 1px solid rgba(59, 130, 246, .08);
}

/* Section subtitle */
.section-sub {
  font-size: .95rem;
  color: var(--text-muted);
  margin-top: .4rem;
  font-style: italic;
}

/* Enhanced card glows on hover */
.project-card:hover,
.skill-card:hover,
.cert-card:hover,
.info-card:hover {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .3), 0 20px 50px rgba(59, 130, 246, .1);
}

/* ==========================================================
   ACHIEVEMENTS
   ========================================================== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.achv-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.achv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}

.achv-card:hover {
  border-color: rgba(59, 130, 246, .4);
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .25), 0 20px 48px rgba(0, 0, 0, .4);
}

.achv-card:hover::before {
  opacity: 1;
}

.achv-icon {
  color: var(--accent-2);
}

.achv-number {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.achv-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.achv-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.achv-tag {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--accent-2);
  background: var(--accent-2-glow);
  border: 1px solid rgba(0, 245, 212, .22);
  border-radius: 4px;
  padding: .18rem .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ==========================================================
   EDUCATION TIMELINE
   ========================================================== */
.edu-timeline {
  position: relative;
  padding-left: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.edu-timeline::before {
  content: '';
  position: absolute;
  left: .55rem;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: .3;
}

.edu-item {
  position: relative;
}

.edu-dot {
  position: absolute;
  left: -2rem;
  top: .35rem;
  width: 14px;
  height: 14px;
  background: var(--accent-2);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px var(--accent-2), 0 0 24px rgba(0, 245, 212, .3);
  animation: dotPulse 3s ease infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    box-shadow: 0 0 8px var(--accent-2), 0 0 18px rgba(0, 245, 212, .25);
  }

  50% {
    box-shadow: 0 0 18px var(--accent-2), 0 0 36px rgba(0, 245, 212, .45);
  }
}

.edu-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.edu-card:hover {
  border-color: rgba(59, 130, 246, .35);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .18), 0 12px 32px rgba(0, 0, 0, .3);
}

.edu-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent-2);
  letter-spacing: .04em;
}

.edu-status {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .18rem .55rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
}

.edu-status-active {
  color: #39ff14;
  background: rgba(57, 255, 20, .1);
  border-color: rgba(57, 255, 20, .25);
}

.edu-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.edu-institution {
  font-size: .83rem;
  color: var(--accent);
  margin-bottom: .75rem;
  font-family: var(--font-mono);
}

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

.edu-courses {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.edu-courses span {
  font-size: .72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: 4px;
  padding: .18rem .55rem;
}

/* ==========================================================
   INSIGHTS / BLOG
   ========================================================== */
.insight-featured {
  background: var(--card-bg);
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.insight-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(59, 130, 246, .06), transparent 60%);
  pointer-events: none;
}

.insight-featured:hover {
  border-color: rgba(59, 130, 246, .45);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .25), 0 24px 64px rgba(0, 0, 0, .4);
}

.insight-featured-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.ins-cat {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent-2);
  background: var(--accent-2-glow);
  border: 1px solid rgba(0, 245, 212, .22);
  border-radius: 4px;
  padding: .18rem .55rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ins-cat-featured {
  color: #39ff14;
  background: rgba(57, 255, 20, .1);
  border-color: rgba(57, 255, 20, .22);
}

.insight-featured h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.insight-featured p {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  max-width: 70ch;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.insight-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.insight-card:hover {
  border-color: rgba(0, 245, 212, .3);
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(0, 245, 212, .15), 0 16px 40px rgba(0, 0, 0, .35);
}

.insight-card h4 {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
}

.insight-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.ins-read {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  transition: color var(--transition);
}

.ins-read:hover {
  color: var(--accent-2);
}

/* ==========================================================
   FAB
   ========================================================== */
.fab-wrap {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fabPulse 3s ease infinite;
}

@keyframes fabPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, .45), 0 8px 24px rgba(0, 0, 0, .5);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, .0), 0 8px 24px rgba(0, 0, 0, .5);
  }
}

.fab-main:hover {
  transform: scale(1.08);
}

.fab-icon {
  position: absolute;
  transition: opacity .2s, transform .2s;
}

.fab-icon-x {
  opacity: 0;
  transform: rotate(-90deg) scale(.5);
}

.fab-wrap.open .fab-icon-plus {
  opacity: 0;
  transform: rotate(90deg) scale(.5);
}

.fab-wrap.open .fab-icon-x {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.fab-wrap.open .fab-main {
  animation: none;
  box-shadow: 0 0 20px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, .5);
}

.fab-menu {
  position: absolute;
  bottom: 66px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
}

.fab-wrap.open .fab-menu {
  pointer-events: auto;
  opacity: 1;
}

.fab-item {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(10, 22, 44, .92);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: .4rem 1rem;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  transform: translateX(20px);
  opacity: 0;
  letter-spacing: .04em;
}

.fab-wrap.open .fab-item {
  transform: translateX(0);
  opacity: 1;
}

.fab-wrap.open .fab-item:nth-child(1) {
  transition-delay: .02s;
}

.fab-wrap.open .fab-item:nth-child(2) {
  transition-delay: .04s;
}

.fab-wrap.open .fab-item:nth-child(3) {
  transition-delay: .06s;
}

.fab-wrap.open .fab-item:nth-child(4) {
  transition-delay: .08s;
}

.fab-wrap.open .fab-item:nth-child(5) {
  transition-delay: .10s;
}

.fab-wrap.open .fab-item:nth-child(6) {
  transition-delay: .12s;
}

.fab-wrap.open .fab-item:nth-child(7) {
  transition-delay: .14s;
}

.fab-wrap.open .fab-item:nth-child(8) {
  transition-delay: .16s;
}

.fab-wrap.open .fab-item:nth-child(9) {
  transition-delay: .18s;
}

.fab-item:hover {
  color: var(--accent-2);
  border-color: rgba(0, 245, 212, .4);
  background: rgba(0, 245, 212, .06);
  transform: translateX(-4px);
}

.fab-bug {
  color: #f87171;
  border-color: rgba(248, 113, 113, .3);
}

.fab-bug:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .08);
}

/* ==========================================================
   MODAL
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, .82);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: rgba(10, 22, 44, .96);
  border: 1px solid rgba(59, 130, 246, .25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(0, 245, 212, .06), 0 32px 80px rgba(0, 0, 0, .7);
  transform: translateY(20px) scale(.98);
  transition: transform var(--transition);
}

.modal-overlay.active .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.modal-title-icon {
  color: #fbbf24;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  transition: all var(--transition);
}

.modal-close:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, .4);
  background: rgba(248, 113, 113, .08);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-form select {
  width: 100%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .95rem;
  padding: .75rem 1rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.modal-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-form select option {
  background: #0a1628;
  color: var(--text);
}

/* ==========================================================
   RESPONSIVE – NEW SECTIONS
   ========================================================== */
@media (max-width: 1100px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .insight-featured {
    padding: 1.75rem;
  }

  .insight-featured h3 {
    font-size: 1.2rem;
  }
}

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

  .edu-timeline {
    padding-left: 1.5rem;
  }

  .fab-wrap {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .modal-panel {
    padding: 1.5rem;
    margin: 1rem;
  }
}