/* ─── Shadcn Graphite Light Design Tokens ────────────────────────────────── */
:root {
  --background:       #ffffff;
  --foreground:       #1a1a1a;
  --card:             #fafafa;
  --card-foreground:  #1a1a1a;
  --muted:            #f2f2f2;
  --muted-foreground: #6b6b6b;
  --secondary:        #ececec;
  --border:           #e4e4e4;
  --accent:           #157aff;
  --accent-foreground:#ffffff;
  --radius:           9999px;
  --font-sans:        'Inter', ui-sans-serif, system-ui, sans-serif;
  --max-w:            72rem;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

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

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .container { padding-inline: 3rem; }
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
  box-shadow: 0rem 0rem 0.05555555555555555rem 0rem rgba(220, 220, 220, 0);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0rem 0rem 0.05555555555555555rem 0rem rgba(220, 220, 220, 1);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-wordmark {
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s;
  line-height: 1.4;
}

.nav-links a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.nav-links li:last-child {
  margin-left: 0.5rem;
}

.nav-resume {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  background-color: var(--foreground) !important;
  color: var(--background) !important;
  border: 1px solid var(--foreground) !important;
  border-radius: var(--radius) !important;
  padding: 0.5rem 1.125rem !important;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-resume svg {
  flex-shrink: 0;
  vertical-align: 0 !important;
  transition: transform 0.2s ease;
}

.nav-resume:hover {
  background-color: #27272a !important; /* Shadcn primary hover: bg-primary/90 */
  border-color: #27272a !important;
  color: var(--background) !important;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.nav-resume:hover svg {
  transform: translateY(1.5px);
}

.nav-resume:active {
  transform: translateY(0) scale(0.98);
  background-color: #09090b !important;
  border-color: #09090b !important;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
  transition-duration: 0.1s;
}

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

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
.nav-mobile { display: none; align-items: center; gap: 0.5rem; }

@media (max-width: 640px) {
  .nav-links  { display: none; }
  .nav-mobile { display: flex; }
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.4rem 0.45rem;
}

.hamburger span {
  display: block;
  height: 1px;
  background: var(--foreground);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

/* X state */
.hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-drawer {
  display: none;
  border-top: 1px solid var(--border);
  padding-block: 0.5rem;
}

.nav-drawer.open { display: block; }

.nav-drawer ul { display: flex; flex-direction: column; }

.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-drawer li:last-child a { border-bottom: none; }
.nav-drawer a:hover { color: var(--foreground); }

/* ─── Section base ───────────────────────────────────────────────────────── */
section {
  border-top: 1px solid var(--border);
}

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

.section-inner {
  padding-top: calc(5.5rem - 0.45rem);
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .section-inner {
    padding-top: calc(5.5rem - 0.55rem);
    padding-bottom: 8rem;
  }
}

@media (min-width: 1024px) {
  .section-inner {
    padding-top: calc(6.5rem - 0.6875rem);
    padding-bottom: 8rem;
  }
}

/* ─── Eyebrow ────────────────────────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.325rem;
}

/* ─── Section heading ────────────────────────────────────────────────────── */
.section-heading {
  margin-bottom: 3.5rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--foreground);
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#hero .section-inner {
  padding-top: 3.5rem;
  padding-bottom: 5.5rem;
}

@media (min-width: 1024px) {
  #hero .section-inner {
    padding-top: 4.5rem;
    padding-bottom: 6.5rem;
  }
}

.hero-avatar {
  display: block;
  width: 7.15rem;
  height: 7.15rem;
  border-radius: 999px;
  object-fit: cover;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .hero-avatar {
    width: 8.6rem;
    height: 8.6rem;
  }
}

.hero-headline {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--foreground);
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.hero-headline .accent {
  color: var(--accent);
}

.hero-headline .hero-headline-sub {
  color: #C4C4C4;
}

/* ─── Hero Logos ─────────────────────────────────────────────────────────── */
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}

.hero-logo-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-logo-img {
  height: clamp(1.625rem, 2.5vw, 2.125rem);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-logo-img:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .hero-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem 1.5rem;
    margin-top: 2.25rem;
  }

  .hero-logo-item {
    justify-content: flex-start;
  }

  .hero-logo-img {
    height: 1.75rem;
    object-position: left center;
  }
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .hero-sub { font-size: 1.25rem; }
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.5rem;
  padding-inline: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn {
  background-color: var(--foreground);
  color: var(--background);
}
.btn:hover { opacity: 0.88; }

.btn-outline {
  border-color: var(--border);
  color: var(--foreground);
  background-color: transparent;
}
.btn-outline:hover { background-color: var(--secondary); }

/* ─── Work / Case study cards ────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

.card {
  background-color: #ffffff;
  border: 1px solid rgba(228, 228, 228, 0.5);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 1.25rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .card { padding: 2.25rem 2.5rem; }
}

@media (min-width: 1024px) {
  .card { padding: 2.5rem 3rem; }
}

/* ─── Card State: Hover ──────────────────────────────────────────────────── */
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  background-color: #ffffff;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.08),
              0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.card:hover .exp-thumb img {
  transform: scale(1.025) translateY(-2px);
}

/* ─── Card State: Focus ──────────────────────────────────────────────────── */
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ─── Card State: Clicked / Active ───────────────────────────────────────── */
.card:active {
  transform: translateY(-1px) scale(0.995);
  border-color: var(--border);
  background-color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  transition-duration: 0.1s;
}

.card:active .exp-thumb img {
  transform: scale(1) translateY(0);
  transition-duration: 0.1s;
}

/* Card thumbnail - bleeds to card edges at the top */
.card-thumb {
  margin: -2rem -2rem 1.75rem;
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden;
  background-color: var(--card);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .card-thumb {
    margin: -2.5rem -2.5rem 2rem;
    height: 380px;
  }
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--card-foreground);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 38rem;
}

