/* ============================================
   PORTFOLIO — style.css
   Black & White · Two-column · Fully Responsive
   Breakpoints:
     ≥ 900px  → two-column desktop
     600-899px → single column tablet
     < 600px  → mobile
     < 380px  → small mobile (iPhone SE etc.)
   ============================================ */

/* ══ THEME TOKENS ══ */

[data-theme="dark"] {
  --bg:           #111111;
  --surface:      #1a1a1a;
  --card:         #1e1e1e;
  --card-hover:   #242424;
  --border:       #2a2a2a;
  --border-hi:    #444444;
  --text:         #f0f0f0;
  --text-2:       #a0a0a0;
  --text-3:       #606060;
  --btn-fill-bg:  #f0f0f0;
  --btn-fill-c:   #111111;
  --btn-fill-hov: #cccccc;
  --btn-out-bg:   rgba(255,255,255,0.04);
  --btn-out-bd:   #303030;
  --btn-out-c:    #b0b0b0;
  --btn-out-hov:  rgba(255,255,255,0.08);
  --tag-bg:       #1e1e1e;
  --tag-bd:       #2e2e2e;
  --tag-c:        #a8a8a8;
  --badge-bg:     rgba(255,255,255,0.05);
  --badge-bd:     rgba(255,255,255,0.13);
  --badge-c:      #cccccc;
  --dot-on:       #f0f0f0;
  --dot-off:      #333333;
  --dot-glow:     rgba(240,240,240,0.15);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --focus:        rgba(255,255,255,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* FIX: ensure section IDs have scroll-margin so sticky nav doesn't cover them */
section[id] {
  scroll-margin-top: 16px;
}

*:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══ SHARED LAYOUT ══ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ══ HEADER ══ */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: clamp(24px, 5vw, 44px) 0 clamp(20px, 4vw, 36px);
  transition: background 0.25s, border-color 0.25s;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 28px);
}

/* ── Avatar ── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: clamp(80px, 15vw, 150px);
  height: clamp(80px, 15vw, 150px);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: clamp(10px, 2vw, 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 5vw, 48px);
  overflow: hidden;
}

.avatar-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  display: block;
}

[data-theme="dark"] .avatar {
  border-color: var(--border);
  box-shadow: none;
}

/* Fallback icon when image fails */
.avatar-fallback {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--text-3);
}

.avatar-dot {
  position: absolute;
  bottom: clamp(4px, 1vw, 8px);
  right: clamp(4px, 1vw, 8px);
  width: clamp(9px, 1.5vw, 13px);
  height: clamp(9px, 1.5vw, 13px);
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  transition: border-color 0.25s;
}

/* ── Hero info ── */
.hero-info {
  flex: 1;
  min-width: 0;
  /* overflow: hidden removed — it was clipping buttons on mobile */
  overflow: visible;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.hero-name {
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
}

.hero-verified {
  font-size: clamp(14px, 2vw, 18px);
  color: #1877F2;
  flex-shrink: 0;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 1.8vw, 13px);
  color: var(--text-3);
  margin-bottom: 5px;
}
.hero-location i { font-size: 11px; color: var(--text-2); }

.hero-roles {
  font-size: clamp(11.5px, 1.8vw, 13.5px);
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.5;
}
.hero-roles b { color: var(--text); font-weight: 500; }

/* FIX: badge is now a <span>, not an <a>, so pointer-events removed */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bd);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: clamp(10.5px, 1.6vw, 12px);
  font-weight: 500;
  color: var(--badge-c);
  margin-bottom: 12px;
  white-space: normal;
  word-break: break-word;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  /* Constrain to parent width so buttons don't overflow */
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(7px, 1.2vw, 9px) clamp(12px, 2vw, 16px);
  border-radius: 8px;
  font-size: clamp(11.5px, 1.6vw, 13px);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
  /* Prevent buttons from overflowing their container */
  min-width: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-fill {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  border-color: var(--btn-fill-bg);
}
.btn-fill:hover {
  background: var(--btn-fill-hov);
  border-color: var(--btn-fill-hov);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--btn-out-bg);
  color: var(--btn-out-c);
  border-color: var(--btn-out-bd);
}
.btn-ghost:hover {
  background: var(--btn-out-hov);
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateY(-1px);
}

/* ══ MAIN GRID ══ */
.main-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(12px, 2.5vw, 24px) clamp(16px, 4vw, 32px) clamp(32px, 5vw, 56px);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: clamp(10px, 2vw, 16px);
  align-items: start;
}

.col { min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vw, 16px); }

/* ══ CARD ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(10px, 1.5vw, 14px);
  padding: clamp(14px, 2.5vw, 22px);
  box-shadow: var(--shadow-card);
  transition: background 0.25s, border-color 0.25s;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.section-label {
  font-size: clamp(9.5px, 1.4vw, 11px);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.section-label i { font-size: 10px; }

.view-all {
  font-size: clamp(10.5px, 1.5vw, 12px);
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
/* FIX: only apply hover on actual links */
a.view-all:hover { color: var(--text); }

/* ── About ── */
.about-body {
  font-size: clamp(12px, 1.6vw, 13.5px);
  color: var(--text-2);
  line-height: 1.8;
}
.about-body p + p { margin-top: 10px; }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  gap: 10px;
  padding: clamp(8px, 1.5vw, 12px) 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:first-child { padding-top: 0; }
.tl-item:last-child  { border-bottom: none; padding-bottom: 0; }

.tl-dot-wrap {
  display: flex;
  align-items: flex-start;
  padding-top: 5px;
  flex-shrink: 0;
  width: 14px;
}

.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-off);
  border: 2px solid var(--surface);
  outline: 1.5px solid var(--dot-off);
  flex-shrink: 0;
  transition: background 0.25s, outline-color 0.25s;
}
.tl-dot.active {
  background: var(--dot-on);
  outline-color: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}

.tl-body { flex: 1; min-width: 0; }

.tl-year {
  display: block;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 1px;
}
.tl-body h3 {
  font-size: clamp(12px, 1.6vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.tl-body > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
  margin-top: 1px;
}

.edu-list {
  list-style: none;
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.edu-list li {
  font-size: clamp(10.5px, 1.3vw, 12px);
  color: var(--text-3);
  padding-left: 12px;
  position: relative;
  line-height: 1.5;
}
.edu-list li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--text-3);
}

/* ── Tech Stack ── */
.stack-group { margin-bottom: 13px; }
.stack-group:last-child { margin-bottom: 0; }

.stack-label {
  font-size: clamp(9px, 1.2vw, 10px);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 6px;
  padding: clamp(3px, 0.6vw, 5px) clamp(8px, 1.2vw, 11px);
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--tag-c);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--border-hi); color: var(--text); }

/* ── Projects ── */
.projects-list { display: flex; flex-direction: column; gap: 6px; }

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(10px, 1.8vw, 13px) clamp(12px, 2vw, 15px);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  /* FIX: ensure <span> used for disabled cards still lays out correctly */
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  width: 100%;
}
.project-card:hover {
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateX(2px);
}

/* FIX: disabled project cards (no href) should look muted and not animate */
.project-card--disabled {
  opacity: 0.5;
  cursor: default;
}
.project-card--disabled:hover {
  border-color: var(--tag-bd);
  background: var(--tag-bg);
  transform: none;
}
.project-card--disabled .proj-arrow {
  opacity: 0.4;
}

