/* ==========================================================================
   STYLE.CSS — components, built entirely on theme.css tokens.
   Glass surfaces use the gradient pairs (glass / drawer-glass / thick-glass)
   plus the inset top/bottom shadows for a real bevel edge, not a flat tint.
   ========================================================================== */

/* ============================================
   RESET / BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  height: 100%;
}
body {
  height: 100%;
  font-family: var(--font-body);
  font-weight: var(--font-weight-sm);
  background: var(--bg-tertiary-color);
  color: var(--text-primary-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* the page never scrolls — only .panel-scroll does */
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
::selection {
  background: var(--text-primary-color);
  color: var(--bg-primary-color);
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
:focus-visible {
  outline: 2px solid var(--text-primary-color);
  outline-offset: 3px;
  border-radius: var(--border-radius-sm);
  corner-shape: squircle;
}

/* ============================================
   FIRST-LOAD ENTRANCE
   ============================================ */
.topbar {
  animation: headerDrop var(--transition-2xl) both;
}
@keyframes headerDrop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.glass-panel {
  animation: glassFocus var(--transition-2xl) both;
}
@keyframes glassFocus {
  from {
    opacity: 0;
    transform: scale(.98);
    backdrop-filter: blur(70px) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(70px) saturate(var(--glass-saturate));
  }
  to {
    opacity: 1;
    transform: scale(1);
    backdrop-filter: blur(var(--glass-blur-2xl)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur-2xl)) saturate(var(--glass-saturate));
  }
}
.panel-footer {
  animation: footerRise var(--transition-xl) both;
  animation-delay: .25s;
}
@keyframes footerRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BACKDROP
   ============================================ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-primary-color);
}
.backdrop-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  opacity: 0;
  filter: saturate(1.05) brightness(.8);
  transform: scale(1.06);
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.backdrop-img.is-active {
  opacity: 1;
}
.backdrop-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 8%, var(--scrim-soft), transparent 60%),
    linear-gradient(180deg, var(--scrim-soft) 0%, var(--scrim-mid) 45%, var(--scrim-strong) 100%);
}
.backdrop-grain {
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================
   SHELL / STAGE
   ============================================ */
.shell {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--padding-xl) var(--padding-4xl);
  gap: var(--gutter-xl);
  align-items: center;
}
.stage {
  flex: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  max-width: 1100px;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  display: flex;
  width: 100%;
  max-width: 1100px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gutter-lg);
}
.pill-nav {
  display: flex;
  gap: var(--gutter-md);
  justify-content: space-between;
}
.pill {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-md);
  color: var(--text-primary-color);
  padding: var(--padding-sm) var(--padding-md);
  border-radius: var(--border-radius-pill);
  corner-shape: squircle;
  background: linear-gradient(135deg, var(--glass-active-from), var(--glass-active-to));
  backdrop-filter: blur(var(--glass-blur-md)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-md)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-primary-color);
  box-shadow:
    inset 0 1px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 8px 20px var(--shadow-drop-sm);
  transition: background var(--transition-sm), border-color var(--transition-sm),
    transform var(--transition-sm), box-shadow var(--transition-sm);
}
.pill:hover {
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  transform: translateY(-1px);
}
.pill.is-active {
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  border-color: var(--border-secondary-color);
  box-shadow:
    inset 0 1px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 10px 26px var(--shadow-drop);
}
.thumb-strip {
  display: flex;
  gap: var(--gutter-sm);
}
.thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-lg);
  corner-shape: squircle;
  background-size: cover;
  background-position: center;
  border: none;
  opacity: 1;
  transition: opacity var(--transition-sm), transform var(--transition-sm), border-color var(--transition-sm);
  box-shadow:
    inset 0 1px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 10px 26px var(--shadow-drop);
}
.thumb:hover {
  opacity: .85;
  transform: translateY(-2px);
}
.thumb.is-active {
  opacity: 1;
  box-shadow:
    inset 0 2px 0 var(--shadow-inset-top),
    inset 0 -2px 0 var(--shadow-inset-bottom),
    0 10px 26px var(--shadow-drop);
  border: 1px solid var(--text-primary-color);
}

/* ============================================
   GLASS PANEL
   ============================================ */
