/* ==========================================================================
   Juan Camilo Gutierrez — Portfolio
   Shared stylesheet for every page. Brand accent: #00EBFF.
   ========================================================================== */

/* ── Tokens ── */
:root {
  --bg:        #07080b;
  --surface:   #0e1116;
  --surface-2: #151a22;
  --line:      rgba(243,246,250,.09);
  --line-2:    rgba(243,246,250,.18);
  --text:      #f3f6fa;
  --text-2:    rgba(243,246,250,.74);
  --text-3:    rgba(243,246,250,.56);
  --brand:     #00ebff;
  --brand-ink: #001a1f;
  --brand-dim: rgba(0,235,255,.10);
  --brand-glow:rgba(0,235,255,.45);
  --deep:      #0a2cff;
  --danger:    #ff9a9a;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1320px;
  --radius: 24px;
  --radius-sm: 14px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.005em;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }

/* Soft blue haze at the top of every page */
body::before {
  content: ''; position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 60% at 78% 20%, rgba(10,44,255,.20), transparent 70%),
    radial-gradient(35% 40% at 20% 0%, rgba(0,235,255,.07), transparent 70%);
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section[id], [id].anchor { scroll-margin-top: calc(var(--nav-h) + 16px); }
main { display: block; }
main:focus { outline: none; }

.skip-link {
  position: fixed; top: 10px; left: 16px; z-index: 1000;
  padding: 12px 18px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

:where(a, button, input, textarea, video, [tabindex]):focus-visible {
  outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px;
}

/* ── Type ── */
.display, .h-section, .cs-title, .cs-h2, .ct-title, .cs-next-name {
  font-weight: 700; text-transform: uppercase; letter-spacing: -.045em; line-height: .94;
  overflow-wrap: anywhere;
}
.h-section { font-size: clamp(2.3rem, 6.2vw, 5rem); }
.accent { color: var(--brand); }

.eyebrow, .sec-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); line-height: 1.4;
}
.eyebrow::before, .sec-label::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--brand); box-shadow: 0 0 10px var(--brand-glow);
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--text-2); font-weight: 500; }

/* ── Buttons ── */
.btn, .btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 6px 8px 6px 24px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none;
  transition: transform .35s var(--ease);
}
.btn-icon svg { width: 18px; height: 18px; }
.btn--primary, .btn-solid { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 40px -12px var(--brand-glow); }
.btn--primary .btn-icon, .btn-solid .btn-icon { background: var(--brand-ink); color: var(--brand); }
.btn--primary:hover, .btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px var(--brand-glow); }
.btn:hover .btn-icon, .btn-solid:hover .btn-icon { transform: rotate(-45deg); }
.btn--ghost { background: rgba(243,246,250,.04); color: var(--text); border-color: var(--line-2); backdrop-filter: blur(10px); }
.btn--ghost .btn-icon { background: rgba(243,246,250,.08); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { min-height: 44px; padding: 4px 6px 4px 18px; font-size: .72rem; }
.btn--sm .btn-icon { width: 32px; height: 32px; }
.btn--plain { padding: 0 22px; }
.cta-arrow-icon { display: none; } /* legacy inline arrows are replaced by .btn-icon */

/* ── Navigation ── */
.site-nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled { background: rgba(7,8,11,.78); backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); text-decoration: none; }
.nav-logo svg { width: 40px; height: auto; filter: drop-shadow(0 0 12px rgba(0,235,255,.35)); }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--text-2);
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--text); background: rgba(243,246,250,.06); }
.nav-links a.is-active { color: var(--brand); background: var(--brand-dim); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  transition: border-color .25s, color .25s;
}
.nav-back svg { width: 16px; height: 16px; }
.nav-back:hover { border-color: var(--brand); color: var(--brand); }

.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-btn {
  min-width: 40px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--text-3); transition: color .25s, background .25s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--text); color: var(--bg); }