.proj-info { min-width: 0; }
.proj-info h3 {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.proj-info > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
}
.proj-url {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, 1.3vw, 11.5px);
  color: var(--text-3);
  margin-top: 2px;
}

.proj-arrow {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.project-card:hover .proj-arrow { transform: translateX(3px); color: var(--text); }

/* ── Stat counters ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: clamp(10px, 1.8vw, 14px) 6px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  text-align: center;
}
.stat-num {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: clamp(9.5px, 1.2vw, 11px); color: var(--text-3); }
@media (max-width: 479px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Project filter / search ── */
.proj-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.proj-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  color: var(--text-3);
  font-size: 12px;
  transition: border-color 0.2s;
}
.proj-search:focus-within { border-color: var(--border-hi); box-shadow: 0 0 0 3px var(--focus); }
.proj-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.proj-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-chip {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  border-radius: 99px;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.proj-chip:hover { background: var(--btn-out-hov); border-color: var(--border-hi); }
.proj-chip.active { background: var(--btn-fill-bg); color: var(--btn-fill-c); border-color: var(--btn-fill-bg); }
.proj-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.project-card[hidden] { display: none; }
.proj-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ── Certifications (carousel) ── */
.cert-carousel { position: relative; }

.cert-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.cert-track::-webkit-scrollbar { display: none; }

button.cert-card {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.cert-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(8px, 1.4vw, 10px);
  transition: border-color 0.2s, background 0.2s;
}
.cert-card:hover { border-color: var(--border-hi); background: var(--card-hover); }
.cert-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.cert-thumb-icon {
  font-size: clamp(30px, 6vw, 44px);
  opacity: 0.85;
}
.cert-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  user-select: none;
  -webkit-user-drag: none;
}
/* Image failed to load → show the icon placeholder */
.cert-thumb.no-img img { display: none; }

.cert-thumb-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cert-card:hover .cert-thumb-zoom,
.cert-card:focus-visible .cert-thumb-zoom { opacity: 1; transform: none; }
@media (hover: none) { .cert-thumb-zoom { opacity: 1; transform: none; } }

.cert-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.cert-name {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.cert-issuer {
  font-size: clamp(10.5px, 1.3vw, 11.5px);
  color: var(--text-3);
}

.cert-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.cert-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-nav:hover { background: var(--btn-out-hov); border-color: var(--border-hi); color: var(--text); }
.cert-nav:active { transform: scale(0.94); }
.cert-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}
.cert-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  background: var(--dot-off);
  transition: width 0.25s, background 0.25s, box-shadow 0.25s;
}
.cert-dot:hover { background: var(--border-hi); }
.cert-dot.active {
  width: 20px;
  background: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}
.cert-dot:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.cert-count {
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

@media (max-width: 379px) { .cert-count { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cert-track { scroll-behavior: auto; }
  .cert-thumb-zoom, .cert-dot { transition: none; }
}

/* ══ FOOTER ══ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(28px, 5vw, 48px) 0 clamp(28px, 5vw, 52px);
  transition: background 0.25s, border-color 0.25s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 52px);
  margin-bottom: clamp(24px, 4vw, 36px);
}

.footer-col-label {
  font-size: clamp(9.5px, 1.3vw, 11px);
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: clamp(12px, 2vw, 18px);
}

.footer-contacts { display: flex; flex-direction: column; gap: 13px; }

.footer-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-2);
  min-width: 0;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text); }

/* FIX: button reset for footer-link button */
button.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  padding: 0;
}

.footer-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.footer-link:hover .footer-link-icon { color: var(--text); border-color: var(--border-hi); }

.footer-link-content { min-width: 0; }
.footer-link-title { font-size: clamp(12px, 1.6vw, 13.5px); font-weight: 500; color: var(--text); }
.footer-link-sub {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.social-row { display: flex; gap: 7px; flex-wrap: wrap; }

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}
.social-btn:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: clamp(14px, 2.5vw, 22px);
}

/* ══ CERTIFICATE LIGHTBOX ══ */
/* FIX: use visibility+opacity instead of display:none/flex to allow CSS transitions */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.cert-lightbox.open {
  visibility: visible;
  opacity: 1;
}

.cert-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.cert-lightbox-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: clamp(12px, 2vw, 18px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 780px;
  overflow: hidden;
  /* FIX: animation only plays when lightbox is opened */
  transform: scale(0.92) translateY(12px);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.cert-lightbox.open .cert-lightbox-box {
  transform: scale(1) translateY(0);
}

.cert-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.5vw, 22px);
  border-bottom: 1px solid var(--border);
}

.cert-lightbox-title {
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 600;
  color: var(--text);
}

.cert-lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-lightbox-close:hover {
  background: var(--card-hover);
  border-color: var(--border-hi);
  color: var(--text);
  transform: scale(1.1);
}

/* FIX: max-height so large certs don't overflow the viewport */
.cert-lightbox-img-wrap {
  padding: clamp(14px, 2.5vw, 22px);
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}
.cert-lightbox-img-wrap img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

/* ══ EMAIL MODAL ══ */
/* FIX: same visibility/opacity pattern for smooth open/close transitions */
.email-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  /* FIX: padding ensures modal doesn't hug screen edges on mobile */
  padding: 16px;
}
.email-modal.open {
  visibility: visible;
  opacity: 1;
}

