:root {
  --bg: #f5f0e8;
  --surface: #fffaf3;
  --surface-2: #f2e4d7;
  --text: #2d2218;
  --muted: #6a5848;
  --accent: #d65733;
  --accent-strong: #c6401d;
  --accent-2: #1f7a8c;
  --border: #dbc8b6;
  --shadow: 0 12px 32px rgba(71, 49, 31, 0.12);
  --header-bg: rgba(245, 240, 232, 0.75);
  --header-border: rgba(219, 200, 182, 0.5);
  --glow-1: rgba(214, 87, 51, 0.17);
  --glow-2: rgba(31, 122, 140, 0.13);
  --grain-color: #000;
  --solid-on-accent: #fff;
  --primary-shadow: 0 10px 20px rgba(198, 64, 29, 0.26);
  --stat-card-bg: rgba(255, 250, 243, 0.82);
  --frost-bg: rgba(255, 250, 243, 0.6);
  --case-gradient: linear-gradient(180deg, rgba(242, 228, 215, 0.55), rgba(245, 240, 232, 0));
  --study-bg-1: rgba(255, 250, 243, 0.78);
  --study-bg-2: rgba(255, 250, 243, 0.52);
  --study-border: rgba(255, 255, 255, 0.48);
  --study-shadow: 0 14px 28px rgba(58, 41, 26, 0.14);
  --inner-highlight: rgba(255, 255, 255, 0.45);
  --study-text: #4e3e30;
  --study-link: #0f5f6f;
  --tag-text: #5e401f;
  --cv-gradient: linear-gradient(130deg, #f8e9da, #e5f2f5);
  --mask-solid: #000;
  --switch-track: #d7c5b2;
  --switch-thumb: #fffaf3;
  --case-hero-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(226, 240, 247, 0.58));
  --radius: 18px;
}

