/* DevLuce — Selected Apps & Craft
 * Stadium Night Editorial Portfolio Stylesheet
 */

:root {
  --bg-ground: #08101c;
  --bg-surface: #0d1829;
  --bg-elevated: #132238;
  --bg-bezel: #050a12;

  --ink-primary: #f3efe6;
  --ink-secondary: #a4b3c7;
  --ink-tertiary: #7d8fa8;

  --accent-gold: #e4b65e;
  --accent-gold-hover: #ecc67b;
  --accent-gold-soft: rgba(228, 182, 94, 0.14);
  --accent-emerald: #34c782;
  --accent-emerald-soft: rgba(52, 199, 130, 0.14);

  --line-subtle: rgba(243, 239, 230, 0.11);
  --line-strong: rgba(243, 239, 230, 0.22);
  --line-gold: rgba(228, 182, 94, 0.36);

  --font-display: "Barlow Condensed", "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Pretendard Variable", "Pretendard", "Barlow", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-device: 28px;

  --shadow-device: 0 26px 56px -14px rgba(2, 6, 14, 0.78), 0 8px 20px -6px rgba(2, 6, 14, 0.55);
  --shadow-lightbox: 0 36px 80px -12px rgba(0, 0, 0, 0.85);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-ground);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

html[lang="ko"] {
  word-break: keep-all;
  overflow-wrap: break-word;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-ground);
  background-image:
    radial-gradient(ellipse 72% 46% at 78% -4%, rgba(228, 182, 94, 0.085) 0%, rgba(228, 182, 94, 0) 68%),
    radial-gradient(ellipse 60% 42% at 14% 12%, rgba(52, 199, 130, 0.05) 0%, rgba(52, 199, 130, 0) 64%),
    linear-gradient(180deg, #091221 0%, #08101c 38%, #070e18 100%);
  color: var(--ink-primary);
  overflow-x: clip;
  caret-color: var(--accent-gold);
}

/* Browser Surface Theming */
::selection {
  background: rgba(228, 182, 94, 0.28);
  color: var(--ink-primary);
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-ground);
}

::-webkit-scrollbar-thumb {
  background: rgba(164, 179, 199, 0.26);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(228, 182, 94, 0.45);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

button {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent-gold);
  color: var(--bg-ground);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 160ms var(--ease-out-expo);
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* =========================================================
   Masthead Navigation
   ========================================================= */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-subtle);
  background: rgba(8, 16, 28, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-primary);
  line-height: 1;
}

.brand-divider {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.work-index-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  padding: 5px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: 999px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo);
}

.lang-btn:hover {
  color: var(--ink-primary);
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent-gold);
  color: var(--bg-ground);
}

.contact-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}

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

/* =========================================================
   Hero Stage — Featured Work #01
   ========================================================= */

.hero-stage {
  position: relative;
  padding-top: clamp(32px, 5vw, 60px);
  padding-bottom: clamp(56px, 7vw, 88px);
  border-bottom: 1px solid var(--line-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.philosophy-line {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-subtle);
  max-width: 52ch;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-icon-frame {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 28px -8px rgba(2, 6, 14, 0.72);
  background: #0d2137;
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-heading-block {
  min-width: 0;
}

.work-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink-primary);
  text-wrap: balance;
}

html[lang="en"] .work-title {
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 5.2vw, 4.4rem);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  line-height: 0.98;
}

.app-meta-inline {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-emerald);
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-emerald);
  flex-shrink: 0;
}

.meta-sep {
  color: var(--ink-tertiary);
}

.meta-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.work-summary {
  margin: 0;
  font-size: clamp(1.03rem, 1.4vw, 1.15rem);
  line-height: 1.72;
  color: var(--ink-secondary);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 200ms var(--ease-out-expo), background-color 200ms var(--ease-out-expo), border-color 200ms var(--ease-out-expo);
}

.store-btn svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.store-btn-primary {
  background: var(--accent-gold);
  color: var(--bg-ground);
  border: 1px solid var(--accent-gold);
}

.store-btn-primary:hover {
  background: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
  transform: translateY(-2px);
}

.store-btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink-primary);
  border: 1px solid var(--line-strong);
}

.store-btn-secondary:hover {
  background: #192d49;
  border-color: var(--line-gold);
  transform: translateY(-2px);
}

/* Scoreboard Spec Ledger */
.hero-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  margin-top: 8px;
}

.ledger-cell {
  padding: 16px;
  border-right: 1px solid var(--line-subtle);
  min-width: 0;
}