.email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.email-modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  width: min(480px, 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.22s ease;
  /* FIX: cap height and allow scrolling so modal works on short screens */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.email-modal.open .email-modal-box {
  transform: translateY(0) scale(1);
}

.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  /* FIX: sticky header inside scrollable modal */
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.email-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.email-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 1.1rem;
  padding: 0.3rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.email-modal-close:hover {
  color: var(--text);
  background: var(--border);
}
.email-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.email-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.email-field input,
.email-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
  outline: none;
  /* FIX: prevent iOS auto-zoom on focus (must be ≥16px on iOS) */
  font-size: max(16px, 0.9rem);
}
.email-field input::placeholder,
.email-field textarea::placeholder { color: var(--text-3); }
.email-field input:focus,
.email-field textarea:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.email-send-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.email-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.email-modal-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.email-modal-status.success { color: #4ade80; }
.email-modal-status.error   { color: #f87171; }
.email-modal-status i { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ── Tablet: 600–899px — single column ── */
@media (max-width: 899px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .col-left,
  .col-right {
    display: contents;
  }

  #about           { order: 1; }
  #experience      { order: 2; }
  #tech            { order: 3; }
  #education       { order: 4; }
  #projects        { order: 5; }
  #certifications  { order: 6; }
}

/* ── Narrow tablet / large phone landscape: 600–750px ── */
@media (max-width: 750px) and (min-width: 600px) {
  /* When avatar + info are side by side, stack buttons full-width */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }
}

/* ── Mobile: < 600px ── */
@media (max-width: 599px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .badge { font-size: 11px; }

  /* Stack hero vertically so info + buttons get full width */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Avatar: 150px fixed on mobile */
  .avatar-wrap {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
  }

  /* Hero info takes full width when stacked */
  .hero-info {
    width: 100%;
  }


  /* Buttons: full-width stacked */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13.5px;
    box-sizing: border-box;
  }
}

/* ── Small mobile: < 420px ── */
@media (max-width: 419px) {
  .avatar-wrap {
    width: 150px;
    height: 150px;
  }
  .hero-name { font-size: 20px; }
  .hero-roles { font-size: 12px; }
  .project-card { flex-wrap: wrap; }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ── Very small: < 320px ── */
@media (max-width: 319px) {
  .hero-name { font-size: 17px; }
  .badge { font-size: 10px; padding: 4px 8px; }
  .card { padding: 12px; }
}

/* ── Wide desktop: ≥ 1280px ── */
@media (min-width: 1280px) {
  .main-grid { gap: 20px; }
  .main-wrap { padding-top: 28px; padding-bottom: 64px; }
}

/* ── Ultra-wide: ≥ 1600px ── */
@media (min-width: 1600px) {
  .container,
  .main-wrap { max-width: 1320px; }
}

/* ══════════════════════════════════════════
   TRANSITION / REVEAL ANIMATIONS
   Inspired by bryllim.com — fade-up on scroll,
   staggered hero entrance on page load
══════════════════════════════════════════ */

/* ── Hero entrance: each child fades + slides up with stagger ── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger delays for each hero child */
.hero-animate:nth-child(1) { animation-delay: 0.05s; }
.hero-animate:nth-child(2) { animation-delay: 0.15s; }

/* Hero-info children stagger */
.hero-info-animate {
  opacity: 0;
  animation: heroFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-info-animate:nth-child(1) { animation-delay: 0.20s; }
.hero-info-animate:nth-child(2) { animation-delay: 0.28s; }
.hero-info-animate:nth-child(3) { animation-delay: 0.36s; }
.hero-info-animate:nth-child(4) { animation-delay: 0.44s; }
.hero-info-animate:nth-child(5) { animation-delay: 0.52s; }

/* ── Scroll reveal: cards fade up as they enter viewport ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger sibling cards inside columns */
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }

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

  /* Show everything immediately when motion is reduced */
  .reveal,
  .hero-animate,
  .hero-info-animate {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
/* ══════════════════════════════════════════
   ADDED FEATURES
══════════════════════════════════════════ */

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--text);
  z-index: 1100;
  transition: width 0.08s linear;
}

/* ── Sticky section nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: block;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--btn-out-hov); }
.nav-link.active {
  color: var(--text);
  background: var(--badge-bg);
  border-color: var(--badge-bd);
}
section[id], footer[id] { scroll-margin-top: 64px; }

/* ── Local time chip ── */
.local-time {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--tag-bd);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.local-time:empty { display: none; }

/* ── Contact form counter ── */
.email-counter {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Back to top ── */
.back-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  z-index: 900;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--card-hover); }
/* ============================================
   PORTFOLIO — style.css
   Black & White · Two-column · Fully Responsive
   Breakpoints:
     ≥ 900px  → two-column desktop
     600-899px → single column tablet
     < 600px  → mobile
     < 380px  → small mobile (iPhone SE etc.)
   ============================================ */

/* ══ THEME TOKENS ══ */

[data-theme="dark"] {
  --bg:           #111111;
  --surface:      #1a1a1a;
  --card:         #1e1e1e;
  --card-hover:   #242424;
  --border:       #2a2a2a;
  --border-hi:    #444444;
  --text:         #f0f0f0;
  --text-2:       #a0a0a0;
  --text-3:       #606060;
  --btn-fill-bg:  #f0f0f0;
  --btn-fill-c:   #111111;
  --btn-fill-hov: #cccccc;
  --btn-out-bg:   rgba(255,255,255,0.04);
  --btn-out-bd:   #303030;
  --btn-out-c:    #b0b0b0;
  --btn-out-hov:  rgba(255,255,255,0.08);
  --tag-bg:       #1e1e1e;
  --tag-bd:       #2e2e2e;
  --tag-c:        #a8a8a8;
  --badge-bg:     rgba(255,255,255,0.05);
  --badge-bd:     rgba(255,255,255,0.13);
  --badge-c:      #cccccc;
  --dot-on:       #f0f0f0;
  --dot-off:      #333333;
  --dot-glow:     rgba(240,240,240,0.15);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --focus:        rgba(255,255,255,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* FIX: ensure section IDs have scroll-margin so sticky nav doesn't cover them */
section[id] {
  scroll-margin-top: 16px;
}

*:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══ SHARED LAYOUT ══ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ══ HEADER ══ */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: clamp(24px, 5vw, 44px) 0 clamp(20px, 4vw, 36px);
  transition: background 0.25s, border-color 0.25s;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 28px);
}

/* ── Avatar ── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: clamp(80px, 15vw, 150px);
  height: clamp(80px, 15vw, 150px);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: clamp(10px, 2vw, 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 5vw, 48px);
  overflow: hidden;
}

.avatar-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  display: block;
}

[data-theme="dark"] .avatar {
  border-color: var(--border);
  box-shadow: none;
}

/* Fallback icon when image fails */
.avatar-fallback {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--text-3);
}

.avatar-dot {
  position: absolute;
  bottom: clamp(4px, 1vw, 8px);
  right: clamp(4px, 1vw, 8px);
  width: clamp(9px, 1.5vw, 13px);
  height: clamp(9px, 1.5vw, 13px);
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  transition: border-color 0.25s;
}

/* ── Hero info ── */
.hero-info {
  flex: 1;
  min-width: 0;
  /* overflow: hidden removed — it was clipping buttons on mobile */
  overflow: visible;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.hero-name {
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
}

.hero-verified {
  font-size: clamp(14px, 2vw, 18px);
  color: #1877F2;
  flex-shrink: 0;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 1.8vw, 13px);
  color: var(--text-3);
  margin-bottom: 5px;
}
.hero-location i { font-size: 11px; color: var(--text-2); }

.hero-roles {
  font-size: clamp(11.5px, 1.8vw, 13.5px);
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.5;
}
.hero-roles b { color: var(--text); font-weight: 500; }

/* FIX: badge is now a <span>, not an <a>, so pointer-events removed */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bd);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: clamp(10.5px, 1.6vw, 12px);
  font-weight: 500;
  color: var(--badge-c);
  margin-bottom: 12px;
  white-space: normal;
  word-break: break-word;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  /* Constrain to parent width so buttons don't overflow */
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(7px, 1.2vw, 9px) clamp(12px, 2vw, 16px);
  border-radius: 8px;
  font-size: clamp(11.5px, 1.6vw, 13px);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
  /* Prevent buttons from overflowing their container */
  min-width: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-fill {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  border-color: var(--btn-fill-bg);
}
.btn-fill:hover {
  background: var(--btn-fill-hov);
  border-color: var(--btn-fill-hov);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--btn-out-bg);
  color: var(--btn-out-c);
  border-color: var(--btn-out-bd);
}
.btn-ghost:hover {
  background: var(--btn-out-hov);
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateY(-1px);
}

/* ══ MAIN GRID ══ */
.main-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(12px, 2.5vw, 24px) clamp(16px, 4vw, 32px) clamp(32px, 5vw, 56px);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: clamp(10px, 2vw, 16px);
  align-items: start;
}

.col { min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vw, 16px); }

/* ══ CARD ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(10px, 1.5vw, 14px);
  padding: clamp(14px, 2.5vw, 22px);
  box-shadow: var(--shadow-card);
  transition: background 0.25s, border-color 0.25s;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.section-label {
  font-size: clamp(9.5px, 1.4vw, 11px);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.section-label i { font-size: 10px; }

.view-all {
  font-size: clamp(10.5px, 1.5vw, 12px);
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
/* FIX: only apply hover on actual links */
a.view-all:hover { color: var(--text); }

