/* ==========================================================================
   THEME VARIABLES
   Change the whole look of the site by editing the values below.
   ========================================================================== */
:root {
  /* --- EDITABLE CONTENT: color palette --- */
  --bg: #0B0E10;
  --surface: #12171B;
  --surface-2: #171D22;
  --text: #F1EFEA;
  --muted: #98A2AC;
  --border: #273037;
  --accent: #F0A63A;      /* primary accent — buttons, highlights */
  --accent-2: #62BDB3;    /* secondary accent — tags, links */
  --accent-ink: #1A1300;  /* text color used on top of --accent */

  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --surface-2: #EFECE6;
  --text: #1C1B18;
  --muted: #5C5850;
  --border: #DEDAD2;
  --accent: #B9791F;
  --accent-2: #2F7A72;
  --accent-ink: #FFFFFF;
  color-scheme: light;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--border);
}

.section:first-of-type { border-top: none; }

/* Subtle atmospheric depth keeps the dark theme from feeling flat. */
.section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.section::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 260px;
  right: -180px;
  top: 20%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-2) 7%, transparent);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}
.section > .container { position: relative; z-index: 1; }

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
}

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.section-head p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.02rem;
}


/* reveal-on-scroll (single orchestrated pattern, not per-card) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   SKIP LINK / ACCESSIBILITY
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; top: 16px; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

/* The frosted-glass backdrop lives on its own layer, not on .site-header
   itself. backdrop-filter/filter on an ancestor forces position:fixed
   descendants (the mobile nav panel) to use THAT ancestor as their
   containing block instead of the viewport — which breaks full-screen
   coverage. Keeping the filter on this isolated pseudo-element avoids that. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Header gets a wider container than body sections — it's a utility bar
   holding 12 nav items and needs more breathing room than a reading column. */
.site-header .container {
  max-width: 1440px;
}

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

.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.brand-name .brand-name-last {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 560px) {
  .brand-name { display: none; }
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.86rem;
  white-space: nowrap;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }

.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

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

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    padding: 28px var(--gutter);
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }
  .menu-toggle { display: flex; }
}

@media (min-width: 1181px) {
  .menu-toggle { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}

/* faint dot-grid field behind the hero — signals "data/sensor" territory
   without shouting; fades out toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--accent-2) 35%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, black 0%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4rem);
  letter-spacing: -0.015em;
}

.hero-headline {
  margin-top: 16px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 46ch;
}

.hero-intro {
  margin-top: 20px;
  max-width: 54ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-links {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.hero-links a svg { width: 14px; height: 14px; }
.hero-links a:hover {
  color: var(--text);
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

/* --- stat strip: real counts pulled from data.js, not decorative filler --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(28px, 4vw, 52px);
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
}

.hero-stat-label {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- photo panel with a detection-frame treatment: a nod to the bounding
   boxes in the pothole-detection project rather than a generic headshot --- */
.hero-frame {
  position: relative;
  padding: 16px;
}

.hero-glow {
  position: absolute;
  inset: 30px;
  z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent) 0%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

.hero-panel {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* subtle bottom-fade so the detection tag stays legible over any photo */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

/* corner brackets, offset outside the frame */
.hero-frame::before,
.hero-frame::after,
.hero-corner-br,
.hero-corner-bl {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.hero-frame::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.hero-frame::after { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.hero-corner-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.hero-corner-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }

.hero-tag {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--accent);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(2px);
}

/* Fallback initials avatar — used automatically if hero-avatar is a <div>
   instead of an <img> (e.g. before a photo has been added) */
div.hero-panel-avatar {
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 40px; }
  .hero-frame { max-width: 280px; margin: 0 auto 8px; order: -1; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.btn:hover svg { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, white 15%);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 65%, transparent);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); background: var(--surface); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 24px;
  align-items: stretch;
}

.about-grid > p {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  font-size: 1rem;
  line-height: 1.8;
}

.about-points {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 26px;
}

.about-points li {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 0.94rem;
  line-height: 1.55;
}
.about-points li:first-child { border-top: none; }
.about-points li:last-child { border-bottom: none; }
.about-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
  .about-grid > p { padding: 24px; }
  .about-points { padding: 4px 20px; }
}

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  border-top: 2px solid var(--border);
  transition: border-top-color 0.2s ease, transform 0.2s ease;
}
.skill-card:hover {
  border-top-color: var(--accent-2);
  transform: translateY(-2px);
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-2);
}

.ai-tools-note {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.92rem;
}
.ai-tools-note strong { color: var(--text); }

/* ==========================================================================
   TIMELINE (experience / education / workshops)
   ========================================================================== */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-top: 6px;
}

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

.timeline-item ul {
  margin-top: 12px;
}

.timeline-item ul li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 6px 0;
}
.timeline-item ul li::before {
  content: "—";
  color: var(--border);
  flex-shrink: 0;
}

.timeline-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.filter-btn:hover { color: var(--text); }
.filter-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-2);
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -16px color-mix(in srgb, var(--accent-2) 45%, transparent);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
}

.project-card h3 {
  font-size: 1.12rem;
  margin-top: 10px;
}

.project-date {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.project-card p.project-desc {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  flex-grow: 1;
}

.project-card .tag-list { margin-top: 18px; }

.project-card-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Pill-shaped chip link — used for the "Repository" and "Certificate" links.
   Dark, rounded, icon + label, subtle lift on hover. */
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 100%, black 4%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--text) 6%, transparent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.chip-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--surface-2) 88%, var(--accent-2) 12%);
}