.card-footer {
  margin-top: 1.5rem;
  width: fit-content;
}

/* ─── Experimentations (Built with AI) 2-column grid ─────────────────────── */
.exp-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .exp-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.exp-list .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .exp-list .card {
    padding: 1.75rem 2rem 2rem;
  }
}

.exp-list .exp-thumb {
  width: 100%;
  min-width: unset;
  aspect-ratio: 1 / 1;
  height: auto;
  background-color: var(--card);
  border-radius: 0.875rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.exp-list .exp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.exp-list .exp-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.exp-list .exp-content .card-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.exp-list .exp-content h3 {
  font-size: clamp(1.125rem, 1.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.exp-list .exp-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.exp-list .exp-content .card-footer {
  margin-top: 1.5rem;
}

/* ─── Featured full-width experiment card ────────────────────────────────── */
.exp-card--full {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .exp-list .card.exp-card--full {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .exp-list .exp-card--full .exp-thumb {
    width: calc(50% - 2.75rem);
    min-width: unset;
    max-width: unset;
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .exp-list .exp-card--full .exp-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
  }

  .exp-list .exp-card--full .exp-content h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  }
}

/* Static (non-interactive) card */
.card.card--static {
  cursor: default;
}

.card.card--static:hover,
.card.card--static:active {
  transform: none;
  border-color: rgba(228, 228, 228, 0.5);
  border-color: color-mix(in srgb, var(--border) 50%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
}

.card.card--static:hover .exp-thumb img,
.card.card--static:active .exp-thumb img {
  transform: none;
}

/* Static (non-interactive) card button in default state */
.card-btn--static,
.card:hover .card-btn--static,
.card-btn--static:hover,
.card:active .card-btn--static,
.card-btn--static:active {
  background-color: transparent !important;
  border-color: var(--border) !important;
  color: var(--foreground) !important;
  transform: none !important;
  cursor: default;
  pointer-events: none;
}

.card-btn--static svg,
.card:hover .card-btn--static svg,
.card-btn--static:hover svg {
  transform: none !important;
}

/* ─── AI Learning Wide Card ──────────────────────────────────────────────── */
.ai-learning-card {
  background-color: #ffffff;
  border: 1px solid rgba(228, 228, 228, 0.5);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 1.25rem;
  box-shadow: none;
  padding: 1.625rem 1.5rem;
  min-height: 4.75rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  cursor: default;
}

@media (min-width: 768px) {
  .ai-learning-card {
    padding: 2rem 2.25rem;
    min-height: 5.5rem;
    margin-top: 1.5rem;
    gap: 1.5rem;
  }
}

.ai-learning-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ai-tool-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-tool-logo:hover {
  transform: translateY(-1px) scale(1.08);
}

.ai-learning-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-learning-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-loader-spinner {
  width: 20px;
  height: 20px;
  animation: ai-spin 0.9s steps(12, end) infinite;
  display: block;
  flex-shrink: 0;
  color: #9e9e9e;
}

@keyframes ai-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-learning-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin: 0;
}

@media (max-width: 640px) {
  .ai-learning-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.625rem 1.25rem;
  }

  .ai-learning-content {
    justify-content: center;
  }
}

/* ─── Horizontal cards (Case studies in Projects section) ─────────────────── */

.card--horizontal {
  flex-direction: row;
  align-items: center;
  gap: 1.75rem;
  padding: 1.875rem 1.5rem;
}

@media (min-width: 768px) {
  .card--horizontal {
    gap: 2.25rem;
    padding: 2.125rem 2rem;
  }
}

@media (min-width: 1024px) {
  .card--horizontal {
    gap: 2.5rem;
    padding: 2.25rem 2.25rem;
  }
}

.card--horizontal .card-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.card--horizontal h3 {
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.375rem;
}

.card--horizontal p {
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 38rem;
}

.card--horizontal .card-footer {
  margin-top: 1rem;
}

.exp-thumb {
  width: 160px;
  min-width: 160px;
  height: 135px;
  background-color: var(--card);
  border-radius: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .exp-thumb {
    width: 180px;
    min-width: 180px;
    height: 145px;
  }
}

.exp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.exp-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

/* Stack on mobile */
@media (max-width: 640px) {
  .card--horizontal {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.625rem 1.25rem;
  }
  .exp-thumb {
    width: 100%;
    min-width: unset;
    height: 160px;
  }
}

.card-btn,
.ui-gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.2s ease;
  width: fit-content;
}

.card-btn svg,
.ui-gallery-btn svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.card:hover .card-btn,
.card-btn:hover,
.ui-gallery-banner:hover .ui-gallery-btn,
.ui-gallery-btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-foreground);
  opacity: 1;
}

