:root{
  color-scheme: light dark;
  --bg: #f5f7fb;
  --bg-elev: rgba(255,255,255,0.76);
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --text: #18212f;
  --muted: #5d6778;
  --line: rgba(24,33,47,0.08);
  --line-strong: rgba(24,33,47,0.14);
  --primary: #4f46e5;
  --primary-soft: rgba(79,70,229,0.12);
  --secondary: #0f766e;
  --shadow: 0 18px 60px rgba(40, 52, 89, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1240px;
  --header-height: 82px;
  --grad-a: rgba(79,70,229,0.18);
  --grad-b: rgba(15,118,110,0.14);
  --hero-ring: rgba(79,70,229,0.1);
}

[data-theme="dark"]{
  --bg: #0a0f18;
  --bg-elev: rgba(14,20,33,0.74);
  --surface: #101827;
  --surface-2: #0f172a;
  --text: #e8eef9;
  --muted: #9aa7ba;
  --line: rgba(255,255,255,0.07);
  --line-strong: rgba(255,255,255,0.14);
  --primary: #8b83ff;
  --primary-soft: rgba(139,131,255,0.18);
  --secondary: #36c7b4;
  --shadow: 0 18px 60px rgba(0,0,0,0.35);
  --grad-a: rgba(139,131,255,0.14);
  --grad-b: rgba(54,199,180,0.12);
  --hero-ring: rgba(139,131,255,0.12);
}

*{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, var(--grad-a), transparent 34%),
    radial-gradient(circle at 90% 18%, var(--grad-b), transparent 28%),
    radial-gradient(circle at 75% 80%, var(--grad-a), transparent 24%),
    var(--bg);
  color:var(--text);
  min-height:100vh;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size:36px 36px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  opacity:.35;
}

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

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

button{
  font:inherit;
  cursor:pointer;
}

.site-shell{
  position:relative;
  width:min(100%, calc(var(--max) + 40px));
  margin-inline:auto;
  padding:18px 20px 48px;
}

.topbar{
  position:sticky;
  top:16px;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:var(--header-height);
  padding:16px 18px;
  margin-bottom:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--bg-elev);
  backdrop-filter:blur(16px);
  box-shadow:var(--shadow);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:max-content;
}

.brand-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 0 0 8px var(--primary-soft);
}

.brand-text{
  font-weight:700;
  letter-spacing:.02em;
}

.nav-links{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1;
}

.nav-link{
  padding:10px 14px;
  border-radius:999px;
  color:var(--muted);
  font-size:.95rem;
  transition:.25s ease;
}

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

.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;
  flex-shrink:0;
}

.prefs-btn{
  display:none;
  width:46px;
  height:46px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  align-items:center;
  justify-content:center;
  transition:transform .25s ease, background-color .25s ease, border-color .25s ease;
}

.prefs-btn:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  border-color:transparent;
}

.topbar-panel{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--bg-elev);
  backdrop-filter:blur(14px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.panel-section{
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px;
}

.panel-section + .panel-section{
  padding-inline-start:12px;
  margin-inline-start:2px;
  border-inline-start:1px solid var(--line);
}

.panel-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--primary-soft);
  color:var(--primary);
  flex-shrink:0;
}

.segmented-control{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
}

.chip-btn{
  border:0;
  background:transparent;
  color:var(--muted);
  min-height:38px;
  padding:0 12px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-weight:600;
  letter-spacing:.01em;
  transition:
    background-color .25s ease,
    color .25s ease,
    transform .25s ease;
}

.chip-btn:hover{
  color:var(--text);
  background:rgba(79,70,229,0.08);
}

.chip-btn.active{
  color:var(--text);
  background:linear-gradient(
    135deg,
    var(--primary-soft),
    color-mix(in srgb, var(--primary-soft) 60%, transparent)
  );
}

.theme-btn[data-theme="system"]::before{
  content:"◐";
  font-size:.95rem;
}

.theme-btn[data-theme="light"]::before{
  content:"☀";
  font-size:.95rem;
}

.theme-btn[data-theme="dark"]::before{
  content:"☾";
  font-size:.95rem;
}

.menu-btn{
  display:none;
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--surface);
  padding:10px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  transition:transform .25s ease, background-color .25s ease, border-color .25s ease;
}

.menu-btn:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  border-color:transparent;
}

.menu-btn span{
  width:100%;
  height:2px;
  border-radius:999px;
  background:var(--text);
}

.section{
  padding:42px 0;
}

.section-head{
  margin-bottom:20px;
}