/* Certificate variant — slightly quieter than the primary Repository chip */
.chip-link-outline {
  background: transparent;
  box-shadow: none;
  color: var(--accent-2);
}
.chip-link-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ==========================================================================
   ACHIEVEMENTS
   ========================================================================== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.achievement-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.achievement-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
  position: relative;
}

.achievement-context {
  margin-top: 8px;
  font-size: 0.96rem;
}

.achievement-detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.achievement-date {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* ==========================================================================
   CERTIFICATIONS
   ========================================================================== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.cert-card h3 { font-size: 1rem; }
.cert-course { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
}

.cert-org { color: var(--accent-2); }
.cert-score {
  font-family: var(--font-mono);
  color: var(--accent);
}

/* Certificate chip links need a little top margin wherever they follow
   other content (cert cards, timeline items, workshop list) */
.chip-link {
  margin-top: 14px;
}

/* ==========================================================================
   RESEARCH / LEADERSHIP CALLOUTS
   ========================================================================== */
.single-callout {
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 34px 38px;
}

.callout h3,
.single-callout h3 { font-size: 1.25rem; }
.callout .meta,
.single-callout .meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-top: 10px;
}
.callout p,
.single-callout p { color: var(--muted); margin-top: 10px; }
.callout ul,
.single-callout ul { margin-top: 14px; }
.callout ul li,
.single-callout ul li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 5px 0;
}
.callout ul li::before,
.single-callout ul li::before { content: "—"; color: var(--border); }

/* ==========================================================================
   ACTIVITIES (workshops / community / strengths / hobbies)
   ========================================================================== */
.activities-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
  align-items: start;
}

.activity-column {
  display: grid;
  gap: 24px;
}

.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border));
  box-shadow: 0 14px 30px -24px color-mix(in srgb, var(--text) 30%, transparent);
}

.activity-card-featured {
  border-top: 2px solid var(--accent-2);
}

.activity-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.activity-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-2) 9%, var(--surface));
  color: var(--accent-2);
}

.activity-icon svg { width: 21px; height: 21px; }

.subheading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 6px;
  font-weight: 600;
}

.activity-lead {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.activity-list li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.activity-list li:last-child { border-bottom: 1px solid var(--border); }
.activity-list .item-title {
  font-weight: 600;
  font-size: 0.96rem;
}
.activity-list .item-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 5px;
}
.activity-list .item-detail {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin-top: 8px;
  max-width: 60ch;
}

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

.pill {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.3;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  transform: translateY(-1px);
}

.hobbies-block { margin-top: 30px; }

.cert-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cert-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.cert-icon svg { width: 18px; height: 18px; }

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

@media (max-width: 520px) {
  .activity-card { padding: 22px; }
  .prominent-pills { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-section {
  padding: 88px 0 100px;
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(32px, 6vw, 64px);
  text-align: left;
}

.contact-box h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 18ch;
}

.contact-box p {
  color: var(--muted);
  margin-top: 16px;
  max-width: 52ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-links a {
  font-size: 0.92rem;
  color: var(--muted);
}
.contact-links a:hover { color: var(--accent-2); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================================================================
   FINAL UI POLISH
   A cohesive visual layer applied to every existing module without changing
   the site's underlying content architecture.
   ============================================================================ */
:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --surface-elevated: color-mix(in srgb, var(--surface) 88%, var(--text) 2%);
  --shadow-soft: 0 18px 50px -34px color-mix(in srgb, var(--text) 28%, transparent);
  --shadow-hover: 0 22px 55px -32px color-mix(in srgb, var(--accent-2) 35%, transparent);
}

body {
  background:
    radial-gradient(900px 420px at 50% -140px, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 68%),
    radial-gradient(700px 360px at 100% 18%, color-mix(in srgb, var(--accent) 3%, transparent), transparent 70%),
    var(--bg);
}

[data-theme="dark"] .section {
  border-top-color: color-mix(in srgb, var(--border) 78%, transparent);
}

[data-theme="dark"] .section-head::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 82%, transparent), var(--border), transparent);
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--text);
}

.site-header {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 75%, transparent),
              0 14px 30px -28px color-mix(in srgb, var(--text) 40%, transparent);
}

.nav-links { gap: 12px; }
.nav-links a {
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 0.8rem;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--surface);
  border-color: var(--border);
}
.nav-links a.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-bottom-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.section {
  padding: 104px 0;
}

.section-head {
  max-width: 820px;
  margin-bottom: 44px;
  padding: 0 0 18px;
  border-left: 0;
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 520px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--border), transparent);
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}
.section-head p {
  max-width: 64ch;
  margin-top: 14px;
  line-height: 1.7;
}