/* ── About ── */
.about-body {
  font-size: clamp(12px, 1.6vw, 13.5px);
  color: var(--text-2);
  line-height: 1.8;
}
.about-body p + p { margin-top: 10px; }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  gap: 10px;
  padding: clamp(8px, 1.5vw, 12px) 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:first-child { padding-top: 0; }
.tl-item:last-child  { border-bottom: none; padding-bottom: 0; }

.tl-dot-wrap {
  display: flex;
  align-items: flex-start;
  padding-top: 5px;
  flex-shrink: 0;
  width: 14px;
}

.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-off);
  border: 2px solid var(--surface);
  outline: 1.5px solid var(--dot-off);
  flex-shrink: 0;
  transition: background 0.25s, outline-color 0.25s;
}
.tl-dot.active {
  background: var(--dot-on);
  outline-color: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}

.tl-body { flex: 1; min-width: 0; }

.tl-year {
  display: block;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 1px;
}
.tl-body h3 {
  font-size: clamp(12px, 1.6vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.tl-body > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
  margin-top: 1px;
}

.edu-list {
  list-style: none;
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.edu-list li {
  font-size: clamp(10.5px, 1.3vw, 12px);
  color: var(--text-3);
  padding-left: 12px;
  position: relative;
  line-height: 1.5;
}
.edu-list li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--text-3);
}

/* ── Tech Stack ── */
.stack-group { margin-bottom: 13px; }
.stack-group:last-child { margin-bottom: 0; }

.stack-label {
  font-size: clamp(9px, 1.2vw, 10px);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 6px;
  padding: clamp(3px, 0.6vw, 5px) clamp(8px, 1.2vw, 11px);
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--tag-c);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--border-hi); color: var(--text); }

/* ── Projects ── */
.projects-list { display: flex; flex-direction: column; gap: 6px; }

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(10px, 1.8vw, 13px) clamp(12px, 2vw, 15px);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  /* FIX: ensure <span> used for disabled cards still lays out correctly */
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  width: 100%;
}
.project-card:hover {
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateX(2px);
}

/* FIX: disabled project cards (no href) should look muted and not animate */
.project-card--disabled {
  opacity: 0.5;
  cursor: default;
}
.project-card--disabled:hover {
  border-color: var(--tag-bd);
  background: var(--tag-bg);
  transform: none;
}
.project-card--disabled .proj-arrow {
  opacity: 0.4;
}

.proj-info { min-width: 0; }
.proj-info h3 {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.proj-info > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
}
.proj-url {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, 1.3vw, 11.5px);
  color: var(--text-3);
  margin-top: 2px;
}

.proj-arrow {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.project-card:hover .proj-arrow { transform: translateX(3px); color: var(--text); }

/* ── Stat counters ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: clamp(10px, 1.8vw, 14px) 6px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  text-align: center;
}
.stat-num {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: clamp(9.5px, 1.2vw, 11px); color: var(--text-3); }
@media (max-width: 479px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Project filter / search ── */
.proj-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.proj-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  color: var(--text-3);
  font-size: 12px;
  transition: border-color 0.2s;
}
.proj-search:focus-within { border-color: var(--border-hi); box-shadow: 0 0 0 3px var(--focus); }
.proj-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.proj-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-chip {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  border-radius: 99px;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.proj-chip:hover { background: var(--btn-out-hov); border-color: var(--border-hi); }
.proj-chip.active { background: var(--btn-fill-bg); color: var(--btn-fill-c); border-color: var(--btn-fill-bg); }
.proj-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.project-card[hidden] { display: none; }
.proj-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ── Certifications (carousel) ── */
.cert-carousel { position: relative; }

.cert-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.cert-track::-webkit-scrollbar { display: none; }

button.cert-card {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.cert-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(8px, 1.4vw, 10px);
  transition: border-color 0.2s, background 0.2s;
}
.cert-card:hover { border-color: var(--border-hi); background: var(--card-hover); }
.cert-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.cert-thumb-icon {
  font-size: clamp(30px, 6vw, 44px);
  opacity: 0.85;
}
.cert-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  user-select: none;
  -webkit-user-drag: none;
}
/* Image failed to load → show the icon placeholder */
.cert-thumb.no-img img { display: none; }

.cert-thumb-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cert-card:hover .cert-thumb-zoom,
.cert-card:focus-visible .cert-thumb-zoom { opacity: 1; transform: none; }
@media (hover: none) { .cert-thumb-zoom { opacity: 1; transform: none; } }

.cert-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.cert-name {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.cert-issuer {
  font-size: clamp(10.5px, 1.3vw, 11.5px);
  color: var(--text-3);
}

.cert-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.cert-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-nav:hover { background: var(--btn-out-hov); border-color: var(--border-hi); color: var(--text); }
.cert-nav:active { transform: scale(0.94); }
.cert-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}
.cert-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  background: var(--dot-off);
  transition: width 0.25s, background 0.25s, box-shadow 0.25s;
}
.cert-dot:hover { background: var(--border-hi); }
.cert-dot.active {
  width: 20px;
  background: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}
.cert-dot:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.cert-count {
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

@media (max-width: 379px) { .cert-count { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cert-track { scroll-behavior: auto; }
  .cert-thumb-zoom, .cert-dot { transition: none; }
}

/* ══ FOOTER ══ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(28px, 5vw, 48px) 0 clamp(28px, 5vw, 52px);
  transition: background 0.25s, border-color 0.25s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 52px);
  margin-bottom: clamp(24px, 4vw, 36px);
}

.footer-col-label {
  font-size: clamp(9.5px, 1.3vw, 11px);
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: clamp(12px, 2vw, 18px);
}

.footer-contacts { display: flex; flex-direction: column; gap: 13px; }

.footer-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-2);
  min-width: 0;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text); }

/* FIX: button reset for footer-link button */
button.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  padding: 0;
}

.footer-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.footer-link:hover .footer-link-icon { color: var(--text); border-color: var(--border-hi); }

.footer-link-content { min-width: 0; }
.footer-link-title { font-size: clamp(12px, 1.6vw, 13.5px); font-weight: 500; color: var(--text); }
.footer-link-sub {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.social-row { display: flex; gap: 7px; flex-wrap: wrap; }

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}
.social-btn:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: clamp(14px, 2.5vw, 22px);
}

/* ══ CERTIFICATE LIGHTBOX ══ */
/* FIX: use visibility+opacity instead of display:none/flex to allow CSS transitions */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.cert-lightbox.open {
  visibility: visible;
  opacity: 1;
}

.cert-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.cert-lightbox-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: clamp(12px, 2vw, 18px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 780px;
  overflow: hidden;
  /* FIX: animation only plays when lightbox is opened */
  transform: scale(0.92) translateY(12px);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.cert-lightbox.open .cert-lightbox-box {
  transform: scale(1) translateY(0);
}

.cert-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.5vw, 22px);
  border-bottom: 1px solid var(--border);
}

.cert-lightbox-title {
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 600;
  color: var(--text);
}

.cert-lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-lightbox-close:hover {
  background: var(--card-hover);
  border-color: var(--border-hi);
  color: var(--text);
  transform: scale(1.1);
}

/* FIX: max-height so large certs don't overflow the viewport */
.cert-lightbox-img-wrap {
  padding: clamp(14px, 2.5vw, 22px);
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}
.cert-lightbox-img-wrap img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

/* ══ EMAIL MODAL ══ */
/* FIX: same visibility/opacity pattern for smooth open/close transitions */
.email-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  /* FIX: padding ensures modal doesn't hug screen edges on mobile */
  padding: 16px;
}
.email-modal.open {
  visibility: visible;
  opacity: 1;
}

