/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { font-family: "Plus Jakarta Sans", sans-serif; color: #F4F7FB; background: #29104A; }

/* ── PAGES ── */
.page {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: translateY(20px);
  overflow-y: auto; overflow-x: hidden;
}
.page.active { opacity: 1; pointer-events: all; transform: translateY(0); }
.page.exit   { opacity: 0; transform: translateY(-20px); }
body.preload .page { transition: none !important; }

#page-home     { background: #03122F; }
#page-about    { background: #181A2F; }
#page-skills   { background: #0D1137; }
#page-homelab  { background: #272640; }
#page-approach { background: #212f45; }
#page-contact  { background: #144552; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px;
  padding: clamp(8px, 1.5vh, 18px) clamp(14px, 4vw, 56px);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo {
  font-size: clamp(0.75rem, 1.5vw, 0.95rem); font-weight: 800;
  color: #fff; letter-spacing: 0.03em; white-space: nowrap;
}
.nav-logo span { color: #C48CB3; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.nav-links button {
  background: none; border: none; cursor: pointer;
  padding: clamp(4px, 0.8vh, 7px) clamp(8px, 1.2vw, 18px); border-radius: 40px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(0.58rem, 1vw, 0.78rem); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); white-space: nowrap;
  transition: all 0.2s;
}
.nav-links button:hover  { color: #fff; background: rgba(255,255,255,0.07); }
.nav-links button.active { color: #fff; background: rgba(255,255,255,0.12); }

/* Hamburger — hidden on desktop */
.nav-toggle-cb { display: none; }
.hamburger     { display: none; }
.ham-line {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── PAGE INNER ── */
.page-inner {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(68px, 10vh, 110px) clamp(16px, 5vw, 56px) clamp(24px, 4vh, 56px);
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.page-inner.scrollable { justify-content: flex-start; overflow-y: visible; max-height: none; }

/* ── HOME ── */
#page-home .page-inner { justify-content: flex-start; min-height: max(100vh, 500px); padding-top: clamp(58px, 8vh, 90px); }
#page-home .home-badge      { margin-bottom: clamp(10px, 1.5vh, 18px); }
#page-home h1               { margin-bottom: clamp(12px, 1.8vh, 20px); }
#page-home .typewriter-wrap { margin-bottom: clamp(14px, 2vh, 24px); min-height: 1.6em; }
#page-home .home-bio        { margin-bottom: clamp(14px, 2vh, 28px); line-height: 1.7; }
#page-home .home-actions    { margin-bottom: clamp(10px, 1.5vh, 18px); }
#page-home .stats-row       { margin-top:    clamp(12px, 2vh,   28px); }
.home-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 40px;
  border: 1px solid rgba(196,140,179,0.3);
  background: rgba(196,140,179,0.08);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #C48CB3; margin-bottom: 28px; width: fit-content;
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #C48CB3; animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

h1 {
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 800; line-height: 0.95;
  color: #fff; letter-spacing: -0.02em; margin-bottom: 16px;
}
h1 .blue { color: #83A6CE; }

.typewriter-wrap {
  display: flex; align-items: center;
  font-family: "DM Mono", monospace;
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  color: #C48CB3; font-weight: 500;
  margin-bottom: 28px; min-height: 2em;
}
.typewriter-text   { color: #E5C9D7; }
.typewriter-cursor {
  display: inline-block; width: 2px; height: 1.1em;
  background: #C48CB3; margin-left: 2px;
  animation: blink 1s step-end infinite; vertical-align: middle;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.home-bio {
  font-size: clamp(0.82rem, 1.4vw, 0.97rem); font-weight: 300;
  color: rgba(229,201,215,0.65);
  max-width: 69ch; line-height: 1.85;
  margin-bottom: clamp(20px, 3.5vh, 44px); text-align: justify;
}
.contact-row  { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(20px, 3.5vh, 44px); }
.home-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: clamp(10px, 1.5vh, 18px); }
.chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8); text-decoration: none;
  font-size: 0.78rem; font-weight: 500; transition: all 0.2s;
}
.chip:hover { border-color: #83A6CE; color: #83A6CE; background: rgba(131,166,206,0.1); }
.chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 8px;
  font-weight: 700; font-size: 0.83rem;
  letter-spacing: 0.04em; cursor: pointer;
  border: none; transition: all 0.18s; font-family: inherit;
}
.btn-solid   { background: #83A6CE; color: #181A2F; }
.btn-solid:hover { background: #E5C9D7; transform: translateY(-2px); }
.btn-outline { border: 1px solid rgba(255,255,255,0.15); color: #fff; background: transparent; }
.btn-outline:hover { border-color: #C48CB3; color: #C48CB3; }

/* ── STATS ── */
.stats-row {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden;
  margin-top: clamp(20px, 4vh, 52px); width: fit-content; max-width: 100%;
}
.stat {
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.5vw, 28px); text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stat:last-child { border-right: none; }
.stat-n { display: block; font-size: clamp(1.1rem, 2.5vw, 1.8rem); font-weight: 800; color: #83A6CE; line-height: 1; }
.stat-l { display: block; font-size: clamp(0.52rem, 0.9vw, 0.62rem); color: rgba(229,201,215,0.5); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 5px; font-weight: 600; }

/* ── SECTION TITLES ── */
.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #C48CB3; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; display: block; width: 18px; height: 1px; background: #C48CB3; }
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 800; color: #fff;
  letter-spacing: -0.015em; margin-bottom: clamp(20px, 3.5vh, 44px); line-height: 1.05;
}
h2 .blue { color: #83A6CE; }
h2 .pink { color: #C48CB3; }

/* ── ABOUT ── */
.about-layout { display: grid; grid-template-columns: clamp(180px, 16vw, 280px) 1fr; gap: 56px; align-items: start; }
.about-layout > * { min-width: 0; }
.photo-info { display: flex; flex-direction: column; min-width: 0; }
.photo-wrap   { position: relative; }
.photo-circle {
  width: clamp(160px, 14vw, 260px); height: clamp(160px, 14vw, 260px); border-radius: 50%;
  overflow: hidden; border: 3px solid rgba(131,166,206,0.3);
  box-shadow: 0 0 40px rgba(131,166,206,0.15);
}
.photo-circle img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.photo-name  { margin-top: 16px; margin-bottom: 6px; text-align: center; font-size: 0.85rem; font-weight: 700; color: #fff; }
.photo-title { text-align: center; font-size: 0.7rem; color: rgba(229,201,215,0.6); font-family: "DM Mono", monospace; letter-spacing: 0.1em; margin-top: 4px; margin-bottom: 6px; }
.about-role  { font-family: "DM Mono", monospace; font-size: 0.67rem; letter-spacing: 0.14em; text-transform: uppercase; color: #83A6CE; margin-bottom: 16px; font-weight: 500; }
.about-text  { font-size: clamp(0.82rem, 1.3vw, 0.95rem); font-weight: 300; color: rgba(229,201,215,0.7); line-height: 1.9; margin-bottom: clamp(16px, 2.5vh, 32px); text-align: justify; overflow-wrap: break-word; word-break: break-word; }
.quads   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quad    { padding: 18px 20px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); transition: border-color 0.2s, transform 0.18s; cursor: default; }
.quad:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.quad-k  { font-family: "DM Mono", monospace; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #83A6CE; margin-bottom: 6px; font-weight: 500; }
.quad p  { font-size: 0.8rem; color: rgba(229,201,215,0.65); line-height: 1.6; font-weight: 300; text-align: justify; }

/* ── WINS ── */
.wins-heading { margin-top: 40px; }
.wins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 36px; }
.win-card {
  padding: 22px 24px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04); transition: border-color 0.2s;
}
.win-card:hover { border-color: rgba(131,166,206,0.35); }
.win-num    { font-family: "DM Mono", monospace; font-size: 0.6rem; color: #C48CB3; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 8px; }
.win-card h4 { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.win-card p  { font-size: 0.78rem; color: rgba(229,201,215,0.65); line-height: 1.65; font-weight: 300; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.skill-card {
  padding: 26px 24px; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; background: rgba(255,255,255,0.04);
  transition: border-color 0.2s, transform 0.18s;
}
.skill-card:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.skill-ico  { margin-bottom: 12px; }
.skill-ico img { width: 26px; height: 26px; display: block; }
.skill-card h3 { font-size: 0.92rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.skill-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.skill-card li { font-size: 0.77rem; color: rgba(229,201,215,0.65); font-weight: 300; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.skill-card li::before { content: "›"; color: #83A6CE; font-size: 0.85rem; flex-shrink: 0; }

/* ── HOMELAB ── */
.homelab-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.lab-updated { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 40px; border: 1px solid rgba(131,166,206,0.3); background: rgba(131,166,206,0.08); font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #83A6CE; }
.lab-updated .upd-dot { width: 5px; height: 5px; border-radius: 50%; background: #6fcf97; animation: pulse 2s infinite; }
.lab-github {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7); text-decoration: none; transition: all 0.2s;
}
.lab-github:hover { border-color: #83A6CE; color: #83A6CE; background: rgba(131,166,206,0.1); }
.lab-github svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

.homelab-layout { display: grid; grid-template-columns: 2.2fr 1.4fr; gap: 28px; align-items: start; }
.diagram-wrap a   { display: block; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.07); transition: border-color 0.2s, transform 0.18s; }
.diagram-wrap a:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.diagram-wrap img { width: 100%; height: auto; display: block; object-fit: contain; }
.hw-list  { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hw-item  { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; background: rgba(255,255,255,0.04); transition: border-color 0.2s, transform 0.18s; }
.hw-item:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.hw-k { font-family: "DM Mono", monospace; font-size: 0.55rem; color: #83A6CE; text-transform: uppercase; letter-spacing: 0.12em; }
.hw-v { font-size: 0.78rem; color: #fff; font-weight: 400; line-height: 1.4; }
.vlan-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.vtag { padding: 3px 10px; border-radius: 40px; font-family: "DM Mono", monospace; font-size: 0.58rem; letter-spacing: 0.07em; font-weight: 500; text-decoration: none; cursor: pointer; transition: opacity 0.2s, transform 0.18s; display: inline-block; }
.vtag:hover { opacity: 0.75; transform: translateY(-2px); }
.v1 { background: rgba(131,166,206,0.12); color: #83A6CE;               border: 1px solid rgba(131,166,206,0.28); }
.v2 { background: rgba(196,140,179,0.10); color: #C48CB3;               border: 1px solid rgba(196,140,179,0.25); }
.v3 { background: rgba(255,255,255,0.05); color: rgba(229,201,215,0.6); border: 1px solid rgba(255,255,255,0.08); }
.v4 { background: rgba(111,207,151,0.10); color: #6fcf97;               border: 1px solid rgba(111,207,151,0.25); }
.v5 { background: rgba(241,196, 15,0.08); color: #f1c40f;               border: 1px solid rgba(241,196, 15,0.20); }

/* Feature blurbs */
.homelab-blurbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.win-sm { padding: 22px 24px; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; background: rgba(255,255,255,0.04); transition: border-color 0.2s, transform 0.18s; }
.win-sm:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.win-sm h4 { font-size: 0.82rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.win-sm p  { font-size: 0.75rem; color: rgba(229,201,215,0.6); font-weight: 300; line-height: 1.6; }

/* Timeline */
.lab-section-title { font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: #C48CB3; margin: 44px 0 24px; text-align: center; }
.lab-timeline { position: relative; width: 100%; padding: 0; }
.lab-timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, #83A6CE, rgba(131,166,206,0.15)); transform: translateX(-50%); }
.tl-item { position: relative; width: 45%; margin-bottom: 36px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 22px 20px; background: rgba(255,255,255,0.03); transition: border-color 0.2s, transform 0.18s; }
.tl-item:hover { border-color: rgba(131,166,206,0.35); transform: translateY(-3px); }
.tl-item:nth-child(odd)  { margin-left: 0; }
.tl-item:nth-child(even) { margin-left: 55%; }
.tl-item:last-child { margin-bottom: 0; }
.tl-date, .tl-title, .tl-desc { text-align: left; }
.tl-desc ul { text-align: left; }
.tl-dot { position: absolute; top: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #83A6CE; background: #1b1b1e; z-index: 1; }
.tl-item:nth-child(odd)  .tl-dot { right: -18px; }
.tl-item:nth-child(even) .tl-dot { left:  -18px; }
.tl-item:first-child .tl-dot { background: #6fcf97; border-color: #6fcf97; box-shadow: 0 0 12px rgba(111,207,151,0.4); }
.tl-date  { font-family: "DM Mono", monospace; font-size: 0.6rem; color: #83A6CE; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; font-weight: 500; }
.tl-title { font-size: 0.88rem; font-weight: 700; color: #E5C9D7; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.tl-desc  { font-size: 0.78rem; color: rgba(229,201,215,0.5); font-weight: 300; line-height: 1.85; margin-top: 10px; }
.tl-desc ul { padding-left: 16px; }
.tl-desc ul li { margin-bottom: 6px; }
.tl-desc ul li:last-child { margin-bottom: 0; }

/* ── APPROACH ── */
.approach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 36px; }
.approach-card {
  padding: 28px 26px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; background: rgba(255,255,255,0.04);
  transition: border-color 0.2s, transform 0.18s;
}
.approach-card:hover { border-color: rgba(131,166,206,0.3); transform: translateY(-2px); }
.approach-num { font-family: "DM Mono", monospace; font-size: 0.6rem; color: #C48CB3; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 10px; }
.approach-card h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.approach-card p  { font-size: 0.8rem; color: rgba(229,201,215,0.65); font-weight: 300; line-height: 1.7; }

/* ── CERTS ── */
.certs-section { margin-top: 36px; }
.certs-label { font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: #C48CB3; margin-bottom: 16px; }
.certs-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-badge {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  font-size: 0.75rem; font-weight: 600; color: #fff;
}
.cert-badge .cert-icon  { font-size: 1rem; }
.cert-badge.inprogress  { border-color: rgba(196,140,179,0.3); background: rgba(196,140,179,0.06); }
.cert-badge.inprogress .cert-label { color: #C48CB3; }
.cert-year { font-family: "DM Mono", monospace; font-size: 0.62rem; color: rgba(229,201,215,0.45); margin-left: 4px; }

/* ── CONTACT ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact-tagline { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; color: #F4F7FB; max-width: 440px; line-height: 1.4; margin-bottom: 12px; }
.contact-sub     { font-size: 0.9rem; color: rgba(244,247,251,0.65); margin-bottom: 36px; font-weight: 300; }
.contact-chips   { display: flex; flex-direction: column; gap: 12px; }
.contact-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: #F4F7FB; text-decoration: none;
  font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
}
.contact-chip:hover { background: rgba(255,255,255,0.14); transform: translateX(4px); }
.contact-chip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.avail-box    { padding: 36px; border-radius: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.avail-label  { font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244,247,251,0.5); margin-bottom: 12px; }
.avail-status { font-size: 1.6rem; font-weight: 800; color: #F4F7FB; margin-bottom: 8px; }
.avail-dot    { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C48CB3; margin-right: 8px; animation: pulse 2s infinite; }
.avail-text   { font-size: 0.85rem; color: rgba(244,247,251,0.6); font-weight: 300; line-height: 1.7; }
.avail-text + .avail-text { margin-top: 16px; }

/* ── PAGE DOTS ── */
.page-dots {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 300;
}
.page-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.25); cursor: pointer;
  transition: all 0.3s; border: none;
}
.page-dot.active { background: #fff; height: 20px; border-radius: 3px; }

/* ── RESPONSIVE ── */

/* Mobile nav (hamburger): < 768px */
@media (max-width: 767px) {
  .hamburger {
    display: flex; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 8px 4px; z-index: 210;
    background: none; border: none;
    -webkit-tap-highlight-color: transparent;
  }
  nav { flex-wrap: nowrap; }
  .nav-logo { font-size: 0.95rem; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(3,6,20,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    gap: 4px; max-height: 0; overflow: hidden;
    opacity: 0; pointer-events: none; z-index: 205;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1),
                opacity    0.3s ease,
                padding    0.4s cubic-bezier(0.4,0,0.2,1);
  }
  .nav-toggle-cb:checked ~ .nav-links {
    max-height: 100vh; opacity: 1; pointer-events: all;
    padding: 80px 24px 32px;
  }
  .nav-links li { width: 100%; }
  .nav-links button {
    width: 100%; text-align: left;
    font-size: 1rem; padding: 14px 18px;
    border-radius: 10px; letter-spacing: 0.05em;
    color: rgba(255,255,255,0.65);
  }
  .nav-links button:hover,
  .nav-links button.active { color: #fff; background: rgba(255,255,255,0.08); }
  .nav-toggle-cb:checked ~ .hamburger .ham-line:nth-child(1) { transform: translateY(7px)  rotate( 45deg); }
  .nav-toggle-cb:checked ~ .hamburger .ham-line:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .hamburger .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Tablet: ≤ 860px */
@media (max-width: 860px) {
  .page-dots  { display: none; }
  .about-layout { grid-template-columns: 1fr; gap: 20px; }
  .photo-wrap   { display: flex !important; flex-direction: row !important; align-items: center; gap: 16px; }
  .photo-circle { width: clamp(72px, 14vw, 110px) !important; height: clamp(72px, 14vw, 110px) !important; flex-shrink: 0; }
  .photo-info   { flex: 1 1 0; min-width: 0; overflow: hidden; flex-direction: column; }
  .photo-name   { margin-top: 0 !important; text-align: left !important; white-space: normal; }
  .photo-title  { text-align: left !important; white-space: normal; overflow: hidden; text-overflow: ellipsis; }
  .about-layout > div:last-child { overflow: hidden; min-width: 0; max-width: 100%; }
  .homelab-layout { grid-template-columns: 1fr; gap: 24px; }
  .contact-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* Mobile portrait: ≤ 600px */
@media (max-width: 600px) {
  .page-inner { padding: clamp(72px, 11vh, 85px) 16px 24px; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .wins-grid, .approach-grid, .quads { grid-template-columns: 1fr; }
  .contact-row { flex-direction: column; align-items: flex-start; }
  .stats-row   { width: 100%; }
  .stat { flex: 1 1 auto; min-width: calc(33% - 1px); border-right: 1px solid rgba(255,255,255,0.08); }
  .home-bio { text-align: left; }
  #page-home .home-actions { gap: 8px; }
  #page-home .home-actions .btn  { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 10px 14px; }
  #page-home .home-actions .chip { flex: 1 1 calc(50% - 4px); justify-content: center; font-size: 0.7rem; padding: 7px 10px; }
  .about-text { text-align: left; }
  /* Skills grid: allow narrower cards on small phones */
  .skills-grid { grid-template-columns: 1fr; }

  /* Timeline: collapse zigzag to single left-aligned column */
  .lab-timeline::before { left: 14px; transform: none; }
  .tl-item {
    width: 100% !important;
    margin-left: 0 !important;
    text-align: left !important;
    padding-left: 36px !important;
    padding-right: 12px !important;
  }
  .tl-item .tl-dot { left: 8px !important; right: auto !important; }

  /* Homelab blurbs: single column */
  .homelab-blurbs { grid-template-columns: 1fr; }
}

/* Mobile landscape: wide + short */
@media (orientation: landscape) and (max-height: 600px) {
  .page-inner { padding: 58px 16px 18px; justify-content: flex-start; }
  #page-home .page-inner { min-height: unset; }
  h1 { font-size: clamp(1.5rem, 5vw, 2.6rem); margin-bottom: 5px; }
  h2 { font-size: clamp(1rem, 3vw, 1.5rem); margin-bottom: 10px; }
  .home-badge    { margin-bottom: 7px; }
  .typewriter-wrap { margin-bottom: 7px; min-height: unset; }
  .home-bio      { margin-bottom: 8px; font-size: 0.82rem; }
  .contact-row   { margin-bottom: 8px; }
  .stats-row     { margin-top: 10px; }
  .stat          { padding: 7px 12px; }
  .stat-n        { font-size: 1rem; }
  .about-layout  { grid-template-columns: clamp(110px, 18vw, 150px) 1fr !important; gap: 18px; align-items: start; }
  .photo-wrap    { flex-direction: column !important; align-items: center; }
  .photo-circle  { width: clamp(80px, 12vw, 108px) !important; height: clamp(80px, 12vw, 108px) !important; }
  .photo-name    { margin-top: 8px !important; text-align: center !important; font-size: 0.74rem; }
  .photo-title   { text-align: center !important; }
  .quads         { grid-template-columns: 1fr 1fr; gap: 6px; }
  .quad          { padding: 8px 10px; }
  .homelab-layout { grid-template-columns: 1fr 1fr !important; gap: 16px; }
  .contact-layout { grid-template-columns: 1fr 1fr !important; gap: 20px; align-items: start; }
  .wins-grid, .approach-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .win-card, .approach-card  { padding: 10px 12px; }
  .skills-grid   { grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 8px; }
  .skill-card    { padding: 12px; }
  .avail-box     { padding: 16px; }
  .page-dots     { display: none; }
}
