:root {
  color-scheme: dark;
  --bg: #0f0c13;
  --bg-elevated: #131018;
  --panel: #17131d;
  --panel-2: #1c1624;
  --text: #f5f2f7;
  --muted: #aaa1b1;
  --faint: #746c7b;
  --purple: #8750ee;
  --purple-bright: #b48bff;
  --purple-wash: rgba(135, 80, 238, .115);
  --purple-line: rgba(180, 139, 255, .32);
  --line: rgba(255, 255, 255, .095);
  --line-strong: rgba(255, 255, 255, .17);
  --sidebar: 244px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .72, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
    radial-gradient(circle at 79% 8%, rgba(135,80,238,.095), transparent 31%),
    radial-gradient(circle at 19% 89%, rgba(135,80,238,.035), transparent 26%);
  background-size: 72px 72px, 72px 72px, auto, auto;
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  top: 11vh;
  right: -19vw;
  width: min(58vw, 900px);
  aspect-ratio: 1;
  border: 1px solid rgba(180,139,255,.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 8vw rgba(135,80,238,.009),
    0 0 0 16vw rgba(135,80,238,.006);
  pointer-events: none;
  animation: ambientFloat 16s ease-in-out infinite alternate;
}

::selection { background: rgba(135,80,238,.38); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); border: 3px solid transparent; background-clip: padding-box; }

[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- SHELL ---------- */
.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100dvh;
  padding: 32px 24px 23px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: rgba(15,12,19,.80);
  backdrop-filter: blur(14px);
}

.sidebar-top { display: grid; gap: 7px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: .055em;
}
.brand-symbol {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(135,80,238,.09);
  transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
.brand:hover .brand-symbol { transform: rotate(45deg) scale(.9); box-shadow: 0 0 0 6px rgba(135,80,238,.08); }
.sidebar-domain {
  margin: 0;
  color: var(--faint);
  font: 600 .61rem/1.35 var(--mono);
  letter-spacing: .08em;
}

.side-nav {
  margin-top: 64px;
  display: grid;
  gap: 3px;
}
.side-nav a {
  position: relative;
  min-width: 0;
  min-height: 48px;
  padding: 0 11px;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s var(--ease);
}
.side-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 3px;
  background: var(--purple-bright);
  transform: translateY(-50%);
  transition: height .22s var(--ease-out);
}
.side-nav a > span {
  color: var(--faint);
  font: 600 .6rem/1 var(--mono);
}
.side-nav a b {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: inherit;
  font-weight: inherit;
}
.side-nav a:hover { color: var(--text); background: rgba(255,255,255,.025); transform: translateX(2px); }
.side-nav a[aria-current="page"] { color: #fff; background: rgba(135,80,238,.075); }
.side-nav a[aria-current="page"]::before { height: 24px; }
.side-nav a[aria-current="page"] > span { color: var(--purple-bright); }

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 5px;
  color: var(--faint);
  font-size: .64rem;
  line-height: 1.45;
}
.shortcut-hint { margin-top: 5px; color: rgba(170,161,177,.58); }
.shortcut-hint kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.018);
  color: var(--muted);
  font: 600 .56rem/1.35 var(--mono);
}

.language-switch {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(170,161,177,.45);
  font: 700 .59rem/1 var(--mono);
  letter-spacing: .08em;
}
.language-switch button {
  appearance: none;
  border: 0;
  padding: 5px 2px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: color .16s ease, transform .16s var(--ease);
}
.language-switch button:hover { color: var(--text); transform: translateY(-1px); }
.language-switch button.is-active { color: var(--purple-bright); }
.sidebar-footer > .language-switch { margin-bottom: 8px; }
.mobile-language-switch { display: none; }

.main { min-width: 0; min-height: 100dvh; }
.mobile-header, .mobile-nav { display: none; }
.view { min-height: 100dvh; }
.view.view-enter { animation: viewIn .34s var(--ease-out) both; }
.view-inner {
  width: min(calc(100% - 72px), 1540px);
  min-height: 100dvh;
  margin-inline: auto;
  padding: clamp(50px, 6.5vh, 82px) 0 42px;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes rowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes mediaIn {
  from { opacity: 0; transform: scale(.978) translateY(7px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes ambientFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(-2.5vw,2vh,0) scale(1.035); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(135,80,238,.08); }
  50% { box-shadow: 0 0 0 8px rgba(135,80,238,0); }
}

.mono-label {
  margin: 0;
  color: var(--faint);
  font: 700 .63rem/1.2 var(--mono);
  letter-spacing: .11em;
  white-space: nowrap;
}

/* ---------- OVERVIEW ---------- */
.overview-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  gap: clamp(62px, 7vw, 112px);
  align-items: center;
  align-content: center;
}
.overview-layout::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 11%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07) 18%, rgba(135,80,238,.20) 60%, transparent);
}
.overview-hero { min-width: 0; position: relative; z-index: 1; }
.hero-wordmark {
  margin: 18px 0 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text);
  font-size: clamp(6.7rem, 11vw, 12rem);
  line-height: .83;
  letter-spacing: -.066em;
  font-weight: 800;
}
.hero-fields {
  margin: 32px 0 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  font-size: clamp(.82rem, 1.12vw, 1.04rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .068em;
}
.hero-links { margin-top: 31px; display: flex; gap: 9px; flex-wrap: wrap; }
.action {
  min-height: 45px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  background: rgba(255,255,255,.01);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  transition: transform .17s var(--ease), background .17s ease, border-color .17s ease;
}
.action:hover { transform: translateY(-2px); background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.26); }
.action.primary { background: var(--purple); border-color: var(--purple); }
.action.primary:hover { background: #9564ef; }

.overview-now {
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 62px minmax(0,1fr);
  gap: 16px;
  align-items: start;
}
.overview-now-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font: 700 .58rem/1.2 var(--mono);
  letter-spacing: .1em;
}
.overview-now-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  animation: pulseDot 2.1s ease-in-out infinite;
}
.overview-now-projects { display: grid; gap: 7px; }
.overview-now-projects a {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 16px;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  align-items: center;
}
.overview-now-projects strong { min-width: 0; overflow: hidden; white-space: nowrap; font-size: .76rem; color: var(--text); }
.overview-now-projects span { color: var(--faint); font-size: .65rem; white-space: nowrap; }
.overview-now-projects b { color: var(--faint); font-size: .68rem; font-weight: 600; transition: transform .17s var(--ease), color .17s ease; }
.overview-now-projects a:hover b { transform: translate(2px,-2px); color: var(--text); }