.email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.email-modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  width: min(480px, 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.22s ease;
  /* FIX: cap height and allow scrolling so modal works on short screens */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.email-modal.open .email-modal-box {
  transform: translateY(0) scale(1);
}

.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  /* FIX: sticky header inside scrollable modal */
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.email-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.email-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 1.1rem;
  padding: 0.3rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.email-modal-close:hover {
  color: var(--text);
  background: var(--border);
}
.email-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.email-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.email-field input,
.email-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
  outline: none;
  /* FIX: prevent iOS auto-zoom on focus (must be ≥16px on iOS) */
  font-size: max(16px, 0.9rem);
}
.email-field input::placeholder,
.email-field textarea::placeholder { color: var(--text-3); }
.email-field input:focus,
.email-field textarea:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.email-send-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.email-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.email-modal-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.email-modal-status.success { color: #4ade80; }
.email-modal-status.error   { color: #f87171; }
.email-modal-status i { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ── Tablet: 600–899px — single column ── */
@media (max-width: 899px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .col-left,
  .col-right {
    display: contents;
  }

  #about           { order: 1; }
  #experience      { order: 2; }
  #tech            { order: 3; }
  #education       { order: 4; }
  #projects        { order: 5; }
  #certifications  { order: 6; }
}

/* ── Narrow tablet / large phone landscape: 600–750px ── */
@media (max-width: 750px) and (min-width: 600px) {
  /* When avatar + info are side by side, stack buttons full-width */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }
}

/* ── Mobile: < 600px ── */
@media (max-width: 599px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .badge { font-size: 11px; }

  /* Stack hero vertically so info + buttons get full width */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Avatar: 150px fixed on mobile */
  .avatar-wrap {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
  }

  /* Hero info takes full width when stacked */
  .hero-info {
    width: 100%;
  }


  /* Buttons: full-width stacked */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13.5px;
    box-sizing: border-box;
  }
}

/* ── Small mobile: < 420px ── */
@media (max-width: 419px) {
  .avatar-wrap {
    width: 150px;
    height: 150px;
  }
  .hero-name { font-size: 20px; }
  .hero-roles { font-size: 12px; }
  .project-card { flex-wrap: wrap; }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ── Very small: < 320px ── */
@media (max-width: 319px) {
  .hero-name { font-size: 17px; }
  .badge { font-size: 10px; padding: 4px 8px; }
  .card { padding: 12px; }
}

/* ── Wide desktop: ≥ 1280px ── */
@media (min-width: 1280px) {
  .main-grid { gap: 20px; }
  .main-wrap { padding-top: 28px; padding-bottom: 64px; }
}

/* ── Ultra-wide: ≥ 1600px ── */
@media (min-width: 1600px) {
  .container,
  .main-wrap { max-width: 1320px; }
}

/* ══════════════════════════════════════════
   TRANSITION / REVEAL ANIMATIONS
   Inspired by bryllim.com — fade-up on scroll,
   staggered hero entrance on page load
══════════════════════════════════════════ */

/* ── Hero entrance: each child fades + slides up with stagger ── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger delays for each hero child */
.hero-animate:nth-child(1) { animation-delay: 0.05s; }
.hero-animate:nth-child(2) { animation-delay: 0.15s; }

/* Hero-info children stagger */
.hero-info-animate {
  opacity: 0;
  animation: heroFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-info-animate:nth-child(1) { animation-delay: 0.20s; }
.hero-info-animate:nth-child(2) { animation-delay: 0.28s; }
.hero-info-animate:nth-child(3) { animation-delay: 0.36s; }
.hero-info-animate:nth-child(4) { animation-delay: 0.44s; }
.hero-info-animate:nth-child(5) { animation-delay: 0.52s; }

/* ── Scroll reveal: cards fade up as they enter viewport ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger sibling cards inside columns */
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }

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

  /* Show everything immediately when motion is reduced */
  .reveal,
  .hero-animate,
  .hero-info-animate {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
/* ══════════════════════════════════════════
   ADDED FEATURES
══════════════════════════════════════════ */

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--text);
  z-index: 1100;
  transition: width 0.08s linear;
}

/* ── Sticky section nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: block;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--btn-out-hov); }
.nav-link.active {
  color: var(--text);
  background: var(--badge-bg);
  border-color: var(--badge-bd);
}
section[id], footer[id] { scroll-margin-top: 64px; }

/* ── Local time chip ── */
.local-time {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--tag-bd);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.local-time:empty { display: none; }

/* ── Contact form counter ── */
.email-counter {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Back to top ── */
.back-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  z-index: 900;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--card-hover); }

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 4vw, 32px);
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .back-top, .toast { transition: none; }
}

/* ── UI fixes ── */
/* single-column layouts: let cards shrink instead of widening the page */
.main-grid > .col { min-width: 0; }
.cert-carousel, .cert-track { min-width: 0; max-width: 100%; }
/* header + nav share one divider line */
header { border-bottom: none; }
.site-nav { border-top: 1px solid var(--border); }
.nav-list { padding: 8px 0; margin: 0; }

/* ══════════════════════════════════════════
   v2 ADDITIONS
══════════════════════════════════════════ */

/* Skip link */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 2000;
  padding: 9px 16px; border-radius: 8px; font-weight: 500;
  background: var(--btn-fill-bg); color: var(--btn-fill-c);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Availability dot on avatar */
.avatar-dot { z-index: 1; }

/* Card spotlight follows the cursor */
.card { position: relative; }
.card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.045), transparent 65%);
  transition: opacity 0.3s;
}
@media (hover: hover) { .card:hover::before { opacity: 1; } }

/* Nav: command-menu button */
.site-nav .container { display: flex; align-items: center; gap: 8px; }
.nav-list { flex: 1; min-width: 0; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--text-2);
  background: var(--btn-out-bg); border: 1px solid var(--btn-out-bd);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.kbd-btn:hover { background: var(--btn-out-hov); border-color: var(--border-hi); color: var(--text); }
.kbd-btn kbd { font-family: inherit; font-size: 11px; color: var(--text-3); }
@media (hover: none) { .kbd-btn kbd { display: none; } }

/* Save-contact button reuses .social-btn */
button.social-btn { cursor: pointer; font-family: inherit; }

/* Lightbox prev / next */
.lb-nav { display: flex; gap: 6px; margin-left: auto; }

/* Honeypot: invisible to people, tempting to bots */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Command palette */
.palette {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 16px 16px;
  visibility: hidden; opacity: 0; transition: opacity 0.15s, visibility 0.15s;
}
.palette.open { visibility: visible; opacity: 1; }
.palette-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.palette-box {
  position: relative; width: min(520px, 100%); overflow: hidden;
  background: var(--card); border: 1px solid var(--border-hi);
  border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(-8px); transition: transform 0.18s ease;
}
.palette.open .palette-box { transform: none; }
.palette-box input {
  width: 100%; padding: 15px 18px; background: none; border: none; outline: none;
  border-bottom: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: max(16px, 0.95rem);
}
.palette-box input::placeholder { color: var(--text-3); }
#paletteList { list-style: none; max-height: min(50vh, 340px); overflow-y: auto; padding: 6px; }
#paletteList li {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
#paletteList li i { width: 16px; text-align: center; color: var(--text-3); }
#paletteList li[aria-selected="true"] { background: var(--btn-out-hov); color: var(--text); }
#paletteList li.palette-empty { cursor: default; color: var(--text-3); justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .palette, .palette-box, .card::before, .skip-link { transition: none; }
}

