/* =========================================================
   Portfolio — style.css
   Edit colors and fonts in the :root block below.
   ========================================================= */

:root {
  --bg: #070d11;
  --bg-2: #0d161c;
  --fg: #eaf6f9;
  --muted: #84a0aa;
  --line: rgba(234, 246, 249, .13);
  --accent: #22d3ee;
  --accent-ink: #04141a;

  --font-display: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --pad: clamp(20px, 4vw, 56px);
}

[data-theme="light"] {
  --bg: #eef7f9;
  --bg-2: #e0eef2;
  --fg: #08171c;
  --muted: #55717a;
  --line: rgba(8, 23, 28, .14);
  --accent: #0e7490;
  --accent-ink: #ffffff;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s, color .5s;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

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

.container { padding-inline: var(--pad); max-width: 1600px; margin-inline: auto; }
.section { padding: clamp(80px, 14vh, 180px) 0; position: relative; }
.section__head { margin-bottom: clamp(40px, 8vh, 90px); }
.label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 7rem);
  line-height: .98;
  letter-spacing: -.03em;
}

/* Film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 9998;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
[data-theme="light"] body::after { opacity: .05; }
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Text mask reveal + fade-in reveals ---------- */
.line {
  display: block;
  overflow: hidden;
  padding: .06em 0 .12em;
  margin: -.06em 0 -.12em;
}
.inner { display: block; }

.js .split .inner { transform: translateY(110%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * .1s); }
.js .split.in .inner { transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  transition: transform 1s var(--ease-io), border-radius 1s var(--ease-io);
}
.loader.is-done {
  transform: translateY(-100%);
  border-radius: 0 0 50% 50% / 0 0 14vh 14vh;
}
.loader__top {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.loader__count {
  align-self: flex-end;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 20rem);
  line-height: .8;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.loader__count sup { font-size: .25em; color: var(--accent); vertical-align: top; margin-left: .1em; }
.loader__bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 4px; width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Page-transition curtain ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  transform: translateY(100%);
  pointer-events: none;
}
.curtain__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 10rem);
  letter-spacing: -.04em;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 101;
}

/* ---------- Cursor ---------- */
.cursor-dot, .cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring {
    display: block;
    position: fixed;
    left: 0; top: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity .3s;
  }
  html.has-cursor.cursor-on .cursor-dot,
  html.has-cursor.cursor-on .cursor-ring { opacity: 1; }
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}
.cursor-dot {
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent);
}
.cursor-ring {
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, opacity .3s !important;
}
.cursor-ring span {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity .25s;
}
.cursor-ring.is-link { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.cursor-ring.is-label { width: 100px; height: 100px; margin: -50px 0 0 -50px; background: var(--accent); }
.cursor-ring.is-label span { opacity: 1; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem var(--pad);
  color: #fff;
  mix-blend-mode: difference;
  transition: transform .7s var(--ease);
}
.js .header { opacity: 0; }
.is-ready .header { opacity: 1; transition: opacity 1s .5s, transform .7s var(--ease); }
.header.is-hidden { transform: translateY(-110%); }

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.logo sup { font-size: .55em; margin-left: .15em; }

.nav { display: flex; gap: 2.2rem; }
.nav a {
  position: relative;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .3rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header__right { display: flex; align-items: center; gap: 1.2rem; }
.clock { font-size: .8rem; letter-spacing: .1em; font-variant-numeric: tabular-nums; opacity: .8; }

.theme-toggle { width: 30px; height: 30px; display: grid; place-items: center; }
.theme-toggle span {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform .7s var(--ease);
}
.theme-toggle:hover span { transform: rotate(180deg); }
[data-theme="light"] .theme-toggle span { transform: rotate(180deg); }
[data-theme="light"] .theme-toggle:hover span { transform: rotate(360deg); }

.menu-btn { display: none; width: 44px; height: 44px; position: relative; }
.menu-btn span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: currentColor;
  transition: transform .5s var(--ease);
}
.menu-btn span:nth-child(1) { top: 17px; }
.menu-btn span:nth-child(2) { top: 25px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: var(--pad);
  clip-path: circle(0 at calc(100% - 44px) 44px);
  visibility: hidden;
  transition: clip-path .9s var(--ease-io), visibility 0s .9s;
}
.menu-open .menu {
  clip-path: circle(160% at calc(100% - 44px) 44px);
  visibility: visible;
  transition: clip-path .9s var(--ease-io), visibility 0s;
}
.menu nav { display: flex; flex-direction: column; }
.menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 6rem);
  letter-spacing: -.03em;
  line-height: 1.1;
}
.menu__num { font-family: var(--font-body); font-size: .9rem; font-weight: 500; letter-spacing: .1em; }
.menu__text { display: block; transform: translateY(110%); transition: transform .8s var(--ease); }
.menu-open .menu__text { transform: none; transition-delay: calc(.35s + var(--i, 0) * .07s); }
.menu__foot { font-size: .9rem; letter-spacing: .08em; }
.menu-open .header { mix-blend-mode: normal; color: var(--accent-ink); transform: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1em 1.6em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition: color .4s var(--ease), transform .4s var(--ease), border-color .4s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translateY(101%);
  transition: transform .55s var(--ease), border-radius .55s var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover i { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--pad) + 5rem) 0 var(--pad);
}
.glow {
  position: absolute;
  left: 0; top: 0;
  width: 60vmax; height: 60vmax;
  margin: -30vmax 0 0 -30vmax;
  background: radial-gradient(closest-side, var(--accent), transparent);
  opacity: .13;
  filter: blur(40px);
  pointer-events: none;
  will-change: transform;
}
.hero__inner { position: relative; width: 100%; will-change: transform, opacity; }
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 2rem;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 12vw, 12.5rem);
  line-height: .92;
  letter-spacing: -.04em;
}
.js .hero-title .inner { transform: translateY(110%); }
.is-ready .hero-title .inner {
  transform: none;
  transition: transform 1.3s var(--ease);
  transition-delay: calc(var(--i, 0) * .11s + .1s);
}