.field-index {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(15,12,19,.15);
}
.field-row {
  min-width: 0;
  min-height: 62px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 28px 18px;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  animation: rowIn .38s var(--ease-out) both;
  animation-delay: 0ms;
  transition: padding .18s var(--ease), background .18s ease;
}
.field-row:hover, .field-row:focus-visible { padding-left: 10px; background: rgba(255,255,255,.025); }
.field-number {
  color: var(--faint);
  font: 600 .69rem/1 var(--mono);
}
.field-row strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text);
  font-size: .96rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .024em;
}
.field-count {
  color: var(--faint);
  text-align: right;
  font: 600 .58rem/1 var(--mono);
}
.field-arrow { color: var(--faint); font-size: .77rem; transition: transform .18s var(--ease), color .18s ease; }
.field-row:hover .field-arrow { color: var(--text); transform: translate(2px,-2px); }
.field-row:hover .field-count { color: var(--muted); }

/* ---------- HEADINGS ---------- */
.page-heading { min-width: 0; }
.page-heading h1 {
  margin: 10px 0 0;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  padding: .02em 0 .16em;
  font-size: clamp(3.55rem, 5.5vw, 6rem);
  line-height: 1.06;
  letter-spacing: -.048em;
  font-weight: 800;
}
.project-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.project-count { padding-bottom: 6px; color: var(--faint); }

/* ---------- PROJECTS ---------- */
.category-tabs {
  margin: 24px 0 15px;
  padding: 0 0 4px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.category-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.008);
  color: var(--muted);
  cursor: pointer;
  font-size: .73rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s var(--ease);
}
.category-tab:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.category-tab[aria-pressed="true"] { color: #fff; background: rgba(255,255,255,.052); border-color: var(--line-strong); }


.subcategory-tabs {
  margin: -5px 0 14px;
  padding: 0 0 4px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.subcategory-tabs[hidden] { display: none; }
.subcategory-tab {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 .64rem/1 var(--sans);
  white-space: nowrap;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.subcategory-tab small {
  color: var(--faint);
  font: 600 .5rem/1 var(--mono);
  letter-spacing: .04em;
}
.subcategory-tab:hover { color: var(--text); border-color: var(--line-strong); }
.subcategory-tab[aria-pressed="true"] {
  color: var(--purple-bright);
  background: var(--purple-wash);
  border-color: rgba(151,101,255,.28);
}
.subcategory-tab[aria-pressed="true"] small { color: var(--purple-bright); }

.project-browser {
  min-height: 630px;
  height: min(77vh, 830px);
  display: grid;
  grid-template-columns: 330px minmax(0,1fr);
  gap: 14px;
}
.project-list-wrap,
.project-preview {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.012);
  box-shadow: 0 20px 52px rgba(0,0,0,.09);
}
.project-list-wrap { overflow: auto; padding: 9px; }
.project-list { display: grid; gap: 4px; }
.project-list-item {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 27px 42px minmax(0,1fr) 15px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  animation: rowIn .28s var(--ease-out) both;
  animation-delay: 0ms;
  transition: color .16s ease, background .16s ease, transform .16s var(--ease);
}
.project-list-item:hover { color: var(--text); background: rgba(255,255,255,.032); transform: translateX(2px); }
.project-list-item[aria-current="true"] { color: #fff; background: rgba(255,255,255,.052); }
.project-list-item.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 3px;
  background: var(--purple-bright);
}
.project-list-item.is-current strong { color: var(--purple-bright); }
.project-list-item.is-current[aria-current="true"] { background: var(--purple-wash); }
.project-no { color: var(--faint); font: 600 .57rem/1 var(--mono); }
.project-thumb {
  width: 42px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}
.project-thumb img { width: 100%; height: 100%; object-fit: var(--project-image-fit, cover); object-position: var(--project-image-position, center); }
.project-thumb-empty { background: linear-gradient(135deg, rgba(135,80,238,.08), rgba(255,255,255,.02)); }
.project-list-copy { min-width: 0; }
.project-list-item strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: .84rem;
  line-height: 1;
  font-weight: 700;
}
.project-list-item small {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--faint);
  font-size: .64rem;
  line-height: 1;
}
.project-arrow { color: var(--faint); font-size: .67rem; }
.current-dot {
  width: 7px;
  height: 7px;
  justify-self: center;
  border-radius: 50%;
  background: var(--purple-bright);
  animation: pulseDot 2.1s ease-in-out infinite;
}