:root[data-theme='dark'] {
  --bg: #11161b;
  --surface: #1c242c;
  --surface-2: #25303a;
  --text: #e8eef5;
  --muted: #a8b5c2;
  --accent: #ff825d;
  --accent-strong: #eb5f35;
  --accent-2: #5ec7d6;
  --border: #33404d;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(17, 22, 27, 0.78);
  --header-border: rgba(71, 88, 104, 0.5);
  --glow-1: rgba(255, 130, 93, 0.16);
  --glow-2: rgba(94, 199, 214, 0.12);
  --grain-color: #cfd7e0;
  --solid-on-accent: #0f1419;
  --primary-shadow: 0 10px 20px rgba(235, 95, 53, 0.24);
  --stat-card-bg: rgba(28, 36, 44, 0.82);
  --frost-bg: rgba(28, 36, 44, 0.72);
  --case-gradient: linear-gradient(180deg, rgba(34, 45, 56, 0.75), rgba(17, 22, 27, 0));
  --study-bg-1: rgba(36, 46, 57, 0.8);
  --study-bg-2: rgba(28, 36, 44, 0.62);
  --study-border: rgba(124, 149, 171, 0.24);
  --study-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
  --inner-highlight: rgba(255, 255, 255, 0.08);
  --study-text: #d4dee7;
  --study-link: #82dbe8;
  --tag-text: #ffd2bf;
  --cv-gradient: linear-gradient(130deg, #233240, #1f2a33);
  --mask-solid: #fff;
  --switch-track: #344250;
  --switch-thumb: #d7e2ec;
  --case-hero-bg: linear-gradient(145deg, rgba(34, 48, 63, 0.84), rgba(27, 40, 53, 0.76));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -8%;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background: radial-gradient(circle at 25% 15%, var(--glow-1), transparent 32%);
  animation: glow-breathe-a 5s ease-in-out infinite;
}

body::after {
  background: radial-gradient(circle at 85% 20%, var(--glow-2), transparent 36%);
  animation: glow-breathe-b 10s ease-in-out infinite;
}

h1{
  font-family: 'Fraunces', serif;
  line-height: 1.1;
  margin-top: 0;
  font-size: x-large;
}

h2,
h3,
a.brand {
  font-family: 'Fraunces', serif;
  line-height: 1.2;
  margin-top: 0;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(var(--grain-color) 0.35px, transparent 0.35px);
  background-size: 5px 5px;
  z-index: -1;
}

body:has(.case-layout) .grain {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.55rem 0 0.2rem;
  background: transparent;
  border: 0;
  pointer-events: none;
  transition: padding 0.25s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  width: min(980px, 92vw);
  padding: 0 2rem;
  border-radius: 999px;
  border: 1px solid var(--header-border);
  background: color-mix(in srgb, var(--header-bg), transparent 12%);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  transition: min-height 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.site-header.island-scrolled {
  padding-top: 0.35rem;
}

.site-header.island-scrolled .nav {
  min-height: 64px;
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-size: 1.25rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  line-height: 1;
}

.icon-sun,
.icon-moon {
  opacity: 0.5;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.icon-sun {
  color: #d28d1d;
  opacity: 1;
}

.icon-moon {
  color: #6886a8;
}

:root[data-theme='dark'] .icon-sun {
  opacity: 0.45;
}

:root[data-theme='dark'] .icon-moon {
  opacity: 1;
  color: #9cc4ff;
}

.toggle-track {
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: var(--switch-track);
  padding: 2px;
  display: inline-flex;
  align-items: center;
}

.toggle-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--switch-thumb);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

:root[data-theme='dark'] .toggle-thumb {
  transform: translateX(17px);
}

main {
  padding-bottom: 4rem;
}

section {
  padding: 5.5rem 0;
}

.hero {
  padding-top: 4.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--accent-2);
  margin-bottom: 0.7rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero-copy {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.72rem 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn.primary {
  color: var(--solid-on-accent);
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  box-shadow: var(--primary-shadow);
}

.btn.ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-stats {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1rem;
}

.hero-stats article {
  background: var(--stat-card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.hero-stats h3 {
  margin-bottom: 0.2rem;
  font-size: 1.7rem;
}

.hero-stats p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.logo-loop {
  padding: 1rem 0 3rem;
  background: transparent;
}

.logo-marquee {
  width: 100%;
  display: flex;
  gap: 0.85rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, var(--mask-solid) 10%, var(--mask-solid) 90%, transparent);
}

.logo-track {
  min-width: max-content;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: logo-scroll 20s linear infinite;
}

.logo-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: var(--frost-bg);
  backdrop-filter: blur(4px);
}

.logo-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.logo-item span {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head.problem-head {
  margin-bottom: 0;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  margin-bottom: 0.2rem;
}

.section-head.center {
  text-align: center;
}

.section-head.center h2 {
  margin-left: auto;
  margin-right: auto;
}

.section-head.problem-head + .cs-problem {
  padding-top: 0;
}

.case-studies {
  background: var(--case-gradient);
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.study-carousel {
  margin-top: 0.4rem;
}

.study-window {
  overflow: hidden;
}

.study-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.35s ease;
  will-change: transform;
}

.study-track .study-card {
  flex: 0 0 calc((100% - 2rem) / 3);
}

.carousel-controls {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.carousel-btn {
  min-width: 52px;
}

.carousel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.study-card {
  background: linear-gradient(140deg, var(--study-bg-1), var(--study-bg-2));
  border: 1px solid var(--study-border);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--study-shadow), inset 0 1px 0 var(--inner-highlight);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.study-track:hover .study-card {
  opacity: 0.7;
}

.study-track:hover .study-card:hover {
  opacity: 1;
}

.study-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(86, 214, 255, 0),
    rgba(162, 234, 255, 1),
    rgba(86, 214, 255, 0)
  );
  box-shadow: 0 0 16px rgba(86, 214, 255, 0.8), 0 0 28px rgba(86, 214, 255, 0.42);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.study-card:hover::before {
  opacity: 1;
  animation: study-border-travel 2.2s linear infinite;
}

@media (hover: none) {
  .study-track:hover .study-card,
  .study-track:hover .study-card:hover {
    opacity: 1;
  }

  .study-card:hover::before {
    opacity: 0;
    animation: none;
  }
}

@keyframes study-border-travel {
  0% {
    top: 0;
    left: 0;
    width: 64px;
    height: 2px;
  }
  24% {
    top: 0;
    left: calc(100% - 64px);
    width: 64px;
    height: 2px;
  }
  25% {
    top: 0;
    left: calc(100% - 2px);
    width: 2px;
    height: 64px;
  }
  49% {
    top: calc(100% - 64px);
    left: calc(100% - 2px);
    width: 2px;
    height: 64px;
  }
  50% {
    top: calc(100% - 2px);
    left: calc(100% - 64px);
    width: 64px;
    height: 2px;
  }
  74% {
    top: calc(100% - 2px);
    left: 0;
    width: 64px;
    height: 2px;
  }
  75% {
    top: calc(100% - 64px);
    left: 0;
    width: 2px;
    height: 64px;
  }
  100% {
    top: 0;
    left: 0;
    width: 2px;
    height: 64px;
  }
}

.study-card-media {
  margin: 0;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.study-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.study-card-content {
  padding: 0.95rem 0.35rem 0.2rem;
  flex: 1;
}

.study-card-footer {
  margin-top: auto;
  padding: 0.4rem 0.35rem 0.2rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
}

.tag {
  display: inline-block;
  background: var(--surface-2);
  color: var(--tag-text);
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.tag-lock {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  vertical-align: middle;
}

.study-card h3 {
  font-size: 1.35rem;
}

.study-card p,
.study-card li,
.about p,
.timeline p {
  color: var(--study-text);
}

.study-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em;
}

.study-card ul {
  padding-left: 1rem;
}

.study-card-meta {
  margin-top: 0.65rem;
}

.study-card a {
  display: block;
  color: var(--study-link);
  font-weight: 700;
  text-decoration: none;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.timeline article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.cv-card {
  background: var(--cv-gradient);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(1.2rem, 2.8vw, 2.2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.design-work {
  margin-top: 3.5rem;
}

.design-carousel {
  margin-top: 1.2rem;
}

.design-stage {
  position: relative;
  height: 360px;
  perspective: 1200px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
  border: 1px solid var(--border);
}

.design-track {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
}

.design-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 320px;
  transform-style: preserve-3d;
  transform-origin: center;
  transition: transform 0.6s ease, opacity 0.4s ease;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

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

.design-empty {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .design-stage {
    height: 320px;
  }
  .design-card {
    width: 220px;
    height: 280px;
  }
}

.contact {
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.case-main {
  padding: 4.5rem 0 3.5rem;
}

.case-hero {
  background: var(--case-hero-bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.case-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  max-width: 18ch;
  margin-bottom: 0.6rem;
}

.case-summary {
  max-width: 64ch;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 0.8rem;
}

.case-meta article {
  background: var(--frost-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
}

.case-meta h3 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.28rem;
}

.case-meta p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

.case-layout {
  display: grid;
  gap: 1.5rem;
}

.cs-section {
  padding-top: 0.5rem;
}

.cs-hero {
  padding-top: 0.3rem;
}

.cs-hero-media {
  position: relative;
  
  border-radius: calc(var(--radius) + 1px);
  overflow: hidden;
  min-height: clamp(260px, 42vw, 420px);
  
}

.cs-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 22, 35, 0.14), rgba(12, 22, 35, 0.72));
}

.cs-hero-copy {
  position: absolute;
  left: clamp(1rem, 2vw, 1.6rem);
  right: clamp(1rem, 2vw, 1.6rem);
  bottom: clamp(1rem, 2.5vw, 1.8rem);
  color: #fff;
}

.cs-hero-copy h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.8rem, 4.6vw, 3.1rem);
}

.cs-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.cs-overview-text {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 100% max-content;
  padding-bottom: 2rem;
}

.cs-overview-grid article {
  background: var(--frost-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 0.95rem;
}

.cs-overview-grid h3 {
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.cs-overview-grid p {
  margin: 0;
  font-weight: 700;

}

.cs-problem {
  padding: 1rem 0 0.2rem;
  max-width: 100% max-content;
}

.cs-problem p {
  margin: 0;
  max-width: 100% max-content;
  font-size: clamp(2.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--text);
  padding-bottom: 2rem;
}

.cs-subsection {
  margin-top: 1rem;
}

.cs-subsection h3 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.cs-subsection .cs-two-col,
.cs-subsection .cs-single-image,
.cs-subsection .cs-ui-grid {
  margin-top: 0.6rem;
}

.cs-subsection p {
  color: var(--muted);
  margin: 3rem 0 0;
}

.cs-section ul,
.cs-section ol {
  margin: 1rem 0 0 1.2rem;
  color: var(--muted);
  padding: 0;
}

.cs-section li {
  margin: 0.35rem 0;
}

.cs-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.cs-two-col figure,
.cs-single-image,
.cs-ui-grid figure {
  margin: 0;
}

.cs-two-col img,
.cs-single-image img,
.cs-ui-grid img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: zoom-in;
}

.cs-ui-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.4rem;
  row-gap: 2.8rem;
}

.cs-ui-grid figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.cs-highlight {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: var(--frost-bg);
  color: var(--text);
  font-weight: 600;
}

.case-password-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.case-password-card {
  width: min(460px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.case-password-card h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
}

.case-password-card p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.case-password-row {
  display: flex;
  gap: 0.55rem;
}

.case-password-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font: inherit;
}

.case-password-error {
  margin-top: 0.5rem;
  min-height: 1.05rem;
  color: #ff9f8a;
  font-size: 0.9rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.image-lightbox.open {
  display: block;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 16, 0.86);
  backdrop-filter: blur(3px);
}

.image-lightbox-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: min(4vw, 2rem);
}

.image-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(10, 18, 30, 0.78);
  color: #fff;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes glow-breathe-a {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.72;
    transform: scale(1.03);
  }
}

@keyframes glow-breathe-b {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(1);
  }
  50% {
    opacity: 0.66;
    transform: scale(1.05);
  }
}

@media (max-width: 1000px) {
  .study-track .study-card {
    flex: 0 0 calc((100% - 1rem) / 2);
  }

  .study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 0.45rem;
  }

  .nav {
    min-height: 66px;
    padding: 0 0.8rem;
  }

  section {
    padding: 4rem 0;
  }

  .menu-btn {
    display: inline-flex;
  }

  .theme-toggle {
    padding: 0.3rem 0.62rem 0.3rem 0.35rem;
  }

  .toggle-label {
    display: none;
  }

  .nav-links {
    position: absolute;
    right: 4vw;
    top: 62px;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem;
    min-width: 190px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero-stats,
  .case-meta,
  .cs-overview-grid,
  .cs-two-col,
  .cs-ui-grid,
  .study-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .study-track .study-card {
    flex: 0 0 100%;
  }

  .logo-item {
    padding: 0.48rem 0.78rem;
  }

  .logo-item img {
    width: 22px;
    height: 22px;
  }

  .cv-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
