/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --bg-main: #ffffff;
  --text-main: #000000;
  --text-muted: #555555;
  --border-color: #e0e0e0;
  --btn-bg: #000000;
  --btn-text: #ffffff;
  --btn-outline-bg: #ffffff;
  --btn-outline-text: #000000;
  --btn-outline-border: #e0e0e0;
  --tag-bg: #f5f5f5;
  --tag-text: #333333;
  --hover-bg: #f5f5f5;
  --card-bg: #ffffff;
  --card-border: #e0e0e0;
  --badge-bg: #1a56db;
  --badge-text: #ffffff;
  --timeline-dot: #000000;
  --timeline-dot-empty: #e0e0e0;
  --section-border: #e0e0e0;
  --footer-bg: #ffffff;
  --gallery-bg: #f5f5f5;
  --dot-color: #e0e0e0;
}

:root[data-theme="dark"] {
  --bg-main: #000000;
  --text-main: #ffffff;
  --text-muted: #aaaaaa;
  --border-color: #222222;
  --btn-bg: #ffffff;
  --btn-text: #000000;
  --btn-outline-bg: #000000;
  --btn-outline-text: #ffffff;
  --btn-outline-border: #333333;
  --tag-bg: #111111;
  --tag-text: #cccccc;
  --hover-bg: #111111;
  --card-bg: #111111;
  --card-border: #222222;
  --badge-bg: #3b82f6;
  --badge-text: #ffffff;
  --timeline-dot: #ffffff;
  --timeline-dot-empty: #333333;
  --section-border: #222222;
  --footer-bg: #000000;
  --gallery-bg: #111111;
  --dot-color: #222222;
}

/* ========================================
   VIEW TRANSITION — THEME SPREAD EFFECT
   ======================================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  transition: background-color 150ms ease, color 150ms ease;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: 1.2;
}

p {
  margin: 0;
}

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

/* ========================================
   ICON UTILITIES
   ======================================== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.icon-sm {
  font-size: 0.875rem;
}

.icon-md {
  font-size: 1rem;
}

.icon-lg {
  font-size: 1.25rem;
}

.icon-xl {
  font-size: 1.5rem;
}

.btn .icon {
  margin-right: 6px;
}

/* Spinner for loading states */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.theme-toggle .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px clamp(16px, 8vw, 120px) 48px;
  width: 100%;
  position: relative;
}

/* Dotted decorative corners */
.container::before,
.container::after {
  content: "";
  position: fixed;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.container::before {
  top: 0;
  right: 0;
  mask-image: radial-gradient(ellipse at top right, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, black 30%, transparent 70%);
}

.container::after {
  bottom: 0;
  left: 0;
  mask-image: radial-gradient(ellipse at bottom left, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at bottom left, black 30%, transparent 70%);
}

p, h1, h2, h3, h4, span, a, li {
  overflow-wrap: break-word;
}

.profile-shell {
  align-items: center;
}

.profile-shell__media {
  height: auto;
}

.profile-shell__card {
  justify-content: stretch;
}

.profile-card {
  overflow: visible;
}

.profile-card__intro {
  padding: 0;
  margin-bottom: 8px;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  display: grid;
  grid-template-columns: clamp(160px, 18vw, 200px) 1fr;
  gap: clamp(14px, 2vw, 24px);
  margin-bottom: 28px;
  align-items: stretch;
}

.header-avatar {
  display: flex;
  flex-direction: column;
}

.avatar-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--gallery-bg);
}

.avatar-wrap video,
.avatar-wrap img,
.avatar-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.name-section h1 {
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.name-section h1 a {
  color: inherit;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
}

.verified-badge img {
  width: 0.85em;
  height: 0.85em;
  object-fit: contain;
  display: block;
}

.verified-badge svg {
  width: 0.7em;
  height: 0.7em;
  display: block;
  flex-shrink: 0;
}

.location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.name-section .role-title {
  margin-top: 4px;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-main);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.theme-toggle:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-muted);
}

/* Role title */
.title-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.role-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Award Dropdown */
.award-dropdown {
  position: relative;
}

.champion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  transition: opacity 150ms ease;
}

.champion-badge:hover {
  opacity: 0.9;
}

.champion-badge .arrow {
  font-size: 0.7rem;
  transition: transform 200ms ease;
}

.award-dropdown.open .arrow {
  transform: rotate(180deg);
}

.dropdown-items {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: min(240px, 90vw);
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.award-dropdown.open .dropdown-items {
  display: block;
}

.dropdown-items a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text-main);
  transition: background-color 150ms ease;
  white-space: normal;
  word-break: break-word;
}

.dropdown-items a:hover {
  background-color: var(--hover-bg);
}

/* Header Actions */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-actions--three {
  display: flex;
}

.compact-actions .btn {
  border-radius: 0;
  justify-content: center;
  padding: 8px 14px;
  font-weight: 500;
  gap: 6px;
  border: 1px solid var(--card-border);
}

.compact-actions .btn:hover {
  border-color: var(--text-muted);
}