.menu-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(243,246,250,.04); cursor: pointer;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.menu-toggle .bars { display: grid; gap: 4px; }
.menu-toggle .bars i { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-toggle[aria-expanded="true"] .bars i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ── Reveal on scroll ── */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   HOME
   ========================================================================== */

/* ── Hero ── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 48px) 0 56px; overflow: hidden; isolation: isolate; }
.hero .wrap { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(28px, 5vh, 56px); }
.hero-status { display: inline-flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--brand); animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.display { font-size: clamp(3.1rem, 11.4vw, 10.4rem); }
.display .line { display: block; }
.display .indent { padding-left: clamp(0px, 9vw, 160px); }
.hero-role { margin-top: clamp(18px, 3vh, 28px); font-size: clamp(1.1rem, 2.3vw, 1.75rem); font-weight: 600; letter-spacing: -.02em; }
.hero-role strong { color: var(--brand); font-weight: 700; }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; margin-top: clamp(28px, 5vh, 48px); }
.hero-bio { max-width: 520px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-orb {
  position: absolute; z-index: -1; pointer-events: none;
  width: min(78vmin, 820px); aspect-ratio: 1; right: max(-12vmin, -140px); top: 50%; transform: translateY(-58%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(0,235,255,.30), transparent 42%),
    radial-gradient(circle at 50% 55%, rgba(10,44,255,.55), rgba(10,44,255,.12) 55%, transparent 70%);
  box-shadow: inset 0 0 120px rgba(0,0,0,.6);
}
.hero-orb::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background-image: radial-gradient(rgba(243,246,250,.35) 1px, transparent 1.4px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle at 45% 40%, #000 0, transparent 68%);
          mask-image: radial-gradient(circle at 45% 40%, #000 0, transparent 68%);
  opacity: .5;
}
.hero-orb::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; left: 50%; top: 50%; margin: -9px;
  background: var(--brand); box-shadow: 0 0 24px 6px var(--brand-glow);
  animation: orbit 14s linear infinite;
}
@keyframes orbit { from { transform: rotate(0) translateX(min(30vmin, 300px)) rotate(0); } to { transform: rotate(360deg) translateX(min(30vmin, 300px)) rotate(-360deg); } }

.social-row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 22px; }
.social-row a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); text-decoration: none; transition: color .25s;
}
.social-row a:hover { color: var(--brand); }
.social-row svg { width: 15px; height: 15px; }

/* ── Ticker ── */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: rgba(243,246,250,.015); }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; color: var(--text-2);
}
.ticker-track span::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand-glow); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── Sections ── */
.section { padding: clamp(88px, 13vw, 160px) 0; }
.section ~ .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .h-section { margin-top: 18px; }
.section-head .lead { max-width: 440px; }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.about-title { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.04em; line-height: 1; margin: 18px 0 32px; }
.about-title em { font-style: normal; color: var(--brand); }
.about-p { color: var(--text-2); font-size: 1.04rem; line-height: 1.75; margin-bottom: 16px; max-width: 620px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stat { padding: clamp(24px, 3vw, 36px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat-n { font-size: clamp(3rem, 5.6vw, 4.6rem); font-weight: 700; letter-spacing: -.06em; line-height: .9; color: var(--brand); }
.stat-n svg { width: .62em; height: .8em; }
.stat-l { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

/* ── Experience ── */
.xp-list { list-style: none; border-top: 1px solid var(--line); }
.xp-item {
  display: grid; grid-template-columns: 180px minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px 32px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease), background .4s;
}
.xp-item:hover { padding-left: 14px; background: linear-gradient(90deg, var(--brand-dim), transparent 60%); }
.xp-when { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.xp-company { font-size: clamp(1.25rem, 2.4vw, 1.9rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: 1.1; }
.xp-role { color: var(--text-2); font-weight: 500; }
.xp-item.is-current .xp-when, .xp-item.is-current .xp-company { color: var(--brand); }
.xp-company a { text-decoration: none; }
.xp-company a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ── Skills ── */
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2);
  transition: border-color .25s, color .25s, background .25s;
}
.skill:hover { border-color: var(--brand); color: var(--text); background: var(--brand-dim); }
.skill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.skills-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.edu-list { list-style: none; display: grid; gap: 10px; }
.edu-item { padding: 22px 24px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.edu-item b { display: block; font-weight: 700; letter-spacing: -.01em; }
.edu-item span { display: block; color: var(--text-2); font-size: .94rem; }
.edu-item small { display: block; margin-top: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.subhead { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; }
.skills-grid + .subhead { margin-top: 40px; }

/* ── Projects ── */
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3vw, 40px) clamp(16px, 2.2vw, 28px); }
.proj-card { display: block; color: inherit; text-decoration: none; }
.proj-card.is-featured { grid-column: 1 / -1; }
.proj-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
/* Featured card: image at its native 4:3 next to the text, so nothing gets cropped or upscaled */
@media (min-width: 901px) {
  .proj-card.is-featured { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
  .proj-card.is-featured .proj-body { padding: 0; }
  .proj-card.is-featured .proj-name { font-size: clamp(2.6rem, 5vw, 4.6rem); }
  .proj-card.is-featured .proj-desc { font-size: 1.1rem; }
}
.proj-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(.85); transform: scale(1.01);
  transition: filter .6s var(--ease), transform .9s var(--ease);
}
.proj-card:hover .proj-img, .proj-card:focus-visible .proj-img, .proj-card.scroll-active .proj-img { filter: none; transform: scale(1.04); }
.proj-arrow {
  position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(7,8,11,.55); backdrop-filter: blur(10px); border: 1px solid var(--line-2); color: var(--text);
  transition: background .35s var(--ease), color .35s var(--ease), transform .45s var(--ease), border-color .35s;
}
.proj-arrow svg { width: 20px; height: 20px; }
.proj-card:hover .proj-arrow, .proj-card:focus-visible .proj-arrow, .proj-card.scroll-active .proj-arrow { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); transform: rotate(-45deg); }
.proj-body { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 22px 4px 0; }
.proj-num { grid-row: span 3; font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--brand); padding-top: 8px; }
.proj-name { font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.04em; line-height: 1.05; }
.proj-desc { color: var(--text-2); max-width: 560px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.proj-tag, .cs-tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2);
}