/* HERO */
.hero {
  padding: 92px 0 0;
}
.hero-grid { gap: clamp(42px, 7vw, 92px); padding-bottom: 72px; }
.hero-eyebrow {
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 5%, transparent);
  margin-bottom: 22px;
}
.hero-eyebrow::before { width: 6px; height: 6px; box-shadow: none; }
.hero h1 { font-size: clamp(3rem, 6.5vw, 5.4rem); line-height: 0.98; letter-spacing: -0.055em; }
.hero-headline { margin-top: 22px; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text); line-height: 1.55; }
.hero-intro { margin-top: 14px; line-height: 1.75; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.hero-meta a:hover { color: var(--accent-2); }
.hero-meta-separator { color: var(--border); }
.hero-actions { margin-top: 30px; }
.btn { border-radius: 999px; padding: 12px 20px; }
.btn-primary { box-shadow: 0 10px 24px -18px var(--accent); }
.hero-links { margin-top: 22px; }
.hero-links a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 12px;
}
.hero-links a:hover { border-color: var(--border); background: var(--surface); }
.hero-stats {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.hero-stat-value { font-size: 1.6rem; }
.hero-stat-label { font-size: 0.7rem; letter-spacing: 0.05em; }
.hero-frame { filter: drop-shadow(0 24px 45px color-mix(in srgb, var(--text) 16%, transparent)); }
.hero-panel {
  border-radius: var(--radius-md);
  border-color: color-mix(in srgb, var(--accent-2) 32%, var(--border));
  background: var(--surface);
}
.hero-photo { border-radius: calc(var(--radius-md) - 2px); }
.hero-tag { border-radius: 999px; left: 20px; bottom: 20px; }

/* ABOUT */
.about-grid { gap: 18px; }
.about-grid > p,
.about-points {
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--surface-2)));
  box-shadow: var(--shadow-soft);
}
.about-grid > p { padding: 32px; font-size: 1rem; border: 1px solid var(--border); border-radius: 14px; }
.about-points { padding: 8px 28px; border: 1px solid var(--border); border-radius: 14px; }
.about-points li { align-items: flex-start; padding: 18px 0; }
.about-point-index {
  flex: 0 0 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding-top: 2px;
}
.about-points li::before { display: none; }

/* SKILLS */
.skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill-card {
  min-height: 170px;
  padding: 22px;
  border-top: 0;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.skill-card:hover { border-color: var(--accent-2); box-shadow: var(--shadow-hover); }
.skill-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.skill-index { color: var(--accent); font-family: var(--font-mono); font-size: 0.7rem; }
.skill-count { color: var(--muted); font-family: var(--font-mono); font-size: 0.66rem; }
.skill-card h3 { font-size: 0.98rem; }
.tag { border-radius: 999px; padding: 6px 10px; }
.ai-tools-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.7;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

/* EXPERIENCE / EDUCATION */
.timeline { border-left: 0; padding-left: 0; display: grid; gap: 16px; }
.timeline-item-card {
  position: relative;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--surface-2)));
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 14px;
  box-shadow: 0 24px 60px -44px rgba(0, 0, 0, .8);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.timeline-item-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-2) 38%, var(--border));
  box-shadow: 0 28px 70px -44px color-mix(in srgb, var(--accent-2) 26%, transparent);
}
.timeline-item-card::before { display: none; }
.experience-card-accent { background: linear-gradient(180deg, var(--accent-2), color-mix(in srgb, var(--accent) 65%, var(--accent-2))); }
.experience-card-main { padding: 28px 32px 30px; }
.timeline-card-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.timeline-label { color: var(--accent-2); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .13em; font-size: .64rem; }
.timeline-date { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); white-space: nowrap; }
.experience-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.timeline-item-card h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -.02em; }
.timeline-meta { line-height: 1.6; margin-top: 6px; }
.experience-type { flex: 0 0 auto; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border)); border-radius: 999px; color: var(--accent-2); font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }
.experience-divider { height: 1px; background: var(--border); margin: 22px 0 10px; }
.timeline-item ul { margin-top: 0; }
.timeline-item ul li { padding: 9px 0; line-height: 1.65; }
.timeline-item ul li::before { content: "•"; color: var(--accent-2); }
.experience-proof { margin-top: 18px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent); }
.timeline-status { border-radius: 999px; padding: 4px 10px; }

/* EDUCATION */
.education-card {
  grid-template-columns: 4px minmax(0, 1fr);
}
.education-card-accent {
  background: linear-gradient(180deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 35%, var(--accent)));
}
.education-card-main {
  padding: 26px 30px 28px;
}
.education-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.education-heading-row h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -.02em;
}
.education-heading-row .timeline-meta {
  max-width: 780px;
  margin-top: 7px;
}
.education-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.education-meta-row span:first-child { color: var(--accent-2); }

/* PROJECTS */
.filter-row {
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 26px;
}
.filter-btn { border: 0; background: transparent; padding: 8px 15px; border-radius: 999px; }
.filter-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card {
  min-height: 310px;
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.project-card:hover { box-shadow: var(--shadow-hover); }
.project-card-top { gap: 18px; }
.project-card-index {
  color: var(--border);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  padding-top: 2px;
}
.project-card-main { min-width: 0; flex: 1; }
.project-category {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 6%, transparent);
}
.project-card h3 { font-size: 1.18rem; line-height: 1.3; margin-top: 12px; }
.project-card p.project-desc { line-height: 1.7; }
.project-card-footer { display: flex; justify-content: flex-start; }
.chip-link { border-radius: 999px; }