.glass-panel {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 1100px;
  border-radius: var(--border-radius-3xl);
  corner-shape: squircle;
  background: linear-gradient(165deg, var(--glass-drawer-from), var(--glass-drawer-to));
  backdrop-filter: blur(var(--glass-blur-2xl)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-2xl)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-secondary-color);
  box-shadow:
    inset 0 2px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 30px 90px var(--shadow-drop);
  overflow: hidden;
  padding: var(--padding-lg);
}
/* top rim highlight — the glass "edge" catching light */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--shadow-inset-top) 40%, var(--shadow-inset-top) 60%, transparent);
  z-index: 3;
  pointer-events: none;
}
/* specular sheen sweep, white only */
/* .glass-panel::after{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:2;
  background:linear-gradient(115deg, transparent 35%, rgba(255,255,255,.04) 48%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 52%, transparent 65%);
  background-size:220% 220%;background-position:120% -10%;
} */
.panel-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--padding-xl);
  scrollbar-width: thin;
  scrollbar-color: var(--border-secondary-color) transparent;
}
.panel-scroll::-webkit-scrollbar {
  width: 6px;
}
.panel-scroll::-webkit-scrollbar-thumb {
  background: var(--border-secondary-color);
  border-radius: var(--border-radius-pill);
  corner-shape: squircle;
}
.panel-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--border-primary-color);
}
.panel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  pointer-events: none;
  z-index: 3;
}
.panel-fade-top {
  top: 0;
  background: linear-gradient(180deg, var(--glass-drawer-from), transparent);
}
.panel-fade-bottom {
  bottom: 0;
  background: linear-gradient(0deg, var(--glass-drawer-to), transparent);
}
.block {
  padding: 0;
}
.block-divider {
  height: 1px;
  background: var(--border-primary-color);
  margin: var(--gutter-4xl) 0;
}

/* ============================================
   PROFILE / HOME
   ============================================ */
.profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: var(--gutter-3xl);
}
.name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-sm);
  font-size: var(--font-size-3xl);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--text-primary-color);
}
.profile-heading {
  display: flex;
  align-items: center;
  gap: var(--gutter-xl);
  flex-wrap: wrap;
}
.profile-img {
  height: 66px;
  width: 66px;
  transition: opacity var(--transition-sm), transform var(--transition-sm), border-color var(--transition-sm);
  border-color: 1px var(--bg-primary-color);
  border-radius: var(--border-radius-2xl);
  corner-shape: squircle;
  box-shadow:
    inset 0 1px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 10px 26px var(--shadow-drop);
}
.role {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--text-secondary-color);
  margin-top: 6px;
}
.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--gutter-md);
}
.loc {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-tertiary-color);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ring {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-live-color);
  box-shadow: 0 0 0 0 var(--status-live-ring-color);
  animation: ringPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
  corner-shape: squircle;
}
.ring.small {
  width: 6px;
  height: 6px;
}
@keyframes ringPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--status-live-ring-color);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(95, 217, 122, 0);
  }
}
.social-row {
  display: flex;
  gap: var(--gutter-sm);
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-lg);
  corner-shape: squircle;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  box-shadow: inset 0 1px 0 var(--shadow-inset-top);
  transition: all var(--transition-sm);
}
.icon-btn:hover {
  color: var(--text-primary-color);
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  transform: translateY(-2px);
}
.bio {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--text-secondary-color);
  max-width: 74ch;
  margin-bottom: var(--gutter-3xl);
}
.bio em {
  color: var(--text-primary-color);
  font-style: normal;
  font-weight: var(--font-weight-md);
}
.divider-label {
  font-family: var(--font-mono);
  font-size: var(--font-size-xsm);
  letter-spacing: .06em;
  color: var(--text-tertiary-color);
  text-transform: lowercase;
  margin-bottom: var(--gutter-lg);
  padding-top: var(--gutter-sm);
}
.glance-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter-md) var(--gutter-2xl);
  margin-bottom: var(--gutter-3xl);
}
.glance-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--font-size-md);
  color: var(--text-accent-color);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-live-color);
  flex-shrink: 0;
  corner-shape: squircle;
}
.dot.live {
  margin-left: 8px;
  box-shadow: 0 0 0 3px var(--status-live-ring-color);
}
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter-md);
  margin-bottom: var(--gutter-3xl);
}
.stack-badge {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 8px 20px rgba(0, 0, 0, .18);
  transition: .25s ease;
}
.stack-badge:hover {
  transform: translateY(-3px);
}
.stack-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
/* Glass Tooltip */
.stack-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-6px) scale(.96);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--text-secondary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .18s ease,
    transform .18s cubic-bezier(.22, 1, .36, 1),
    visibility .18s;
}
.stack-badge:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}
.badge-glyph {
  font-family: var(--font-mono);
  font-weight: var(--font-weight-lg);
  font-size: var(--font-size-sm);
}