.js .hero-fade { opacity: 0; transform: translateY(24px); }
.is-ready .hero-fade {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(.7s + var(--d, 0) * .12s);
}

.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: clamp(2rem, 6vh, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero__desc { max-width: 34rem; font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--muted); }
.hero__desc strong { color: var(--fg); font-weight: 500; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }

.badge { position: relative; width: 120px; height: 120px; color: var(--fg); }
.badge svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge text { fill: currentColor; font-size: 15px; font-weight: 600; letter-spacing: .04em; font-family: var(--font-body); }
.badge__arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--accent);
  animation: bob 1.8s var(--ease-io) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(5px); } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--line);
  padding: 1.4rem 0;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__group { display: inline-flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem; flex-shrink: 0; }
.marquee__item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.marquee__sep { color: var(--accent); font-size: 1.4rem; }
.marquee--big { border: 0; padding: clamp(40px, 8vh, 90px) 0 clamp(30px, 6vh, 60px); }
.marquee--big .marquee__item {
  font-size: clamp(4rem, 13vw, 13rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}
.marquee--big .marquee__item.is-fill { color: var(--fg); -webkit-text-stroke: 0; }
.marquee--big .marquee__sep { font-size: clamp(2rem, 6vw, 5rem); }

/* ---------- Projects ---------- */
.projects { border-bottom: 1px solid var(--line); }
.project {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto 72px 48px;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3.2vw, 2.6rem) 0;
  border-top: 1px solid var(--line);
}
.project > * { transition: opacity .4s var(--ease), transform .7s var(--ease), background .4s, border-color .4s; }
.projects:hover .project > * { opacity: .3; }
.projects:hover .project:hover > * { opacity: 1; }

.project__num { font-size: .9rem; color: var(--muted); letter-spacing: .1em; }
.project__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 4.6rem);
  letter-spacing: -.03em;
  line-height: 1;
}
.project:hover .project__title { transform: translateX(clamp(8px, 1.6vw, 26px)); }
.project__tags, .project__year { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.project__arrow {
  width: 48px; height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.project:hover .project__arrow { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(45deg); }

/* Floating preview that follows the cursor */
.preview {
  display: none;
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  width: clamp(220px, 26vw, 400px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) { .preview { display: block; } }
.preview__card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
  color: #0b0b0c;
  background: linear-gradient(135deg, var(--c1, #22d3ee), var(--c2, #0ea5e9));
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
  transform: translate(-50%, -50%) scale(.5);
  opacity: 0;
  transition: transform .6s var(--ease), opacity .35s;
}
.preview__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 28px);
  pointer-events: none;
}
.preview.on .preview__card { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.preview__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 9vw, 8rem); line-height: .8; letter-spacing: -.05em; }
.preview__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; position: relative; z-index: 1; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(120px, 1fr) 4fr; gap: 2rem; }
.about .label { margin-bottom: 0; padding-top: .8rem; }
.about__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.about__text .w { opacity: .14; }
.stats {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: clamp(40px, 8vh, 90px);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.stat__plus { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 3.5rem); color: var(--accent); vertical-align: top; }
.stat p { color: var(--muted); font-size: .9rem; margin-top: .6rem; }