.section-head-row{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.eyebrow{
  margin:0 0 10px;
  color:var(--secondary);
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:.78rem;
  font-weight:700;
}

h1,h2,h3,p{
  margin:0;
}

h2{
  font-size:clamp(1.65rem, 4vw, 2.45rem);
  line-height:1.1;
}

.hero{
  padding-top:18px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:26px;
  align-items:center;
}

.hero-copy,
.hero-visual,
.card,
.contact-card{
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:var(--bg-elev);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
}

.hero-copy{
  padding:30px;
}

.hero-title{
  font-size:clamp(2.35rem, 6vw, 5.25rem);
  line-height:.95;
  letter-spacing:-.03em;
  max-width:10ch;
}

.hero-subtitle{
  margin-top:18px;
  color:var(--muted);
  font-size:1.05rem;
  line-height:1.85;
  max-width:62ch;
}

.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}

.badge{
  padding:10px 14px;
  border-radius:999px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
  font-size:.92rem;
}

.hero-cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.primary-btn,
.secondary-btn,
.doc-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:50px;
  padding:0 20px;
  border-radius:16px;
  font-weight:600;
  transition:transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.primary-btn{
  background:linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 50%, var(--secondary)));
  color:#fff;
  box-shadow:0 14px 36px rgba(79,70,229,0.26);
}

.secondary-btn,
.doc-link{
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
}

.primary-btn:hover,
.secondary-btn:hover,
.doc-link:hover{
  transform:translateY(-2px);
}

.quick-info{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:26px;
}

.quick-info:empty{
  display:none;
}

.info-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
  padding:14px;
  border-radius:18px;
  background:var(--surface);
  border:1px solid var(--line);
}

.info-item span:first-child{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--primary-soft);
  flex-shrink:0;
}

.info-item p{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.6;
}

.hero-visual{
  position:relative;
  min-height:100%;
  padding:26px;
  overflow:hidden;
}

.photo-frame{
  position:relative;
  width:min(100%, 440px);
  margin-inline:auto;
  border-radius:32px;
  overflow:hidden;
  background:linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, transparent));
  border:1px solid var(--line-strong);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05);
}

.photo-frame::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:26px;
  border:1px solid var(--hero-ring);
  pointer-events:none;
  z-index:2;
}

.profile-photo{
  width:100%;
  aspect-ratio:1 / 1.08;
  object-fit:cover;
}

.glow{
  position:absolute;
  border-radius:50%;
  filter:blur(24px);
  opacity:.8;
  pointer-events:none;
}

.glow-one{
  width:150px;
  height:150px;
  background:var(--grad-a);
  top:8%;
  inset-inline-start:8%;
}

.glow-two{
  width:190px;
  height:190px;
  background:var(--grad-b);
  bottom:8%;
  inset-inline-end:8%;
}

.about-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:20px;
}

.card{
  padding:24px;
}

.glass-card p{
  color:var(--muted);
  line-height:1.95;
  font-size:1rem;
}

.metrics-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.metric-item{
  padding:18px;
  border-radius:20px;
  background:var(--surface);
  border:1px solid var(--line);
  min-height:120px;
}

.metric-item h3{
  font-size:1.1rem;
  margin-bottom:10px;
}

.metric-item p{
  color:var(--muted);
  line-height:1.65;
  font-size:.95rem;
}

.skills-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.skill-card{
  padding:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--bg-elev);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
}

.skill-card h3{
  margin-bottom:14px;
  font-size:1.08rem;
}

.skill-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.skill-pill{
  padding:10px 12px;
  border-radius:999px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--muted);
  font-size:.92rem;
}

.timeline{
  position:relative;
  display:grid;
  gap:18px;
}

.timeline::before{
  content:"";
  position:absolute;
  top:8px;
  bottom:8px;
  inset-inline-start:19px;
  width:2px;
  background:linear-gradient(var(--primary), transparent);
  opacity:.4;
}

.timeline-item{
  position:relative;
  padding-inline-start:62px;
  padding-block:4px;
}

.timeline-dot{
  position:absolute;
  inset-inline-start:8px;
  top:18px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:var(--surface);
  border:2px solid var(--primary);
  box-shadow:0 0 0 8px var(--primary-soft);
}

.timeline-card{
  padding:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--bg-elev);
  box-shadow:var(--shadow);
}

.timeline-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.timeline-meta{
  color:var(--muted);
  font-size:.94rem;
  margin-top:6px;
}

.timeline-list{
  margin-top:14px;
  display:grid;
  gap:10px;
  padding:0;
  list-style:none;
}

.timeline-list li{
  color:var(--muted);
  line-height:1.75;
  position:relative;
  padding-inline-start:20px;
}

.timeline-list li::before{
  content:"";
  position:absolute;
  inset-inline-start:0;
  top:.7em;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--secondary);
}

.certs-grid,
.docs-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.cert-card,
.doc-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--bg-elev);
  box-shadow:var(--shadow);
}