.card:hover .card-btn svg,
.card-btn:hover svg {
  transform: translate(2px, -2px);
}

.ui-gallery-banner:hover .ui-gallery-btn svg,
.ui-gallery-btn:hover svg {
  transform: translateX(3px);
}

.card:active .card-btn,
.card-btn:active,
.ui-gallery-banner:active .ui-gallery-btn,
.ui-gallery-btn:active {
  background-color: color-mix(in srgb, var(--accent) 85%, black);
  border-color: color-mix(in srgb, var(--accent) 85%, black);
  transform: scale(0.97);
}

.portfolio-link-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.portfolio-link:hover {
  color: var(--foreground);
  border-color: var(--foreground);
}

/* ─── About ──────────────────────────────────────────────────────────────── */
.about-summary {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  margin-top: -2.5rem;
}

.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Timeline ───────────────────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-left: 0.5rem;
  padding-left: 1.75rem;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-bottom: 2rem;
  cursor: pointer;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Connecting line strictly between nodes with comfortable hover corridor */
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(-1.75rem - 12.5px);
  top: 0.45rem;
  bottom: -0.45rem;
  width: 25px;
  background: linear-gradient(
    to right,
    transparent calc(50% - 0.5px),
    var(--border) calc(50% - 0.5px),
    var(--border) calc(50% + 0.5px),
    transparent calc(50% + 0.5px)
  );
  z-index: 1;
}

/* Static timeline node */
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1.75rem - 4.5px);
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--background);
  border: 2px solid var(--border);
  z-index: 2;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Latest / active node - default state when not hovering any item */
.timeline:not(:has(.timeline-item:hover)):not(:has(.timeline-item:focus-visible)):not(:has(.timeline-item.is-active)) .timeline-item:first-child::before,
.timeline-item:hover::before,
.timeline-item:focus-visible::before,
.timeline-item.is-active::before {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

/* Minimal Year typography - no backdrop or fill */
.timeline-year {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
  white-space: nowrap;
  line-height: 1.6;
  transition: color 0.2s ease;
}

.timeline:not(:has(.timeline-item:hover)):not(:has(.timeline-item:focus-visible)):not(:has(.timeline-item.is-active)) .timeline-item:first-child .timeline-year,
.timeline-item:hover .timeline-year,
.timeline-item:focus-visible .timeline-year,
.timeline-item.is-active .timeline-year {
  color: var(--accent);
  font-weight: 600;
}

.timeline-item p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}

.timeline-item strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Tablet & Desktop alignment */
@media (min-width: 640px) {
  .timeline {
    padding-left: 2.25rem;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1.25rem;
    align-items: baseline;
    padding-bottom: 1.875rem;
  }

  .timeline-item::before {
    left: calc(-2.25rem - 4.5px);
    top: 0.4rem;
  }

  .timeline-item:not(:last-child)::after {
    left: calc(-2.25rem - 12.5px);
    top: 0.4rem;
    bottom: -0.4rem;
  }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: none;
  background-color: #fafafa;
  border-radius: var(--radius);
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--foreground);
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.stats-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.stat-tile {
  background-color: var(--card);
  padding: 1.75rem 2rem;
}

.stat-value {
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--foreground);
}

.stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

/* ─── Community ──────────────────────────────────────────────────────────── */
.community-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .community-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

.community-card {
  background-color: #ffffff;
  border: 1px solid rgba(228, 228, 228, 0.5);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  cursor: default;
}

@media (min-width: 768px) {
  .community-card { padding: 2.5rem; }
}

.community-card .role {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.625rem;
}

.community-card h3 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.community-logo {
  height: 1.5em;
  width: auto;
  flex-shrink: 0;
}

.community-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}

