/* ===== Variables ===== */
:root {
  --bg:           #f9f5fa;
  --bg-alt:       #efe7f2;
  --border:       #e2d8ee;
  --text:         #2a272c;
  --text-muted:   #6b5b6f;
  --text-light:   #a896a7;
  --accent:       #bb4f00;
  --accent-btn:   #c55200;
  --accent-dark:  #a64600;
  --accent2:       #E36888;
  --accent2-light: #F0A8C0;
  --sage:          #bacd7a;
  --ube:           #8b4d9a;
  --ube-light:     #b190cc;
  --white:         #FFFFFF;

  /* unused — kept for reference
  --accent2-dark:  #C8506E;
  --matcha:  #94ad41;
  --bg2:           #FAF8F5;
  --bg-alt2:       #F2EDE7;
  --border2:       #E8E0D8;
  */

  --font-serif: 'Fascinate', system-ui, -apple-system, sans-serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --font-accent: 'Coiny', system-ui, -apple-system, sans-serif;

  --radius:    12px;
  --radius-sm: 6px;
  --shadow:    0 2px 20px rgba(44, 40, 39, 0.08);
  --shadow-lg: 0 8px 40px rgba(44, 40, 39, 0.14);
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --duration:  0.28s;

  --max-width: 1140px;
  --nav-h:     64px;
}

/* ===== Screen-reader only utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section     { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-small { padding: 64px 0; }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.section-title.centered { text-align: center; }

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 52px;
}
.section-subtitle.centered { text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}
.btn-primary { background: var(--accent-btn); color: var(--white); }
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(196, 144, 106, 0.38);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--ube);
  color: var(--white);
  border: 1.5px solid var(--border);
}
.btn-accent:hover {
  border-color: var(--ube);
  color: var(--ube);
  background: transparent;
  transform: translateY(-2px);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: var (var(--bg));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text);
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a.nav-cta { padding: 8px 18px; font-size: 0.85rem; color: var(--white); }
.nav-links a.nav-cta:hover,
.nav-links a.nav-cta.active { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -8%;
  width: 55vw;
  height: 55vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, rgba(196, 144, 106, 0.1) 0%, transparent 68%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45ch;
  color: var(--ube);
}
.hero-name-text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4em;
}
.hero-name-word {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08ch;
}
.hero-name-letter {
  display: inline-block;
  transition: color 0.45s var(--ease);
}
.hero-name-letter--highlight {
  color: var(--ube);
}
.hero-name-note {
  opacity: 0;
  transform: translateY(0.1em);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  font-size: 0.38em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ube);
  font-weight: 600;
}
@media (hover: hover) {
  .hero-name:hover .hero-name-letter:not(.hero-name-letter--highlight) {
    color: var(--ube-light);
  }
  .hero-name:hover .hero-name-note {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-name--active .hero-name-letter:not(.hero-name-letter--highlight) {
  color: var(--ube-light);
}
.hero-name--active .hero-name-note {
  opacity: 1;
  transform: translateY(0);
}
.hero-role {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 800px;
  line-height: 1.75;
  margin-bottom: 44px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-right: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: var(--border) 1.5px solid;
  line-height: 1;
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.hero-badge-arrow { width: 13px; height: 13px; flex-shrink: 0; }
.hero-tagline-text {
  display: none;
}
.hero-tagline-text.visible {
  display: inline;
  animation: tagline-reveal 0.4s var(--ease) forwards;
}
@keyframes tagline-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (hover: hover) {
  .hero-tagline-text {
    display: inline;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }
  .hero-badge:hover + .hero-tagline-text {
    opacity: 1;
  }
}
.hero-badge:hover,
.hero-badge:focus-visible {
  background: rgba(135, 196, 133, 0.22);
  transform: translateY(-1px);
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 2px rgba(143, 166, 142, 0.16);
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: opacity 0.5s var(--ease);
  animation: scroll-hint-bob 1.8s ease-in-out infinite;
}
.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}
.scroll-hint span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-hint svg { width: 32px; height: 32px; display: block; }
@keyframes scroll-hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

.btt-mobile { display: none; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: auto;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(44, 40, 39, 0.08);
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.back-to-top.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(44, 40, 39, 0.12);
}

@media (max-width: 620px) {
  .back-to-top { right: 14px; bottom: 14px; }
  .btt-desktop { display: none; }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
}
.about-image {
  justify-self: end;
}
.about-image-placeholder {
  width: 260px;
  height: 320px;
  border-radius: 20px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--text-light);
}
.about-image-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}
.about-content .section-title { margin-bottom: 24px; }
.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-text:last-child { margin-bottom: 0; }

/* ===== Timeline expand ===== */
.timeline-expand-wrap {
  display: none; /* temporarily hidden while timeline is shown by default */
}
.timeline-expand-btn { gap: 10px; }
.expand-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.timeline-expand-btn[aria-expanded="true"] .expand-chevron {
  transform: rotate(180deg);
}
.timeline-collapsible {
  overflow: visible; /* temporarily open by default */
  height: auto;
  transition: height 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Timeline ===== */
.timeline-header {
  display: grid;
  grid-template-columns: 1fr 110px 1fr;
  gap: 0 24px;
  margin-bottom: 28px;
}
.hint-click { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-click { display: inline; }
}

.timeline-col-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.timeline-col-header--right {
  align-items: flex-start;
}
.timeline-col-label {
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-serif);
  color: var(--ube);
  text-align: right;
}
.timeline-col-header--right .timeline-col-label { text-align: left; }
.timeline-col-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration) var(--ease);
}
.timeline-col-link:hover { color: var(--accent-dark); }
.timeline-col-link.contact-link--disabled {
  color: var(--text-light);
  text-decoration: none;
  cursor: default;
}
.coming-soon { opacity: 0.6; }