/* ACHIEVEMENTS */
.achievements-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.achievement-card {
  min-height: 190px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.achievement-card::after { display: none; }
.achievement-card:hover { box-shadow: var(--shadow-hover); }
.achievement-card-top { display: flex; align-items: baseline; gap: 12px; }
.achievement-index { color: var(--accent-2); font-family: var(--font-mono); font-size: .68rem; }
.achievement-title { font-size: 1.35rem; }
.achievement-context { line-height: 1.55; }
.achievement-date { margin-top: auto; padding-top: 18px; }

/* CERTIFICATIONS */
.cert-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cert-card {
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.cert-heading { align-items: flex-start; }
.cert-icon { border-radius: 10px; }
.cert-card h3 { font-size: 1rem; line-height: 1.4; }
.cert-course { line-height: 1.55; }
.cert-meta { margin-top: auto; }
.cert-card .chip-link { align-self: flex-start; }

/* RESEARCH / LEADERSHIP */
.single-callout {
  width: 100%;
  max-width: none;
  padding: 34px 36px;
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--surface-2)));
}
.callout-kicker {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: .67rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.single-callout h3 { font-size: clamp(1.25rem, 2.4vw, 1.65rem); }
.single-callout p { max-width: 70ch; line-height: 1.7; }
.single-callout .meta {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.single-callout ul li { padding: 8px 0; }
.single-callout ul li::before { content: "•"; color: var(--accent-2); }

/* ACTIVITIES */
.activities-grid { grid-template-columns: 1.15fr .85fr; gap: 18px; }
.activity-column { gap: 18px; }
.activity-card {
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.activity-card-featured { border-top: 2px solid var(--accent-2); }
.activity-icon { border-radius: 11px; }
.subheading { font-size: .68rem; letter-spacing: .13em; }
.activity-lead { line-height: 1.65; }
.activity-list li { padding: 16px 0; }
.activity-list .item-title { font-size: .96rem; }
.activity-list .item-meta { font-size: .68rem; }
.activity-list .item-detail { line-height: 1.6; }
.prominent-pills { gap: 8px; }
.pill { min-height: 48px; border-radius: 10px; background: var(--surface-2); }

/* CONTACT / FOOTER */
.contact-section { padding: 104px 0 110px; }
.contact-box {
  padding: clamp(34px, 7vw, 72px);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface));
  position: relative;
  overflow: hidden;
}
.contact-box::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -100px;
  top: -100px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.contact-box h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 15ch; letter-spacing: -.04em; }
.contact-box p { line-height: 1.75; }
.contact-actions { margin-top: 28px; }
.contact-links { gap: 10px; }
.contact-links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
}
.contact-links a:hover { background: var(--surface-2); }
.site-footer { padding: 24px 0; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .skills-grid,
  .achievements-grid,
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .section { padding: 78px 0; }
  .hero { padding-top: 62px; }
  .hero-grid { gap: 34px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.4rem); }
  .hero-meta { font-size: .67rem; }
  .about-grid > p { padding: 26px; }
  .timeline-card-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .education-heading-row { flex-direction: column; gap: 12px; }
  .education-card-main { padding: 24px 22px 24px; }
  .experience-heading-row { flex-direction: column; gap: 12px; }
  .experience-type { align-self: flex-start; }
  .experience-card-main { padding: 24px 22px 26px; }
  .activities-grid { grid-template-columns: 1fr; }
  .single-callout { padding: 28px 24px; }
}

@media (max-width: 560px) {
  .skills-grid,
  .achievements-grid,
  .cert-grid { grid-template-columns: 1fr; }
  .filter-row { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-btn { flex: 0 0 auto; }
  .project-card { min-height: 0; padding: 22px; }
  .achievement-card { min-height: 0; }
  .cert-card { min-height: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .contact-actions .btn { width: 100%; justify-content: center; }
  .contact-links { gap: 8px; }
}

/* ========================================================================
   FINAL UI REFINEMENT — unified interaction + heading treatment
   ======================================================================== */
:root {
  --ui-transition: 220ms cubic-bezier(.2,.7,.2,1);
  --ui-shadow-hover: 0 18px 42px -28px color-mix(in srgb, var(--text) 38%, transparent);
  --ui-border-hover: color-mix(in srgb, var(--accent-2) 52%, var(--border));
}

/* Keep section numbering and titles on a predictable vertical rhythm. */
.section-head {
  max-width: 820px;
  margin-bottom: 46px;
}
.section-head h2 {
  line-height: 1.08;
  text-wrap: balance;
}
.section-head p {
  line-height: 1.65;
}

/* A single interaction language for all elevated content surfaces. */
.skill-card,
.project-card,
.achievement-card,
.cert-card,
.activity-card,
.timeline-item-card,
.single-callout,
.about-grid > p,
.about-points {
  transition:
    transform var(--ui-transition),
    border-color var(--ui-transition),
    box-shadow var(--ui-transition),
    background-color var(--ui-transition);
}

.skill-card:hover,
.project-card:hover,
.achievement-card:hover,
.cert-card:hover,
.activity-card:hover,
.timeline-item-card:hover,
.single-callout:hover,
.about-grid > p:hover,
.about-points:hover {
  border-color: var(--ui-border-hover);
  box-shadow: var(--ui-shadow-hover);
}

.skill-card:hover,
.project-card:hover,
.achievement-card:hover,
.cert-card:hover,
.activity-card:hover,
.timeline-item-card:hover,
.single-callout:hover,
.about-grid > p:hover {
  transform: translateY(-2px);
}

/* Skills: use an outer ring as well as the border so the complete box,
   including the top edge, remains visibly highlighted on hover. */
.skill-card {
  position: relative;
  border: 1px solid var(--border);
  overflow: visible;
}
.skill-card:hover {
  border-color: var(--accent-2);
  box-shadow:
    0 0 0 1px var(--accent-2),
    var(--ui-shadow-hover);
}

/* Achievements: the number and award title form one clean heading unit. */
.achievement-card-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 34px;
}
.achievement-index {
  flex: 0 0 auto;
  line-height: 1;
}
.achievement-title {
  min-width: 0;
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}
.achievement-card {
  display: flex;
  flex-direction: column;
}
.achievement-date {
  margin-top: auto;
}

/* Certification cards should feel interactive only where a proof exists. */
.cert-card:has(.chip-link:hover) {
  border-color: var(--accent-2);
}

/* Buttons, filter controls and social links use the same motion curve. */
.btn,
.filter-btn,
.chip-link,
.contact-links a,
.hero-links a {
  transition:
    transform var(--ui-transition),
    border-color var(--ui-transition),
    background-color var(--ui-transition),
    color var(--ui-transition),
    box-shadow var(--ui-transition);
}

.btn:hover,
.chip-link:hover,
.contact-links a:hover,
.hero-links a:hover {
  transform: translateY(-1px);
}

.filter-btn:hover {
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border));
  color: var(--text);
}

