/* ============================================================
   ARKA — Product Designer Portfolio
   Minimal, aesthetic, soft-dark blue on neutral base
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Brand blue — soft & slightly dark */
  --blue: #3b5488;
  --blue-deep: #253a63;
  --blue-ink: #16223c;
  --blue-soft: #7f96c4;
  --blue-tint: #e9eef7;
  --blue-tint-2: #d9e2f1;

  /* Neutral base */
  --bg: #f6f6f2;
  --surface: #ffffff;
  --ink: #14171f;
  --ink-2: #4b5261;
  --ink-3: #9096a5;
  --line: rgba(20, 23, 31, 0.09);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --font-body: "Manrope", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(5rem, 11vw, 9.5rem);

  --header-bg: rgba(246, 246, 242, 0.82);
  color-scheme: light;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #0f1218;
  --surface: #171c26;
  --ink: #eceef3;
  --ink-2: #a9afbe;
  --ink-3: #6b7386;
  --line: rgba(236, 238, 243, 0.1);
  --blue: #8fa7d6;
  --blue-deep: #c0cdea;
  --blue-tint: #1c2434;
  --blue-tint-2: #2a3752;
  --header-bg: rgba(15, 18, 24, 0.82);
  color-scheme: dark;
}
[data-theme="dark"] ::selection { background: #33518e; }
[data-theme="dark"] .btn { background: #33518e; }
[data-theme="dark"] .btn--ghost { background: transparent; }
[data-theme="dark"] .btn--ghost::before { background: #33518e; }
[data-theme="dark"] .filter-btn.is-active { background: #33518e; }
[data-theme="dark"] .chip:hover { background: #33518e; }
[data-theme="dark"] .lang-menu button.is-active { background: #33518e; }
[data-theme="dark"] .cursor-ring { border-color: rgba(143, 167, 214, 0.5); }
[data-theme="dark"] .cursor-ring.is-view { background: #33518e; border-color: #33518e; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--blue); color: #fff; }

/* Film grain overlay — subtle texture */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(1240px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }

.display {
  font-size: clamp(2.9rem, 8.2vw, 6.6rem);
}
.h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
}
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); }

em, .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--blue);
  opacity: 0.5;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  max-width: 34em;
}

.muted { color: var(--ink-3); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(2.2rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--rd, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* Line-mask headline animation */
.line { display: block; overflow: hidden; padding-block: 0.06em; }
.line .li {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 1s var(--ease);
}
.line:nth-child(2) .li { transition-delay: 0.09s; }
.line:nth-child(3) .li { transition-delay: 0.18s; }
.line:nth-child(4) .li { transition-delay: 0.27s; }
.is-loaded .line .li, .line.in .li { transform: translateY(0); }

/* ---------- Page transition ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--blue-ink);
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.page-transition .pt-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.page-transition.is-active {
  transform: scaleY(1);
  transition: transform 0.55s var(--ease);
  pointer-events: all;
}
.page-transition.is-active .pt-mark { opacity: 1; transition-delay: 0.25s; }
.page-transition.is-leaving {
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.65s var(--ease) 0.1s;
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 4000;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--blue);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(59, 84, 136, 0.45);
  display: grid;
  place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cursor-ring .cursor-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor-ring.is-hover { width: 56px; height: 56px; background: rgba(59, 84, 136, 0.12); }
.cursor-ring.is-view {
  width: 84px; height: 84px;
  background: var(--blue);
  border-color: var(--blue);
}
.cursor-ring.is-view .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: transform 0.5s var(--ease), background 0.4s ease, box-shadow 0.4s ease;
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.15rem;
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}
.logo:hover .logo-mark { transform: scale(1.14); }
.logo:active .logo-mark { transform: scale(1.05); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  padding-block: 0.3rem;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--blue);
  color: #fff;
  overflow: hidden;
  transition: color 0.4s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue-ink);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn > * { position: relative; z-index: 1; }
.btn:hover { box-shadow: 0 12px 30px -10px rgba(37, 58, 99, 0.5); }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--ghost::before { background: var(--blue); }
.btn--ghost:hover { color: #fff; }

.btn--light { background: #fff; color: #1d2c4c; }
.btn--light::before { background: var(--blue-soft); }
.btn--light:hover { color: #16223c; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  z-index: 1200;
  width: 44px; height: 44px;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 10px;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease), opacity 0.3s;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); background: #fff; }
.menu-toggle.is-open span:nth-child(2) { top: 21px; transform: rotate(-45deg); background: #fff; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--blue-ink);
  display: grid;
  place-content: center;
  gap: 0.5rem;
  clip-path: circle(0% at calc(100% - 2.5rem) 2.5rem);
  transition: clip-path 0.7s var(--ease);
  visibility: hidden;
}
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 2.5rem) 2.5rem); visibility: visible; }
.mobile-menu a {
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.5s ease, transform 0.6s var(--ease), color 0.3s;
}
.mobile-menu a small {
  font-size: 0.9rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--blue-soft);
}
.mobile-menu.is-open a { opacity: 1; transform: none; }
.mobile-menu.is-open a:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.22s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.29s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.36s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: 0.43s; }
.mobile-menu a:hover { color: #fff; }

@media (max-width: 760px) {
  .nav-links, .nav .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
}
.hero-glow--1 {
  width: 44vw; height: 44vw;
  right: -12vw; top: -8vw;
  background: radial-gradient(circle, rgba(127, 150, 196, 0.35), transparent 65%);
}
.hero-glow--2 {
  width: 30vw; height: 30vw;
  left: -10vw; bottom: -6vw;
  background: radial-gradient(circle, rgba(59, 84, 136, 0.18), transparent 65%);
}
.hero-inner { position: relative; }
.hero .display { max-width: 11em; }

.hero-meta {
  margin-top: 2.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2.5rem;
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0.55rem 1.1rem;
  border-radius: 99px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.availability .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3ba55d;
  position: relative;
}
.availability .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #3ba55d;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.5); opacity: 1; }
  to   { transform: scale(1.6); opacity: 0; }
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  translate: -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-hint .wheel {
  width: 1px;
  height: 3rem;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-hint .wheel::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--blue);
  animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(280%); }
}
@media (max-height: 800px) {
  .scroll-hint { display: none; }
  .hero { padding-bottom: 3rem; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 1.4rem;
  overflow: hidden;
  display: flex;
  user-select: none;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee-track span {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}
.marquee-track span::after {
  content: "✦";
  color: var(--blue);
  font-size: 0.8em;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  flex-wrap: wrap;
}

/* ---------- Project covers (abstract UI art) ---------- */
.cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.cover--wide { aspect-ratio: 16 / 9; }
.cover-inner {
  transition: transform 0.9s var(--ease);
  will-change: transform;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
a:hover .cover-inner, .cover:hover .cover-inner { transform: scale(1.045); }

.cover--a { background: linear-gradient(135deg, #2c4271 0%, #3b5488 55%, #55709f 100%); }
.cover--b { background: linear-gradient(150deg, #dfe6f3 0%, #c6d3ea 60%, #aebfdf 100%); }
.cover--c { background: linear-gradient(140deg, #ece9e1 0%, #ddd9cf 100%); }
.cover--d { background: linear-gradient(140deg, #171c28 0%, #232c42 70%, #2e3d5e 100%); }

/* Mock UI elements inside covers */
.ui-window {
  width: 62%;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 30px 60px -20px rgba(22, 34, 60, 0.45);
}
.ui-dots { display: flex; gap: 5px; margin-bottom: 0.9rem; }
.ui-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue-tint-2);
}
.ui-dots i:first-child { background: var(--blue-soft); }
.ui-row {
  height: 9px;
  border-radius: 99px;
  background: var(--blue-tint);
  margin-bottom: 8px;
}
.ui-row.accent { background: var(--blue-soft); }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }
.ui-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 64px;
  margin-top: 1rem;
}
.ui-chart i {
  flex: 1;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, var(--blue), var(--blue-soft));
  height: var(--h, 50%);
  transform-origin: bottom;
  transition: transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
  transform: scaleY(0.25);
}
.in .ui-chart i, a:hover .ui-chart i, .cover:hover .ui-chart i { transform: scaleY(1); }

.ui-phone {
  width: 34%;
  aspect-ratio: 9 / 18;
  background: #fff;
  border-radius: 26px;
  padding: 1rem 0.9rem;
  box-shadow: 0 34px 70px -24px rgba(22, 34, 60, 0.5);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ui-phone .notch {
  width: 34%; height: 6px;
  border-radius: 99px;
  background: var(--blue-tint-2);
  margin: 0 auto 4px;
}
.ui-card {
  border-radius: 12px;
  background: var(--blue-tint);
  flex: 1;
}
.ui-card.tall { flex: 2.4; background: linear-gradient(150deg, var(--blue), var(--blue-soft)); }

.ui-stack {
  display: flex;
  gap: 0.9rem;
  width: 68%;
}
.ui-stack .ui-tile {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  transition: transform 0.7s var(--ease), background 0.5s ease;
}
.ui-stack .ui-tile:nth-child(2) { translate: 0 -12%; background: rgba(255, 255, 255, 0.92); color: var(--blue-deep); }
a:hover .ui-stack .ui-tile:nth-child(1) { transform: rotate(-5deg) translateY(-6px); }
a:hover .ui-stack .ui-tile:nth-child(3) { transform: rotate(5deg) translateY(-6px); }

.ui-browser {
  width: 70%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(22, 34, 60, 0.35);
}
.ui-browser .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--blue-tint);
}
.ui-browser .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-tint-2); }
.ui-browser .bar .url {
  flex: 1;
  height: 10px;
  margin-left: 0.5rem;
  border-radius: 99px;
  background: var(--blue-tint);
}
.ui-browser .body { padding: 1.1rem; }
.ui-browser .heroblock {
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--blue), var(--blue-soft));
  margin-bottom: 10px;
}
.ui-browser .cols { display: flex; gap: 8px; }
.ui-browser .cols i {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-tint);
}

/* ---------- Work list (home) ---------- */
.work-list { display: grid; gap: clamp(3.5rem, 7vw, 6rem); }
.project-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.project-card:nth-child(even) .project-media { order: 2; }
.project-media { position: relative; }
.project-media .cover { box-shadow: 0 24px 60px -30px rgba(22, 34, 60, 0.35); }
.project-info .index {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-3);
  font-size: 1.1rem;
}
.project-info h3 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0.6rem 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.project-info h3 .arrow-circle {
  width: 2.2rem; height: 2.2rem;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--blue);
  transition: background 0.4s ease, color 0.4s ease, transform 0.5s var(--ease);
}
.project-card a:hover .arrow-circle {
  background: var(--blue);
  color: #fff;
  transform: rotate(45deg);
}
.project-info p { color: var(--ink-2); max-width: 30em; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.3rem;
}
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tag--blue { background: var(--blue-tint); color: var(--blue-deep); box-shadow: none; }