/* ============================================
   EXPERIENCE
   ============================================ */
.exp {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}
.exp-img {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  margin-top: 6px;
}
.exp-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.exp-list {
  display: flex;
  flex-direction: column;
  gap: var(--gutter-xl);
  margin-bottom: var(--gutter-4xl);
}
.exp-item {
  padding-bottom: var(--gutter-xl);
  border-bottom: 1px solid var(--border-tertiary-color);
}
.exp-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.exp-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px var(--gutter-lg);
  margin-bottom: 0px;
}
.exp-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-sm);
  color: var(--text-primary-color);
  display: flex;
  align-items: center;
}
.exp-role {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  color: var(--text-secondary-color);
}
.exp-date {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-secondary-color);
  margin-left: auto;
}
.exp-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary-color);
  max-width: 450px;
}
.hero-actions {
  display: flex;
  gap: var(--gutter-md);
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-lg);
  padding: var(--padding-md) var(--padding-lg);
  border-radius: var(--border-radius-4xl);
  /* corner-shape: squircle;  */
  transition: all var(--transition-sm);
  cursor: pointer;
  border: none;
}
.btn svg {
  transition: transform var(--transition-sm);
}
.btn:hover svg {
  transform: translate(2px, -2px);
}
.btn-solid {
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  color: var(--text-primary-color);
  border: 1px solid var(--border-primary-color);
  box-shadow: inset 0 1px 0 var(--shadow-inset-top);
}
.btn-solid:hover {
  background: linear-gradient(0deg, var(--glass-bg-active-from), var(--glass-bg-active-to));
  transform: translateY(-2px);
}
.btn-wide {
  width: 100%;
  justify-content: center;
}

/* ============================================
   BLOCK TITLES
   ============================================ */
.block-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-sm);
  font-size: var(--font-size-display);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin-bottom: 10px;
  max-width: 22ch;
  color: var(--text-primary-color);
}
.block-sub {
  color: var(--text-secondary-color);
  font-size: var(--font-size-md);
  max-width: 56ch;
  margin-bottom: var(--gutter-3xl);
}

/* ============================================
   FEATURED PRODUCTS
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter-2xl);
  margin-bottom: 40px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-xl);
  corner-shape: squircle;
  overflow: hidden;
  background: linear-gradient(165deg, var(--glass-drawer-from), var(--glass-drawer-to));
  border: 1px solid var(--border-secondary-color);
  box-shadow:
    inset 0 1px 0 var(--shadow-inset-top),
    inset 0 -1px 0 var(--shadow-inset-bottom),
    0 20px 50px var(--shadow-drop);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}
.feature-card:hover {
  transform: translateY(-4px);
}
.feature-preview {
  border-bottom: 1px solid var(--border-primary-color);
}
.feature-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.feature-body {
  padding: var(--padding-xl);
  justify-content: space-between;
}
.feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter-md);
  margin-bottom: var(--gutter-md);
}
.feature-head h3 {
  font-family: var(--font-body);
  font-weight: var(--font-weight-xl);
  font-size: var(--font-size-2xl);
  color: var(--text-primary-color);
}
.feature-links {
  display: flex;
  gap: 8px;
}
.feature-links .icon-btn {
  border-radius: 50%;
}
.feature-desc {
  color: var(--text-secondary-color);
  font-size: var(--font-size-md);
  margin-bottom: var(--gutter-xl);
  max-width: 60ch;
}
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter-sm);
}
.feature-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  box-shadow: inset 0 1px 0 var(--shadow-inset-top);
  transition: transform var(--transition-sm);
}
.feature-badge:hover {
  transform: translateY(-2px);
}
.feature-note {
  display: block;
  margin-top: var(--gutter-md);
  font-family: var(--font-mono);
  font-size: var(--font-size-xsm);
  color: var(--text-tertiary-color);
}

/* ============================================
   VIEW SWITCHING
   ============================================ */