/* List entries get a restrained hover cue without causing layout jumps. */
.activity-list li,
.about-points li,
.callout ul li,
.single-callout ul li {
  transition: background-color var(--ui-transition), color var(--ui-transition);
}
.activity-list li:hover,
.about-points li:hover {
  background: color-mix(in srgb, var(--accent-2) 4%, transparent);
}

/* Keep hover transforms off reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
  .skill-card:hover,
  .project-card:hover,
  .achievement-card:hover,
  .cert-card:hover,
  .activity-card:hover,
  .timeline-item-card:hover,
  .single-callout:hover,
  .about-grid > p:hover,
  .btn:hover,
  .chip-link:hover,
  .contact-links a:hover,
  .hero-links a:hover {
    transform: none;
  }
}

/* ========================================================================
   FINAL APPLICATION-READY POLISH
   ======================================================================== */

/* Keep the complete academic identity on one visual line on desktop. */
.hero-eyebrow {
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  font-size: clamp(0.62rem, 0.78vw, 0.85rem);
  letter-spacing: 0.035em;
}

/* Lift the portrait slightly so it aligns better with the hero content. */
.hero-frame {
  align-self: center;
  transform: translateY(-24px);
}

/* Education uses the same polished card language as Experience without
   inheriting any experience-specific spacing or semantics. */
.education-card {
  min-height: 0;
}

.education-card:hover {
  transform: translateY(-2px);
}

.education-card-main {
  min-width: 0;
}

/* Prevent long institution names from creating accidental horizontal
   overflow while preserving readable line lengths. */
.education-heading-row > div {
  min-width: 0;
}

.education-heading-row .timeline-meta {
  overflow-wrap: anywhere;
}

/* All section headings keep their number directly above the title. */
.section-head {
  overflow: visible;
}


/* Keep the interaction ring fully visible on every skills card. */
.skill-card {
  isolation: isolate;
}

.skill-card:hover {
  outline: 1px solid var(--accent-2);
  outline-offset: -1px;
}

@media (max-width: 900px) {
  .hero-frame {
    transform: translateY(-14px);
  }
}

@media (max-width: 560px) {
  /* Still one line; the responsive type scale keeps the complete label
     inside the viewport instead of allowing it to wrap. */
  .hero-eyebrow {
    font-size: 0.56rem;
    letter-spacing: 0.025em;
    padding: 6px 8px;
    gap: 6px;
  }

  .hero-frame {
    transform: translateY(-8px);
  }
}


/* ========================================================================
   MPA + MOBILE APPLICATION REFINEMENT
   ======================================================================== */
:root {
  --page-max: 1180px;
  --page-gutter: clamp(18px, 4vw, 48px);
  --ui-transition: 220ms cubic-bezier(.2,.7,.2,1);
}

html, body { max-width: 100%; overflow-x: clip; }
body { min-height: 100vh; }
.container { max-width: var(--page-max); padding-inline: var(--page-gutter); }

/* Page-level navigation */
.page-shell { min-height: calc(100vh - 68px); }
.page-hero { padding: 92px 0 18px; }
.page-hero .section-head { margin-bottom: 0; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5.4vw, 4.25rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 600; }
.page-content { padding: 36px 0 108px; }
.page-intro { max-width: 68ch; color: var(--muted); margin-top: 12px; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.page-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }

/* Home quick navigation */
.home-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 42px; }
.home-link-card { display:flex; flex-direction:column; gap:8px; padding:20px; border:1px solid var(--border); border-radius:14px; background:var(--surface); transition:transform var(--ui-transition), border-color var(--ui-transition), box-shadow var(--ui-transition); }
.home-link-card:hover { transform:translateY(-3px); border-color:var(--accent-2); box-shadow:var(--shadow-hover); }
.home-link-card span { font-family:var(--font-mono); color:var(--accent-2); font-size:.68rem; letter-spacing:.12em; }
.home-link-card strong { font-family:var(--font-display); font-size:1rem; }
.home-link-card small { color:var(--muted); line-height:1.5; }