@media (max-width: 820px) {
  .project-card { grid-template-columns: 1fr; }
  .project-card:nth-child(even) .project-media { order: 0; }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem;
  text-align: center;
}
.stat .num {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--blue-deep);
}
.stat .num sup { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--blue-soft); }
.stat .label {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Services ---------- */
.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
  position: relative;
}
.service-row:first-child { border-top: 1px solid var(--line); }
.service-row:hover { padding-left: 1.2rem; }
.service-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--blue-tint), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}
.service-row:hover::before { opacity: 1; }
.service-row .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--blue-soft);
  width: 3rem;
}
.service-row h3 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin-bottom: 0.35rem; }
.service-row p { color: var(--ink-2); max-width: 40em; font-size: 0.98rem; }
.service-row .s-arrow {
  font-size: 1.6rem;
  color: var(--blue);
  transform: translateX(-8px) rotate(0deg);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.service-row:hover .s-arrow { transform: translateX(0) rotate(-45deg); opacity: 1; }

/* ---------- Testimonials (3-card grid) ---------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (max-width: 640px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.testi-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px var(--blue-tint-2), 0 20px 40px -20px rgba(37, 58, 99, 0.3);
}
.testi-card .qmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 3rem;
  line-height: 0.6;
  color: var(--blue);
}
.testi-card blockquote {
  flex: 1;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.testi-card .who {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.testi-card .avatar {
  width: 2.6rem; height: 2.6rem;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, #3b5488, #7f96c4);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
}
.testi-card .who strong { display: block; font-size: 0.95rem; }
.testi-card .who span { font-size: 0.82rem; color: var(--ink-3); }

/* ---------- Articles ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (max-width: 640px) { .articles-grid { grid-template-columns: 1fr; } }
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px var(--blue-tint-2), 0 20px 40px -20px rgba(37, 58, 99, 0.3);
}
.article-card.is-filtered { display: none; }
.article-card .cover {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}
.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.4rem 1.5rem 1.6rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.article-date {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.article-card h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.article-card:hover h3 { color: var(--blue); }
.article-excerpt {
  flex: 1;
  font-size: 0.92rem;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue);
}
.article-read .arrow { transition: transform 0.4s var(--ease); }
.article-card:hover .article-read .arrow { transform: translate(3px, -3px); }

/* Articles page toolbar: search, filter, sort */
.articles-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.articles-toolbar .filters { margin-bottom: 0; }
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 260px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  background: var(--surface);
  border-radius: 99px;
  padding: 0.62rem 1.2rem;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow 0.3s ease;
}
.search-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue-soft); }
.search-box svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  background-color: var(--surface);
  border: 0;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  padding: 0.62rem 2.4rem 0.62rem 1.2rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239096a5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: box-shadow 0.3s ease;
}
.sort-select:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--blue-soft); }
.articles-empty {
  text-align: center;
  color: var(--ink-3);
  padding-block: 3rem;
}
.articles-follow {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- Header controls: language & theme ---------- */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.lang-switch { position: relative; }
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.44rem 0.72rem;
  border-radius: 99px;
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.3s ease, box-shadow 0.3s ease;
}
.lang-trigger:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.lang-caret {
  width: 9px;
  height: 9px;
  transition: transform 0.35s var(--ease);
}
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 34px rgba(20, 23, 31, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  z-index: 60;
}
.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.lang-menu button {
  text-align: left;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.42rem 0.85rem;
  border-radius: 9px;
  color: var(--ink-2);
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-menu button:hover { background: var(--blue-tint); color: var(--ink); }
.lang-menu button.is-active { background: var(--blue); color: #fff; }
.theme-toggle {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: color 0.3s ease, transform 0.5s var(--ease), box-shadow 0.3s ease;
}
.theme-toggle:hover { color: var(--blue); transform: rotate(40deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: block; }
@media (max-width: 940px) { .btn--nav { display: none; } }
@media (max-width: 400px) { .lang-trigger { padding: 0.4rem 0.55rem; } }

/* ---------- Mega footer ---------- */
.mega-footer {
  position: relative;
  margin-top: var(--section);
  background: var(--blue-ink);
  color: #fff;
  border-radius: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px) 0 0;
  overflow: hidden;
  padding-top: clamp(4rem, 8vw, 7rem);
}
.mega-footer::before,
.mega-footer .f-orb {
  content: "";
  position: absolute;
  width: 55vw; height: 55vw;
  min-width: 26rem; min-height: 26rem;
  border-radius: 50%;
  top: -22%; right: -15%;
  background: radial-gradient(circle, rgba(127, 150, 196, 0.3), transparent 62%);
  filter: blur(40px);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-16%, 12%) scale(1.18); }
}
.mega-footer em { color: #a4b8e4; }
.f-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 1.2rem;
}
.f-eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--blue-soft); opacity: 0.6; }
.f-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 15em;
}
.footer-cta-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer-marquee {
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: clamp(0.9rem, 2vw, 1.5rem);
  display: flex;
  overflow: hidden;
  user-select: none;
}
.footer-marquee .fm-track {
  display: flex;
  flex-shrink: 0;
  animation: marquee 22s linear infinite;
}
.footer-marquee:hover .fm-track { animation-play-state: paused; }
.fm-track span {
  white-space: nowrap;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.32);
  transition: color 0.5s ease, -webkit-text-stroke-color 0.5s ease;
}
.footer-marquee:hover .fm-track span {
  color: #fff;
  -webkit-text-stroke-color: transparent;
}
.footer-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; gap: 2rem; } }
.f-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 1rem;
}
.f-link {
  display: flex;
  align-items: center;
  width: fit-content;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  padding-block: 0.35rem;
  transition: color 0.3s ease;
}
.f-link .fl-arrow {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  color: #a4b8e4;
  transition: max-width 0.4s var(--ease), opacity 0.3s ease, margin-right 0.4s var(--ease);
}
.f-link:hover { color: #fff; }
.f-link:hover .fl-arrow { max-width: 1.2em; opacity: 1; margin-right: 0.35em; }
.f-loc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.f-loc .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7ee2a0;
  animation: blink 2s ease infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }
.footer-bottom2 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.to-top {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background 0.35s ease, color 0.35s ease, transform 0.4s var(--ease), border-color 0.35s ease;
}
.to-top:hover {
  background: #fff;
  color: var(--blue-ink);
  border-color: #fff;
  transform: translateY(-5px);
}

/* ---------- Extra cover mock UI: smartwatch & certificate ---------- */
.ui-watch {
  width: 30%;
  aspect-ratio: 1;
  border-radius: 28%;
  background: #10151f;
  box-shadow: 0 30px 60px -20px rgba(22, 34, 60, 0.5), inset 0 0 0 5px #fff;
  display: grid;
  place-items: center;
}
.ui-watch .ring {
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 6px solid var(--blue-soft);
  border-top-color: #7ee2a0;
  rotate: -30deg;
  transition: rotate 0.9s var(--ease);
}
a:hover .ui-watch .ring, .cover:hover .ui-watch .ring { rotate: 330deg; }
.ui-badge {
  width: 44%;
  background: #fff;
  border-radius: 16px;
  padding: 1.3rem 1.2rem;
  box-shadow: 0 30px 60px -20px rgba(22, 34, 60, 0.45);
}
.ui-badge .seal {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(140deg, #3b5488, #7f96c4);
  margin: 0 auto 0.9rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  transition: transform 0.6s var(--ease);
}
a:hover .ui-badge .seal, .cover:hover .ui-badge .seal { transform: rotate(360deg) scale(1.08); }
.ui-badge .ui-row { background: #e9eef7; }
.ui-badge .ui-row.accent { background: #7f96c4; }

/* Contact aside link list (kept from socials) */
.socials { display: flex; gap: 1.6rem; }
.socials a {
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.3s;
}
.socials a:hover { color: var(--blue); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: clamp(9rem, 16vw, 13rem) 0 clamp(3rem, 6vw, 5rem);
}
.page-hero .display { max-width: 10em; }
.page-hero .lead { margin-top: 1.8rem; }

/* ---------- Work page grid ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.filter-btn {
  padding: 0.6rem 1.3rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: all 0.35s var(--ease);
}
.filter-btn:hover { color: var(--blue-deep); box-shadow: inset 0 0 0 1.5px var(--blue-soft); }
.filter-btn.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.work-grid .grid-item:nth-child(even) { transform: translateY(clamp(0px, 4vw, 3.5rem)); }
.grid-item {
  transition: opacity 0.5s ease, transform 0.6s var(--ease), scale 0.5s var(--ease);
}
.grid-item.is-filtered {
  opacity: 0;
  scale: 0.92;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}
.grid-item .cover { margin-bottom: 1.3rem; }
.grid-item .g-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.grid-item h3 { font-size: 1.35rem; }
.grid-item .g-meta .year {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-3);
}
.grid-item .cat { font-size: 0.88rem; color: var(--ink-2); margin-top: 0.25rem; }
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .grid-item:nth-child(even) { transform: none; }
}

/* ---------- Case study ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1500;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  padding-block: 2.5rem;
  border-block: 1px solid var(--line);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.case-meta .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}
.case-meta .value { font-weight: 600; }

.case-hero-media { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.prose {
  max-width: 44em;
  margin-inline: auto;
}
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.2rem; }
.prose p { color: var(--ink-2); margin-bottom: 1.2rem; }
.prose .prose-block { margin-bottom: clamp(3rem, 6vw, 4.5rem); }

.process-steps { counter-reset: step; display: grid; gap: 0; margin-top: 1rem; }
.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.process-step:first-child { border-top: 1px solid var(--line); }
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--blue-soft);
}
.process-step h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.process-step p { font-size: 0.98rem; color: var(--ink-2); }

.case-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-block: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 700px) { .case-gallery { grid-template-columns: 1fr; } }

.outcome-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.outcome-stats .stat {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  padding: 1.6rem;
}

.next-project {
  display: block;
  background: var(--blue-ink);
  color: #fff;
  text-align: center;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  position: relative;
  overflow: hidden;
}
.next-project .np-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.next-project .np-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0.8rem;
  transition: letter-spacing 0.6s var(--ease);
}
.next-project:hover .np-title { letter-spacing: 0.01em; }
.next-project::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--blue-soft);
  transform: scaleX(0);
  transition: transform 0.7s var(--ease);
}
.next-project:hover::after { transform: scaleX(1); }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #2c4271, #55709f);
  display: grid;
  place-items: center;
  position: sticky;
  top: 7rem;
  overflow: hidden;
}
.portrait .monogram {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(5rem, 12vw, 9rem);
  color: rgba(255, 255, 255, 0.9);
}
/* Breathing glow behind the monogram */
.portrait::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 62%);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.65; }
  50%      { transform: scale(1.12); opacity: 1; }
}
/* Floating accents */
.portrait .fl {
  position: absolute;
  border-radius: 50%;
  animation: floaty 7s ease-in-out infinite;
}
.portrait .fl--1 { width: 12px; height: 12px; background: rgba(255, 255, 255, 0.55); top: 18%; left: 15%; }
.portrait .fl--2 { width: 36px; height: 36px; border: 1.5px solid rgba(255, 255, 255, 0.38); bottom: 18%; right: 13%; animation-duration: 9s; animation-delay: -2.5s; }
.portrait .fl--3 { width: 7px; height: 7px; background: rgba(164, 184, 228, 0.9); top: 30%; right: 24%; animation-duration: 8s; animation-delay: -4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.portrait .monogram { position: relative; animation: floaty 6s ease-in-out infinite; }
/* Cursor spotlight (pointer devices) */
.portrait .spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.15), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.portrait:hover .spotlight { opacity: 1; }
@media (max-width: 900px) {
  /* Portrait becomes a short banner: no sticky, height-capped instead of 4/5 ratio.
     Keep it positioned so absolute ornaments stay clipped inside. */
  .portrait {
    position: relative;
    top: auto;
    aspect-ratio: auto;
    height: clamp(200px, 42vw, 320px);
  }
  .portrait .monogram { font-size: clamp(3.2rem, 12vw, 5.5rem); }
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.value-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px var(--blue-tint-2), 0 20px 40px -20px rgba(37, 58, 99, 0.25);
}
.value-card .glyph {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--blue);
  margin-bottom: 1rem;
}
.value-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.value-card p { font-size: 0.95rem; color: var(--ink-2); }