/* Print: clean résumé-style output */
@media print {
  .site-nav, .scroll-progress, .back-top, .toast, .cta-row, .palette, .cert-controls, .proj-toolbar { display: none !important; }
  body { background: #fff; color: #000; }
  .card, header, footer { background: #fff; border-color: #ccc; box-shadow: none; }
  .reveal, .hero-animate, .hero-info-animate { opacity: 1 !important; transform: none !important; animation: none !important; }
  .main-grid { grid-template-columns: 1fr; }
}
/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 4vw, 32px);
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  font-size: 12.5px;
  font-weight: 500;/* ============================================
   PORTFOLIO — style.css
   Black & White · Two-column · Fully Responsive
   Breakpoints:
     ≥ 900px  → two-column desktop
     600-899px → single column tablet
     < 600px  → mobile
     < 380px  → small mobile (iPhone SE etc.)
   ============================================ */

/* ══ THEME TOKENS ══ */

[data-theme="dark"] {
  --bg:           #111111;
  --surface:      #1a1a1a;
  --card:         #1e1e1e;
  --card-hover:   #242424;
  --border:       #2a2a2a;
  --border-hi:    #444444;
  --text:         #f0f0f0;
  --text-2:       #a0a0a0;
  --text-3:       #606060;
  --btn-fill-bg:  #f0f0f0;
  --btn-fill-c:   #111111;
  --btn-fill-hov: #cccccc;
  --btn-out-bg:   rgba(255,255,255,0.04);
  --btn-out-bd:   #303030;
  --btn-out-c:    #b0b0b0;
  --btn-out-hov:  rgba(255,255,255,0.08);
  --tag-bg:       #1e1e1e;
  --tag-bd:       #2e2e2e;
  --tag-c:        #a8a8a8;
  --badge-bg:     rgba(255,255,255,0.05);
  --badge-bd:     rgba(255,255,255,0.13);
  --badge-c:      #cccccc;
  --dot-on:       #f0f0f0;
  --dot-off:      #333333;
  --dot-glow:     rgba(240,240,240,0.15);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --focus:        rgba(255,255,255,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* FIX: ensure section IDs have scroll-margin so sticky nav doesn't cover them */
section[id] {
  scroll-margin-top: 16px;
}

*:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══ SHARED LAYOUT ══ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ══ HEADER ══ */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: clamp(24px, 5vw, 44px) 0 clamp(20px, 4vw, 36px);
  transition: background 0.25s, border-color 0.25s;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 28px);
}

/* ── Avatar ── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: clamp(80px, 15vw, 150px);
  height: clamp(80px, 15vw, 150px);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: clamp(10px, 2vw, 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 5vw, 48px);
  overflow: hidden;
}

.avatar-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  display: block;
}

[data-theme="dark"] .avatar {
  border-color: var(--border);
  box-shadow: none;
}

/* Fallback icon when image fails */
.avatar-fallback {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--text-3);
}

.avatar-dot {
  position: absolute;
  bottom: clamp(4px, 1vw, 8px);
  right: clamp(4px, 1vw, 8px);
  width: clamp(9px, 1.5vw, 13px);
  height: clamp(9px, 1.5vw, 13px);
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  transition: border-color 0.25s;
}

/* ── Hero info ── */
.hero-info {
  flex: 1;
  min-width: 0;
  /* overflow: hidden removed — it was clipping buttons on mobile */
  overflow: visible;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.hero-name {
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
}

.hero-verified {
  font-size: clamp(14px, 2vw, 18px);
  color: #1877F2;
  flex-shrink: 0;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 1.8vw, 13px);
  color: var(--text-3);
  margin-bottom: 5px;
}
.hero-location i { font-size: 11px; color: var(--text-2); }

.hero-roles {
  font-size: clamp(11.5px, 1.8vw, 13.5px);
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.5;
}
.hero-roles b { color: var(--text); font-weight: 500; }

/* FIX: badge is now a <span>, not an <a>, so pointer-events removed */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bd);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: clamp(10.5px, 1.6vw, 12px);
  font-weight: 500;
  color: var(--badge-c);
  margin-bottom: 12px;
  white-space: normal;
  word-break: break-word;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  /* Constrain to parent width so buttons don't overflow */
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(7px, 1.2vw, 9px) clamp(12px, 2vw, 16px);
  border-radius: 8px;
  font-size: clamp(11.5px, 1.6vw, 13px);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
  /* Prevent buttons from overflowing their container */
  min-width: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-fill {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  border-color: var(--btn-fill-bg);
}
.btn-fill:hover {
  background: var(--btn-fill-hov);
  border-color: var(--btn-fill-hov);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--btn-out-bg);
  color: var(--btn-out-c);
  border-color: var(--btn-out-bd);
}
.btn-ghost:hover {
  background: var(--btn-out-hov);
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateY(-1px);
}

/* ══ MAIN GRID ══ */
.main-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(12px, 2.5vw, 24px) clamp(16px, 4vw, 32px) clamp(32px, 5vw, 56px);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: clamp(10px, 2vw, 16px);
  align-items: start;
}

.col { min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vw, 16px); }

/* ══ CARD ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(10px, 1.5vw, 14px);
  padding: clamp(14px, 2.5vw, 22px);
  box-shadow: var(--shadow-card);
  transition: background 0.25s, border-color 0.25s;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.section-label {
  font-size: clamp(9.5px, 1.4vw, 11px);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.section-label i { font-size: 10px; }

.view-all {
  font-size: clamp(10.5px, 1.5vw, 12px);
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
/* FIX: only apply hover on actual links */
a.view-all:hover { color: var(--text); }

/* ── About ── */
.about-body {
  font-size: clamp(12px, 1.6vw, 13.5px);
  color: var(--text-2);
  line-height: 1.8;
}
.about-body p + p { margin-top: 10px; }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  gap: 10px;
  padding: clamp(8px, 1.5vw, 12px) 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:first-child { padding-top: 0; }
.tl-item:last-child  { border-bottom: none; padding-bottom: 0; }

.tl-dot-wrap {
  display: flex;
  align-items: flex-start;
  padding-top: 5px;
  flex-shrink: 0;
  width: 14px;
}

.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-off);
  border: 2px solid var(--surface);
  outline: 1.5px solid var(--dot-off);
  flex-shrink: 0;
  transition: background 0.25s, outline-color 0.25s;
}
.tl-dot.active {
  background: var(--dot-on);
  outline-color: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}

.tl-body { flex: 1; min-width: 0; }

.tl-year {
  display: block;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 1px;
}
.tl-body h3 {
  font-size: clamp(12px, 1.6vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.tl-body > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
  margin-top: 1px;
}

.edu-list {
  list-style: none;
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.edu-list li {
  font-size: clamp(10.5px, 1.3vw, 12px);
  color: var(--text-3);
  padding-left: 12px;
  position: relative;
  line-height: 1.5;
}
.edu-list li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--text-3);
}

/* ── Tech Stack ── */
.stack-group { margin-bottom: 13px; }
.stack-group:last-child { margin-bottom: 0; }

.stack-label {
  font-size: clamp(9px, 1.2vw, 10px);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 6px;
  padding: clamp(3px, 0.6vw, 5px) clamp(8px, 1.2vw, 11px);
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--tag-c);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--border-hi); color: var(--text); }