/* ---------- Services ---------- */
.service {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 72px 1fr 1.2fr 48px;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 2.6vw, 2.2rem) 0;
  border-top: 1px solid var(--line);
  transition: color .5s;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -1);
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .55s var(--ease-io);
  z-index: -1;
}
.service:hover { color: var(--accent-ink); }
.service:hover::before { transform: scaleY(1); }
.service__num { font-size: .9rem; letter-spacing: .1em; color: var(--muted); transition: color .4s; }
.service h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 3rem); letter-spacing: -.03em; line-height: 1.05; }
.service p { color: var(--muted); max-width: 32rem; transition: color .4s; }
.service:hover .service__num, .service:hover p { color: inherit; }
.service__arrow { font-size: 1.4rem; justify-self: end; transition: transform .5s var(--ease); }
.service:hover .service__arrow { transform: rotate(45deg); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 0; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 11rem);
  line-height: .92;
  letter-spacing: -.04em;
}
.contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(40px, 8vh, 90px);
}
.contact__mail {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 3.4rem);
  letter-spacing: -.02em;
  transition: color .4s, transform .4s var(--ease);
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: -.1em;
  width: 100%; height: 2px;
  background: var(--accent);
}
.contact__mail:hover { color: var(--accent); }
.contact__btn {
  display: grid;
  place-items: center;
  width: clamp(130px, 14vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.3;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.contact__btn:hover { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 25%, transparent); }
.socials { display: flex; flex-wrap: wrap; gap: .8rem 2.2rem; margin-top: clamp(40px, 8vh, 80px); }
.socials a {
  position: relative;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding-bottom: .2rem;
}
.socials a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }
.socials a:hover { color: var(--accent); }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.6rem 2rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
}
.footer a:hover { color: var(--accent); }
.footer__clock { font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .clock { display: none; }
  .badge { display: none; }
  .project { grid-template-columns: 40px 1fr 44px; gap: 1rem; }
  .project__tags, .project__year { display: none; }
  .project__arrow { width: 44px; height: 44px; }
  .about { grid-template-columns: 1fr; }
  .stats { grid-column: 1; grid-template-columns: 1fr; gap: 1.6rem; }
  .service { grid-template-columns: 40px 1fr 32px; }
  .service p { display: none; }
  body::after { animation: none; }
}

/* ---------- Failsafe (if JS fails to start) ---------- */
.is-failsafe .reveal, .is-failsafe .hero-fade, .is-failsafe .header { opacity: 1 !important; transform: none !important; }
.is-failsafe .inner { transform: none !important; }
.is-failsafe .loader { display: none; }
.is-failsafe body { overflow: auto !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero-fade { opacity: 1; transform: none; }
  .js .split .inner, .js .hero-title .inner { transform: none; }
}