.project-preview {
  overflow: auto;
  scrollbar-gutter: stable;
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(300px, .72fr);
  align-items: start;
  padding: 28px;
  gap: 38px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.project-preview.is-current-project {
  border-color: var(--purple-line);
  box-shadow: inset 0 0 0 1px rgba(135,80,238,.07), 0 20px 52px rgba(0,0,0,.09);
}
.project-media-column { min-width: 0; display: grid; gap: 14px; }
.project-image-stack { min-width: 0; display: grid; gap: 9px; }
.preview-media,
.project-blank {
  width: min(100%, 540px);
  aspect-ratio: 3 / 4;
  justify-self: center;
  border-radius: 13px;
  overflow: hidden;
}
.preview-media {
  position: relative;
  appearance: none;
  padding: 0;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(rgba(255,255,255,.018), rgba(255,255,255,.008)), var(--panel-2);
  cursor: zoom-in;
  animation: mediaIn .35s var(--ease-out) both;
}
.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: var(--project-image-fit, contain);
  object-position: var(--project-image-position, center);
  transition: transform .35s var(--ease-out), opacity .18s ease;
}
.media-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,12,19,.76);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.76);
  font: 700 .55rem/1 var(--mono);
  letter-spacing: .05em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s var(--ease);
}
.preview-media:hover img { transform: scale(1.012); }
.preview-media:hover .media-expand, .preview-media:focus-visible .media-expand { opacity: 1; transform: none; }

.gallery-thumbs {
  width: min(100%, 540px);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
}
.gallery-thumb {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  cursor: pointer;
  opacity: .58;
  transition: opacity .16s ease, border-color .16s ease, transform .16s var(--ease);
}
.gallery-thumb:hover { opacity: .9; transform: translateY(-1px); }
.gallery-thumb.is-active { opacity: 1; border-color: var(--purple-bright); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb > span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 3px 4px;
  border-radius: 4px;
  background: rgba(15,12,19,.72);
  color: rgba(255,255,255,.7);
  font: 600 .48rem/1 var(--mono);
}

.project-blank {
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.007);
  color: var(--faint);
}
.project-blank span { font: 500 2rem/1 var(--mono); }
.project-empty-visual {
  min-height: 320px;
  border-right: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
  color: rgba(255,255,255,.055);
}
.project-empty-visual span { font: 800 6rem/1 var(--sans); letter-spacing: -.06em; }
.project-empty-visual i { position: absolute; width: 90px; height: 90px; border: 1px solid rgba(135,80,238,.09); border-radius: 50%; }

.preview-copy { min-width: 0; align-self: start; padding: 6px 0 14px; }
.project-preview-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-kicker-row { min-width: 0; display: flex; align-items: center; gap: 7px; }
.project-kicker {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--faint);
  font: 700 .6rem/1.2 var(--mono);
  letter-spacing: .08em;
}
.current-badge,
.example-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 .49rem/1 var(--mono);
  letter-spacing: .07em;
}
.current-badge { border: 1px solid var(--purple-line); color: var(--purple-bright); background: var(--purple-wash); }
.current-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.example-badge { border: 1px solid var(--line); color: var(--faint); background: rgba(255,255,255,.022); }
.copy-project-link {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font: 700 .52rem/1 var(--mono);
  letter-spacing: .05em;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.copy-project-link:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.02); }
.preview-copy h2 {
  margin: 13px 0 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: clamp(2.15rem, 3.05vw, 3.45rem);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
}
.preview-description {
  margin: 16px 0 0;
  max-width: 43ch;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}