/* ── Contact ── */
.ct-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px);
  padding: clamp(28px, 6vw, 80px); border-radius: calc(var(--radius) + 8px); border: 1px solid var(--line);
  background: var(--surface);
}
.ct-card::before {
  content: ''; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; left: -20%; bottom: -55%; border-radius: 50%;
  background: radial-gradient(circle, rgba(10,44,255,.45), transparent 65%);
}
.ct-title { font-size: clamp(2.4rem, 5vw, 4.6rem); margin: 18px 0 22px; overflow-wrap: break-word; }
.ct-title span { color: var(--brand); }
.ct-sub { color: var(--text-2); max-width: 400px; margin-bottom: 28px; }
.ct-email {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding-bottom: 4px;
  font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--brand); overflow-wrap: anywhere;
}
.ct-email:hover { color: var(--brand); }
.ct-form { display: grid; gap: 12px; }
.field { position: relative; display: grid; }
.field label { position: absolute; top: 12px; left: 20px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); pointer-events: none; transition: color .25s; }
.field input, .field textarea {
  width: 100%; padding: 32px 20px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: rgba(7,8,11,.6); font-size: 16px; line-height: 1.5; outline: none; resize: vertical;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field textarea { min-height: 150px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(243,246,250,.38); }
.field input:focus, .field textarea:focus { border-color: var(--brand); background: rgba(7,8,11,.85); box-shadow: 0 0 0 4px var(--brand-dim); }
.field:focus-within label { color: var(--brand); }
.field input.invalid { border-color: var(--danger); }
.field-error { display: none; padding: 6px 4px 0; font-size: .8rem; color: var(--danger); }
.field-error.show { display: block; }
.privacy-consent { display: flex; align-items: flex-start; gap: 12px; padding: 6px 2px; font-size: .82rem; line-height: 1.55; color: var(--text-2); cursor: pointer; }
.privacy-consent input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.privacy-consent a { color: var(--brand); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-note { font-size: .82rem; color: var(--text-3); }
.form-note span { color: var(--brand); font-weight: 700; }
.btn-send:disabled { background: rgba(243,246,250,.08); color: var(--text-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-send:disabled .btn-icon { background: rgba(243,246,250,.06); color: var(--text-3); }
.form-success { display: none; padding: 28px; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: var(--brand-dim); color: var(--brand); font-weight: 600; text-align: center; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer-big {
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 48px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.footer-big a.footer-cta { font-size: clamp(2rem, 6vw, 4.4rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.045em; line-height: .95; text-decoration: none; transition: color .3s; }
.footer-big a.footer-cta:hover { color: var(--brand); }
.footer-big a.footer-cta span { color: var(--brand); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; }
.footer-links a, .f-privacy, .f-top {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--text-2); transition: color .25s;
}
.footer-links a:hover, .f-privacy:hover, .f-top:hover { color: var(--brand); }
.f-top svg { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.f-copy { font-size: .8rem; color: var(--text-3); }

/* ==========================================================================
   CASE STUDIES
   ========================================================================== */
#cs-hero { padding: calc(var(--nav-h) + clamp(48px, 8vw, 110px)) 0 0; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.cs-tag { border-color: rgba(0,235,255,.4); color: var(--brand); }
.cs-title { font-size: clamp(3.2rem, 12vw, 10rem); }
.cs-sub { margin-top: 26px; max-width: 720px; font-size: clamp(1.08rem, 1.7vw, 1.35rem); line-height: 1.55; color: var(--text-2); font-weight: 500; }
.cs-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cs-cover { width: 100%; margin-top: clamp(40px, 6vw, 72px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: var(--surface); }

#cs-overview { padding: clamp(80px, 11vw, 140px) 0 clamp(56px, 8vw, 100px); }
.cs-overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.cs-h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 26px; }
.cs-p { color: var(--text-2); font-size: 1.04rem; line-height: 1.8; margin-bottom: 14px; max-width: 760px; }
.cs-p:last-child { margin-bottom: 0; }
.cs-meta { display: grid; gap: 0; border-top: 1px solid var(--line); }
.cs-meta > .cs-meta-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.cs-meta-item .sec-label, .cs-meta-label { margin-bottom: 10px; font-size: .7rem; }
.cs-meta-label { display: block; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.cs-meta-value { font-weight: 600; line-height: 1.55; }
.cs-meta-item .cs-p { color: var(--text); font-weight: 600; font-size: 1rem; line-height: 1.55; }

.cs-block { margin-top: clamp(64px, 9vw, 112px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 20px clamp(32px, 5vw, 80px); align-items: start; }
.cs-block > .sec-label {
  font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: -.02em; color: var(--brand); text-transform: uppercase; line-height: 1.15; align-items: baseline;
}
.cs-block > .sec-label::before { transform: translateY(-.15em); }
.cs-block > :not(.sec-label) { grid-column: 2; }
.cs-list { list-style: none; display: grid; gap: 14px; max-width: 760px; }
.cs-list li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 1.02rem; line-height: 1.75; }
.cs-list li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--brand); }
.cs-list-num { counter-reset: n; }
.cs-list-num li { padding-left: 52px; }
.cs-list-num li::before {
  counter-increment: n; content: counter(n, decimal-leading-zero); top: .2em; left: 0; width: auto; height: auto; border: 0;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--brand);
}
.rf-decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rf-decisions .cs-meta-item { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rf-number { font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--brand); }
.rf-heading { margin: 14px 0 10px; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.rf-decisions .cs-p { font-size: .98rem; color: var(--text-2); font-weight: 400; line-height: 1.7; }

#cs-gallery, .cs-demos { padding: 0 0 clamp(72px, 10vw, 120px); }
#cs-gallery > .wrap > .sec-label, .cs-demos > .wrap > .sec-label { margin-bottom: 28px; }
.cs-gallery-list { display: grid; gap: clamp(14px, 2vw, 24px); }
.cs-gallery-list img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.cs-demo { margin: 0 0 40px; }
.cs-demo figcaption { margin-bottom: 14px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.cs-demo video { width: 100%; max-height: 82vh; border-radius: var(--radius); border: 1px solid var(--line); background: #000; }
.cs-demo-mobile video, .cs-demo-portrait video { width: auto; margin: 0 auto; }
.cs-prototype { padding: 0 0 clamp(72px, 10vw, 120px); text-align: center; }

.cs-next { border-top: 1px solid var(--line); }
.cs-next a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: clamp(56px, 9vw, 110px) 0; text-decoration: none;
}
.cs-next-name { display: block; margin-top: 14px; font-size: clamp(2.6rem, 9vw, 7.5rem); transition: color .35s; }
.cs-next .proj-arrow { position: static; width: clamp(56px, 8vw, 96px); height: clamp(56px, 8vw, 96px); }
.cs-next .proj-arrow svg { width: 40%; height: 40%; }
.cs-next a:hover .cs-next-name { color: var(--brand); }
.cs-next a:hover .proj-arrow { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); transform: rotate(-45deg); }

.cs-cta { padding: 0 0 clamp(72px, 10vw, 120px); }
.cs-cta .ct-card { grid-template-columns: 1fr auto; align-items: end; }
.cs-cta .ct-title { margin-bottom: 12px; }
.cs-cta .ct-sub { margin-bottom: 0; }

/* ── Privacy ── */
.privacy-main { padding: calc(var(--nav-h) + clamp(48px, 8vw, 110px)) 0 clamp(72px, 10vw, 120px); }
.privacy-main .wrap { max-width: 980px; }
.privacy-main h1.cs-h2 { font-size: clamp(2.4rem, 7vw, 5rem); }
.privacy-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.privacy-section .sec-label { margin-bottom: 16px; color: var(--text); }
.privacy-link { color: var(--brand); font-weight: 600; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid, .skills-split { grid-template-columns: 1fr; }
  .cs-block { grid-template-columns: 1fr; }
  .cs-block > :not(.sec-label) { grid-column: auto; }
}
@media (max-width: 900px) {
  .ct-card, .cs-overview-grid, .cs-cta .ct-card { grid-template-columns: 1fr; }
  .hero-bottom { grid-template-columns: 1fr; }
  .xp-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto; display: none; flex-direction: column; gap: 0;
    padding: 12px var(--gutter) 28px; background: rgba(7,8,11,.96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 60px; padding: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
  .nav-links a:hover { background: none; color: var(--brand); }
  .nav-cta { display: none; }
}
@media (max-width: 700px) {
  :root { --nav-h: 68px; --radius: 18px; }
  .proj-grid { grid-template-columns: 1fr; }
  .rf-decisions { grid-template-columns: 1fr; }
  .hero { align-items: center; min-height: auto; padding-top: calc(var(--nav-h) + 40px); }
  .hero-orb { width: 120vw; right: -50vw; top: 30%; opacity: .8; }
  .display .indent { padding-left: 0; }
  .stat { min-height: 140px; }
  .nav-back span { display: none; }
  .nav-back { padding: 0 12px; }
  .btn, .btn-solid { white-space: normal; }
}
@media (max-width: 380px) {
  .lang-btn { min-width: 34px; padding: 0 6px; }
  .menu-toggle .label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
