/* ==========================================================================
   kfragkeskou.social - premium light theme
   Pearl surfaces, indigo accent, glass panels.
   Headings: Bricolage Grotesque · Body: Inter
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces: layered pearl, never flat white everywhere */
  --bg: #f7f6f2;
  --bg-tint: #f1f0f8;
  --surface: #fdfdfb;
  --surface-glass: rgba(253, 253, 251, 0.72);
  --surface-deep: #ecebf5;

  /* Ink */
  --ink: #211f33;
  --ink-2: #565370;
  --ink-3: #8a87a3;

  /* Accent: premium indigo, locked across the whole site */
  --accent: #5b4ef0;
  --accent-deep: #4438cf;
  --accent-soft: #edebfd;
  --accent-soft-2: #dfdcfb;
  --violet: #8b5cf6;

  --line: rgba(33, 31, 51, 0.09);
  --line-strong: rgba(33, 31, 51, 0.16);

  /* Shape system: containers 24, media 16, controls pill, inputs 12 */
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  --shadow-soft: 0 18px 50px -24px rgba(64, 56, 160, 0.22);
  --shadow-lift: 0 28px 70px -28px rgba(64, 56, 160, 0.32);
  --shadow-glass: 0 10px 40px -18px rgba(64, 56, 160, 0.18);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-padding-top: calc(var(--nav-h) + 28px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }

p { margin: 0 0 1em; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

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

::selection { background: var(--accent-soft-2); color: var(--ink); }

.container {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 14px; color: #fff; }

/* Ambient mesh background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 12% -4%, rgba(91, 78, 240, 0.09), transparent 65%),
    radial-gradient(720px 520px at 92% 12%, rgba(139, 92, 246, 0.08), transparent 65%),
    radial-gradient(560px 460px at 78% 88%, rgba(255, 188, 143, 0.07), transparent 65%);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
              background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(91, 78, 240, 0.55);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 18px 38px -14px rgba(91, 78, 240, 0.65);
}

.btn-ghost {
  background: var(--surface-glass);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.88rem; }
.btn svg { width: 17px; height: 17px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-deep);
}
.link-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(4px); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s, transform 0.2s var(--ease-out);
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-block;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.chip:hover {
  border-color: var(--accent-soft-2);
  color: var(--accent-deep);
  transform: translateY(-1px);
}
.chips.small .chip { padding: 0.3rem 0.75rem; font-size: 0.78rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 12px;
  z-index: 100;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  width: min(1200px, 100% - 1.6rem);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: 1.4rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.nav.scrolled .nav-inner {
  background: rgba(253, 253, 251, 0.88);
  box-shadow: var(--shadow-soft);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--ink); }
.nav-brand img { border-radius: 9px; }

.nav-links {
  display: flex;
  gap: 1.6rem;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  padding-block: 0.4rem;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

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

/* Burger */
.burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.burger span {
  position: absolute;
  left: 13px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s, top 0.3s var(--ease-out);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 3rem;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.mobile-menu[hidden] { display: none !important; }
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  font-weight: 650;
  color: var(--ink);
  padding-block: 0.35rem;
  border-bottom: 1px solid var(--line);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.45s var(--ease-out),
              color 0.2s;
}
.mobile-menu.open nav a {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu nav a:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu nav a:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu nav a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu nav a:nth-child(4) { transition-delay: 0.16s; }
.mobile-menu nav a:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu nav a:nth-child(6) { transition-delay: 0.24s; }
.mobile-menu nav a:nth-child(7) { transition-delay: 0.28s; }
.mobile-menu nav a:nth-child(8) { transition-delay: 0.32s; }
.mobile-menu nav a:hover { color: var(--accent-deep); }
.mobile-menu-foot {
  margin-top: 2.4rem;
  font-size: 0.95rem;
}

body.menu-open { overflow: hidden; }

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  position: relative;
}
.section-tint {
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(91, 78, 240, 0.06), transparent 60%),
    var(--bg-tint);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}
.section-sub {
  color: var(--ink-2);
  font-size: 1.06rem;
  max-width: 56ch;
}
.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.9rem;
}
.section-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.2rem, 4vw, 3rem);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.6rem, 6vh, 4.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: clip;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(820px 540px at 78% 30%, rgba(91, 78, 240, 0.12), transparent 62%),
    radial-gradient(540px 420px at 8% 80%, rgba(255, 188, 143, 0.1), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 1.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fb56b;
  box-shadow: 0 0 0 0 rgba(47, 181, 107, 0.45);
}
.pulse-dot { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 181, 107, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(47, 181, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 181, 107, 0); }
}