.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 0;
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 100ms ease, opacity 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-black {
  background-color: var(--btn-bg);
  color: var(--btn-text);
}

.btn-outline {
  background-color: var(--btn-outline-bg);
  color: var(--btn-outline-text);
  border-color: var(--btn-outline-border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
}

.profile-award {
  width: 100%;
}

.profile-award .champion-badge {
  width: 100%;
  border-radius: 0;
  justify-content: space-between;
  padding: 10px 12px;
}

.profile-award .champion-badge > span:not(.icon):not(.arrow) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.profile-award .dropdown-items {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ========================================
   CONTENT AREA — TWO COLUMNS
   ======================================== */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 30vw, 360px);
  gap: clamp(20px, 3vw, 34px);
}

.left-col,
.right-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

.left-col section,
.right-col section {
  min-width: 0;
}

/* Section titles */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  border-top: 1px solid var(--section-border);
  padding-top: 18px;
}

.section-heading h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 700;
}

.section-heading a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 150ms ease;
}

.section-heading a:hover {
  color: var(--text-main);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-content {
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.about-content:hover {
  border-color: var(--text-muted);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.82rem;
  font-weight: 400;
}

/* ========================================
   TECH STACK
   ======================================== */
.tech-category {
  margin-bottom: 16px;
}

.tech-category h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 0.78rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-main);
  transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.tag-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.tag:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* ========================================
   PROJECTS
   ======================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 0;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--hover-bg) 100%);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.project-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.project-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--gallery-bg);
  margin-bottom: 4px;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-card .domain-tag {
  display: inline-block;
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: fit-content;
}

/* ========================================
   PROJECT STACK CAROUSEL
   ======================================== */
.project-stack {
  position: relative;
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.stack-card {
  position: absolute;
  width: min(260px, 55%);
  background: linear-gradient(160deg, var(--card-bg) 0%, var(--hover-bg) 100%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              opacity 0.4s ease,
              border-color 0.2s ease;
  transform-origin: center bottom;
  cursor: pointer;
}

/* Always fanned — 5 slots: far-left(0), left(1), center(2), right(3), far-right(4) */
.stack-card[data-position="0"] {
  z-index: 1;
  transform: rotate(-6deg) translateX(-90%) scale(0.82);
  opacity: 0.5;
}

.stack-card[data-position="1"] {
  z-index: 2;
  transform: rotate(-3deg) translateX(-52%) scale(0.92);
  opacity: 0.85;
}

.stack-card[data-position="2"] {
  z-index: 4;
  transform: rotate(0deg) translateX(0) scale(1);
  opacity: 1;
}

.stack-card[data-position="3"] {
  z-index: 2;
  transform: rotate(3deg) translateX(52%) scale(0.92);
  opacity: 0.85;
}

.stack-card[data-position="4"] {
  z-index: 1;
  transform: rotate(6deg) translateX(90%) scale(0.82);
  opacity: 0.5;
}

/* Hover — just highlight, no movement */
.stack-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

/* Card internals */
.stack-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-card__tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  background: var(--bg-main);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stack-card__tag--primary {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

.stack-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stack-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stack-card__icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-main);
}

.stack-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

.stack-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stack-card__cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  transition: gap 200ms ease;
}

.stack-card:hover .stack-card__cta {
  gap: 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .project-stack {
    height: 280px;
  }

  .stack-card {
    width: min(220px, 58%);
    padding: 16px;
  }

  .stack-card[data-position="0"] {
    transform: rotate(-5deg) translateX(-70%) scale(0.78);
  }

  .stack-card[data-position="1"] {
    transform: rotate(-2deg) translateX(-40%) scale(0.9);
  }

  .stack-card[data-position="3"] {
    transform: rotate(2deg) translateX(40%) scale(0.9);
  }

  .stack-card[data-position="4"] {
    transform: rotate(5deg) translateX(70%) scale(0.78);
  }
}

@media (max-width: 400px) {
  .project-stack {
    height: 260px;
  }

  .stack-card {
    width: 55%;
  }

  .stack-card[data-position="0"] {
    opacity: 0;
    pointer-events: none;
  }

  .stack-card[data-position="4"] {
    opacity: 0;
    pointer-events: none;
  }

  .stack-card[data-position="1"] {
    transform: rotate(-3deg) translateX(-35%) scale(0.9);
  }

  .stack-card[data-position="3"] {
    transform: rotate(3deg) translateX(35%) scale(0.9);
  }
}

/* ========================================
   CERTIFICATIONS (v2 card grid)
   ======================================== */
.cert-grid-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 4px 0;
}

.cert-grid-home::-webkit-scrollbar {
  display: none;
}

.cert-card-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 14px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--card-bg) 0%, var(--hover-bg) 100%);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.cert-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--text-muted);
}

.cert-card-v2:hover {
  border-color: var(--text-muted);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

.cert-card-v2__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-card-v2__icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-main);
}

.cert-card-v2__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

