/* ========================================
   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;
}

: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;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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 200ms ease, color 200ms 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: 1120px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

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

.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: 180px 1fr;
  gap: 20px;
  margin-bottom: 28px;
  align-items: start;
}

.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;
  gap: 12px;
}

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

.name-section h1 {
  font-size: 1.45rem;
  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.85rem;
  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: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.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.85rem;
  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.74rem;
  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: 300px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px;
  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: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: background-color 150ms ease;
}

.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 .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) 360px;
  gap: 34px;
}

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

/* 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: 1.5rem;
  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: var(--card-bg);
  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.88rem;
  font-weight: 400;
}

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

.tech-category h3 {
  font-size: 1.06rem;
  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;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 0.82rem;
  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:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* ========================================
   PROJECTS
   ======================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 0;
  background: var(--card-bg);
  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: 1.18rem;
  font-weight: 700;
  margin-top: 4px;
}

.project-card p {
  font-size: 0.92rem;
  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.82rem;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: fit-content;
}

/* ========================================
   CERTIFICATIONS
   ======================================== */
.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: 1rem;
  font-weight: 700;
}

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

/* ========================================
   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: 14px;
  align-items: center;
  padding: 10px 12px;
  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: 1.02rem;
  font-weight: 700;
}

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

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

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

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

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

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

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

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

.training-item span {
  font-size: 0.8rem;
  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: 1fr 1fr 1fr 1fr;
  gap: 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--section-border);
  padding-top: 16px;
}

.footer-links-grid>.footer-col {
  padding: 0 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: 1rem;
  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.88rem;
  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.92rem;
  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.9rem;
  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.9rem;
  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.5rem;
  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;
}

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

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

.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;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
}

.subpage-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  gap: 8px;
}

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

.subpage-achievement {
  margin-left: auto;
}

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

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

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

.page-hero {
  margin-bottom: 32px;
}

.page-hero h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

.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(2, 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(2, 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;
}

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

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

.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 */
@media (max-width: 1024px) {
  .desktop-image {
    display: none;
  }

  .mobile-image {
    display: block;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

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

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

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

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

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  .header {
    grid-template-columns: 140px 1fr;
    gap: 12px;
  }

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

  .location {
    font-size: 0.78rem;
  }

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

  .champion-badge {
    font-size: 0.68rem;
    padding: 5px 10px;
  }

  .btn {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .compact-actions {
    gap: 6px;
  }

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

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

  .tech-grid-full {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .subpage-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .subpage-achievement {
    width: 100%;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .container {
    padding: 16px 12px 40px;
  }

  .header {
    grid-template-columns: 125px 1fr;
    gap: 8px;
  }

  .header-content {
    gap: 4px;
  }

  .name-section h1 {
    font-size: 0.92rem;
    gap: 3px;
  }

  .verified-badge svg {
    width: 0.6em;
    height: 0.6em;
  }

  .location {
    font-size: 0.65rem;
    margin-top: 1px;
  }

  .role-title {
    font-size: 0.62rem;
    margin-top: 1px;
  }

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

  .header-top {
    align-items: center;
  }

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

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

  .compact-actions {
    gap: 4px;
  }

  .compact-actions .btn {
    padding: 4px 6px;
    font-size: 0.65rem;
  }

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

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

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

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

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

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

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

  .gallery-section h2 {
    font-size: 1.3rem;
  }

  .gallery-item {
    flex: 0 0 100%;
    min-width: 100%;
  }

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

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

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

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

/* ========================================
   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;
}

.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: 350px;
  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;
}

.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;
}

@media (max-width: 480px) {
  .chatbot-wrapper {
    bottom: 16px;
    right: 16px;
  }

  .chatbot-window {
    width: calc(100vw - 32px);
    height: 400px;
    bottom: 64px;
  }
}

.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);
}

/* ── 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%);
  }
}