.ledger-cell:first-child {
  padding-left: 0;
}

.ledger-cell:last-child {
  border-right: 0;
}

.ledger-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 4px;
}

.ledger-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-value-gold {
  color: var(--accent-gold);
}

/* Hero Visual — 3-Phone Stadium Fan */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 16px;
  min-width: 0;
}

.mound-arc-bg {
  position: absolute;
  inset: auto -6% 4% -6%;
  width: 112%;
  height: auto;
  pointer-events: none;
  opacity: 0.55;
}

.device-triptych {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  height: 510px;
}

.triptych-btn {
  appearance: none;
  padding: 7px;
  background: var(--bg-bezel);
  border: 1px solid rgba(243, 239, 230, 0.16);
  border-radius: var(--radius-device);
  box-shadow: var(--shadow-device);
  cursor: pointer;
  overflow: hidden;
  position: absolute;
  transition: transform 320ms var(--ease-out-expo), border-color 220ms var(--ease-out-expo);
}

.triptych-btn img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 21px;
}

.triptych-btn:hover {
  border-color: var(--line-gold);
}

.triptych-left {
  width: 186px;
  left: 6px;
  top: 52px;
  z-index: 1;
  transform: rotate(-6deg);
  opacity: 0.88;
}

.triptych-left:hover {
  transform: rotate(-4deg) translateY(-8px);
  opacity: 1;
}

.triptych-right {
  width: 186px;
  right: 6px;
  top: 62px;
  z-index: 1;
  transform: rotate(6deg);
  opacity: 0.88;
}

.triptych-right:hover {
  transform: rotate(4deg) translateY(-8px);
  opacity: 1;
}

.triptych-center {
  width: 230px;
  z-index: 3;
  top: 0;
  border-color: rgba(243, 239, 230, 0.24);
}

.triptych-center:hover {
  transform: translateY(-8px);
}

/* =========================================================
   Gallery Section — Real Device Showcase
   ========================================================= */

.gallery-section {
  padding-top: clamp(56px, 7vw, 92px);
  padding-bottom: 7vw;
  border-bottom: 1px solid var(--line-subtle);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(28px, 3.6vw, 40px);
}

.section-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink-primary);
  text-wrap: balance;
}

html[lang="en"] .section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.section-aside {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  max-width: 48ch;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-hint {
  font-size: 0.8125rem;
  color: var(--ink-tertiary);
  margin-right: 6px;
}

.icon-circle-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 180ms var(--ease-out-expo), background-color 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo);
}

.icon-circle-btn:hover {
  border-color: var(--accent-gold);
  background: var(--bg-elevated);
  color: var(--accent-gold);
}

.icon-circle-btn svg {
  width: 18px;
  height: 18px;
}

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 248px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(164, 179, 199, 0.28) transparent;
}

.gallery-item {
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-trigger {
  appearance: none;
  position: relative;
  padding: 7px;
  border-radius: 26px;
  border: 1px solid var(--line-subtle);
  background: var(--bg-bezel);
  box-shadow: 0 18px 36px -12px rgba(2, 6, 14, 0.65);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform 240ms var(--ease-out-expo), border-color 200ms var(--ease-out-expo);
}

.gallery-trigger:hover {
  transform: translateY(-4px);
  border-color: var(--line-gold);
}

.gallery-shot {
  width: 100%;
  aspect-ratio: 621 / 1344;
  object-fit: cover;
  border-radius: 19px;
  background: #000000;
}

.gallery-caption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-inline: 2px;
}

.gallery-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.gallery-text {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* =========================================================
   Craft Pillars — Open Editorial Ledger (No Boxy Cards)
   ========================================================= */

.craft-section {
  padding-top: clamp(56px, 7vw, 92px);
  padding-bottom: 7vw;
  border-bottom: 1px solid var(--line-subtle);
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.craft-column {
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.6vw, 32px) clamp(12px, 2vw, 20px) 0;
  border-right: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.craft-column:not(:first-child) {
  padding-left: clamp(20px, 2.6vw, 32px);
}

.craft-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.craft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.craft-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

.craft-icon {
  width: 22px;
  height: 22px;
  color: var(--ink-tertiary);
}

.craft-title {
  margin: 4px 0 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink-primary);
}

.craft-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--ink-secondary);
}

/* =========================================================
   Specification Colophon
   ========================================================= */

.spec-section {
  padding-top: clamp(52px, 6.5vw, 84px);
  padding-bottom: clamp(56px, 7vw, 92px);
}