.cert-card-v2__issuer {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cert-card-v2__verify {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
  letter-spacing: 0.04em;
  transition: color 200ms ease;
}

.cert-card-v2:hover .cert-card-v2__verify {
  color: var(--text-main);
}

@media (max-width: 640px) {
  .cert-grid-home {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    padding: 12px 0;
  }

  .cert-card-v2 {
    flex: 0 0 130px;
    min-width: 130px;
    margin-left: -14px;
    padding: 14px 10px;
    border-radius: 12px;
    gap: 6px;
    scroll-snap-align: start;
  }

  .cert-card-v2:first-child {
    margin-left: 0;
  }

  .cert-card-v2:nth-child(1) { z-index: 6; transform: rotate(-1.5deg); }
  .cert-card-v2:nth-child(2) { z-index: 5; transform: rotate(0.5deg) translateY(-2px); }
  .cert-card-v2:nth-child(3) { z-index: 4; transform: rotate(1deg); }
  .cert-card-v2:nth-child(4) { z-index: 3; transform: rotate(-1deg) translateY(2px); }
  .cert-card-v2:nth-child(5) { z-index: 2; transform: rotate(1.5deg); }
  .cert-card-v2:nth-child(6) { z-index: 1; transform: rotate(-0.5deg) translateY(-2px); }

  .cert-card-v2__icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .cert-card-v2__icon svg {
    width: 14px;
    height: 14px;
  }

  .cert-card-v2__title {
    font-size: 0.6rem;
  }

  .cert-card-v2__issuer {
    font-size: 0.5rem;
  }

  .cert-card-v2__verify {
    font-size: 0.55rem;
  }
}

/* ========================================
   CERTIFICATIONS (old carousel - kept for subpages)
   ======================================== */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-left: none;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 0;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.cert-item:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
  background: var(--hover-bg);
}

.cert-item h3 {
  font-size: 0.9rem;
  font-weight: 700;
}

.cert-item .cert-issuer {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================
   CERT CAROUSEL (horizontal scroll cards)
   ======================================== */
.cert-carousel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 4px 0 12px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.cert-carousel:hover .cert-carousel__track {
  animation-play-state: paused;
}

.cert-carousel__track {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}

.cert-carousel__track--ltr {
  animation: certScrollLTR 22s linear infinite;
}

.cert-carousel__track--rtl {
  animation: certScrollRTL 22s linear infinite;
}

@keyframes certScrollLTR {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes certScrollRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cert-card {
  flex: 0 0 min(260px, 75%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.cert-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.cert-card__badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-card__badge svg {
  width: 18px;
  height: 18px;
  color: var(--bg-main);
}

.cert-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cert-card__issuer {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cert-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-card__type {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.cert-card__arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cert-card:hover .cert-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   BADGES INLINE (compact, below certs)
   ======================================== */
.badges-inline {
  margin-top: -10px;
}

.badges-inline-marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.badges-inline-marquee:hover .badges-inline-track {
  animation-play-state: paused;
}

.badges-inline-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  animation: badgesInlineScroll 30s linear infinite;
  will-change: transform;
}

.badge-item-sm,
.badge-item-sm--accredible {
  flex-shrink: 0;
  width: 120px;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  position: relative;
}

.badge-item-sm iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

.badge-card--sm {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
}

.badge-card--sm img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: contain;
  background: #fff;
  padding: 8px 8px 4px;
}

.badge-card--sm .badge-card__content {
  padding: 4px 6px 6px;
}

.badge-card--sm .badge-card__title {
  font-size: 0.6rem;
  line-height: 1.2;
  font-weight: 400;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes badgesInlineScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   EXPERIENCE & EDUCATION (Right Column)
   ======================================== */
.image-placeholder {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--gallery-bg);
  aspect-ratio: 16/9;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 0;
}

.timeline::before {
  display: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.timeline-item.interactive:hover {
  background-color: var(--hover-bg);
  border-color: var(--card-border);
  transform: translateX(2px);
}

.timeline-item.interactive:hover .timeline-dot {
  transform: scale(1.4);
}

.timeline-item.interactive.active {
  background-color: var(--hover-bg);
  border-color: var(--badge-bg);
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--timeline-dot);
  flex-shrink: 0;
  transition: background-color 200ms ease, transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.timeline-dot.empty {
  background-color: transparent;
  border: 2px solid var(--timeline-dot-empty);
}

.timeline-body h3 {
  font-size: 0.78rem;
  font-weight: 700;
}

.timeline-body p {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-year {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ========================================
   EDUCATION & TRAININGS
   ======================================== */
.education-training {
  display: grid;
  gap: 12px;
}

.education-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.education-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
}

.training-list {
  display: grid;
  gap: 6px;
}

.training-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 8px 10px;
}

.training-item strong {
  font-size: 0.72rem;
}

.training-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.project-card,
.cert-item,
.tech-card,
.timeline-item,
.content-section {
  opacity: 0;
  transform: translateY(14px);
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 360ms ease, transform 360ms ease;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--section-border);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--section-border);
  padding-top: 16px;
}

.footer-links-grid>.footer-col {
  padding: 0 clamp(12px, 2vw, 20px);
  border-right: 1px solid var(--section-border);
}

.footer-links-grid>.footer-col:first-child {
  padding-left: 0;
}

.footer-links-grid>.footer-col:last-child {
  border-right: none;
  padding-right: 0;
}

.affiliation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.affiliation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 600;
}

.affiliation-item:hover {
  background-color: var(--hover-bg);
}

.footer-col h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Footer navigation links */
.member-link {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.82rem;
  margin-bottom: 8px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.member-link:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-muted);
}

/* Social links */
.social-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.84rem;
  transition: color 150ms ease;
}