.view {
  display: none;
}
.view.is-active {
  display: block;
}
.view.is-leaving {
  animation: viewLeave var(--transition-sm) forwards;
}
@keyframes viewLeave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(.985);
  }
}
.view.is-entering > * {
  animation: childRise var(--transition-lg) both;
  animation-delay: calc(var(--stagger-index, 0) * 35ms);
}
@keyframes childRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-secondary-color);
  margin-bottom: var(--gutter-2xl);
  padding: var(--padding-sm) var(--padding-md);
  border-radius: var(--border-radius-pill);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  transition: all var(--transition-sm);
}
.back-link:hover {
  color: var(--text-primary-color);
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  transform: translateX(-2px);
}

/* ============================================
   CASE STUDY
   ============================================ */
.case-title {
  max-width: none;
}
.case-sub {
  max-width: 64ch;
}
.case-image-full {
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-primary-color);
  margin-bottom: var(--gutter-md);
}
.case-image-full img {
  width: 100%;
  display: block;
  aspect-ratio: 16/7;
  object-fit: cover;
}
.case-image-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter-lg);
  margin-bottom: var(--gutter-md);
}
.case-image-2col img {
  width: 100%;
  display: block;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-primary-color);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.case-caption {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary-color);
  max-width: 70ch;
  margin-bottom: var(--gutter-4xl);
}
.version-list {
  display: flex;
  flex-direction: column;
  gap: var(--gutter-md);
  margin-bottom: var(--gutter-4xl);
}
.version-item {
  display: flex;
  align-items: baseline;
  gap: var(--gutter-lg);
  padding: var(--padding-md) 0;
  border-bottom: 1px solid var(--border-tertiary-color);
}
.version-item:last-child {
  border-bottom: none;
}
.version-tag {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-primary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  padding: 3px 10px;
  border-radius: var(--border-radius-pill);
  flex-shrink: 0;
}
.version-desc {
  font-size: var(--font-size-md);
  color: var(--text-secondary-color);
}
.testimonial-masonry {
  columns: 3 260px;
  column-gap: var(--gutter-lg);
}
.testimonial-item {
  break-inside: avoid;
  margin-bottom: var(--gutter-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary-color);
  box-shadow: 0 8px 20px var(--shadow-drop-sm);
  background: var(--bg-secondary-color);
  min-height: 160px;
}
.testimonial-item img {
  width: 100%;
  display: block;
}
@media (max-width: 720px) {
  .case-image-2col {
    grid-template-columns: 1fr;
  }
  .testimonial-masonry {
    columns: 1 100%;
  }
}

/* ---------- Case Study Layout ---------- */
.case-section {
  display: flex;
  flex-direction: column;
  gap: var(--gutter-3xl);
  margin-bottom: var(--padding-4xl);
}
.story-block {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--gutter-4xl);
  align-items: center;
  margin: var(--padding-4xl) 0;
}
.story-block.reverse {
  grid-template-columns: 1.05fr 0.95fr;
}
.story-block.reverse .story-copy {
  order: 2;
}
.story-block.reverse .story-image {
  order: 1;
}

/* ---------- Case Study Copy ---------- */
.story-copy h2 {
  margin:
    var(--margin-lg)
    0
    var(--margin-xl);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-md);
  line-height: 1.15;
  max-width: 34rem;
}
.story-copy p {
  margin-bottom: var(--margin-lg);
  max-width: 34rem;
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary-color);
}

/* ---------- Case Study Images ---------- */
.story-image img,
.case-image-full img {
  width: 100%;
  display: block;
  border-radius: var(--border-radius-xl);
}
.story-image img {
  box-shadow: var(--box-shadow-xl);
}

/* ---------- Case Study Metrics ---------- */
.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter-2xl);
  margin:
    var(--margin-xl)
    0
    var(--padding-xl);
}
.metric-number {
  display: block;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-lg);
  margin-bottom: var(--margin-sm);
}
.metric-label {
  color: var(--text-tertiary-color);
  font-size: var(--font-size-md);
}

/* ---------- Case Study Evolution ---------- */
.evolution-list {
  display: flex;
  flex-direction: column;
}
.evolution-item {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: var(--gutter-xl);
  padding:
    var(--padding-lg)
    0;
  border-bottom: 1px solid var(--border-primary-color);
}
.evolution-version {
  color: var(--text-tertiary-color);
}
.evolution-desc {
  font-size: var(--font-size-lg);
}

