/* =========================================================
   DevOps Portfolio — Stylesheet
   Design tokens: dark base, blue accent, terminal-inspired
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Colors */
  --bg: #0a0e16;
  --bg-alt: #0d1220;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #3b82f6;
  --accent-soft: #60a5fa;
  --accent-dim: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --ok: #22d3a5;

  --text: #e7ebf3;
  --text-muted: #9aa5b8;
  --text-faint: #6b7385;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

::selection { background: var(--accent); color: #fff; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Background texture: faint grid across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.text-gradient {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent) 55%, #8ab4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-strong);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--accent-soft);
  border: 1px solid var(--border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--accent-soft);
  margin-bottom: 14px;
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(34, 211, 165, 0.18);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 211, 165, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(34, 211, 165, 0.06); }
}

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 12px; }
.section-sub { color: var(--text-muted); font-size: 1.02rem; }

section { position: relative; padding: 120px 0; z-index: 1; }

/* ---------- Glass ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px var(--accent-glow); }

.btn--ghost {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent-soft); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.btn--outline:hover { color: var(--text); border-color: var(--accent-soft); }

.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__terminal {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-soft);
  display: flex;
  gap: 6px;
}
.loader__prompt { color: var(--ok); }
.loader__cursor { animation: blink 1s step-end infinite; color: var(--accent-soft); }

@keyframes blink { 50% { opacity: 0; } }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), height 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.is-scrolled {
  height: 66px;
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

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

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.nav__logo-bracket { color: var(--accent-soft); }

.nav__menu { display: flex; align-items: center; gap: 34px; }
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav__link:hover, .nav__link.active-link { color: var(--text); }
.nav__link:hover::after, .nav__link.active-link::after { width: 100%; }

.nav__cta { display: inline-flex; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 20;
}
.nav__toggle-bar {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle.is-active .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle.is-active .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 55% at 30% 30%, black 20%, transparent 75%);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.hero__glow--1 { width: 480px; height: 480px; background: var(--accent); top: -160px; right: -120px; }
.hero__glow--2 { width: 360px; height: 360px; background: #6d28d9; opacity: 0.25; bottom: -140px; left: -100px; }

.hero__container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
  padding-block: 60px;
}

.hero__title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.hero__role {
  font-family: var(--font-mono);
  color: var(--accent-soft);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  min-height: 1.6em;
  margin-bottom: 20px;
}
.typing-cursor { animation: blink 0.9s step-end infinite; color: var(--accent-soft); }

.hero__desc { color: var(--text-muted); max-width: 480px; margin-bottom: 34px; font-size: 1.02rem; }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero__stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero__stat { display: flex; flex-direction: column; gap: 2px; }
.hero__stat-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.hero__stat-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); text-transform: lowercase; }

/* Terminal visual */
.terminal {
  background: #0c101a;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s var(--ease);
}
.terminal:hover { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }
.terminal__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-inline: auto;
}

.terminal__body {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 22px 20px;
  min-height: 300px;
  color: #c7d1e0;
  line-height: 1.85;
}
.terminal__body .prompt { color: var(--ok); }
.terminal__body .path { color: var(--accent-soft); }
.terminal__body .comment { color: var(--text-faint); }
.terminal__body .out { color: var(--text-muted); display: block; }
.terminal__cursor { display: inline-block; width: 7px; height: 1em; background: var(--accent-soft); vertical-align: -2px; animation: blink 0.9s step-end infinite; }

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator__mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--text-muted);
  border-radius: 14px;
  display: block;
  position: relative;
}
.scroll-indicator__wheel {
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 7px;
  background: var(--accent-soft);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll-wheel 1.6s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% { opacity: 1; top: 6px; }
  60% { opacity: 0; top: 18px; }
  100% { opacity: 0; top: 6px; }
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about__text p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.02rem; }
.about__text code { color: var(--accent-soft); }
.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
  background: var(--accent-dim);
  border: 1px solid rgba(59,130,246,0.28);
  padding: 6px 13px;
  border-radius: 999px;
}

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: linear-gradient(var(--border-strong), transparent);
}
.timeline__item { position: relative; margin-bottom: 22px; }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: -28px; top: 22px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-faint);
}
.timeline__marker--active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.timeline__card { padding: 20px 22px; transition: border-color 0.3s ease, transform 0.3s ease; }
.timeline__card:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline__date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-soft); }
.timeline__title { font-size: 1.05rem; margin: 6px 0 8px; }
.timeline__desc { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Skills ---------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  padding: 22px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.35);
  box-shadow: 0 16px 32px -18px rgba(59,130,246,0.35);
}
.skill-card__top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.skill-card__icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent-soft);
  flex-shrink: 0;
}
.skill-card__icon svg { width: 20px; height: 20px; }
.skill-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }

.skill-card__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 8px;
}
.skill-card__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 1.4s var(--ease);
  position: relative;
}
.skill-card__fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.2s linear infinite;
  animation-play-state: paused;
}
.skill-card.is-visible .skill-card__fill::after { animation-play-state: running; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.skill-card__pct { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); }

/* ---------- Projects ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.32);
  box-shadow: 0 24px 44px -22px rgba(0,0,0,0.55);
}
.project-card__image {
  height: 170px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.9);
  position: relative;
  overflow: hidden;
}
.project-card__image svg { width: 46px; height: 46px; opacity: 0.9; position: relative; z-index: 1; }
.project-card__image--1 { background: linear-gradient(135deg, #1d4ed8, #3b82f6 60%, #60a5fa); }
.project-card__image--2 { background: linear-gradient(135deg, #0f766e, #14b8a6 60%, #5eead4); }
.project-card__image--3 { background: linear-gradient(135deg, #6d28d9, #8b5cf6 60%, #c4b5fd); }
.project-card__image::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,0,0,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.12) 1px, transparent 1px);
  background-size: 18px 18px;
}

.project-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-card__title { font-size: 1.12rem; }
.project-card__desc { color: var(--text-muted); font-size: 0.92rem; flex: 1; }

.project-card__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-card__actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- Certifications ---------- */
.certs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cert-card {
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cert-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.32); }
.cert-card__ribbon {
  width: 52px; height: 52px;
  margin-inline: auto;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.cert-card__ribbon svg { width: 26px; height: 26px; }
.cert-card__title { font-size: 0.98rem; margin-bottom: 8px; line-height: 1.4; }
.cert-card__issuer { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 10px; }
.cert-card__year { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-soft); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; }

.contact__info { display: flex; flex-direction: column; gap: 26px; }
.contact__info-item { display: flex; align-items: center; gap: 16px; }
.contact__info-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact__info-label { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); margin-bottom: 3px; }
.contact__info-value { font-size: 0.98rem; }

.contact__form { padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.form-group input, .form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.25s ease, background 0.25s ease;
  resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-faint); }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(59,130,246,0.05);
  outline: none;
}
.form-group.has-error input, .form-group.has-error textarea { border-color: #f87171; }
.form-error { font-size: 0.76rem; color: #f87171; min-height: 1em; }

.form-success {
  text-align: center;
  color: var(--ok);
  font-size: 0.9rem;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.form-success.is-visible { opacity: 1; height: auto; margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__social { display: flex; gap: 14px; }
.footer__social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.footer__social a:hover { color: var(--accent-soft); border-color: var(--accent-soft); transform: translateY(-3px); }
.footer__copy { font-size: 0.82rem; color: var(--text-faint); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, border-color 0.3s ease;
  z-index: 300;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent-soft); color: var(--accent-soft); }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__container { grid-template-columns: 1fr; gap: 44px; }
  .hero__visual { order: -1; }
  .terminal { transform: none; }
  .about__grid { grid-template-columns: 1fr; gap: 44px; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .certs__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  section { padding: 84px 0; }

  .nav__menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: rgba(10, 14, 22, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 15;
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.05rem; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  .hero__stats { gap: 24px; }
  .skills__grid { grid-template-columns: 1fr 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .certs__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .skills__grid { grid-template-columns: 1fr; }
  .certs__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .terminal__body { font-size: 0.78rem; padding: 18px 16px; min-height: 260px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