.cert-thumb{
  aspect-ratio:16 / 11;
  object-fit:cover;
  width:100%;
  border-radius:18px;
  border:1px solid var(--line);
  cursor:pointer;
}

.cert-body{
  padding-top:14px;
}

.cert-body h3,
.doc-card h3{
  margin-bottom:8px;
  font-size:1.06rem;
}

.cert-body p,
.doc-card p{
  color:var(--muted);
  line-height:1.7;
  font-size:.94rem;
}

.cert-slider{
  display:grid;
  gap:18px;
  width:100%;
}

.cert-card-slider{
  padding:20px;
}

.cert-slider-layout{
  display:grid;
  grid-template-columns:minmax(320px, 1.1fr) minmax(280px, .9fr);
  gap:20px;
  align-items:stretch;
}

.cert-slider-media{
  position:relative;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  background:var(--surface);
  min-height:320px;
}

.cert-media-nav{
  position:absolute;
  inset-inline:16px;
  bottom:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
  z-index:3;
}

.cert-media-nav-btn{
  width:48px;
  height:48px;
  border:1px solid rgba(255,255,255,0.14);
  border-radius:16px;
  background:rgba(15,23,42,0.42);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(12px);
  box-shadow:0 10px 28px rgba(0,0,0,0.22);
  transition:
    transform .25s ease,
    background-color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
  pointer-events:auto;
}

.cert-media-nav-btn:hover{
  transform:translateY(-2px) scale(1.03);
  background:rgba(79,70,229,0.38);
  border-color:rgba(255,255,255,0.22);
  box-shadow:0 14px 34px rgba(0,0,0,0.28);
}

.cert-media-nav-btn:focus-visible{
  outline:2px solid #fff;
  outline-offset:2px;
}

.cert-media-nav-btn i{
  font-size:1rem;
  line-height:1;
}

.cert-slider-image{
  width:100%;
  height:100%;
  object-fit:cover;
  cursor:pointer;
}

.cert-slider-body{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
}

.cert-slider-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:8px 12px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--text);
  font-size:.85rem;
  font-weight:700;
}

.cert-slider-body h3{
  font-size:clamp(1.15rem, 2.5vw, 1.6rem);
  line-height:1.3;
}

.cert-slider-body p{
  color:var(--muted);
  line-height:1.9;
  font-size:.98rem;
}

.cert-preview-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  font-weight:600;
  transition:transform .25s ease, background-color .25s ease, border-color .25s ease;
}

.cert-preview-btn:hover{
  transform:translateY(-2px);
  background:var(--primary-soft);
  border-color:transparent;
}

.cert-slider-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
}

.cert-slider-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  width:100%;
}

.cert-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  border:0;
  padding:0;
  background:var(--line-strong);
  transition:all .25s ease;
}

.cert-dot.active{
  width:30px;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
}

.cert-thumb-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(90px, 1fr));
  gap:10px;
}

.cert-thumb-mini{
  padding:0;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  overflow:hidden;
  aspect-ratio:4 / 3;
  transition:border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.cert-thumb-mini img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.72;
  transition:opacity .25s ease, transform .25s ease;
}

.cert-thumb-mini:hover{
  transform:translateY(-2px);
}

.cert-thumb-mini:hover img,
.cert-thumb-mini.active img{
  opacity:1;
  transform:scale(1.03);
}

.cert-thumb-mini.active{
  border-color:var(--primary);
  box-shadow:0 0 0 4px var(--primary-soft);
}

.doc-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
}

.contact-shell{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:20px;
  align-items:stretch;
}

.contact-copy{
  padding:26px;
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:linear-gradient(160deg, var(--bg-elev), var(--surface));
  box-shadow:var(--shadow);
}

.contact-text{
  color:var(--muted);
  line-height:1.9;
  margin-top:12px;
}

.hero-social{
  margin-top:22px;
}

.social-links{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.social-link{
  width:52px;
  height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
  font-size:1.15rem;
  transition:transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.social-link:hover{
  transform:translateY(-2px);
  background:var(--primary-soft);
  color:var(--primary);
  border-color:transparent;
  box-shadow:0 12px 28px rgba(79,70,229,0.14);
}

.social-link:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.contact-card-social{
  margin-top:18px;
  padding-top:18px;
  border-top:1px dashed var(--line-strong);
}

.footer-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.footer-social .social-links{
  gap:10px;
}

.footer-social .social-link{
  width:46px;
  height:46px;
  border-radius:14px;
  font-size:1rem;
}

.contact-card{
  padding:24px;
}

.contact-list{
  display:grid;
  gap:14px;
}

.contact-item{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:16px;
  border-radius:18px;
  background:var(--surface);
  border:1px solid var(--line);
}

.contact-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--primary-soft);
  flex-shrink:0;
}