/* ---------- Mobile polish ---------- */
@media (max-width: 800px) {
  :root { --pad: 20px; }
  .hero { padding: 6.5rem 0 1.6rem; min-height: 100svh; }
  .hero-title { font-size: clamp(2.9rem, 14.5vw, 5rem); line-height: .95; }
  .hero__tag { font-size: .7rem; letter-spacing: .1em; margin-bottom: 1.4rem; }
  .hero__bottom { gap: 1.4rem; margin-top: 1.8rem; padding-top: 1.4rem; }
  .hero__desc { font-size: 1rem; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; justify-content: center; padding: 1em .8em; }
  .section { padding: 72px 0; }
  .section__head { margin-bottom: 36px; }
  .h2 { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .marquee { padding: 1rem 0; }
  .marquee__item { font-size: 1.7rem; }
  .marquee--big .marquee__item { font-size: 4.2rem; }
  .project { padding: 1.3rem 0; }
  .project__title { font-size: clamp(1.7rem, 8vw, 2.6rem); }
  .about__text { font-size: clamp(1.45rem, 6.4vw, 2rem); }
  .stats { margin-top: 40px; }
  .stat { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 .6rem; }
  .stat p { grid-column: 1 / -1; }
  .service { padding: 1.3rem 0; }
  .service h3 { font-size: clamp(1.4rem, 7vw, 2rem); }
  .service:active { color: var(--accent-ink); }
  .service:active::before { transform: scaleY(1); }
  .contact__title { font-size: clamp(2.8rem, 15vw, 5rem); }
  .contact__row { margin-top: 36px; }
  .contact__mail { font-size: clamp(1.15rem, 6vw, 1.7rem); word-break: break-all; }
  .contact__btn { width: 120px; }
  .socials { gap: .8rem 1.6rem; margin-top: 36px; }
  .footer { flex-direction: column; gap: .5rem; text-align: left; }
  .menu { height: 100dvh; }
  .loader__count { font-size: clamp(5rem, 32vw, 9rem); }
  .header { padding: .8rem var(--pad); }
  .curtain__label { font-size: clamp(2.4rem, 14vw, 5rem); }
}
@media (max-width: 380px) {
  .hero-title { font-size: 2.7rem; }
  .btn { font-size: .9rem; }
}

/* ---------- Office addresses ---------- */
.addr { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: clamp(32px, 6vh, 64px); }
.addr h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin-bottom: .5rem; font-weight: 600; }
.addr p { color: var(--muted); max-width: 26rem; }
.note { font-size: .8rem; color: var(--muted); max-width: 40rem; }
@media (max-width: 800px) { .addr { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---------- Portrait / About ---------- */
.about { display: block; }
.about__grid {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.about__grid .label { margin-bottom: 1.4rem; }
.portrait { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.portrait__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 28%, var(--bg-2)), var(--bg-2));
  border: 1px solid var(--line);
}
.portrait__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--fg) 6%, transparent) 0 1px, transparent 1px 30px);
  opacity: .6;
}
.portrait__ring {
  position: absolute;
  left: 50%; top: 46%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 28px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 0 64px color-mix(in srgb, var(--accent) 5%, transparent);
  animation: ring 5s ease-in-out infinite;
}
@keyframes ring { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.05); } }
.portrait__img {
  position: absolute;
  left: 50%; bottom: 0;
  width: 96%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35));
  will-change: transform;
}
.portrait__tag {
  position: absolute;
  left: -14px; bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .9rem 1.2rem;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5);
}
.portrait__tag strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.1; }
.portrait__tag span { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; opacity: .85; }
.about__grid .about__text { font-size: clamp(1.5rem, 2.8vw, 2.7rem); }
.about__facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.about__facts span {
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
}
@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { max-width: 420px; }
  .portrait__tag { left: 12px; bottom: 16px; padding: .7rem 1rem; }
  .portrait__tag strong { font-size: 1rem; }
  .about__grid .about__text { font-size: clamp(1.4rem, 6vw, 1.9rem); }
}

/* ---------- Loader logo ---------- */
.loader__logo {
  position: absolute;
  left: 50%; top: 46%;
  width: min(560px, 80vw);
  transform: translate(-50%, -50%);
  padding: clamp(14px, 2.6vw, 26px) clamp(16px, 3.4vw, 34px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  opacity: 0;
  animation: logoIn 1s var(--ease) .15s forwards;
}
.loader__logo img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
@keyframes logoIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 24px)) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
[data-theme="light"] .loader__logo { box-shadow: 0 24px 60px -24px rgba(8, 23, 28, .35), 0 0 0 1px var(--line); }

/* ---------- Hero spacing: no empty gap above the headline ---------- */
.hero { align-items: center; }
.hero__bottom { justify-content: space-between; }
@media (max-width: 800px) {
  .hero { min-height: 0; align-items: flex-start; padding: 6rem 0 2.4rem; }
  .loader__logo { top: 42%; border-radius: 16px; }
}

/* ---------- Full-screen logo loader ---------- */
.loader { background: #fff; color: #07161c; }
.loader__top { color: #5b7480; }
.loader__count { font-size: clamp(3rem, 9vw, 8rem); }
.loader__count sup { color: #0891b2; }
.loader__bar { background: #0891b2; }
.loader__logo {
  top: 50%;
  width: min(1240px, 92vw);
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none !important;
}
.loader__logo img { mix-blend-mode: multiply; }
.logo-stack { display: none; }
@media (max-width: 800px) {
  .loader__logo { top: 47%; width: 100%; padding: 0 20px; border-radius: 0; }
  .logo-wide { display: none; }
  .logo-stack { display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 4vh, 40px); }
  .logo-stack picture:first-child { width: min(58vw, 38vh); }
  .logo-stack picture:last-child { width: min(88vw, 70vh); }
  .loader__count { font-size: clamp(3rem, 16vw, 5.5rem); }
}