.timeline-controls {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.timeline-extra-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
  pointer-events: none;
}
.timeline-row.timeline-row--archived {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.35s var(--ease), opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.timeline-row.timeline-row--archived.timeline-row--visible {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 110px 1fr;
  gap: 0 24px;
  align-items: start;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 20px 12px 0;
}
.timeline-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0 12px 20px;
}

.timeline-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.timeline-year-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-alt);
  box-shadow: 0 0 0 2px var(--accent);
  flex-shrink: 0;
}
.section .timeline-dot { border-color: var(--bg); }

.timeline-year {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-top: 6px;
}

.timeline-item {
  max-width: 300px;
  width: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: default;
  min-height: 70px;
  transition: box-shadow var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}
@media (hover: hover) {
  .timeline-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
    transform: translateY(-2px);
  }
}
.timeline-item--active {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.item-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 2px;
}
.item-subtitle {
  font-size: 0.8rem;
  color: var(--accent);
}

.item-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s var(--ease), opacity 0.28s ease;
  opacity: 0;
}
@media (hover: hover) {
  .timeline-item:hover .item-desc {
    max-height: 210px;
    opacity: 1;
  }
}
.timeline-item--active .item-desc {
  max-height: 210px;
  opacity: 1;
}
.item-desc p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-top: 10px;
  overflow: hidden;
}

/* ===== Work / Cases ===== */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 44px;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: var(--white);
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent-btn); color: var(--white); border-color: var(--accent-btn); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.cases-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.case-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: block;
  transition: box-shadow var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}
.case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }
.case-card.hidden { display: none; }