.hero-title {
  font-size: clamp(2.7rem, 5.6vw, 4.5rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 1.3rem;
  max-width: 13ch;
}
.wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.w { display: inline-block; }
.w.grad {
  background: linear-gradient(110deg, var(--accent) 10%, var(--violet) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.3rem;
}

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orb-glow {
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 36%,
      rgba(139, 92, 246, 0.22),
      rgba(91, 78, 240, 0.13) 42%,
      transparent 70%),
    radial-gradient(circle at 70% 74%,
      rgba(255, 158, 110, 0.12),
      transparent 55%);
  filter: blur(8px);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-canvas canvas { width: 100% !important; height: 100% !important; }

.portrait-card {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(330px, 78%);
  padding: 0.85rem 0.85rem 1.1rem;
  border-radius: var(--r-lg);
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  transform: rotate(-2.4deg);
  transition: transform 0.5s var(--ease-out);
}
.portrait-card:hover { transform: rotate(0deg) translateY(-6px); }
.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  border-radius: var(--r-md);
}
.portrait-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 0.35rem 0;
}
.portrait-card figcaption strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
}
.portrait-card figcaption span {
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* Floating tech chips */
.chip3d {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  will-change: transform;
}
.chip3d.c1 { top: 6%;  left: 6%; }
.chip3d.c2 { top: 16%; right: 2%; }
.chip3d.c3 { top: 42%; left: -2%; }
.chip3d.c4 { bottom: 30%; right: -1%; }
.chip3d.c5 { bottom: 10%; left: 10%; }
.chip3d.c6 { top: 64%; right: 8%; }
.chip3d.c7 { bottom: -2%; right: 26%; }

.chip3d { animation: floaty 6s ease-in-out infinite; }
.chip3d.c2 { animation-delay: -1.2s; }
.chip3d.c3 { animation-delay: -2.6s; }
.chip3d.c4 { animation-delay: -0.7s; }
.chip3d.c5 { animation-delay: -3.4s; }
.chip3d.c6 { animation-delay: -1.9s; }
.chip3d.c7 { animation-delay: -4.2s; }
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: clamp(2.6rem, 6vh, 4rem);
  padding: 1.5rem clamp(1rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee-section {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}
.marquee-lead {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 2rem;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee + .marquee { margin-top: 1.1rem; }

.marquee-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  padding-block: 0.4rem;
}
.marquee.is-ready .marquee-track { animation: mq-left var(--mq-dur, 48s) linear infinite; }
.marquee.is-ready[data-direction="right"] .marquee-track { animation-name: mq-right; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes mq-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes mq-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.mq-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.2rem 0.7rem 0.7rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px -12px rgba(64, 56, 160, 0.18);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.mq-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-soft);
}
.mq-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
}
.mq-item span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ==========================================================================
   FEATURED WORK
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.4rem;
}
.fcard {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px -20px rgba(64, 56, 160, 0.18);
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease-out), border-color 0.35s;
  transform-style: preserve-3d;
}
.fcard:hover {
  box-shadow: var(--shadow-lift);
  border-color: var(--accent-soft-2);
}
.fcard-media {
  display: block;
  overflow: hidden;
  background: var(--surface-deep);
}
.fcard-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.fcard:hover .fcard-media img { transform: scale(1.04); }

.fcard-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.6rem 1.7rem 1.8rem;
}
.fcard-body h3 {
  font-size: 1.45rem;
  margin: 0;
}
.fcard-body p {
  color: var(--ink-2);
  margin: 0;
  font-size: 0.97rem;
}
.fcard-impact {
  font-weight: 600;
  color: var(--accent-deep) !important;
  font-size: 0.9rem !important;
}

/* Layout variants */
.fcard.span-7 { grid-column: span 7; }
.fcard.span-5 { grid-column: span 5; }

.fcard-wide {
  flex-direction: row;
  align-items: stretch;
}
.fcard-wide .fcard-media {
  flex: 1.15;
  min-width: 0;
}
.fcard-wide .fcard-media img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 320px;
}
.fcard-wide .fcard-body {
  flex: 1;
  justify-content: center;
  padding: clamp(1.6rem, 3vw, 2.6rem);
}
.fcard-wide .fcard-body h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }

.fcard-row {
  flex-direction: row;
  align-items: stretch;
}
.fcard-row .fcard-media { flex: 0.85; min-width: 0; }
.fcard-row .fcard-media img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 240px;
}
.fcard-row .fcard-body { flex: 1; justify-content: center; }