.spec-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.spec-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.68;
  color: var(--ink-secondary);
  max-width: 38ch;
}

.spec-list {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 12px 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-subtle);
  align-items: baseline;
}

.spec-term {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.spec-desc {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-primary);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.spec-desc-mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--line-subtle);
  padding-block: 32px 44px;
  background: rgba(5, 10, 18, 0.45);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-primary);
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-tertiary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 2px;
  transition: color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}

.footer-email:hover {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* =========================================================
   Lightbox Dialog
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
  background: rgba(4, 9, 17, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
}

.lightbox-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.lightbox-frame {
  padding: 8px;
  border-radius: 30px;
  border: 1px solid var(--line-strong);
  background: var(--bg-bezel);
  box-shadow: var(--shadow-lightbox);
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  width: auto;
  max-height: calc(76vh - 18px);
  max-width: min(74vw, 340px);
  border-radius: 22px;
}

.lightbox-caption {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-primary);
  text-align: center;
}

/* Bottom inset equals clamp(56px, 7vw, 92px), written as a vw base with px bounds */
@media (max-width: 799.98px) {
  .gallery-section,
  .craft-section {
    padding-bottom: 56px;
  }
}

@media (min-width: 1315px) {
  .gallery-section,
  .craft-section {
    padding-bottom: 92px;
  }
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .device-triptych {
    max-width: 460px;
    height: 450px;
  }

  .triptych-center {
    width: 204px;
  }

  .triptych-left,
  .triptych-right {
    width: 166px;
    top: 46px;
  }

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

  .craft-column {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }

  .craft-column:not(:first-child) {
    padding-left: 0;
  }

  .craft-column:last-child {
    border-bottom: 0;
  }

  .spec-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .brand-divider,
  .brand-subtitle,
  .work-index-pill,
  .contact-link,
  .gallery-hint {
    display: none;
  }

  .masthead-inner {
    min-height: 60px;
  }

  .hero-stage {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .app-identity {
    gap: 14px;
    align-items: flex-start;
  }

  .app-meta-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 8px;
  }

  .meta-sep {
    display: none;
  }

  .app-icon-frame {
    width: 62px;
    height: 62px;
    border-radius: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    justify-content: center;
  }

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

  .ledger-cell {
    padding: 14px 16px;
  }

  .ledger-cell:nth-child(2n) {
    border-right: 0;
  }

  .ledger-cell:nth-child(3),
  .ledger-cell:nth-child(4) {
    border-top: 1px solid var(--line-subtle);
  }

  .ledger-cell:nth-child(odd) {
    padding-left: 0;
  }

  .device-triptych {
    max-width: 344px;
    height: 368px;
  }

  .triptych-center {
    width: 168px;
  }

  .triptych-left,
  .triptych-right {
    width: 132px;
    top: 42px;
  }

  .triptych-left {
    left: 2px;
  }

  .triptych-right {
    right: 2px;
  }

  .gallery-track {
    grid-auto-columns: minmax(200px, 72vw);
    gap: 16px;
  }

  .spec-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .lightbox-stage {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =========================================================
   Selected Work Index — two-work contents strip
   ========================================================= */

.work,
.hero-stage[id],
.gallery-section[id],
.craft-section[id],
.spec-section[id] {
  scroll-margin-top: 68px;
}

.work-index {
  border-bottom: 1px solid var(--line-subtle);
}

.work-index-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-index-item {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  text-decoration: none;
  min-width: 0;
  transition: color 180ms var(--ease-out-expo);
}

.work-index-item + .work-index-item {
  padding-left: clamp(20px, 3vw, 36px);
  border-left: 1px solid var(--line-subtle);
}

.work-index-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
  transition: color 180ms var(--ease-out-expo);
}

.work-index-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line-subtle);
}

.work-index-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
  white-space: nowrap;
}