.contact-item h3{
  font-size:.95rem;
  margin-bottom:4px;
}

.contact-item a,
.contact-item p{
  color:var(--muted);
  line-height:1.7;
  word-break:break-word;
}

.footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--muted);
}

.back-top{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  min-height:54px;
  padding:0 16px;
  border-radius:999px;
  background:var(--surface);
  border:1px solid var(--line);
}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(5,10,18,0.8);
  backdrop-filter:blur(8px);
  z-index:30;
}

.modal.open{
  display:flex;
}

.modal img{
  max-width:min(1200px, 100%);
  max-height:88vh;
  border-radius:24px;
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 30px 80px rgba(0,0,0,0.5);
}

.modal-close{
  position:absolute;
  top:22px;
  inset-inline-end:22px;
  width:52px;
  height:52px;
  border-radius:50%;
  border:0;
  background:rgba(255,255,255,0.12);
  color:#fff;
  font-size:2rem;
  line-height:1;
}

.fade-in{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}

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

@media (max-width: 1120px){
  .nav-links{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    inset-inline:0;
    padding:12px;
    border:1px solid var(--line);
    border-radius:22px;
    background:var(--bg-elev);
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:6px;
  }

  .nav-links.open{
    display:flex;
  }

  .nav-links .nav-link{
    width:100%;
    text-align:center;
    border-radius:16px;
  }

  .menu-btn{
    display:flex;
  }

  .hero-grid,
  .about-grid,
  .contact-shell{
    grid-template-columns:1fr;
  }
}

@media (max-width: 920px){
  .skills-grid,
  .certs-grid,
  .docs-grid{
    grid-template-columns:1fr;
  }

  .cert-slider-layout{
    grid-template-columns:1fr;
  }

  .topbar{
    flex-wrap:wrap;
    justify-content:space-between;
  }

  .topbar-actions{
    width:auto;
    margin-inline-start:auto;
  }

  .prefs-btn{
    display:inline-flex;
  }

  .topbar-panel{
    position:absolute;
    top:calc(100% + 10px);
    inset-inline-end:0;
    z-index:25;
    display:none;
    flex-direction:column;
    align-items:stretch;
    width:min(340px, calc(100vw - 28px));
    padding:12px;
    border-radius:22px;
    background:var(--bg-elev);
    backdrop-filter:blur(16px);
    box-shadow:var(--shadow);
  }

  .topbar-panel.open{
    display:flex;
  }

  .topbar-panel .panel-section{
    width:100%;
    justify-content:space-between;
    gap:10px;
  }

  .topbar-panel .panel-section + .panel-section{
    border-inline-start:0;
    border-top:1px solid var(--line);
    padding-inline-start:4px;
    margin-inline-start:0;
    padding-top:12px;
    margin-top:2px;
  }

  .segmented-control{
    flex:1;
    justify-content:space-between;
  }

  .segmented-control .chip-btn{
    flex:1;
  }
}

@media (max-width: 680px){
  .site-shell{
    padding-inline:14px;
  }

  .topbar{
    top:10px;
    padding:12px;
    border-radius:20px;
  }

  .prefs-btn,
  .menu-btn{
    width:44px;
    height:44px;
    border-radius:14px;
  }

  .topbar-panel{
    width:min(100vw - 28px, 340px);
    padding:10px;
    border-radius:20px;
  }

  .panel-icon{
    width:34px;
    height:34px;
    border-radius:12px;
  }

  .chip-btn{
    min-height:36px;
    font-size:.9rem;
    padding:0 10px;
  }

  .cert-media-nav{
    inset-inline:12px;
    bottom:12px;
  }

  .cert-media-nav-btn{
    width:42px;
    height:42px;
    border-radius:14px;
  }

  .cert-media-nav-btn i{
    font-size:.92rem;
  }

  .hero-copy,
  .hero-visual,
  .card,
  .contact-copy,
  .contact-card{
    padding:18px;
  }

  .hero-title{
    max-width:none;
  }

  .hero-cta{
    flex-direction:column;
    align-items:stretch;
  }

  .primary-btn,
  .secondary-btn,
  .doc-link{
    width:100%;
  }

  .quick-info,
  .metrics-grid{
    grid-template-columns:1fr;
  }

  .timeline-item{
    padding-inline-start:52px;
  }

  .timeline::before{
    inset-inline-start:14px;
  }

  .timeline-dot{
    inset-inline-start:3px;
  }

  .footer{
    flex-direction:column;
    align-items:flex-start;
  }

  .footer-actions{
    width:100%;
    justify-content:flex-start;
  }

  .cert-thumb-strip{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }

  *, *::before, *::after{
    animation:none !important;
    transition:none !important;
  }
}