/* ==========================================================================
   BENTO: WHAT I BUILD
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
}
.bcell {
  grid-column: span 12;
  padding: 1.6rem 1.6rem 1.7rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.bcell:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent-soft-2);
}
.bcell svg {
  width: 26px;
  height: 26px;
  color: var(--accent-deep);
  margin-bottom: 0.9rem;
}
.bcell h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.bcell p {
  color: var(--ink-2);
  font-size: 0.92rem;
  margin: 0;
}

.bcell.span-3 { grid-column: span 3; }
.bcell.span-4 { grid-column: span 4; }
.bcell.span-5 { grid-column: span 5; }
.bcell.span-6 { grid-column: span 6; }
.bcell.span-12 { grid-column: span 12; }

.bcell-accent {
  background: linear-gradient(135deg, var(--accent-soft), rgba(253, 253, 251, 0.9) 70%);
  border-color: var(--accent-soft-2);
}
.bcell-grid-bg {
  background-image:
    linear-gradient(rgba(91, 78, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 78, 240, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  background-color: var(--surface);
}
.bcell-slim {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  background: linear-gradient(120deg, var(--accent-soft) 0%, rgba(253, 253, 251, 0.85) 55%);
  border-color: var(--accent-soft-2);
}
.bcell-slim svg { margin-bottom: 0; flex-shrink: 0; }
.bcell-slim h3 { margin-bottom: 0.2rem; }

/* ==========================================================================
   EXPERIENCE
   ========================================================================== */
.xp-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 880px;
}
.xp-item {
  position: relative;
  z-index: 1;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s var(--ease-out);
}
.xp-item summary { list-style: none; }
.xp-item summary::-webkit-details-marker { display: none; }
.xp-item:hover {
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-soft);
}
.xp-head {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  padding: 1.25rem 1.4rem;
  text-align: left;
  cursor: pointer;
}
.xp-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}
.xp-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.xp-role {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.06rem;
  color: var(--ink);
}
.xp-org {
  font-size: 0.88rem;
  color: var(--ink-2);
}
.xp-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  transition: transform 0.35s var(--ease-out), background-color 0.25s;
  flex-shrink: 0;
}
.xp-toggle svg { width: 17px; height: 17px; }
.xp-item[open] .xp-toggle { transform: rotate(45deg); background: var(--accent-soft-2); }

.xp-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.xp-body[hidden] { display: none; }
.xp-body-inner {
  overflow: hidden;
  padding-inline: 1.4rem;
}
.xp-item[open] .xp-body-inner { padding-bottom: 1.5rem; }
.xp-body-inner p {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.xp-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-statement {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  max-width: 18ch;
}
.about-main p {
  color: var(--ink-2);
  font-size: 1.04rem;
  max-width: 58ch;
}
.about-facts {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.fact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s var(--ease-out);
}
.fact:hover {
  transform: translateX(5px);
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-soft);
}
.fact svg {
  width: 22px;
  height: 22px;
  color: var(--accent-deep);
  flex-shrink: 0;
}
.fact div { display: flex; flex-direction: column; gap: 0.05rem; }
.fact strong { font-size: 0.97rem; font-weight: 600; }
.fact span { font-size: 0.85rem; color: var(--ink-3); }

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
}
.skill-group {
  grid-column: span 6;
  padding: 1.6rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s var(--ease-out);
}
.skill-group:hover {
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-soft);
}
.skill-group h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}
.skill-group h3 svg {
  width: 20px;
  height: 20px;
  color: var(--accent-deep);
}
.skill-accent {
  background: linear-gradient(135deg, var(--accent-soft), rgba(253, 253, 251, 0.92) 75%);
  border-color: var(--accent-soft-2);
}
.skill-wide { grid-column: span 12; }

/* ==========================================================================
   AWARDS & EDUCATION
   ========================================================================== */
.bg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.awards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.award-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.3rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s var(--ease-out);
}
.award-row:hover {
  transform: translateY(-3px);
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-soft);
}
.award-place {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 2.4ch;
}
.award-row h3 { font-size: 1.08rem; margin-bottom: 0.15rem; }
.award-row p { margin: 0; font-size: 0.88rem; color: var(--ink-2); }
.award-row svg { width: 22px; height: 22px; color: var(--ink-3); }

.edu-card {
  padding: 1.8rem 1.8rem 2rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px -20px rgba(64, 56, 160, 0.18);
}
.edu-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 0.4rem;
}
.edu-card h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.edu-meta {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 1.2rem;
}

/* ==========================================================================
   RECOMMENDATIONS
   ========================================================================== */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}