.project-facts {
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}
.project-facts > div {
  min-width: 0;
  padding: 12px 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-facts dt {
  color: var(--faint);
  font: 700 .52rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-facts dd {
  margin: 7px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
}
.built-with { margin-top: 24px; }
.meta-label {
  margin: 0 0 9px;
  color: var(--faint);
  font: 700 .53rem/1 var(--mono);
  letter-spacing: .09em;
}
.project-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: .68rem;
}
.project-actions { margin-top: 20px; display: flex; gap: 7px; flex-wrap: wrap; }
.project-action {
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: .77rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .16s var(--ease), background .16s ease, border-color .16s ease;
}
.project-action:hover { transform: translateY(-1px); background: rgba(255,255,255,.034); border-color: rgba(255,255,255,.25); }
.youtube-action::before { content: '▶'; font-size: .66em; opacity: .76; }

.project-stepper {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.project-stepper a {
  min-width: 0;
  padding: 9px 0;
  color: var(--faint);
  text-decoration: none;
}
.project-stepper a:last-child { text-align: right; }
.project-stepper span { display: block; margin-bottom: 6px; font: 700 .5rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.project-stepper strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 700;
  transition: color .16s ease;
}
.project-stepper a:hover strong { color: var(--text); }
.empty-state { margin: 0; padding: 20px; color: var(--muted); font-size: .81rem; }


/* ---------- POLISHED MOTION ---------- */
.view.view-enter .page-heading,
.view.view-enter .overview-hero,
.view.view-enter .category-tabs,
.view.view-enter .project-browser,
.view.view-enter .profile-card,
.view.view-enter .team-item {
  animation: riseIn .5s var(--ease-out) both;
}
.view.view-enter .page-heading { animation-delay: 35ms; }
.view.view-enter .category-tabs { animation-delay: 80ms; }
.view.view-enter .project-browser { animation-delay: 125ms; }
.view.view-enter .profile-card:nth-child(1) { animation-delay: 70ms; }
.view.view-enter .profile-card:nth-child(2) { animation-delay: 105ms; }
.view.view-enter .profile-card:nth-child(3) { animation-delay: 140ms; }
.view.view-enter .profile-card:nth-child(4) { animation-delay: 175ms; }
.view.view-enter .profile-card:nth-child(5) { animation-delay: 210ms; }
.view.view-enter .profile-card:nth-child(6) { animation-delay: 245ms; }
.view.view-enter .profile-card:nth-child(7) { animation-delay: 280ms; }
.view.view-enter .team-item:nth-child(1) { animation-delay: 70ms; }
.view.view-enter .team-item:nth-child(2) { animation-delay: 115ms; }
.view.view-enter .team-item:nth-child(3) { animation-delay: 160ms; }
.view.view-enter .team-item:nth-child(4) { animation-delay: 205ms; }

.profile-card,
.project-list-wrap,
.project-preview,
.team-item,
.social-card {
  will-change: transform;
}
.profile-card {
  transition: transform .22s var(--ease), border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.016);
  box-shadow: 0 22px 56px rgba(0,0,0,.09);
}
.project-preview > * { animation: riseIn .38s var(--ease-out) both; }
.project-preview > *:nth-child(2) { animation-delay: 55ms; }
.social-card:hover .social-icon { transform: scale(1.045) rotate(-1deg); }
.social-icon { transition: transform .2s var(--ease-out), background .2s ease; }

/* ---------- PROFILE ---------- */
.profile-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 14px;
  align-items: stretch;
}
.profile-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.01);
  box-shadow: 0 18px 48px rgba(0,0,0,.06);
}
.profile-about {
  grid-column: 1 / -1;
  padding-block: 27px;
  display: grid;
  grid-template-columns: minmax(250px,.74fr) minmax(0,1.26fr);
  gap: 17px 50px;
  align-items: start;
}
.profile-about > .mono-label { grid-column: 1 / -1; }
.profile-about > h2 {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: .05em 0 .15em;
  white-space: normal;
  text-wrap: balance;
  font-size: clamp(2rem, 2.7vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 800;
}

/* About statement: rigid / metallic engineering contrasted with expressive design.
   The card sizing/grid stays unchanged; only the phrase styling changes. */
.profile-about > h2.about-statement.is-styled {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .06em;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
  overflow: visible;
}

.about-engineering {
  display: inline-block;
  max-width: 100%;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(2.05rem, 2.65vw, 2.95rem);
  line-height: .94;
  font-weight: 900;
  letter-spacing: -.075em;
  text-transform: uppercase;

  /* restrained brushed-metal effect */
  color: #c8c8cf;
  background: linear-gradient(180deg,
    #f2f2f5 0%,
    #c9c9d0 28%,
    #8f8f99 50%,
    #d7d7dc 69%,
    #9a9aa4 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-second-line {
  display: inline-flex;
  align-items: center;
  gap: .38em;
  max-width: 100%;
  overflow: visible;
}

.about-meets {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 1.3vw, 1.28rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: lowercase;
  color: #b8b1c0;
  transform: translateY(.03em);
}

.about-meets::before {
  content: none;
}

.about-design {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 3.25vw, 3.6rem);
  line-height: 1.02;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.065em;
  padding: .02em .08em .14em 0;
  margin-bottom: -.14em;
  overflow: visible;

  /* purple → blue keeps Design expressive without looking neon */
  color: #a970ff;
  background: linear-gradient(105deg, #b66cff 0%, #936cff 42%, #6f83ff 72%, #55a7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 760px) {
  .about-engineering { font-size: clamp(1.9rem, 8.6vw, 2.55rem); }
  .about-meets { font-size: clamp(1rem, 4.6vw, 1.18rem); }
  .about-design { font-size: clamp(2.4rem, 11vw, 3.15rem); }
}
.about-copy { min-width: 0; }
.about-copy > p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.58;
}
.facts {
  margin: 17px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}
.fact-row { min-width: 0; display: flex; gap: 8px; }
.fact-row dt, .fact-row dd { font-size: .69rem; white-space: nowrap; }
.fact-row dt { color: var(--faint); }
.fact-row dd { margin: 0; color: var(--muted); }

.profile-list-card { grid-column: span 4; min-height: 165px; }
.profile-snapshot { grid-column: span 5; min-height: 172px; }
.profile-current { grid-column: span 7; min-height: 172px; }
.profile-socials { grid-column: 1 / -1; }
.profile-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.profile-tags span {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  background: rgba(255,255,255,.008);
  font-size: .71rem;
}
.profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-section-note { color: var(--faint); font-size: .65rem; white-space: nowrap; }

.profile-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.profile-stat {
  min-width: 0;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.profile-stat strong { color: var(--text); font-size: 1.55rem; line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.profile-stat span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--faint); font-size: .6rem; line-height: 1.25; }

.current-projects {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}
.current-work-card {
  min-width: 0;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(135,80,238,.075), transparent 52%),
    rgba(255,255,255,.009);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .18s ease, background-color .18s ease, transform .18s var(--ease);
}
.current-work-card:hover {
  border-color: var(--purple-line);
  background-color: rgba(135,80,238,.035);
  transform: translateY(-2px);
}
.current-work-media {
  width: 112px;
  aspect-ratio: 3 / 4;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #100c17;
}
.current-work-media img { width: 100%; height: 100%; display: block; }
.current-work-media-empty b { color: var(--purple-bright); font-size: 1.35rem; letter-spacing: -.03em; }
.current-work-body {
  min-width: 0;
  padding: 4px 3px 3px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.current-work-topline {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.current-work-stage {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--purple-bright);
  font: 700 .58rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.current-work-stage i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(135,80,238,.08);
  animation: pulseDot 2.1s ease-in-out infinite;
}
.current-work-topline small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--faint);
  font-size: .59rem;
}
.current-work-title {
  width: 100%;
  min-width: 0;
  margin-top: 15px;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -.025em;
}
.current-work-taxonomy {
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--faint);
  font-size: .63rem;
}
.current-work-note {
  margin-top: 13px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.current-work-tools {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.current-work-tools b {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  font-size: .56rem;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}
.current-work-action {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: .65rem;
  font-weight: 700;
}
.current-work-action b { color: var(--purple-bright); font-size: .8rem; }

.current-empty { margin: 18px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.5; }

.social-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 9px;
}
.social-card {
  width: 100%;
  min-width: 0;
  min-height: 94px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.008);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .17s var(--ease), border-color .17s ease, background .17s ease;
}
.social-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: rgba(255,255,255,.025); }
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--purple-wash);
  color: var(--purple-bright);
  font-size: .82rem;
  font-weight: 800;
}
.social-icon svg { width: 20px; height: 20px; fill: currentColor; }
.social-logo-image { width: 27px; height: 27px; object-fit: contain; border-radius: 50%; }
.social-logo-square { width: 30px; height: 30px; border-radius: 7px; }
.social-glyph { font: 800 .82rem/1 var(--mono); letter-spacing: -.04em; }
.social-glyph-code { font-size: .7rem; }
.social-copy-main { min-width: 0; display: grid; gap: 5px; }
.social-copy-main strong { min-width: 0; overflow: hidden; white-space: nowrap; font-size: .9rem; font-weight: 750; }
.social-handle { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: .72rem; }
.social-handle.is-placeholder { color: var(--faint); font-style: italic; }
.social-arrow { color: var(--faint); font: 700 .53rem/1 var(--mono); white-space: nowrap; }
.social-unconfigured { border-style: dashed; opacity: .82; }