.social-block:hover {
  color: var(--badge-bg);
}

.social-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Speaking & Contact blocks */
.speaking-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.contact-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.contact-block .contact-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-block .contact-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.contact-block .contact-value {
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  transition: color 150ms ease;
}

.contact-link:hover {
  color: var(--text-main);
}

/* Gallery */
.gallery-section {
  margin-top: 14px;
  border-top: 1px solid var(--section-border);
  padding-top: 18px;
}

.gallery-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.gallery-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 16px;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
  scroll-snap-type: x mandatory;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.gallery-carousel-wrapper {
  position: relative;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.gallery-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-main);
  transition: all 150ms ease;
  flex-shrink: 0;
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
}

.gallery-arrow:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-muted);
  transform: scale(1.08);
}

.gallery-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 200ms ease;
}

.gallery-dot.active {
  background: var(--text-main);
  width: 24px;
  border-radius: 4px;
}

.gallery-item {
  flex: 0 0 calc(25% - 12px);
  min-width: calc(25% - 12px);
  aspect-ratio: 4/3;
  border-radius: 0;
  overflow: hidden;
  background: var(--gallery-bg);
  border: 1px solid var(--border-color);
  scroll-snap-align: start;
  transition: opacity 300ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 900px) {
  .gallery-item {
    flex: 0 0 calc(33.333% - 11px);
    min-width: calc(33.333% - 11px);
  }
}

@media (max-width: 640px) {
  .gallery-item {
    flex: 0 0 calc(50% - 8px);
    min-width: calc(50% - 8px);
  }
}

@media (max-width: 400px) {
  .gallery-item {
    flex: 0 0 85%;
    min-width: 85%;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
  pointer-events: none;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ── Lightbox Modal ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-counter {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 200ms ease;
  z-index: 10;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 200ms ease, opacity 200ms ease;
  opacity: 0.7;
  z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
  }
}

.copyright-bar {
  text-align: center;
  padding-top: 20px;
  margin-top: 32px;
  border-top: 1px solid var(--section-border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   SUB-PAGE CONTENT
   ======================================== */
.subpage-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  gap: 6px;
  padding: 8px 0;
  transition: color 0.2s ease, gap 0.2s ease;
}

.back-link:hover {
  color: var(--text-main);
  gap: 10px;
}

.back-link .icon svg {
  transition: transform 0.2s ease;
}

.back-link:hover .icon svg {
  transform: translateX(-3px);
}

/* Page hero — title + description block */
.page-hero {
  margin-bottom: 32px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--card-border);
}

.page-hero h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.page-hero p {
  color: var(--text-muted);
  max-width: 55ch;
  line-height: 1.7;
  font-size: 0.92rem;
}

/* Filter tabs / category pills */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.filter-tab {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.filter-tab:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.filter-tab.active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

/* Stats strip in hero */
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.hero-stat__label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.subpage-achievement {
  width: 100%;
  margin-left: 0;
}

.subpage-achievement .champion-badge {
  font-size: 0.7rem;
  padding: 6px 10px;
}

/* Dotted background overlay for all subpages */
.page-without-profile {
  position: relative;
}

.page-without-profile::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.page-without-profile .header {
  display: none;
}

.page-without-profile .page-hero {
  margin-top: 8px;
}

.content-section {
  margin-bottom: 36px;
}

.content-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Full-width tech stack grid for sub-page */
.tech-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}

.tech-card {
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
}

.tech-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tech-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Blog article list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item {
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 150ms ease;
}

.article-item:hover {
  border-color: var(--text-muted);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-meta .article-tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 500;
}

.article-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.article-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--badge-bg);
  margin-top: 4px;
  display: inline-block;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 24px;
}

.contact-card {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 150ms ease;
}

.contact-card:hover {
  border-color: var(--text-muted);
}