/* ── Projects ── */
.projects-list { display: flex; flex-direction: column; gap: 6px; }

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(10px, 1.8vw, 13px) clamp(12px, 2vw, 15px);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  /* FIX: ensure <span> used for disabled cards still lays out correctly */
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  width: 100%;
}
.project-card:hover {
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateX(2px);
}

/* FIX: disabled project cards (no href) should look muted and not animate */
.project-card--disabled {
  opacity: 0.5;
  cursor: default;
}
.project-card--disabled:hover {
  border-color: var(--tag-bd);
  background: var(--tag-bg);
  transform: none;
}
.project-card--disabled .proj-arrow {
  opacity: 0.4;
}

.proj-info { min-width: 0; }
.proj-info h3 {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.proj-info > p {
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--text-2);
}
.proj-url {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, 1.3vw, 11.5px);
  color: var(--text-3);
  margin-top: 2px;
}

.proj-arrow {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.project-card:hover .proj-arrow { transform: translateX(3px); color: var(--text); }

/* ── Stat counters ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: clamp(10px, 1.8vw, 14px) 6px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  text-align: center;
}
.stat-num {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: clamp(9.5px, 1.2vw, 11px); color: var(--text-3); }
@media (max-width: 479px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Project filter / search ── */
.proj-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.proj-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  color: var(--text-3);
  font-size: 12px;
  transition: border-color 0.2s;
}
.proj-search:focus-within { border-color: var(--border-hi); box-shadow: 0 0 0 3px var(--focus); }
.proj-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.proj-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-chip {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  border-radius: 99px;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.proj-chip:hover { background: var(--btn-out-hov); border-color: var(--border-hi); }
.proj-chip.active { background: var(--btn-fill-bg); color: var(--btn-fill-c); border-color: var(--btn-fill-bg); }
.proj-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.project-card[hidden] { display: none; }
.proj-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ── Certifications (carousel) ── */
.cert-carousel { position: relative; }

.cert-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.cert-track::-webkit-scrollbar { display: none; }

button.cert-card {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.cert-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  border-radius: 9px;
  padding: clamp(8px, 1.4vw, 10px);
  transition: border-color 0.2s, background 0.2s;
}
.cert-card:hover { border-color: var(--border-hi); background: var(--card-hover); }
.cert-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.cert-thumb-icon {
  font-size: clamp(30px, 6vw, 44px);
  opacity: 0.85;
}
.cert-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  user-select: none;
  -webkit-user-drag: none;
}
/* Image failed to load → show the icon placeholder */
.cert-thumb.no-img img { display: none; }

.cert-thumb-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cert-card:hover .cert-thumb-zoom,
.cert-card:focus-visible .cert-thumb-zoom { opacity: 1; transform: none; }
@media (hover: none) { .cert-thumb-zoom { opacity: 1; transform: none; } }

.cert-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.cert-name {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.cert-issuer {
  font-size: clamp(10.5px, 1.3vw, 11.5px);
  color: var(--text-3);
}

.cert-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.cert-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  background: var(--btn-out-bg);
  border: 1px solid var(--btn-out-bd);
  color: var(--btn-out-c);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-nav:hover { background: var(--btn-out-hov); border-color: var(--border-hi); color: var(--text); }
.cert-nav:active { transform: scale(0.94); }
.cert-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.cert-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}
.cert-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  background: var(--dot-off);
  transition: width 0.25s, background 0.25s, box-shadow 0.25s;
}
.cert-dot:hover { background: var(--border-hi); }
.cert-dot.active {
  width: 20px;
  background: var(--dot-on);
  box-shadow: 0 0 0 3px var(--dot-glow);
}
.cert-dot:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.cert-count {
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

@media (max-width: 379px) { .cert-count { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cert-track { scroll-behavior: auto; }
  .cert-thumb-zoom, .cert-dot { transition: none; }
}

/* ══ FOOTER ══ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(28px, 5vw, 48px) 0 clamp(28px, 5vw, 52px);
  transition: background 0.25s, border-color 0.25s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 52px);
  margin-bottom: clamp(24px, 4vw, 36px);
}

.footer-col-label {
  font-size: clamp(9.5px, 1.3vw, 11px);
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: clamp(12px, 2vw, 18px);
}

.footer-contacts { display: flex; flex-direction: column; gap: 13px; }

.footer-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-2);
  min-width: 0;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text); }

/* FIX: button reset for footer-link button */
button.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  padding: 0;
}

.footer-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.footer-link:hover .footer-link-icon { color: var(--text); border-color: var(--border-hi); }

.footer-link-content { min-width: 0; }
.footer-link-title { font-size: clamp(12px, 1.6vw, 13.5px); font-weight: 500; color: var(--text); }
.footer-link-sub {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.social-row { display: flex; gap: 7px; flex-wrap: wrap; }

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}
.social-btn:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: clamp(10.5px, 1.4vw, 12px);
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: clamp(14px, 2.5vw, 22px);
}

/* ══ CERTIFICATE LIGHTBOX ══ */
/* FIX: use visibility+opacity instead of display:none/flex to allow CSS transitions */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.cert-lightbox.open {
  visibility: visible;
  opacity: 1;
}

.cert-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.cert-lightbox-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: clamp(12px, 2vw, 18px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 780px;
  overflow: hidden;
  /* FIX: animation only plays when lightbox is opened */
  transform: scale(0.92) translateY(12px);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.cert-lightbox.open .cert-lightbox-box {
  transform: scale(1) translateY(0);
}

.cert-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.5vw, 22px);
  border-bottom: 1px solid var(--border);
}

.cert-lightbox-title {
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 600;
  color: var(--text);
}

.cert-lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cert-lightbox-close:hover {
  background: var(--card-hover);
  border-color: var(--border-hi);
  color: var(--text);
  transform: scale(1.1);
}

/* FIX: max-height so large certs don't overflow the viewport */
.cert-lightbox-img-wrap {
  padding: clamp(14px, 2.5vw, 22px);
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}
.cert-lightbox-img-wrap img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

/* ══ EMAIL MODAL ══ */
/* FIX: same visibility/opacity pattern for smooth open/close transitions */
.email-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  /* FIX: padding ensures modal doesn't hug screen edges on mobile */
  padding: 16px;
}
.email-modal.open {
  visibility: visible;
  opacity: 1;
}