.timeline { display: grid; }
.timeline-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.timeline-row:first-child { border-top: 1px solid var(--line); }
.timeline-row:hover { padding-left: 0.8rem; }
.timeline-row .years {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--blue);
}
.timeline-row h3 { font-size: 1.1rem; }
.timeline-row p { font-size: 0.92rem; color: var(--ink-2); }
.timeline-row .place { font-size: 0.88rem; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) {
  .timeline-row { grid-template-columns: 1fr; gap: 0.3rem; }
}

.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  padding: 0.7rem 1.4rem;
  border-radius: 99px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: all 0.35s var(--ease);
}
.chip:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-3px);
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { position: relative; margin-bottom: 2.2rem; }
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 0.6rem 0;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s;
}
.form-field textarea { resize: vertical; min-height: 7rem; }
.form-field .focus-line {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1.5px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.form-field:focus-within .focus-line { transform: scaleX(1); }

.contact-aside .aside-block { margin-bottom: 2.5rem; }
.contact-aside .aside-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}
.contact-aside a.big-link {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.contact-aside a.big-link:hover { color: var(--blue); }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  padding-block: 1.4rem;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.faq-q:hover { color: var(--blue-deep); }
.faq-q .fx {
  position: relative;
  width: 1rem; height: 1rem;
  flex: none;
}
.faq-q .fx::before, .faq-q .fx::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%; height: 2px;
  background: var(--blue);
  translate: 0 -50%;
  transition: rotate 0.45s var(--ease);
}
.faq-q .fx::after { rotate: 90deg; }
.faq-item.is-open .fx::after { rotate: 0deg; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--ink-2); padding-bottom: 1.4rem; max-width: 42em; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  translate: -50% 150%;
  z-index: 5000;
  background: var(--blue-ink);
  color: #fff;
  padding: 1rem 1.8rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: 0 20px 50px -12px rgba(22, 34, 60, 0.5);
  transition: translate 0.6s var(--ease);
}
.toast.is-visible { translate: -50% 0; }
.toast .check { color: #7ee2a0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .line .li { opacity: 1; transform: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