.case-thumb {
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.case-thumb--img {
  background-size: cover;
  background-position: center top;
}
.case-thumb::after {
  content: 'View case →';
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.18);
  padding: 5px 13px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.case-card:hover .case-thumb::after { opacity: 1; transform: translateY(0); }

.case-body    { padding: 24px; }
.case-title   { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 400; margin-bottom: 8px; line-height: 1.3; }
.case-title { color: var(--text); }
.case-description { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.case-tags    { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 0.73rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(227, 104, 136, 0.12);
  color: var(--accent2);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ===== Learning Journey ===== */
.certifications-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.certifications-wrapper .btn {
  width: auto;
  height: fit-content;
  justify-self: center;
  align-self: center;
}
.certifications-grid {
  display: contents;
}
.cert-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.cert-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.cert-icon svg { width: 22px; height: 22px; stroke: white; }

.cert-year        { font-size: 0.75rem; font-weight: 500; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 5px; }
.cert-title       { font-size: 0.98rem; font-weight: 500; color: var(--accent-dark); line-height: 1.3; margin-bottom: 3px; }
.cert-institution { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.cert-description { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; }
.cert-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ===== Contact ===== */
.contact-inner { max-width: 540px; }
.contact-inner .section-title { margin-bottom: 16px; }
.contact-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 44px;
}
.contact-links { display: flex; flex-direction: column; gap: 18px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  color: var(--text);
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.contact-link:hover { color: var(--accent); transform: translateX(5px); }
.contact-link--disabled {
  color: var(--text-light);
  cursor: default;
  opacity: 0.6;
}
.contact-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== Footer ===== */
.footer {
  padding: 64px 0 0;
  border-top: 1px solid var(--border);
}
.footer-bottom {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { font-size: 0.83rem; color: var(--text-light); }

/* ===== Scroll fade-in ===== */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .about-grid {
    display: flow-root;
  }
  .about-image {
    float: right;
    margin-left: 16px;
    margin-bottom: 8px;
  }
  .about-image-photo {
    width: 100px;
    height: 100px;
    border-radius: 100%;
    object-fit: cover;
    object-position: center top;
  }
  .about-image-placeholder {
    width: 100px;
    height: 100px;
    margin: 0;
  }
  .timeline-row,
  .timeline-header {
    grid-template-columns: 1fr 80px 1fr;
    gap: 0 12px;
  }
  .timeline-item { max-width: 100%; }
}

/* ===== Case Study Page ===== */
.case-hero {
  padding: calc(var(--nav-h) + 72px) 0 72px;
  border-bottom: 1px solid var(--border);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.back-link:hover { color: var(--accent); transform: translateX(-3px); }
.case-hero-banner {
  width: 100%;
  height: 320px;
  border-radius: 16px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 5rem;
  color: rgba(255,255,255,0.4);
}
.case-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.case-meta {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.case-meta-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 4px;
}
.case-meta-item label abbr {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  text-decoration-color: var(--text-light);
  position: relative;
}
.case-meta-item label abbr::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--text);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.case-meta-item label abbr:hover::after,
.case-meta-item label abbr:focus::after {
  opacity: 1;
}
.case-meta-item span { font-size: 0.9rem; color: var(--text-muted); }
.case-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
}
.case-content h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin: 48px 0 16px;
}
.case-content h2:first-child { margin-top: 0; }
.case-content p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.placeholder-block {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  color: var(--text-light);
  margin: 32px 0;
}
.placeholder-block p { font-size: 0.9rem; margin-bottom: 6px; }
.placeholder-block p:last-child { margin-bottom: 0; }
.placeholder-image {
  width: 100%;
  height: 240px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 24px 0;
}
.case-img {
  width: 100%;
  border-radius: var(--radius);
  margin: 24px 0;
  display: block;
  cursor: zoom-in;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 22, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightbox-in 0.22s var(--ease) both;
}
.lightbox[hidden] { display: none; }
@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
  transition: border-radius var(--duration) var(--ease);
  animation: lightbox-img-in 0.28s var(--ease) both;
}
.lightbox-img.is-zoomed {
  max-width: none;
  max-height: none;
  width: auto;
  cursor: zoom-out;
  align-self: flex-start;
}
@keyframes lightbox-img-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration) var(--ease);
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }
.lightbox-close svg { width: 18px; height: 18px; }
#not-found { text-align: center; padding: 120px 24px; color: var(--text-muted); }
#not-found h2 { font-family: var(--font-serif); font-weight: 400; margin-bottom: 16px; }

/* Case page — hide banner + description */
#case-banner    { display: none; }
#case-description { display: none; }

/* Case page — links */
.case-content a,
.case-meta a {
  color: var(--ube);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.case-content a:hover,
.case-meta a:hover { color: var(--ube-light); }

/* Case page — entrance animation */
@keyframes case-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
#case-title   { animation: case-reveal 0.55s var(--ease) 0.10s both; }
#case-tags    { animation: case-reveal 0.55s var(--ease) 0.38s both; }
.case-meta-item              { animation: case-reveal 0.5s var(--ease) both; }
.case-meta-item:nth-child(1) { animation-delay: 0.66s; }
.case-meta-item:nth-child(2) { animation-delay: 0.80s; }
.case-meta-item:nth-child(3) { animation-delay: 0.94s; }
.case-meta-item:nth-child(4) { animation-delay: 1.08s; }
.case-meta-item:nth-child(5) { animation-delay: 1.22s; }
.case-meta-item:nth-child(6) { animation-delay: 1.36s; }
#case-content { animation: case-reveal 0.55s var(--ease) 1.30s both; }

@media (max-width: 620px) {
  .section { padding: 64px 0; }

  /* Mobile nav */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 24px; font-size: 0.95rem; }
  .nav-toggle { display: flex; }

  /* Mobile timeline: single column, stacked */
  .timeline::before { display: none; }
  .timeline-header  { display: none; }
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .timeline-left,
  .timeline-right {
    padding: 0;
    justify-content: stretch;
  }
  .timeline-center-col { display: none; }
  .timeline-item { max-width: 100%; }
  .timeline-item::before {
    content: attr(data-year);
    display: block;
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .timeline-item { cursor: pointer; }

  .cases-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-name {
    font-size: clamp(2.8rem, 13vw, 4rem);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .hero-name-text { flex-direction: column; gap: 0; }
}