.contact-card .card-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-card .card-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-card .card-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.collab-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.collab-item {
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.collab-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.collab-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ========================================
   INTERACTIVE STATES
   ======================================== */
.interactive {
  transition: transform 100ms ease, background-color 150ms ease, border-color 150ms ease;
}

.interactive:hover {
  transform: translateY(-1px);
}

/* Focus states */
*:focus-visible {
  outline: 2px solid var(--badge-bg);
  outline-offset: 2px;
}

/* ========================================
   NOSCRIPT
   ======================================== */
.noscript-banner {
  max-width: 960px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
}

.desktop-image {
  display: block;
}

/* Desktop image */
.desktop-image .auto-slider-container {
  position: relative;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  border-top: 1px dotted var(--border-color);
  border-bottom: 1px dotted var(--border-color);
  padding: clamp(16px, 2.5vw, 24px) 0;
  margin: clamp(20px, 3vw, 32px) 0;
  gap: 16px;
}

.stat-value {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  font-family: "SF Mono", "Fira Code", "Courier New", monospace;
}

.stat-label {
  font-size: clamp(0.55rem, 1vw, 0.65rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.mobile-image {
  display: none;
  margin: 36px 0;
}

.auto-slider-container {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
  margin-bottom: 24px;
  max-height: 500px;
}

.auto-slider-track {
  display: flex;
  width: 200%;
  height: 100%;
  animation: auto-slide 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

.auto-slider-track img {
  width: 50%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@keyframes auto-slide {

  0%,
  45% {
    transform: translateX(0);
  }

  50%,
  95% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .desktop-image {
    display: none;
  }

  .mobile-image {
    display: block;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links-grid>.footer-col:nth-child(2n) {
    border-right: none;
  }

  .footer-links-grid>.footer-col:nth-child(n+3) {
    border-top: 1px solid var(--section-border);
    padding-top: 16px;
    margin-top: 16px;
  }
}

/* ── Small tablet / landscape phone (≤768px) ── */
@media (max-width: 768px) {
  .header {
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .header-avatar {
    height: 100%;
  }

  .avatar-wrap {
    aspect-ratio: auto;
    height: 100%;
  }

  .name-section h1 {
    font-size: 1rem;
  }

  .location {
    font-size: 0.72rem;
  }

  .role-title {
    font-size: 0.7rem;
  }

  .champion-badge {
    font-size: 0.6rem;
    padding: 4px 8px;
  }

  .btn {
    font-size: 0.76rem;
    padding: 7px 10px;
  }

  .compact-actions {
    gap: 4px;
  }

  .compact-actions .btn {
    padding: 6px 10px;
  }

  .compact-actions .btn .btn-arrow {
    display: none;
  }

  .compact-actions--three .btn {
    padding: 8px;
    min-width: 0;
  }

  .compact-actions--three .btn > span:not(.icon) {
    display: none;
  }

  .compact-actions--three .btn .icon {
    margin-right: 0;
    font-size: 0.95rem;
  }

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

  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.55rem;
  }

  /* Keep fan layout on tablet but smaller */
  .project-stack {
    height: 260px;
  }

  .stack-card {
    width: min(220px, 50%);
    padding: 16px;
  }

  .subpage-header {
    gap: 6px;
  }

  .page-hero h2 {
    font-size: 1.5rem;
  }

  .page-hero p {
    font-size: 0.85rem;
  }

  .filter-tabs {
    gap: 6px;
  }

  .filter-tab {
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  .hero-stats {
    gap: 16px;
  }

  .hero-stat__value {
    font-size: 1.1rem;
  }

  .footer-links-grid>.footer-col {
    padding: 0 12px;
  }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
  .container {
    padding: 12px 20px 32px;
  }

  .header {
    grid-template-columns: 110px 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .header-avatar {
    height: 100%;
  }

  .avatar-wrap {
    aspect-ratio: auto;
    height: 100%;
  }

  .header-content {
    gap: 4px;
  }

  .profile-card__intro {
    padding: 0;
    margin-bottom: 4px;
  }

  .name-section h1 {
    font-size: 0.95rem;
  }

  .location {
    font-size: 0.68rem;
  }

  .role-title {
    font-size: 0.65rem;
  }

  .theme-toggle {
    width: 26px;
    height: 26px;
  }

  .theme-toggle svg {
    width: 12px;
    height: 12px;
  }

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

  .compact-actions .btn {
    padding: 6px 8px;
    font-size: 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
  }

  .compact-actions .btn .icon {
    font-size: 0.7rem;
    margin-right: 3px;
  }

  .compact-actions .btn .btn-arrow {
    display: none;
  }

  .champion-badge {
    font-size: 0.52rem;
    padding: 4px 6px;
    gap: 3px;
  }

  .champion-badge .icon svg {
    width: 10px;
    height: 10px;
  }

  .profile-award .champion-badge {
    padding: 5px 6px;
  }

  .dropdown-items {
    padding: 4px;
  }

  .dropdown-items a {
    font-size: 0.6rem;
    padding: 5px 8px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 0;
    margin: 16px 0;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.5rem;
  }

  .section-heading {
    margin-bottom: 10px;
    padding-top: 12px;
  }

  .section-heading h2 {
    font-size: 0.95rem;
  }

  .section-heading a {
    font-size: 0.7rem;
  }

  .about-content {
    padding: 10px;
  }

  .about-text p {
    font-size: 0.74rem;
    line-height: 1.5;
  }

  .tech-category {
    margin-bottom: 10px;
  }

  .tech-category h3 {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .tag {
    font-size: 0.65rem;
    padding: 3px 7px;
    gap: 4px;
  }

  .tag-icon {
    width: 12px;
    height: 12px;
  }

  .tag-list {
    gap: 5px;
  }

  /* Keep fan layout on mobile but smaller */
  .project-stack {
    height: 240px;
  }

  .stack-card {
    width: min(180px, 52%);
    padding: 12px;
    gap: 8px;
    border-radius: 12px;
  }

  .stack-card__tags {
    gap: 5px;
  }

  .stack-card__tag {
    font-size: 0.58rem;
    padding: 3px 7px;
  }

  .stack-card__header {
    gap: 10px;
  }

  .stack-card__icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .stack-card__icon svg {
    width: 15px;
    height: 15px;
  }

  .stack-card__title {
    font-size: 0.82rem;
  }

  .stack-card__desc {
    font-size: 0.7rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    line-height: 1.5;
  }

  .stack-card__cta {
    font-size: 0.68rem;
    padding-top: 6px;
  }

  .cert-carousel {
    gap: 6px;
  }

  .cert-card {
    flex: 0 0 min(170px, 65%);
    padding: 8px 10px;
    gap: 8px;
    border-radius: 8px;
  }

  .cert-card__badge {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }

  .cert-card__badge svg {
    width: 13px;
    height: 13px;
  }

  .cert-card__issuer {
    font-size: 0.55rem;
  }

  .cert-card__title {
    font-size: 0.68rem;
  }

  .cert-card__type {
    font-size: 0.55rem;
  }

  .badges-inline-marquee {
    margin-top: 4px;
  }

  .badge-item-sm,
  .badge-item-sm--accredible {
    width: 90px;
    height: 150px;
  }

  .gallery-section {
    margin-top: 8px;
    padding-top: 12px;
  }

  .gallery-section h2 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .gallery-nav {
    margin-top: 10px;
  }

  .gallery-arrow {
    width: 32px;
    height: 32px;
  }

  .gallery-arrow svg {
    width: 16px;
    height: 16px;
  }

  .github-section {
    padding: 16px 0 10px;
  }

  .github-header {
    margin-bottom: 8px;
  }

  .github-graph {
    max-height: 70px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-links-grid>.footer-col {
    border-right: none;
    padding: 0;
    border-bottom: 1px solid var(--section-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .footer-links-grid>.footer-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .footer-links-grid>.footer-col:nth-child(n+3) {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }

  .footer-col h3 {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .member-link {
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .social-block {
    font-size: 0.75rem;
    padding: 6px 0;
  }

  .speaking-text {
    font-size: 0.72rem;
  }

  .contact-block .contact-label {
    font-size: 0.65rem;
  }

  .contact-block .contact-value {
    font-size: 0.72rem;
  }

  .copyright-bar {
    font-size: 0.7rem;
    padding-top: 14px;
    margin-top: 16px;
  }

  .chatbot-wrapper {
    bottom: 12px;
    right: 12px;
  }

  .chatbot-trigger-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .chatbot-trigger-btn span {
    display: none;
  }

  .chatbot-window {
    width: calc(100vw - 24px);
    height: 360px;
    bottom: 52px;
  }

  .prank-ask-overlay {
    clip-path: circle(0% at calc(100% - 32px) calc(100% - 32px));
  }

  .prank-ask-close {
    bottom: 12px;
    right: 12px;
  }

  .auto-slider-container {
    aspect-ratio: 3/4;
    max-height: 350px;
    border-radius: 8px;
    margin-bottom: 16px;
  }

  .subpage-header {
    gap: 4px;
  }

  .back-link {
    font-size: 0.78rem;
  }

  .page-hero {
    padding: 16px 0 20px;
  }

  .page-hero h2 {
    font-size: 1.3rem;
  }

  .page-hero p {
    font-size: 0.8rem;
  }

  .filter-tabs {
    gap: 5px;
    margin-top: 14px;
  }

  .filter-tab {
    font-size: 0.65rem;
    padding: 4px 10px;
  }

  .hero-stats {
    gap: 14px;
    margin-top: 14px;
  }

  .hero-stat__value {
    font-size: 1rem;
  }

  .hero-stat__label {
    font-size: 0.6rem;
  }
}

/* ── Extra small (≤360px) ── */
@media (max-width: 360px) {
  .header {
    grid-template-columns: 90px 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .avatar-wrap {
    aspect-ratio: auto;
    height: 100%;
  }

  .name-section h1 {
    font-size: 0.9rem;
  }

  .compact-actions .btn > span:not(.icon) {
    display: none;
  }

  .compact-actions .btn .icon {
    margin-right: 0;
  }

  .stack-card {
    flex: 0 0 85%;
  }
}

/* ── Large screens (≥1400px) ── */
@media (min-width: 1400px) {
  .container {
    max-width: 1280px;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   CHATBOT
   ======================================== */
.chatbot-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.chatbot-wrapper>* {
  pointer-events: auto;
}

.chatbot-trigger-btn {
  background-color: var(--text-main);
  color: var(--bg-main);
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease, opacity 0.3s ease;
}

.chatbot-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-color: var(--text-muted);
}

.chatbot-trigger-btn svg {
  width: 20px;
  height: 20px;
}

.chatbot-window {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: min(350px, calc(100vw - 48px));
  height: 450px;
  max-height: calc(100vh - 100px);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.chatbot-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  padding: 16px;
  background-color: var(--text-main);
  color: var(--bg-main);
  border-bottom: 1px solid var(--card-border);
}

.chatbot-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bg-main);
}

.chatbot-header p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  opacity: 0.9;
  color: var(--bg-main);
}

.chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-msg.bot-msg {
  align-self: flex-start;
}

.chat-msg.user-msg {
  align-self: flex-end;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.bot-msg .msg-bubble {
  background-color: var(--hover-bg);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  overflow: hidden;
}

/* Allow prank terminal styling to override bubble */
.bot-msg .msg-bubble div[style] {
  margin: -10px -14px;
  border-radius: 12px;
}

.user-msg .msg-bubble {
  background-color: var(--text-main);
  color: var(--bg-main);
  border-bottom-right-radius: 4px;
}

.chatbot-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--card-border);
  background-color: var(--card-bg);
  gap: 8px;
}

.chatbot-input-area input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 200ms ease;
}

.chatbot-input-area input:focus {
  border-color: var(--text-main);
}

.chatbot-input-area button {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 200ms ease;
}

.chatbot-input-area button:hover {
  background-color: var(--hover-bg);
}

.chatbot-input-area button svg {
  width: 20px;
  height: 20px;
}

.chat-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.chip-btn {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, transform 100ms ease;
  white-space: nowrap;
}

.chip-btn:hover {
  background-color: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
  transform: translateY(-1px);
}

/* Typing indicator */
.typing-indicator .msg-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ========================================
   PRANK OVERLAYS
   ======================================== */

/* Shared overlay base */
.prank-ask-overlay,
.prank-thinking-overlay,
.prank-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vh 6vw;
  background: #0a0a0a;
  color: #f0f0f0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Invert: when page is dark mode, chat overlays go light */
:root[data-theme="dark"] .prank-ask-overlay,
:root[data-theme="dark"] .prank-thinking-overlay,
:root[data-theme="dark"] .prank-result-overlay {
  background: #ffffff;
  color: #111111;
}

/* Ask overlay gets a special expand-from-button animation */
.prank-ask-overlay {
  clip-path: circle(0% at calc(100% - 54px) calc(100% - 48px));
  will-change: clip-path;
}

.prank-ask-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.prank-thinking-overlay.show,
.prank-result-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s 0s;
}

/* Lock body scroll when prank is active */
body.prank-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* === ASK OVERLAY === */
.prank-ask-close {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: #f0f0f0;
  color: #0a0a0a;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

:root[data-theme="dark"] .prank-ask-close {
  background: #111;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prank-ask-close:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] .prank-ask-close:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.prank-ask-content {
  max-width: 600px;
  text-align: center;
}

.prank-ask-title {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  font-weight: 400;
  color: #f0f0f0;
  margin: 0 0 24px 0;
  line-height: 1.3;
}

:root[data-theme="dark"] .prank-ask-title {
  color: #111111;
}

.prank-ask-input-wrap {
  position: relative;
  display: inline-block;
}

.prank-ask-input {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  color: #f0f0f0;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  min-width: 200px;
  padding: 0;
  caret-color: #f0f0f0;
}

:root[data-theme="dark"] .prank-ask-input {
  color: #111111;
  caret-color: #111111;
}

.prank-ask-input::placeholder {
  color: #666;
}

:root[data-theme="dark"] .prank-ask-input::placeholder {
  color: #aaa;
}

/* === THINKING OVERLAY === */
.prank-thinking-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.prank-thinking-dots {
  display: flex;
  gap: 5px;
}

.prank-thinking-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f0f0f0;
  animation: prankDotBounce 1.4s infinite ease-in-out;
}

:root[data-theme="dark"] .prank-thinking-dots span {
  background: #333;
}

.prank-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.prank-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes prankDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.prank-thinking-text {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: #ccc;
  margin: 0;
}

:root[data-theme="dark"] .prank-thinking-text {
  color: #333;
}

/* === RESULT OVERLAY === */
.prank-result-overlay {
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  overflow: hidden;
}

.prank-result-overlay::-webkit-scrollbar {
  display: none;
}

.prank-result-box {
  max-width: 550px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.prank-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.prank-data.visible {
  opacity: 1;
  transform: translateY(0);
}

.prank-line {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(0.85rem, 2.5vw, 1.4rem);
  color: #f0f0f0;
  margin: 0;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prank-line--reveal {
  opacity: 1;
  transform: translateY(0);
}

.prank-countdown {
  font-size: clamp(2rem, 8vw, 5rem) !important;
  font-weight: 700;
  text-align: center;
}

.prank-photo-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

.prank-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .prank-photo {
  border-color: rgba(0, 0, 0, 0.2);
}

.prank-report-card {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  text-align: left;
}

.prank-report-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.prank-report-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  white-space: nowrap;
}

.prank-report-data {
  flex: 1;
  min-width: 0;
}

@media (max-width: 500px) {
  .prank-report-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .prank-photo {
    width: 100px;
    height: 100px;
  }
}

:root[data-theme="dark"] .prank-line {
  color: #111;
}

/* Summary table */
.prank-summary {
  text-align: center;
}

.prank-summary-title {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: #999;
  margin: 0 0 16px;
  text-transform: lowercase;
}

.prank-summary-table {
  margin: 0 auto;
  border-collapse: collapse;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
}

.prank-summary-table td {
  padding: 3px 8px;
  color: #ddd;
  text-align: left;
  word-break: break-all;
}

.prank-summary-table td:first-child {
  color: #888;
  text-align: right;
}

:root[data-theme="dark"] .prank-summary-table td {
  color: #333;
}

:root[data-theme="dark"] .prank-summary-table td:first-child {
  color: #999;
}
  white-space: nowrap;
}

.prank-close-btn,
.prank-download-btn {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: #999;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 20px;
  margin-top: 24px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.prank-close-btn:hover,
.prank-download-btn:hover {
  color: #111;
  border-color: #111;
}

.prank-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.prank-download-btn {
  color: #c0392b;
  border-color: #c0392b;
}

.prank-download-btn:hover {
  background: #c0392b;
  color: #fff;
}

.prank-disclaimer {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.7rem;
  color: #bbb;
  margin-top: 20px;
  text-align: center;
}

.prank-disclaimer a {
  color: #999;
  text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .prank-ask-overlay,
  .prank-thinking-overlay,
  .prank-result-overlay {
    padding: 8vh 5vw;
  }

  .prank-ask-input {
    min-width: 150px;
  }

  .prank-result-box {
    max-width: 100%;
  }

  .prank-close-btn,
  .prank-download-btn {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .prank-btn-row {
    gap: 8px;
    margin-top: 20px;
  }

  .prank-disclaimer {
    font-size: 0.6rem;
  }
}

/* Site counter - top right corner */
.site-counter {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9998;
  display: flex;
  gap: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  pointer-events: none;
}

.counter-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 600px) {
  .site-counter {
    top: auto;
    bottom: 70px;
    right: 12px;
    font-size: 0.65rem;
  }
}

/* ── GitHub Contributions ── */
.github-section {
  padding: 24px 0 16px;
  border-top: 1px solid var(--section-border);
}

.github-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.github-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.github-handle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 200ms ease;
}

.github-handle:hover {
  color: var(--text-main);
}

.github-graph-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 8px 0;
}

.github-graph {
  width: 100%;
  max-height: 100px;
  height: auto;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

.github-graph--dark {
  display: none;
}

:root[data-theme="dark"] .github-graph--light {
  display: none;
}

:root[data-theme="dark"] .github-graph--dark {
  display: block;
}

.github-contributions-label {
  margin-top: 8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Credly Badges Marquee ── */
.badges-section {
  padding: 32px 0 16px;
}

.badges-section h2 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.badges-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.badges-marquee-wrapper:hover .badges-marquee-track {
  animation-play-state: paused;
}

.badges-marquee-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  animation: badgesScroll 40s linear infinite;
  will-change: transform;
}

.badge-item iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
  max-width: 100% !important;
}
/* ── Badge containers: fixed size ── */
.badge-item,
.badge-item--accredible {
  flex-shrink: 0 !important;
  width: 150px !important;
  height: 270px !important;
  min-height: 270px !important;
  max-height: 270px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: stretch !important;
  position: relative !important;
}

/* ── Badge card shell ── */
.badge-card {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
}

/* ── Image: grows to fill ALL leftover space ── */
.badge-card img {
  width: 100% !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  background: #ffffff;
  padding: 12px 10px 6px !important;
}

/* ── Content: natural height, NO fixed px, hugs bottom ── */
.badge-card__content {
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Remove the spacer pseudo-element */
.badge-card__content::after {
  display: none !important;
}

/* ── Title: natural 1–2 line height, NO fixed height ── */
.badge-card__title {
  font-size: 0.68rem !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
  color: #222222 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
  padding: 6px 8px 2px 8px !important;
  margin: 0 !important;
  /* NO height, NO min-height, NO max-height */
}

/* ── Issuer: natural height, NO fixed height ── */
.badge-card__issuer {
  font-size: 0.60rem !important;
  font-style: italic !important;
  color: #666666 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding: 0 8px 6px 8px !important;
  margin: 0 !important;
  /* NO height, NO min-height, NO max-height */
}

/* ── Footer: always at the very bottom, natural height ── */
.badge-card__footer {
  font-size: 0.55rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #b5b5b5 !important;
  border-top: 1px solid #ececec !important;
  padding: 5px 8px 6px 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  /* NO height, NO min-height, NO max-height */
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .badge-item,
  .badge-item--accredible {
    width: 140px !important;
    height: 252px !important;
    min-height: 252px !important;
    max-height: 252px !important;
  }
  .badge-card { border-radius: 8px; }
}

@media (max-width: 640px) {
  .badge-item,
  .badge-item--accredible {
    width: 132px !important;
    height: 236px !important;
    min-height: 236px !important;
    max-height: 236px !important;
  }
}

@keyframes badgesScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}