/* ---------- TEAMS ---------- */
.team-list {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}
.team-item {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 27px 10px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  transition: padding .22s var(--ease), background .22s ease, border-color .22s ease;
}
.team-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  border-radius: 2px;
  background: var(--purple-bright);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .24s var(--ease-out);
}
.team-item:hover { padding-left: 16px; background: rgba(135,80,238,.025); border-color: rgba(135,80,238,.16); }
.team-item:hover::before { transform: scaleY(1); }
.team-index { color: var(--faint); font: 650 .68rem/1 var(--mono); transition: color .2s ease; }
.team-item:hover .team-index { color: var(--purple-bright); }
.team-main { min-width: 0; }
.team-main h2 {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: clamp(1.95rem, 2.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.026em;
  font-weight: 800;
}
.team-role { margin: 10px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.38; }
.team-side { display: flex; align-items: center; gap: 15px; }
.team-period { color: var(--faint); font: 650 .72rem/1 var(--mono); white-space: nowrap; }
.team-link { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); text-decoration: none; transition: transform .16s var(--ease), color .16s ease, border-color .16s ease; }
.team-link:hover { transform: translate(1px,-1px); color: var(--text); border-color: var(--line-strong); }
.team-empty {
  min-height: 310px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 68px minmax(0,520px) 1fr;
  align-items: center;
  gap: 28px;
}
.team-empty-index { color: rgba(255,255,255,.08); font-size: 3.6rem; line-height: 1; font-weight: 800; letter-spacing: -.06em; }
.team-empty strong { display: block; font-size: 1.2rem; }
.team-empty p { margin: 8px 0 0; max-width: 52ch; color: var(--faint); font-size: .78rem; line-height: 1.5; }
.team-empty-mark { justify-self: end; width: 120px; height: 120px; border: 1px solid rgba(135,80,238,.08); border-radius: 50%; box-shadow: 0 0 0 32px rgba(135,80,238,.008); }

/* ---------- LIGHTBOX ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 40px 72px;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) 52px;
  align-items: center;
  gap: 18px;
  background: rgba(7,5,9,.93);
  backdrop-filter: blur(14px);
  animation: lightboxIn .2s ease both;
}
@keyframes lightboxIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close,
.lightbox-nav {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.025);
  color: var(--text);
  cursor: pointer;
  transition: background .16s ease, transform .16s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,.07); transform: scale(1.03); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}
.lightbox-nav { width: 48px; height: 48px; border-radius: 50%; font-size: 1rem; }
.lightbox-figure {
  min-width: 0;
  width: min(100%, 940px);
  height: min(86dvh, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  gap: 12px;
}
.lightbox-figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.lightbox-figure figcaption { color: var(--faint); text-align: center; font: 600 .6rem/1.2 var(--mono); letter-spacing: .06em; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(24,19,31,.94);
  box-shadow: 0 14px 38px rgba(0,0,0,.28);
  color: var(--text);
  font-size: .7rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }


/* ---------- FINAL MICRO-INTERACTIONS ---------- */
.side-nav a { position: relative; overflow: hidden; }
.side-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--purple-bright), transparent 72%);
  transform: scaleX(0);
  transform-origin: left;
  opacity: .6;
  transition: transform .28s var(--ease-out);
}
.side-nav a:hover::after,
.side-nav a[aria-current="page"]::after { transform: scaleX(1); }

.field-row { position: relative; }
.field-row::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(165,113,255,.75), transparent);
  transform: scaleX(0);
  transition: transform .3s var(--ease-out);
}
.field-row:hover::after { transform: scaleX(1); }
.field-row:hover strong { transform: translateX(3px); }
.field-row strong { transition: transform .22s var(--ease-out), color .22s ease; }

.project-list-item { transition: background .2s ease, border-color .2s ease, transform .2s var(--ease-out); }
.project-list-item:hover { transform: translateX(2px); }
.preview-media img { transition: transform .45s var(--ease-out), filter .3s ease; }
.preview-media:hover img { transform: scale(1.012); }
.project-action, .action, .category-tab { will-change: transform; }
.project-action:active, .action:active, .category-tab:active { transform: translateY(1px) scale(.985); }