/* Resume preview modal */
.modal { position:fixed; inset:0; z-index:300; display:grid; place-items:center; padding:22px; background:rgba(3,6,8,.78); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); opacity:0; pointer-events:none; transition:opacity var(--ui-transition); }
.modal.open { opacity:1; pointer-events:auto; }
.modal-dialog { width:min(980px, 100%); height:min(88vh, 900px); display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:16px; overflow:hidden; box-shadow:0 30px 100px -40px #000; transform:translateY(10px) scale(.99); transition:transform var(--ui-transition); }
.modal.open .modal-dialog { transform:none; }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-bottom:1px solid var(--border); }
.modal-head strong { font-family:var(--font-display); font-size:.95rem; }
.modal-close { width:36px; height:36px; border:1px solid var(--border); border-radius:9px; background:var(--surface-2); color:var(--text); display:grid; place-items:center; }
.modal-close:hover { border-color:var(--accent-2); }
.modal-frame { flex:1; width:100%; border:0; background:#fff; }
.modal-fallback { padding:12px 16px; border-top:1px solid var(--border); color:var(--muted); font-size:.82rem; }
body.modal-open { overflow:hidden; }

/* Certificate previews */
.cert-grid { align-items:start; }
.cert-card { overflow:hidden; }
.cert-preview { margin:-22px -22px 22px; border-bottom:1px solid var(--border); background:#fff; }
.cert-preview iframe { display:block; width:100%; height:260px; border:0; background:#fff; }
.cert-preview-fallback { padding:34px 18px; text-align:center; color:#666; background:#f6f6f6; }
.cert-body { display:flex; flex-direction:column; min-height:220px; }
.cert-proof-row { margin-top:auto; display:flex; flex-wrap:wrap; gap:8px; padding-top:18px; }
.cert-proof-row .chip-link { margin-top:0; }

/* Gallery */
.gallery-block { margin-top:28px; }
.gallery-head { display:flex; justify-content:space-between; align-items:end; gap:18px; margin-bottom:14px; }
.gallery-head h3 { font-size:1rem; }
.gallery-head p { color:var(--muted); font-size:.82rem; }
.gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.gallery-item { aspect-ratio:4/3; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--surface); position:relative; transition:transform var(--ui-transition),border-color var(--ui-transition),box-shadow var(--ui-transition); }
.gallery-item:hover { transform:translateY(-2px); border-color:var(--accent-2); box-shadow:var(--shadow-hover); }
.gallery-item img { width:100%; height:100%; object-fit:cover; }
.gallery-placeholder { min-height:150px; display:grid; place-items:center; text-align:center; padding:20px; color:var(--muted); }
.gallery-placeholder strong { display:block; color:var(--text); margin-bottom:5px; }

/* Buttons should never create horizontal overflow on phones. */
.btn { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.hero-actions .btn { white-space:nowrap; }
.hero-eyebrow { max-width:100%; overflow:hidden; }

@media (max-width: 980px) {
  .home-links, .page-grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .page-hero { padding-top:70px; }
  .page-content { padding-bottom:78px; }
  .page-grid, .page-grid-3 { grid-template-columns:1fr; }
  .home-links { grid-template-columns:1fr 1fr; }
  .modal { padding:10px; }
  .modal-dialog { height:92vh; border-radius:12px; }
  .cert-preview iframe { height:230px; }
  .gallery-grid { grid-template-columns:1fr 1fr; }
  .hero-eyebrow { font-size:clamp(.48rem,2.25vw,.65rem); letter-spacing:.015em; gap:5px; }
  .hero-actions { width:100%; }
  .hero-actions .btn { width:100%; }
  .hero-frame { transform:translateY(-14px); }
}
@media (max-width: 480px) {
  .home-links { grid-template-columns:1fr; }
  .gallery-grid { grid-template-columns:1fr; }
  .cert-preview iframe { height:205px; }
  .hero-eyebrow { font-size:.49rem; padding:6px 7px; }
  .hero-meta { flex-direction:column; align-items:flex-start; gap:3px; }
  .hero-meta-separator { display:none; }
}

/* ========================================================================
   FINAL NAV / PDF / GALLERY REFINEMENT
   ======================================================================== */
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.section-head::after { display:none; }

/* Seamless client-side page transitions. Direct URLs still work as normal MPA pages. */
body.page-leaving #main-content { opacity: 0; transform: translateY(7px); }
#main-content { opacity: 1; transform: none; transition: opacity .18s ease, transform .18s ease; }

/* PDF.js viewer: our own scroll surface, with the scrollbar UI hidden.
   Scrolling remains fully functional with wheel, touch, keyboard and trackpad. */
.pdf-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.pdf-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.pdf-scroll::-webkit-scrollbar { width: 11px; }
.pdf-scroll::-webkit-scrollbar-track { background: #20262a; border-left: 1px solid var(--border); }
.pdf-scroll::-webkit-scrollbar-thumb { background: var(--accent-2); border-radius: 99px; border: 2px solid #20262a; min-height: 42px; }
.pdf-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.pdf-page { display:flex; justify-content:center; align-items:flex-start; padding:10px; min-width:0; box-sizing:border-box; }
.pdf-page canvas { display:block; max-width:100%; height:auto !important; box-shadow: 0 12px 32px -24px #000; }
.pdf-loading, .pdf-error { min-height:180px; display:grid; place-items:center; text-align:center; gap:4px; padding:28px; color:var(--muted); }
.pdf-error strong { color:var(--text); }
.pdf-error span { font-size:.85rem; }
.cert-preview { height:330px; min-height:330px; max-height:330px; flex:0 0 330px; overflow:hidden; box-sizing:border-box; margin:-22px -22px 22px; border-bottom:1px solid var(--border); background:#fff; }
.cert-preview .pdf-scroll { height:100%; min-height:0; max-height:100%; overflow-y:scroll; overflow-x:hidden; background:#f4f4f4; }
.cert-preview .pdf-page { padding:10px; }
.cert-preview .pdf-page canvas { width:min(100%, 680px) !important; }
.modal-viewer { flex:1; min-height:0; background:#e9e9e9; }
.modal-viewer .pdf-page { padding:18px; }
.modal-fallback { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }

/* Event-specific galleries sit inside the event that owns them. */
.event-gallery { margin:16px 0 4px; padding-top:14px; border-top:1px solid var(--border); }
.event-gallery::before { content:"Event gallery"; display:block; margin-bottom:10px; color:var(--accent-2); font-family:var(--font-mono); font-size:.68rem; letter-spacing:.13em; text-transform:uppercase; }
.event-gallery .gallery-placeholder { min-height:110px; border:1px dashed var(--border); border-radius:10px; background:color-mix(in srgb, var(--surface-2) 72%, transparent); }
.event-gallery .gallery-placeholder span { display:block; font-size:.8rem; }
.event-gallery .gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.event-gallery .gallery-item { margin:0; }

@media (max-width:760px) {
  .section-kicker { margin-bottom:14px; }
  .cert-preview { height:330px; min-height:330px; max-height:330px; }
  .modal { padding:8px; }
  .modal-dialog { height:94vh; }
  .event-gallery .gallery-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
  .cert-preview { height:330px; min-height:330px; max-height:330px; }
  .pdf-page { padding:8px; }
  .modal-fallback { font-size:.76rem; }
}
@media (prefers-reduced-motion: reduce) {
  #main-content { transition:none; }
}

/* Final refinement: reference-style page headings */
.page-hero .section-head { max-width: 1180px; margin-inline:auto; text-align:center; }
.page-hero .section-kicker { display:inline-flex; align-items:center; justify-content:center; padding:7px 13px; border:1px solid color-mix(in srgb, var(--accent-2) 35%, var(--border)); border-radius:999px; background:color-mix(in srgb, var(--accent-2) 8%, transparent); color:var(--accent-2); }
.page-hero h1 { max-width:1000px; margin:24px auto 0; }
.page-hero .section-head > p { max-width:900px; margin:22px auto 0; }
.pdf-failed { display:grid; place-items:center; min-height:180px; background:var(--surface-2); }
.pdf-error { max-width:34rem; padding:28px; text-align:center; }
.pdf-error strong { display:block; margin-bottom:7px; }
.pdf-error span { display:block; color:var(--muted); line-height:1.55; }
.event-gallery:empty { display:none; }
@media (max-width:760px){ .page-hero { padding-top:72px; } .page-hero h1 { font-size:clamp(2.25rem,9vw,3.6rem); } .page-hero .section-head > p { font-size:.98rem; } }

/* ========================================================================
   SHARED CHROME + ICON REFINEMENT
   ======================================================================== */
.nav-links a svg { width:15px; height:15px; flex:0 0 15px; display:none; }
.nav-links a[data-nav="home"] svg { display:block; }
.nav-links a[data-nav="home"] { gap:6px; }
.nav-github { width:34px; height:34px; display:inline-grid; place-items:center; color:var(--muted); border-radius:10px; transition:color var(--ui-transition), background var(--ui-transition), transform var(--ui-transition); }
.nav-github svg { width:18px; height:18px; display:block; }
.nav-github:hover { color:var(--text); background:var(--surface-2); transform:translateY(-1px); }
.nav-resume { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 19px; border-radius:999px; background:var(--text); color:var(--bg); font-size:.84rem; font-weight:600; transition:transform var(--ui-transition), opacity var(--ui-transition); }
.nav-resume:hover { transform:translateY(-1px); opacity:.92; }
.btn-icon { width:16px; height:16px; flex:0 0 16px; display:block; }
.btn-primary:hover .btn-icon { transform:none; }
.chip-link .btn-icon, .chip-link > svg { width:15px; height:15px; flex:0 0 15px; }
.activity-icon svg { width:21px; height:21px; display:block; }
.activity-icon { overflow:hidden; }
.event-gallery { display:none; }
.event-gallery:has(.gallery-grid) { display:block; }
@media (max-width:760px){
  .nav-github { display:none; }
  .nav-resume { display:none; }
}

/* v7 icon and shared-chrome refinements */
.hero-actions .btn-icon { width:17px; height:17px; }
.hero-links { display:flex; flex-wrap:wrap; gap:14px; align-items:center; }
.hero-links a { display:inline-flex; align-items:center; gap:8px; }
.social-icon { width:17px; height:17px; flex:0 0 17px; }
.contact-actions .btn { display:inline-flex; align-items:center; gap:9px; }
.project-card .chip-link > svg { width:17px; height:17px; }
@media (max-width:560px){ .hero-actions .btn { gap:9px; } }

/* ========================================================================
   NAVIGATION — supplied reference treatment
   ======================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 0;
  padding: 12px 0 0;
  background: transparent;
  box-shadow: none;
}
.site-header::before { display:none; }
.site-header .container { max-width: 1600px; }
.nav {
  min-height: 70px;
  height: 70px;
  padding: 0 14px 0 25px;
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  box-shadow: 0 10px 35px -28px color-mix(in srgb, var(--text) 45%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-brand { gap: 11px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border-width: 1.5px;
}
.brand-name { font-size: 1rem; }
.nav-links { gap: 6px; }
.nav-links a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ui-transition), background var(--ui-transition), border-color var(--ui-transition), transform var(--ui-transition);
}
.nav-links a svg { display:none !important; }
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  border-color: var(--border);
  transform: translateY(-1px);
}
.nav-links a.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}
.nav-actions { gap: 10px; }
.theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  color: var(--text);
  transition: color var(--ui-transition), background var(--ui-transition), border-color var(--ui-transition), transform var(--ui-transition);
}
.theme-toggle:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; }

@media (max-width: 1320px) {
  .nav-links { gap: 2px; }
  .nav-links a { padding-inline: 9px; font-size: .78rem; }
}
@media (max-width: 1180px) {
  .nav { padding-right: 14px; }
  .nav-links {
    top: 94px;
    inset-inline: 16px;
    bottom: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    padding: 14px;
  }
  .nav-links a { padding: 12px 14px; }
}
@media (max-width: 560px) {
  .site-header { padding: 8px 8px 0; }
  .nav { min-height: 62px; height:62px; padding-left:12px; }
  .brand-mark { width:40px; height:40px; }
  .nav-links { top:78px; inset-inline:8px; }
}

/* Supplied GitHub repository mark: solid Octocat silhouette, no enclosing circle. */
.project-card .chip-link > svg { width:17px; height:17px; fill:currentColor; stroke:none; }

/* ========================================================================
   CERTIFICATION PDF PREVIEW — FINAL
   Fixed reference-size preview, edge-to-edge page fit, visible custom rail,
   and native wheel/touch scrolling that can chain back to the page.
   ======================================================================== */
.cert-preview {
  position: relative !important;
  aspect-ratio: 4 / 3 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  box-sizing: border-box;
  background: #f4f4f4;
}

.cert-preview.pdf-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none;
  overscroll-behavior: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}
.cert-preview.pdf-scroll::-webkit-scrollbar { display: none !important; width: 0 !important; }

.cert-preview .pdf-page {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.cert-preview .pdf-page canvas,
.cert-preview .pdf-page-canvas {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Scrollbar UI is intentionally invisible; the preview remains scrollable. */
/* No loading placeholder: the first rendered page is the only visual state. */
.cert-preview .pdf-loading { display: none !important; }

@media (max-width:760px) {
  .cert-preview {
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

/* ========================================================================
   CERTIFICATION PREVIEW — EDGE-TO-EDGE + RELIABLE CUSTOM SCROLLBAR
   ======================================================================== */
.cert-card { overflow: hidden; }
.cert-preview {
  width: calc(100% + 44px) !important;
  margin: -22px -22px 22px !important;
  aspect-ratio: 3 / 2 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  background: #f4f4f4;
}
.cert-preview.pdf-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overscroll-behavior: auto !important;
  touch-action: pan-y !important;
}
.cert-preview.pdf-scroll::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
.cert-preview .pdf-page {
  width: 100% !important;
  min-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}
.cert-preview .pdf-page-canvas,
.cert-preview .pdf-page canvas {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.pdf-custom-scrollbar {
  position: absolute !important;
  z-index: 30 !important;
  top: 7px !important;
  right: 6px !important;
  bottom: 7px !important;
  width: 9px !important;
  border-radius: 999px !important;
  background: rgba(18,24,27,.30) !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
.pdf-custom-scrollbar.is-hidden { opacity: 0 !important; pointer-events: none !important; }
.pdf-custom-scrollbar .pdf-scroll-thumb {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  min-height: 34px !important;
  border-radius: 999px !important;
  background: var(--accent-2) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.28) !important;
  cursor: grab !important;
  touch-action: none !important;
}
.pdf-custom-scrollbar .pdf-scroll-thumb:active { cursor: grabbing !important; background: var(--accent) !important; }
.cert-preview .pdf-loading { display: none !important; }
@media (max-width:760px){
  .cert-preview { aspect-ratio: 3 / 2 !important; }
}
@media (max-width:480px){
  .cert-preview { aspect-ratio: 3 / 2 !important; }
}


/* FINAL: certification preview scrollbar is intentionally invisible.
   Scrolling remains fully enabled for mouse wheel, trackpad and touch. */
.cert-preview.pdf-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overscroll-behavior: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}
.cert-preview.pdf-scroll::-webkit-scrollbar,
.cert-preview.pdf-scroll::-webkit-scrollbar-track,
.cert-preview.pdf-scroll::-webkit-scrollbar-thumb {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
/* No custom scrollbar rail/thumb should be visible or intercept scrolling. */
.cert-preview .pdf-custom-scrollbar {
  display: none !important;
  pointer-events: none !important;
}


/* ==========================================================================
   CURRENT PASS — NAV / FOOTER / RESUME PREVIEW
   ========================================================================== */

/* Slightly more compact desktop navigation. */
@media (min-width: 1181px) {
  .nav {
    height: 62px;
    gap: 18px;
  }
  .nav-links {
    gap: 8px;
  }
  .nav-links a {
    padding: 6px 8px;
    font-size: .78rem;
  }
  .nav-actions {
    gap: 9px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

/* Give the footer content a little more breathing room. */
.site-footer {
  padding: 34px 0;
}
.footer-row {
  column-gap: 48px;
  row-gap: 16px;
}

/* Desktop resume preview: invisible scrollbar, but the modal remains scrollable. */
@media (min-width: 761px) {
  .modal-viewer.pdf-scroll {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .modal-viewer.pdf-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

/* Preserve the mobile resume viewer's previous scrollbar behavior. */
@media (max-width: 760px) {
  .modal-viewer.pdf-scroll {
    scrollbar-width: auto !important;
    -ms-overflow-style: auto !important;
  }
  .modal-viewer.pdf-scroll::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
  }
  .modal-viewer.pdf-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-2);
    border-radius: 999px;
  }
  .modal-viewer.pdf-scroll::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--surface-2) 75%, transparent);
  }

  /* Smaller active-page capsule in the mobile menu. */
  .nav-links a {
    padding: 9px 12px !important;
    min-height: 0 !important;
    line-height: 1.25;
  }
  .nav-links {
    padding: 12px !important;
    gap: 3px !important;
  }
}