.work-index-desc {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.work-index-item:hover .work-index-name {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
}

.work-index-item[data-work-link="today-mound"][aria-current="true"] .work-index-num {
  color: var(--accent-gold);
}

.work-index-item[data-work-link="typik"][aria-current="true"] .work-index-num {
  color: #eeeef1;
}

.work-index-total {
  color: var(--ink-tertiary);
}

/* =========================================================
   Featured Work #02 — typik (monochrome graphite tint)
   Source palette: typik design tokens (no hue; cool grey ramp)
   ========================================================= */

.work--typik {
  --accent-gold: #eeeef1;
  --accent-gold-hover: #ffffff;
  --accent-gold-soft: rgba(238, 238, 241, 0.12);
  --line-gold: rgba(238, 238, 241, 0.42);
  --bg-ground: #111111;
  --bg-surface: #1b1b1e;
  --bg-elevated: #27272b;
  --ink-primary: #f5f5f7;
  --ink-secondary: #b6b8bf;
  --ink-tertiary: #8a8a8e;
  --line-subtle: rgba(245, 245, 247, 0.1);
  --line-strong: rgba(245, 245, 247, 0.2);

  position: relative;
  background: linear-gradient(180deg, #161618 0%, #131315 42%, #111113 100%);
  border-top: 1px solid rgba(245, 245, 247, 0.14);
  color: var(--ink-primary);
}

.work--typik ::selection {
  background: rgba(238, 238, 241, 0.24);
}

.work--typik .hero-stage {
  padding-top: clamp(56px, 7vw, 96px);
}

.work--typik .app-icon-frame {
  background: #cecfd4;
  border-color: rgba(245, 245, 247, 0.22);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.7);
}

.work--typik .work-title,
html[lang="en"] .work--typik .work-title {
  font-family: var(--font-sans);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: none;
}

/* Status and platform floor sit on separate lines so neither language wraps mid-row */
.work--typik .app-meta-inline {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.work--typik .meta-sep {
  display: none;
}

/* Content-sized ledger columns: "20 Languages" fits without truncation */
.work--typik .hero-ledger {
  grid-template-columns: repeat(4, auto);
}

.work--typik .store-btn-secondary:hover {
  background: #333336;
}

.work--typik .gallery-shot {
  aspect-ratio: 621 / 1349;
  background: #f5f5f7;
}

.work--typik .gallery-trigger {
  background: #0b0b0c;
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.7);
}

.hero-grid--reverse .hero-visual {
  order: -1;
}

/* Preview stage — the app icon at room scale: grey ground, white keycaps */
.typik-stage {
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 24px 0;
  border-radius: var(--radius-device);
  background:
    radial-gradient(ellipse 70% 52% at 50% 34%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 70%),
    #cecfd4;
  overflow: hidden;
  isolation: isolate;
}

.typik-stage :focus-visible {
  outline-color: #111111;
}

.typik-stage .device-triptych {
  max-width: 480px;
  height: 468px;
}

.typik-stage .triptych-btn {
  background: #0b0b0c;
  border-color: rgba(17, 17, 17, 0.5);
  box-shadow: 0 26px 48px -18px rgba(17, 17, 17, 0.55), 0 8px 18px -8px rgba(17, 17, 17, 0.35);
}

.typik-stage .triptych-btn:hover {
  border-color: #111111;
}

.typik-stage .triptych-center {
  width: 212px;
}

.typik-stage .triptych-left,
.typik-stage .triptych-right {
  width: 170px;
  top: 50px;
  opacity: 1;
}

.keycap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
  width: calc(100% + 96px);
  height: 112px;
  margin: 26px -48px -34px;
  flex-shrink: 0;
}

.keycap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 28px;
  background: #fdfdfd;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px -14px rgba(17, 17, 17, 0.4);
}

.keycap svg {
  width: 44%;
  max-width: 132px;
  height: auto;
}

/* Lightbox picks up the tint of the case study it was opened from */
.lightbox[data-lightbox-work="typik"] {
  --accent-gold: #eeeef1;
  --line-gold: rgba(238, 238, 241, 0.42);
  background: rgba(10, 10, 12, 0.92);
}

.lightbox[data-lightbox-work="typik"] .lightbox-frame {
  background: #0b0b0c;
  border-color: rgba(245, 245, 247, 0.2);
}

@media (max-width: 1040px) {
  .hero-grid--reverse .hero-visual {
    order: 0;
  }

  .typik-stage {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .work-index-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-index-item {
    padding: 12px 0;
  }

  .work-index-item + .work-index-item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-subtle);
  }

  .work--typik .hero-stage {
    padding-top: 44px;
  }

  .work--typik .hero-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .typik-stage {
    padding: 28px 12px 0;
    border-radius: 22px;
  }

  .typik-stage .device-triptych {
    max-width: 340px;
    height: 352px;
  }

  .typik-stage .triptych-center {
    width: 160px;
  }

  .typik-stage .triptych-left,
  .typik-stage .triptych-right {
    width: 128px;
    top: 40px;
  }

  .keycap-row {
    gap: 10px;
    width: calc(100% + 56px);
    height: 84px;
    margin: 18px -28px -26px;
  }

  .keycap {
    padding-bottom: 22px;
    border-radius: 16px 16px 0 0;
  }
}