.social-card::after {
  content: '';
  position: absolute;
  inset: auto 14px 0 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(165,113,255,.75), transparent);
  transform: scaleX(0);
  transition: transform .25s var(--ease-out);
}
.social-card { position: relative; overflow: hidden; }
.social-card:hover::after { transform: scaleX(1); }
.social-card:hover .social-arrow { color: var(--purple-bright); transform: translate(1px,-1px); }
.social-arrow { transition: color .2s ease, transform .2s var(--ease-out); }

.language-switch button.is-active { text-shadow: 0 0 18px rgba(165,113,255,.24); }

@media (prefers-reduced-motion: reduce) {
  .side-nav a::after,
  .field-row::after,
  .field-row strong,
  .team-item::before,
  .preview-media img,
  .social-card::after,
  .social-arrow { transition: none !important; }
  .field-row:hover strong,
  .project-list-item:hover,
  .preview-media:hover img,
  .social-card:hover .social-arrow { transform: none !important; }
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 1500px) {
  .project-browser { grid-template-columns: 350px minmax(0,1fr); }
  .project-preview { grid-template-columns: minmax(430px, 1.15fr) minmax(310px, .7fr); }
  .preview-media, .project-blank, .gallery-thumbs { width: min(100%, 575px); }
}

@media (max-width: 1180px) {
  :root { --sidebar: 218px; }
  .sidebar { padding-inline: 21px; }
  .view-inner { width: min(calc(100% - 48px), 1140px); }
  .overview-layout { grid-template-columns: minmax(0,1.1fr) minmax(315px,.9fr); gap: 48px; }
  .hero-wordmark { font-size: clamp(5.5rem, 10vw, 9rem); }
  .project-browser { grid-template-columns: 292px minmax(0,1fr); }
  .project-preview { grid-template-columns: minmax(330px,1fr) minmax(250px,.72fr); gap: 26px; padding: 22px; }
  .preview-media, .project-blank, .gallery-thumbs { width: min(100%, 500px); }
}