.rec-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.7rem 1.7rem 1.8rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s var(--ease-out);
}
.rec-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-soft-2);
  box-shadow: var(--shadow-lift);
}
.rec-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-soft-2));
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.rec-card h3 { font-size: 1.18rem; margin: 0; }
.rec-role {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 0;
}
.rec-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.tst-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1.3rem;
}
.tst-card {
  margin: 0;
  padding: 1.8rem 1.9rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.tst-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent-soft-2);
}
.tst-featured {
  grid-row: span 2;
  background: linear-gradient(150deg, var(--accent-soft) 0%, var(--surface) 60%);
  border-color: var(--accent-soft-2);
  justify-content: center;
}
.tst-featured > svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.tst-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}
.tst-featured p { font-size: 1.12rem; }
.tst-card footer {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.tst-card footer strong { font-size: 0.97rem; }
.tst-card footer span { font-size: 0.85rem; color: var(--ink-3); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-info .section-head { margin-bottom: 1.8rem; }

.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1rem;
}
.contact-row > svg {
  width: 19px;
  height: 19px;
  color: var(--accent-deep);
  flex-shrink: 0;
}
.contact-row a { color: var(--ink); font-weight: 550; }
.contact-row a:hover { color: var(--accent-deep); }
.contact-row .icon-btn { width: 34px; height: 34px; }
.contact-row .icon-btn svg { width: 15px; height: 15px; }

.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 600;
}
.badge-soft svg { width: 15px; height: 15px; }

.socials {
  display: flex;
  gap: 0.6rem;
}

/* Form */
.contact-form {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  padding: 0.85rem 1.05rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-3); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field input.invalid,
.form-field textarea.invalid { border-color: #c4452f; }

.form-submit { justify-content: center; }
.form-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 550;
  min-height: 1.4em;
}
.form-status.ok { color: #1f7a4d; }
.form-status.err { color: #c4452f; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.8rem;
}
.footer-brand p {
  color: var(--ink-2);
  font-size: 0.93rem;
  margin-top: 1rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links a,
.footer-contact a {
  color: var(--ink-2);
  font-size: 0.93rem;
  width: fit-content;
}
.footer-links a:hover,
.footer-contact a:hover { color: var(--accent-deep); }
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}
.footer-contact .socials { margin-top: 0.6rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ==========================================================================
   MODAL (PDF viewer)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 31, 51, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  width: min(900px, 100%);
  max-height: min(86dvh, 980px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.modal.is-open .modal-panel { animation: modal-in 0.35s var(--ease-out); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-size: 1.02rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.modal-body {
  flex: 1;
  min-height: 0;
  background: var(--surface-deep);
}
.modal-body iframe {
  display: block;
  width: 100%;
  height: min(72dvh, 860px);
  border: 0;
}
.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 3rem 1.6rem;
  text-align: center;
}
.pdf-fallback svg { width: 42px; height: 42px; color: var(--accent-deep); }
.pdf-fallback p { color: var(--ink-2); margin: 0; max-width: 36ch; }
.pdf-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-actions .btn { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-visual { min-height: 440px; margin-top: 1rem; }

  .fcard.span-7, .fcard.span-5 { grid-column: span 6; }

  .bcell.span-3 { grid-column: span 6; }
  .bcell.span-4 { grid-column: span 6; }
  .bcell.span-5 { grid-column: span 6; }
  .bcell.span-6 { grid-column: span 6; }

  .rec-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 62px; }

  .hero { padding-top: calc(var(--nav-h) + 2.2rem); }
  .hero-title { max-width: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 0.6rem; }

  .hero-visual { min-height: 360px; padding-block: 0; }
  .chip3d.c3, .chip3d.c6, .chip3d.c7 { display: none; }

  .fcard.span-7, .fcard.span-5 { grid-column: span 12; }
  .fcard-wide, .fcard-row { flex-direction: column; }
  .fcard-wide .fcard-media img,
  .fcard-row .fcard-media img {
    aspect-ratio: 16 / 10;
    min-height: 0;
    height: auto;
  }

  .bcell.span-3, .bcell.span-4, .bcell.span-5, .bcell.span-6 { grid-column: span 12; }
  .bcell-slim { flex-direction: row; align-items: flex-start; }

  .xp-head {
    grid-template-columns: 1fr auto;
    grid-template-areas: "date toggle" "titles toggle";
    row-gap: 0.3rem;
  }
  .xp-date { grid-area: date; }
  .xp-titles { grid-area: titles; }
  .xp-toggle { grid-area: toggle; }

  .about-grid,
  .bg-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .skill-group { grid-column: span 12; }

  .rec-grid { grid-template-columns: 1fr; }

  .tst-grid { grid-template-columns: 1fr; }
  .tst-featured { grid-row: auto; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .portrait-card { width: min(300px, 92%); }
  .modal { padding: 0.7rem; }
  .modal-body iframe { height: 70dvh; }
}

/* ==========================================================================
   MANUAL MOTION KILL-SWITCH
   Animations run for everyone by default (the OS reduced-motion flag is
   deliberately ignored: on Windows it is often off without the user knowing).
   Visiting any page with ?motion=off adds .no-motion and freezes everything.
   ========================================================================== */
.no-motion *,
.no-motion *::before,
.no-motion *::after {
  animation: none !important;
  transition: none !important;
}
.no-motion .marquee { overflow-x: auto; }
.no-motion { scroll-behavior: auto; }