.email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.email-modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  width: min(480px, 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.22s ease;
  /* FIX: cap height and allow scrolling so modal works on short screens */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.email-modal.open .email-modal-box {
  transform: translateY(0) scale(1);
}

.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  /* FIX: sticky header inside scrollable modal */
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.email-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.email-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 1.1rem;
  padding: 0.3rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.email-modal-close:hover {
  color: var(--text);
  background: var(--border);
}
.email-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.email-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.email-field input,
.email-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
  outline: none;
  /* FIX: prevent iOS auto-zoom on focus (must be ≥16px on iOS) */
  font-size: max(16px, 0.9rem);
}
.email-field input::placeholder,
.email-field textarea::placeholder { color: var(--text-3); }
.email-field input:focus,
.email-field textarea:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.email-send-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.email-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.email-modal-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.email-modal-status.success { color: #4ade80; }
.email-modal-status.error   { color: #f87171; }
.email-modal-status i { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ── Tablet: 600–899px — single column ── */
@media (max-width: 899px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .col-left,
  .col-right {
    display: contents;
  }

  #about           { order: 1; }
  #experience      { order: 2; }
  #tech            { order: 3; }
  #education       { order: 4; }
  #projects        { order: 5; }
  #certifications  { order: 6; }
}

/* ── Narrow tablet / large phone landscape: 600–750px ── */
@media (max-width: 750px) and (min-width: 600px) {
  /* When avatar + info are side by side, stack buttons full-width */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }
}

/* ── Mobile: < 600px ── */
@media (max-width: 599px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .badge { font-size: 11px; }

  /* Stack hero vertically so info + buttons get full width */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Avatar: 150px fixed on mobile */
  .avatar-wrap {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
  }

  /* Hero info takes full width when stacked */
  .hero-info {
    width: 100%;
  }


  /* Buttons: full-width stacked */
  .cta-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13.5px;
    box-sizing: border-box;
  }
}

/* ── Small mobile: < 420px ── */
@media (max-width: 419px) {
  .avatar-wrap {
    width: 150px;
    height: 150px;
  }
  .hero-name { font-size: 20px; }
  .hero-roles { font-size: 12px; }
  .project-card { flex-wrap: wrap; }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ── Very small: < 320px ── */
@media (max-width: 319px) {
  .hero-name { font-size: 17px; }
  .badge { font-size: 10px; padding: 4px 8px; }
  .card { padding: 12px; }
}

/* ── Wide desktop: ≥ 1280px ── */
@media (min-width: 1280px) {
  .main-grid { gap: 20px; }
  .main-wrap { padding-top: 28px; padding-bottom: 64px; }
}

/* ── Ultra-wide: ≥ 1600px ── */
@media (min-width: 1600px) {
  .container,
  .main-wrap { max-width: 1320px; }
}

/* ══════════════════════════════════════════
   TRANSITION / REVEAL ANIMATIONS
   Inspired by bryllim.com — fade-up on scroll,
   staggered hero entrance on page load
══════════════════════════════════════════ */

/* ── Hero entrance: each child fades + slides up with stagger ── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger delays for each hero child */
.hero-animate:nth-child(1) { animation-delay: 0.05s; }
.hero-animate:nth-child(2) { animation-delay: 0.15s; }

/* Hero-info children stagger */
.hero-info-animate {
  opacity: 0;
  animation: heroFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-info-animate:nth-child(1) { animation-delay: 0.20s; }
.hero-info-animate:nth-child(2) { animation-delay: 0.28s; }
.hero-info-animate:nth-child(3) { animation-delay: 0.36s; }
.hero-info-animate:nth-child(4) { animation-delay: 0.44s; }
.hero-info-animate:nth-child(5) { animation-delay: 0.52s; }

/* ── Scroll reveal: cards fade up as they enter viewport ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger sibling cards inside columns */
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }

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

  /* Show everything immediately when motion is reduced */
  .reveal,
  .hero-animate,
  .hero-info-animate {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
/* ══════════════════════════════════════════
   ADDED FEATURES
══════════════════════════════════════════ */

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--text);
  z-index: 1100;
  transition: width 0.08s linear;
}

/* ── Sticky section nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: block;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--btn-out-hov); }
.nav-link.active {
  color: var(--text);
  background: var(--badge-bg);
  border-color: var(--badge-bd);
}
section[id], footer[id] { scroll-margin-top: 64px; }

/* ── Local time chip ── */
.local-time {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--tag-bd);
  background: var(--tag-bg);
  color: var(--text-2);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.local-time:empty { display: none; }

/* ── Contact form counter ── */
.email-counter {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Back to top ── */
.back-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  z-index: 900;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--card-hover); }

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 4vw, 32px);
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-fill-bg);
  color: var(--btn-fill-c);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .back-top, .toast { transition: none; }
}

/* ── UI fixes ── */
/* single-column layouts: let cards shrink instead of widening the page */
.main-grid > .col { min-width: 0; }
.cert-carousel, .cert-track { min-width: 0; max-width: 100%; }
/* header + nav share one divider line */
header { border-bottom: none; }
.site-nav { border-top: 1px solid var(--border); }
.nav-list { padding: 8px 0; margin: 0; }

/* ══════════════════════════════════════════
   v2 ADDITIONS
══════════════════════════════════════════ */

/* Skip link */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 2000;
  padding: 9px 16px; border-radius: 8px; font-weight: 500;
  background: var(--btn-fill-bg); color: var(--btn-fill-c);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Availability dot on avatar */
.avatar-dot { z-index: 1; }

/* Card spotlight follows the cursor */
.card { position: relative; }
.card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.045), transparent 65%);
  transition: opacity 0.3s;
}
@media (hover: hover) { .card:hover::before { opacity: 1; } }

/* Nav: command-menu button */
.site-nav .container { display: flex; align-items: center; gap: 8px; }
.nav-list { flex: 1; min-width: 0; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--text-2);
  background: var(--btn-out-bg); border: 1px solid var(--btn-out-bd);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.kbd-btn:hover { background: var(--btn-out-hov); border-color: var(--border-hi); color: var(--text); }
.kbd-btn kbd { font-family: inherit; font-size: 11px; color: var(--text-3); }
@media (hover: none) { .kbd-btn kbd { display: none; } }

/* Save-contact button reuses .social-btn */
button.social-btn { cursor: pointer; font-family: inherit; }

/* Lightbox prev / next */
.lb-nav { display: flex; gap: 6px; margin-left: auto; }

/* Honeypot: invisible to people, tempting to bots */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Command palette */
.palette {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 16px 16px;
  visibility: hidden; opacity: 0; transition: opacity 0.15s, visibility 0.15s;
}
.palette.open { visibility: visible; opacity: 1; }
.palette-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.palette-box {
  position: relative; width: min(520px, 100%); overflow: hidden;
  background: var(--card); border: 1px solid var(--border-hi);
  border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(-8px); transition: transform 0.18s ease;
}
.palette.open .palette-box { transform: none; }
.palette-box input {
  width: 100%; padding: 15px 18px; background: none; border: none; outline: none;
  border-bottom: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: max(16px, 0.95rem);
}
.palette-box input::placeholder { color: var(--text-3); }
#paletteList { list-style: none; max-height: min(50vh, 340px); overflow-y: auto; padding: 6px; }
#paletteList li {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
#paletteList li i { width: 16px; text-align: center; color: var(--text-3); }
#paletteList li[aria-selected="true"] { background: var(--btn-out-hov); color: var(--text); }
#paletteList li.palette-empty { cursor: default; color: var(--text-3); justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .palette, .palette-box, .card::before, .skip-link { transition: none; }
}

/* Print: clean résumé-style output */
@media print {
  .site-nav, .scroll-progress, .back-top, .toast, .cta-row, .palette, .cert-controls, .proj-toolbar { display: none !important; }
  body { background: #fff; color: #000; }
  .card, header, footer { background: #fff; border-color: #ccc; box-shadow: none; }
  .reveal, .hero-animate, .hero-info-animate { opacity: 1 !important; transform: none !important; animation: none !important; }
  .main-grid { grid-template-columns: 1fr; }
}
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .back-top, .toast { transition: none; }
}

/* ── UI fixes ── */
/* single-column layouts: let cards shrink instead of widening the page */
.main-grid > .col { min-width: 0; }
.cert-carousel, .cert-track { min-width: 0; max-width: 100%; }
/* header + nav share one divider line */
header { border-bottom: none; }
.site-nav { border-top: 1px solid var(--border); }
.nav-list { padding: 8px 0; margin: 0; }