@media (max-width: 940px) {
  :root { --sidebar: 192px; }
  .sidebar { padding: 27px 17px 21px; }
  .side-nav { margin-top: 46px; }
  .side-nav a { min-height: 44px; font-size: .82rem; }
  .view-inner { width: min(calc(100% - 34px), 880px); padding-top: 45px; }
  .overview-layout { grid-template-columns: 1fr; gap: 46px; align-content: center; }
  .overview-layout::before { top: 7%; }
  .hero-wordmark { font-size: clamp(5.7rem, 16vw, 9.2rem); }
  .field-index { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-left: 1px solid var(--line); }
  .field-row { border-right: 1px solid var(--line); }

  .project-browser { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .project-list-wrap { max-height: 280px; }
  .project-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-list-item { min-height: 72px; }
  .project-preview { min-height: 650px; grid-template-columns: minmax(300px,.95fr) minmax(250px,.75fr); }

  .profile-list-card { grid-column: span 6; }
  .profile-list-card:nth-of-type(4) { grid-column: span 12; }
  .profile-snapshot, .profile-current { grid-column: span 6; }
  .profile-about { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .profile-about > .mono-label { grid-column: auto; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body::after { display: none; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { min-height: 100dvh; }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 58px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15,12,19,.88);
    backdrop-filter: blur(14px);
  }
  .mobile-section { color: var(--faint); font: 700 .6rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

  .mobile-nav {
    position: fixed;
    z-index: 60;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    min-height: 50px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 4px;
    background: rgba(20,16,26,.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0,0,0,.28);
  }
  .mobile-nav a {
    min-width: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    white-space: nowrap;
    color: var(--faint);
    text-decoration: none;
    font-size: .63rem;
    font-weight: 700;
  }
  .mobile-nav a[aria-current="page"] { color: #fff; background: var(--purple-wash); }

  .mobile-language-switch {
    position: fixed;
    z-index: 70;
    left: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15,12,19,.88);
    backdrop-filter: blur(12px);
  }

  .view-inner {
    width: min(calc(100% - 24px), 720px);
    min-height: calc(100dvh - 58px);
    padding: 33px 0 30px;
  }
  .overview-layout { min-height: calc(100dvh - 124px); align-content: center; gap: 34px; }
  .overview-layout::before { display: none; }
  .hero-wordmark { font-size: clamp(4.7rem, 24vw, 8rem); }
  .hero-fields { margin-top: 23px; font-size: clamp(.68rem, 3vw, .88rem); }
  .hero-links { margin-top: 25px; }
  .action { min-height: 43px; }
  .overview-now { grid-template-columns: 54px minmax(0,1fr); }
  .field-index { grid-template-columns: 1fr 1fr; }
  .field-row { min-height: 53px; grid-template-columns: 27px minmax(0,1fr) 21px 13px; gap: 7px; }
  .field-row strong { font-size: .8rem; }

  .page-heading h1 { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .project-heading { gap: 14px; }
  .project-count { font-size: .55rem; padding-bottom: 3px; }
  .category-tabs { margin-top: 18px; }
  .subcategory-tabs { margin-top: -4px; margin-bottom: 12px; }
  .project-list-wrap { max-height: 245px; }
  .project-list { grid-template-columns: 1fr; }
  .project-list-item { min-height: 70px; }
  .project-preview { min-height: 0; grid-template-columns: 1fr; gap: 22px; padding: 16px; }
  .project-media-column, .preview-copy { width: min(100%, 500px); justify-self: center; }
  .preview-media, .project-blank, .gallery-thumbs { width: min(100%, 460px); }
  .media-expand { opacity: 1; transform: none; }
  .preview-copy h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .preview-description { font-size: .82rem; }
  .copy-project-link > span:last-child { display: none; }

  .profile-grid { grid-template-columns: 1fr; gap: 10px; }
  .profile-about, .profile-list-card, .profile-snapshot, .profile-current, .profile-socials { grid-column: auto; }
  .profile-card { padding: 18px; }
  .profile-list-card { min-height: 0; }
  .profile-section-note { display: none; }
  .profile-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .social-grid { grid-template-columns: 1fr; }
  .social-card { min-height: 70px; }

  .team-item { min-height: 104px; grid-template-columns: 38px minmax(0,1fr); padding-block: 18px; }
  .team-side { grid-column: 2; justify-content: flex-start; }
  .team-empty { grid-template-columns: 52px minmax(0,1fr); min-height: 260px; gap: 18px; }
  .team-empty-mark { display: none; }
  .team-empty-index { font-size: 2.8rem; }

  .lightbox { padding: 60px 12px 28px; grid-template-columns: 42px minmax(0,1fr) 42px; gap: 6px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-close { top: 14px; right: 14px; }
  .lightbox-figure { height: min(78dvh, 760px); }
  .toast { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 500px) {
  .view-inner { width: min(calc(100% - 20px), 720px); }
  .field-index { grid-template-columns: 1fr; }
  .overview-now { grid-template-columns: 1fr; gap: 9px; }
  .overview-now-projects a { grid-template-columns: minmax(0,1fr) 16px; }
  .overview-now-projects a span { display: none; }
  .preview-media, .project-blank, .gallery-thumbs { width: 100%; }
  .project-facts { grid-template-columns: 1fr 1fr; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-stat { grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 10px; }
  .profile-stat strong { font-size: 1.15rem; }
  .project-preview-head { align-items: flex-start; }
  .project-kicker-row { flex-wrap: wrap; }
  .lightbox { grid-template-columns: 36px minmax(0,1fr) 36px; }
  .lightbox-nav { width: 34px; height: 34px; }
}

@media (hover: none) {
  .field-row:hover, .project-list-item:hover, .social-card:hover, .action:hover, .project-action:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Dynamic profile density: hidden optional cards never leave dead grid columns. */
.profile-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.profile-grid > .profile-card { flex: 1 1 300px; }
.profile-grid > .profile-about,
.profile-grid > .profile-socials { flex: 1 1 100%; }
.profile-grid > .profile-list-card { flex-basis: 290px; }
.profile-grid > .profile-snapshot { flex-basis: 360px; }
.profile-grid > .profile-current { flex: 1 1 100%; }

@media (max-width: 760px) {
  .profile-grid > .profile-card { flex-basis: 100%; }
}

@media (max-width: 760px) {
  .current-projects { grid-template-columns: 1fr; }
  .current-work-card { grid-template-columns: 88px minmax(0,1fr); min-height: 168px; gap: 12px; }
  .current-work-media { width: 88px; }
  .current-work-note { -webkit-line-clamp: 2; }
}

@media (max-width: 420px) {
  .current-work-card { grid-template-columns: 72px minmax(0,1fr); padding: 10px; min-height: 148px; }
  .current-work-media { width: 72px; }
  .current-work-title { margin-top: 11px; font-size: .96rem; }
  .current-work-note { display: none; }
  .current-work-tools { display: none; }
}

/* Keep the mobile overview compact: two field columns, with counts reserved for desktop. */
@media (max-width: 760px) {
  .field-index { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .field-row { grid-template-columns: 24px minmax(0,1fr) 13px; gap: 7px; }
  .field-count { display: none; }
}

@media (max-width: 350px) {
  .field-row { grid-template-columns: 21px minmax(0,1fr) 12px; gap: 5px; }
  .field-row strong { font-size: .76rem; }
}

/* CSP-safe dynamic classes (no inline style attributes needed). */
.fit-contain img { object-fit: contain !important; }
.fit-cover img { object-fit: cover !important; }
.pos-center img { object-position: center !important; }
.pos-top img { object-position: top !important; }
.pos-bottom img { object-position: bottom !important; }
.pos-left img { object-position: left !important; }
.pos-right img { object-position: right !important; }
.stagger-0 { animation-delay: 0ms !important; }
.stagger-1 { animation-delay: 38ms !important; }
.stagger-2 { animation-delay: 76ms !important; }
.stagger-3 { animation-delay: 114ms !important; }
.stagger-4 { animation-delay: 152ms !important; }
.stagger-5 { animation-delay: 190ms !important; }
.stagger-6 { animation-delay: 228ms !important; }
.stagger-7 { animation-delay: 266ms !important; }

/* =========================================================
   MODULAR PROJECT MEDIA SUPPORT
   Keeps the original Projects layout while allowing optional logos,
   covers and galleries without changing the visual hierarchy.
   ========================================================= */

/* Project switching should be calm. The Projects view itself still gets
   the normal page entrance, but selecting another item does not replay it. */
.project-list-item { animation: none !important; }
.project-preview,
.project-preview > *,
.project-preview .project-media-column,
.project-preview .preview-copy,
.project-image-stack,
.preview-media { animation: none !important; }
.project-list-item[aria-current="true"] { transform: none; }

/* If a programming project has a logo, use it in the compact list thumbnail
   rather than squeezing a full screenshot into the tiny slot. */

/* Optional logo beside the project title. It is intentionally small: the
   project artwork/screenshot remains the main visual. */
.project-title-line {
  min-width: 0;
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-title-line h2 {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
}

/* Logo-only projects are supported, but a logo never becomes an enormous
   poster. Add media.cover whenever you have a screenshot/render/photo. */

/* 3D / Animation and Photography keep the large tall visual treatment.
   Standard software/engineering projects stay on the same 3:4 shape, just
   without forcing their artwork to fill/crop. */
.project-preview.media-visual .preview-media,
.project-preview.media-visual .project-blank,
.project-preview.media-visual .gallery-thumbs {
  width: min(100%, 590px);
}
.project-preview.media-standard .preview-media,
.project-preview.media-standard .project-blank,
.project-preview.media-standard .gallery-thumbs {
  width: min(100%, 540px);
}

@media (max-width: 1180px) {
  .project-preview.media-visual .preview-media,
  .project-preview.media-visual .project-blank,
  .project-preview.media-visual .gallery-thumbs,
  .project-preview.media-standard .preview-media,
  .project-preview.media-standard .project-blank,
  .project-preview.media-standard .gallery-thumbs {
    width: min(100%, 500px);
  }
}

@media (max-width: 760px) {
  .project-preview.media-visual .preview-media,
  .project-preview.media-visual .project-blank,
  .project-preview.media-visual .gallery-thumbs,
  .project-preview.media-standard .preview-media,
  .project-preview.media-standard .project-blank,
  .project-preview.media-standard .gallery-thumbs {
    width: min(100%, 500px);
  }
}

/* The fixed sidebar leaves too little horizontal room around tablet widths;
   stack the project list above the preview before the preview gets cramped. */
@media (max-width: 1080px) and (min-width: 761px) {
  .project-browser {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .project-list-wrap { max-height: 285px; }
  .project-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .project-preview,
  .project-preview.media-standard,
  .project-preview.media-visual,
}

/* =========================================
   FLEXIBLE PROJECT MEDIA RATIOS
   Default: 16:9. Every cover/gallery item may override its own ratio.
   ========================================= */
.project-preview,
.project-preview.media-standard,
.project-preview.media-visual {
  grid-template-columns: minmax(0, 1.42fr) minmax(290px, .68fr);
  gap: clamp(24px, 2.6vw, 44px);
}

.project-media-column,
.project-image-stack {
  width: 100%;
  min-width: 0;
}

.preview-media,
.project-blank,
.project-preview.media-standard .preview-media,
.project-preview.media-standard .project-blank,
.project-preview.media-visual .preview-media,
.project-preview.media-visual .project-blank {
  width: 100%;
  max-width: none;
  aspect-ratio: var(--project-media-ratio, 16 / 9);
}

.preview-media.ratio-auto,
.project-blank.ratio-auto { aspect-ratio: auto; }

.preview-media.ratio-auto img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 760px);
}

.preview-media img {
  object-fit: var(--project-image-fit, contain);
  object-position: var(--project-image-position, center);
}

/* Mixed-ratio albums use a horizontal filmstrip. Each thumb keeps the ratio
   declared on that individual image. */
.gallery-thumbs,
.project-preview.media-standard .gallery-thumbs,
.project-preview.media-visual .gallery-thumbs {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(181,161,255,.45) transparent;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: auto;
  height: 72px;
  aspect-ratio: var(--thumb-media-ratio, 16 / 9);
}

.gallery-thumb.ratio-auto {
  width: 112px;
  aspect-ratio: auto;
}

.gallery-thumb img {
  object-fit: var(--thumb-image-fit, cover);
  object-position: var(--thumb-image-position, center);
}

.project-thumb img,
.current-work-media img {
  object-fit: var(--project-image-fit, cover);
  object-position: var(--project-image-position, center);
}

@media (min-width: 1500px) {
  .project-preview,
  .project-preview.media-standard,
  .project-preview.media-visual {
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, .64fr);
  }
}

@media (max-width: 1180px) {
  .project-preview,
  .project-preview.media-standard,
  .project-preview.media-visual {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .72fr);
  }
}

@media (max-width: 1080px) and (min-width: 761px) {
  .project-preview,
  .project-preview.media-standard,
  .project-preview.media-visual { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .project-preview,
  .project-preview.media-standard,
  .project-preview.media-visual { grid-template-columns: 1fr; }

  .preview-media,
  .project-blank,
  .gallery-thumbs,
  .project-preview.media-standard .preview-media,
  .project-preview.media-standard .project-blank,
  .project-preview.media-standard .gallery-thumbs,
  .project-preview.media-visual .preview-media,
  .project-preview.media-visual .project-blank,
  .project-preview.media-visual .gallery-thumbs { width: 100%; }

  .gallery-thumb { height: 62px; }
}



/* Compact project thumbnails are intentionally landscape-first because most
   real screenshots/renders are 16:9. The full preview still follows each
   image's configured ratio. */
.project-list-item {
  grid-template-columns: 27px 66px minmax(0,1fr) 15px;
}
.project-thumb {
  width: 66px;
  height: auto;
  aspect-ratio: 16 / 9;
}

.current-work-card {
  grid-template-columns: 152px minmax(0, 1fr);
}
.current-work-media {
  width: 152px;
  aspect-ratio: 16 / 9;
}

@media (max-width: 760px) {
  .project-list-item { grid-template-columns: 24px 58px minmax(0,1fr) 13px; }
  .project-thumb { width: 58px; }
  .current-work-card { grid-template-columns: 118px minmax(0,1fr); }
  .current-work-media { width: 118px; }
}

@media (max-width: 420px) {
  .current-work-card { grid-template-columns: 92px minmax(0,1fr); }
  .current-work-media { width: 92px; }
}
