/* =========================================================
   COLORS AND SIZES
   Change a value here and it updates everywhere on the site.
   ========================================================= */
:root {
  --bg: #f5f7fb;
  --bg-alt: #eaeff6;
  --surface: #ffffff;
  --text: #142033;
  --muted: #4b5a6f;
  --accent: #0a6ebd;
  --on-accent: #ffffff;
  --accent-soft: rgba(10, 110, 189, 0.1);
  --border: #d9e1ec;
  --shadow: 0 10px 30px rgba(16, 33, 60, 0.08);

  /* The sidebar and hero stay dark in both themes */
  --side-bg: #080d16;
  --side-text: #c4cfdd;
  --glow: #5cc8ff;

  --side-w: 280px;
  --radius: 14px;
  --font-head: "Poppins", system-ui, sans-serif;
}

/* Dark colors (chosen with the toggle, or automatically if the device is in dark mode) */
:root[data-theme="dark"] {
  --bg: #0b111b;
  --bg-alt: #0f1724;
  --surface: #131c2a;
  --text: #e6edf6;
  --muted: #a2b0c3;
  --accent: #5cc8ff;
  --on-accent: #06101c;
  --accent-soft: rgba(92, 200, 255, 0.12);
  --border: #243246;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b111b;
    --bg-alt: #0f1724;
    --surface: #131c2a;
    --text: #e6edf6;
    --muted: #a2b0c3;
    --accent: #5cc8ff;
    --on-accent: #06101c;
    --accent-soft: rgba(92, 200, 255, 0.12);
    --border: #243246;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

/* =========================================================
   BASICS
   ========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 0.9em; }
a { color: var(--accent); }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.muted { color: var(--muted); }

/* Text only screen readers can hear */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Clear outline for keyboard users */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link { position: absolute; left: -9999px; z-index: 200; }
.skip-link:focus {
  left: 16px; top: 16px; padding: 8px 14px;
  background: var(--accent); color: var(--on-accent); border-radius: 6px;
}

/* Scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150;
  background: linear-gradient(90deg, var(--glow), #8a7dff);
  transform-origin: left; transform: scaleX(0);
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 100;
  display: flex; flex-direction: column;
  padding: 36px 22px 22px;
  background: var(--side-bg); color: var(--side-text);
  overflow-y: auto;
  transition: transform 0.35s ease, visibility 0.35s;
}

.profile { text-align: center; }

.avatar {
  width: 104px; height: 104px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #0a5fa8, #4b32b0);
  box-shadow: 0 0 0 6px rgba(92, 200, 255, 0.12), 0 0 30px rgba(92, 200, 255, 0.25);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.side-name { margin: 0; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.side-name a { color: #fff; text-decoration: none; }
.side-role { font-size: 0.85rem; color: #93a3b8; margin: 4px 0 16px; }

.socials { display: flex; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 0 0 28px; }
.socials a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #151e2c; color: #dbe5f1;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.socials a:hover { background: var(--glow); color: #06101c; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

.side-nav ul { list-style: none; padding: 0; margin: 0; }
.side-nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; margin-bottom: 4px; border-radius: 10px;
  color: var(--side-text); text-decoration: none; font-size: 0.97rem;
  transition: background 0.25s, color 0.25s, padding-left 0.25s;
}
.side-nav a svg { color: #7d8ea5; transition: color 0.25s; }
.side-nav a:hover { background: #121a27; color: #fff; padding-left: 18px; }
.side-nav a:hover svg { color: var(--glow); }
.side-nav a.active { background: rgba(92, 200, 255, 0.14); color: #fff; }
.side-nav a.active svg { color: var(--glow); }

.theme-toggle {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid #243042; background: transparent; color: var(--side-text);
  font: inherit; font-size: 0.9rem; cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.theme-toggle:hover { background: #121a27; color: #fff; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }

/* Menu button and dark overlay: hidden on big screens */
.menu-toggle, .overlay { display: none; }

/* =========================================================
   MAIN AREA
   ========================================================= */
main { margin-left: var(--side-w); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 36px; }

.section { padding: 96px 0; scroll-margin-top: 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 6px; color: var(--accent);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.section-head h2, .contact-card h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); position: relative; padding-bottom: 14px; }
.section-head h2::after, .contact-card h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #8a7dff);
}
.sub-title { font-size: 1.3rem; margin: 64px 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 8px 20px var(--accent-soft); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 80px 8%;
  color: #fff; overflow: hidden;
  background: radial-gradient(ellipse at 70% 20%, #13284a 0%, #0a1222 55%, #060b14 100%);
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-content { position: relative; max-width: 760px; }
.hero-hello { color: #9fb2c9; font-size: 1.15rem; margin-bottom: 4px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }

.typed-line { font-family: var(--font-head); font-size: clamp(1.15rem, 2.6vw, 1.7rem); font-weight: 500; color: var(--glow); min-height: 1.6em; margin-bottom: 20px; }
.caret {
  display: inline-block; width: 3px; height: 1.1em; margin-left: 4px; vertical-align: -0.15em;
  background: var(--glow); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-lead { color: #c3cfde; font-size: 1.08rem; max-width: 620px; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.hero .btn-primary { background: var(--glow); color: #06101c; }
.hero .btn-primary:hover { box-shadow: 0 0 24px rgba(92, 200, 255, 0.45); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.hero-loc { display: flex; align-items: center; gap: 8px; color: #9fb2c9; font-size: 0.95rem; }
.hero-loc svg { width: 18px; height: 18px; }

/* Little mouse icon at the bottom */
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: wheel 1.6s infinite;
}
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-intro { font-size: 1.1rem; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.check-list li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.35em + 5px); width: 6px; height: 4px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; list-style: none; padding: 0; margin: 0; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  transition: transform 0.25s, border-color 0.25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat-num { display: block; font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.88rem; color: var(--muted); line-height: 1.4; }

.principles {
  list-style: none; padding: 0; margin: 0; counter-reset: p;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px;
}
.principle {
  counter-increment: p; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 22px 70px; font-size: 0.97rem; color: var(--muted);
  transition: transform 0.25s, box-shadow 0.25s;
}
.principle strong { display: block; color: var(--text); margin-bottom: 4px; }
.principle::before {
  content: counter(p, decimal-leading-zero);
  position: absolute; left: 20px; top: 20px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--accent);
}
.principle:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* =========================================================
   PROJECTS
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-btn {
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.92rem; font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { border-color: var(--accent); }
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.project-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project-card[hidden] { display: none; }
.project-card:not([hidden]) { animation: pop 0.4s ease; }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* Soft light that follows the mouse over a card */
.project-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(92, 200, 255, 0.12), transparent 45%);
  transition: opacity 0.3s;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.project-card:hover::before { opacity: 1; }

.card-top {
  display: flex; flex-direction: column; gap: 2px;
  padding: 22px; color: #fff;
  background: linear-gradient(135deg, #0a5fa8, #0b6f8f);
}
.project-card[data-category~="dl"] .card-top { background: linear-gradient(135deg, #4b32b0, #0a5fa8); }
.card-cat { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; }
.card-metric { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; margin-top: 6px; }
.card-metric-label { font-size: 0.88rem; opacity: 0.95; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 2px; }
.card-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }
.card-body > p:not(.card-sub) { font-size: 0.95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 18px; }
.tags li {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px;
}

.card-actions { position: relative; z-index: 2; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.details-btn {
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); border: 0;
  font: inherit; font-size: 0.9rem; font-weight: 600;
  transition: transform 0.2s;
}
.details-btn:hover { transform: translateY(-2px); }
.card-actions a { font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.card-actions a:hover { text-decoration: underline; }

/* More projects */
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.more-card a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: transform 0.25s, border-color 0.25s;
}
.more-card a:hover { transform: translateY(-4px); border-color: var(--accent); }
.more-card strong { color: var(--accent); }
.more-card span { font-size: 0.9rem; color: var(--muted); }

/* Pop-up window */
.project-dialog {
  width: min(640px, calc(100% - 32px)); max-height: 85vh;
  padding: 32px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.project-dialog[open] { animation: pop 0.3s ease; }
.project-dialog::backdrop { background: rgba(4, 8, 16, 0.65); backdrop-filter: blur(4px); }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.dialog-close:hover { border-color: var(--accent); color: var(--accent); }
.dialog-body h3 { font-size: 1.6rem; margin-right: 40px; margin-bottom: 4px; }
.dialog-sub { color: var(--muted); }
.metrics { padding-left: 20px; margin: 16px 0 24px; }
.metrics li { margin-bottom: 10px; }
.metrics strong { color: var(--accent); }

/* =========================================================
   EXPERIENCE TIMELINE
   ========================================================= */
.timeline { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; max-width: 860px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), var(--border));
}
.t-item {
  position: relative; margin-bottom: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.t-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.t-item::before {
  content: ""; position: absolute; left: -33px; top: 26px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  transition: background 0.25s;
}
.t-item:hover::before { background: var(--accent); }
.t-date {
  display: inline-block; margin-bottom: 8px; padding: 2px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.82rem; font-weight: 600;
}
.t-item h3 { font-size: 1.15rem; margin-bottom: 2px; }
.t-org { color: var(--muted); font-style: italic; font-size: 0.95rem; }
.t-item ul { padding-left: 20px; margin: 0; font-size: 0.96rem; }
.t-item li { margin-bottom: 6px; }

/* =========================================================
   SKILLS TABS
   ========================================================= */
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab-list [role="tab"] {
  padding: 10px 20px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--muted);
  font: inherit; font-weight: 600; font-size: 0.93rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab-list [role="tab"]:hover { color: var(--text); border-color: var(--accent); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.tab-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; min-height: 160px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: 8px 16px; border-radius: 999px; font-size: 0.93rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--bg);
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
  animation: chip-in 0.4s both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.chips li:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   EDUCATION
   ========================================================= */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.edu-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform 0.25s, border-color 0.25s;
}
.edu-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.edu-card h3 { font-size: 1.15rem; }
.cert-list { list-style: none; padding: 0; margin: 0; }
.cert-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 0.95rem; }
.cert-list li:last-child { border-bottom: 0; }
.cert-list span { color: var(--muted); white-space: nowrap; font-size: 0.85rem; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-card {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 48px 32px; box-shadow: var(--shadow);
}
.contact-card h2::after { left: 50%; margin-left: -28px; }
.email-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 24px 0; }
.email-link { font-family: var(--font-head); font-size: clamp(1.05rem, 2.5vw, 1.4rem); font-weight: 600; text-decoration: none; word-break: break-all; }
.email-link:hover { text-decoration: underline; }
.copy-btn {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 0.85rem; font-weight: 600;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.site-footer { padding: 28px 36px; text-align: center; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); }
.site-footer p { margin: 0; }

/* Back-to-top button */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }

/* =========================================================
   SCROLL-IN ANIMATION (only when JavaScript is running)
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* =========================================================
   TABLETS AND PHONES (narrower than 992px)
   The sidebar slides in from the left when the menu button is tapped.
   ========================================================= */
@media (max-width: 991px) {
  main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); visibility: hidden; box-shadow: 0 0 40px rgba(0, 0, 0, 0.5); }
  .menu-open .sidebar { transform: none; visibility: visible; }

  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: fixed; top: 14px; right: 14px; z-index: 120;
    width: 46px; height: 46px; padding: 0 12px; border-radius: 50%; cursor: pointer;
    border: 0; background: var(--glow); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  }
  .menu-toggle span { display: block; height: 2px; background: #06101c; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .overlay { position: fixed; inset: 0; z-index: 95; background: rgba(4, 8, 16, 0.55); }
  .menu-open .overlay { display: block; }

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

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .hero { padding: 90px 22px 80px; }
  .project-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 1.35rem; }
  .project-dialog { padding: 26px 20px; }
  .timeline { padding-left: 26px; }
  .t-item::before { left: -29px; }
  .timeline::before { left: 4px; }
  .cert-list li { flex-direction: column; gap: 0; }
}

/* Visitors who ask their device for less motion get a calm page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