/* ─── Contact ────────────────────────────────────────────────────────────── */
.contact-headline {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.contact-sub {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 38rem;
  margin-bottom: 3.5rem;
}

.contact-list {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-item {
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  transition: color 0.2s;
}

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

.contact-link:hover .contact-hint { color: var(--accent); }

.contact-label {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.contact-hint {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.contact-hint .hint-text { display: none; }

@media (min-width: 500px) {
  .contact-hint .hint-text { display: inline; }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-top a {
  transition: color 0.2s;
}

.footer-top a:hover { color: var(--foreground); }

/* ─── Scroll reveal ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Notable wins - deep-dive blocks ─────────────────────────────────────── */
.wins-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .wins-item { gap: 2rem; }
}

.win-case-study .exp-thumb {
  width: 145px;
  min-width: 145px;
  height: auto;
  aspect-ratio: auto;
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .win-case-study .exp-thumb {
    width: 160px;
    min-width: 160px;
  }
}

.win-case-study .exp-thumb img {
  width: 100%;
  height: auto;
  max-height: 155px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.07));
}

@media (max-width: 640px) {
  .win-case-study .exp-thumb {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
  }
  .win-case-study .exp-thumb img {
    max-height: 150px;
  }
}

.wins-list {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

@media (min-width: 768px) {
  .wins-list { gap: 8rem; }
}

.win-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .win-block {
    flex-direction: row;
    gap: 3rem;
  }
}

.win-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--card);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .win-thumb {
    width: 320px;
    min-width: 320px;
  }
}

.win-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.win-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.win-content .card-label {
  margin-bottom: 0.25rem;
}

.win-content h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.win-desc {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.win-meta {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0;
}

.win-meta strong {
  color: var(--foreground);
  font-weight: 600;
}

.win-meta--section {
  margin-top: 0.75rem;
}

.win-list {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
}

/* ─── UI Gallery Teaser Banner ───────────────────────────────────────────── */
.ui-gallery-banner {
  background-color: #ffffff;
  border: 1px solid rgba(228, 228, 228, 0.5);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 1.25rem;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ui-gallery-banner:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  background-color: #ffffff;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.08),
              0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.ui-gallery-banner:active {
  transform: translateY(-1px) scale(0.995);
  border-color: var(--border);
  background-color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  transition-duration: 0.1s;
}

.ui-gallery-banner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .ui-gallery-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    gap: 3.5rem;
  }
}

.ui-gallery-banner-content {
  flex: 1;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ui-gallery-banner-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--foreground);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.ui-gallery-banner-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 1.75rem;
}

/* Banner visual preview stack */
.ui-gallery-banner-visual {
  flex-shrink: 0;
  width: 100%;
  max-width: 360px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 1rem 0;
}

@media (min-width: 900px) {
  .ui-gallery-banner-visual {
    width: 380px;
    max-width: 380px;
    padding: 0;
  }
}

.ui-gallery-stack {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui-gallery-stack-card {
  position: absolute;
  width: 190px;
  height: 130px;
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(228, 228, 228, 0.5);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background-color: var(--background);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s;
}

@media (min-width: 500px) {
  .ui-gallery-stack-card {
    width: 210px;
    height: 140px;
  }
}

.ui-gallery-stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Fan layering */
.ui-gallery-stack-card.card-1 {
  transform: translate(-35px, 12px) rotate(-6deg);
  z-index: 1;
}

.ui-gallery-stack-card.card-2 {
  transform: translate(35px, 8px) rotate(6deg);
  z-index: 2;
}

.ui-gallery-stack-card.card-3 {
  transform: translate(0, -8px) rotate(0deg);
  z-index: 3;
  width: 210px;
  height: 145px;
}

@media (min-width: 500px) {
  .ui-gallery-stack-card.card-1 {
    transform: translate(-45px, 15px) rotate(-6deg);
  }
  .ui-gallery-stack-card.card-2 {
    transform: translate(45px, 10px) rotate(6deg);
  }
  .ui-gallery-stack-card.card-3 {
    width: 230px;
    height: 155px;
    transform: translate(0, -10px) rotate(0deg);
  }
}

.ui-gallery-banner:hover .ui-gallery-stack-card.card-1 {
  transform: translate(-65px, 20px) rotate(-10deg);
}

.ui-gallery-banner:hover .ui-gallery-stack-card.card-2 {
  transform: translate(65px, 15px) rotate(10deg);
}

.ui-gallery-banner:hover .ui-gallery-stack-card.card-3 {
  transform: translate(0, -18px) scale(1.03);
  box-shadow: 0 18px 35px -6px rgba(0, 0, 0, 0.16);
}

.ui-gallery-badge-count {
  position: absolute;
  bottom: 0px;
  right: 15px;
  z-index: 4;
  background-color: var(--foreground);
  color: var(--background);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