/* ---------- Case Study Decisions ---------- */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter-3xl);
}
.decision {
  padding-bottom: var(--padding-xl);
  border-bottom: 1px solid var(--border-primary-color);
}
.decision h3 {
  margin-bottom: var(--margin-md);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-md);
}
.decision p {
  color: var(--text-secondary-color);
  line-height: 1.7;
}

/* ---------- Case Study Results ---------- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter-3xl);
}
.results-grid h2 {
  margin-bottom: var(--margin-sm);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-lg);
}
.results-grid p {
  color: var(--text-tertiary-color);
}

/* ---------- Case Study Reflection ---------- */
.reflection {
  max-width: 44rem;
}
.reflection h2 {
  margin:
    var(--margin-lg)
    0
    var(--margin-xl);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-md);
  line-height: 1.2;
}
.reflection p {
  margin-bottom: var(--margin-lg);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary-color);
}

/* ============================================
   RECENT DESIGNS
   ============================================ */
.recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gutter-lg);
  margin-bottom: var(--gutter-md);
}
.shuffle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary-color);
  background: linear-gradient(135deg, var(--glass-bg-from), var(--glass-bg-to));
  border: 1px solid var(--border-primary-color);
  box-shadow: inset 0 1px 0 var(--shadow-inset-top);
  transition: all var(--transition-sm);
}
.shuffle-btn:hover {
  color: var(--text-primary-color);
  background: linear-gradient(135deg, var(--glass-bg-hover-from), var(--glass-bg-hover-to));
  transform: translateY(-2px);
}
.shuffle-btn.is-spinning svg {
  animation: shuffleSpin var(--transition-lg) var(--transition-sm);
}
@keyframes shuffleSpin {
  to {
    transform: rotate(360deg);
  }
}
.recent-grid {
  columns: 3 280px;
  column-gap: var(--gutter-lg);
  transition: opacity var(--transition-sm);
}
.recent-grid.is-shuffling {
  opacity: 0;
}
.recent-card {
  display: block;
  position: relative;
  break-inside: avoid;
  margin-bottom: var(--gutter-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary-color);
  box-shadow: 0 8px 20px var(--shadow-drop-sm);
  transition: transform var(--transition-md);
}
.recent-card:hover {
  transform: translateY(-5px);
}
.recent-card img {
  display: block;
  width: 100%;
  height: auto;
}
.recent-card .work-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.recent-grid.is-entering-grid > * {
  animation: childRise var(--transition-lg) both;
  animation-delay: calc(var(--stagger-index, 0) * 40ms);
}
@media (max-width: 720px) {
  .recent-grid {
    columns: 1 100%;
  }
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */
.micro-grid {
  columns: 2 240px;
  column-gap: var(--gutter-lg);
}
.mi-card {
  break-inside: avoid;
  margin-bottom: var(--gutter-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary-color);
  box-shadow: 0 8px 20px var(--shadow-drop-sm);
  background: var(--bg-secondary-color);
  cursor: default;
  transition: transform var(--transition-md);
}
.mi-card:hover {
  transform: translateY(-4px);
}
.mi-video {
  width: 100%;
  display: block;
  /* no height set — video's natural height drives the card */
}
@media (max-width: 720px) {
  .micro-grid {
    columns: 1 100%;
  }
}

/* ============================================
   CONTACT
   ============================================ */
.block-contact {
  padding-bottom: 0;
}
.block-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--gutter-md);
  width: fit-content;
}
.contact-social {
  display: flex;
  gap: var(--gutter-md);
  width: fit-content;
}
.contact-social a {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--text-secondary-color);
  transition: color var(--transition-sm);
}
.contact-social a:hover {
  color: var(--text-primary-color);
}

/* ============================================
   PANEL FOOTER
   ============================================ */
.panel-footer {
  display: flex;
  width: 100%;
  max-width: 1100px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: var(--gutter-sm);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-tertiary-color);
}
.footer-loc {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .thumb {
    width: 42px;
    height: 42px;
  }
}
@media (max-width: 720px) {
  .shell {
    padding: var(--padding-md);
    gap: var(--gutter-md);
  }
  .pill {
    padding: var(--padding-sm) var(--padding-lg);
    font-size: var(--font-size-sm);
  }
  .thumb-strip {
    display: none;
  }
  .panel-scroll {
    padding: var(--padding-xl) var(--padding-lg) var(--gutter-3xl);
  }
  .profile-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-meta {
    align-items: flex-start;
  }
  .exp-date {
    margin-left: 0;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .contact-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
