/* ==========================================================================
   Barbi Braude: Digital Production
   Layout & motion based on "Personal Portfolio Website: Animations" (Dymas Alfin / Mikan Team)
   ========================================================================== */

:root {
  --bg: #FDFDFD;
  --bg-2: #F3F3F3;
  --surface: #FFFFFF;
  --ink: #0A0909;
  --ink-2: #2A2828;
  --muted: #707070;
  --muted-2: #A9A9A9;
  --line: #E7E7E7;
  --dark: #1E1D1D;
  --dark-2: #2A2929;
  --live: #22C55E;
  --accent: #9C6455;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --shadow-sm: 0 1px 2px rgba(10, 9, 9, .04), 0 6px 18px rgba(10, 9, 9, .06);
  --shadow-md: 0 2px 6px rgba(10, 9, 9, .04), 0 18px 40px rgba(10, 9, 9, .08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-loading, body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { display: none; }
.icon { width: 1.05em; height: 1.05em; flex: none; transition: transform .45s var(--ease); }
.icon--flip { transform: scaleX(-1); }

/* ---------- Atoms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon { transform: rotate(45deg); }
.btn--dark {
  background: var(--ink); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 24px -8px rgba(10, 9, 9, .55);
}
.btn--dark:hover { background: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 16px 30px -10px rgba(10, 9, 9, .6); }
.btn--light { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn--sm { padding: 12px 18px; font-size: 14px; }
.btn--lg { padding: 20px 30px; font-size: 17px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  min-height: 40px; font-size: 14px; font-weight: 600; line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s;
}
a.chip:hover, button.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.chip--dark { background: var(--ink); color: #fff; border-color: var(--ink); padding-left: 8px; }
.chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 14px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-md);
  font-size: 13.5px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.status-pill__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.status-pill__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--live); opacity: 0; animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.tags--lg li { font-size: 13px; padding: 8px 14px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; border-bottom: 1.5px solid currentColor; padding-bottom: 4px; }
.link-arrow:hover .icon { transform: rotate(45deg); }
.link-arrow--up .icon { transform: rotate(-45deg); }
.link-arrow--up:hover .icon { transform: rotate(-45deg) translate(2px, -2px); }

.round-btn {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: background-color .3s, color .3s, transform .35s var(--ease);
}
.round-btn:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: transform 1s var(--ease-io);
}
.loader__inner { display: flex; gap: .35em; font-family: var(--font-display); font-weight: 700; font-stretch: 112%; font-size: clamp(28px, 5vw, 64px); overflow: hidden; }
.loader__word { display: inline-block; transform: translateY(110%); animation: loaderWord .7s var(--ease) forwards; }
.loader__word:nth-child(2) { animation-delay: .15s; }
.loader__word:nth-child(3) { animation-delay: .3s; color: var(--muted-2); }
@keyframes loaderWord { to { transform: none; } }
.loader.is-done { transform: translateY(-100%); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; padding-block: 18px; transition: transform .6s var(--ease), padding .4s var(--ease); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(253, 253, 253, .78); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(10, 9, 9, .05);
  opacity: 0; transition: opacity .4s;
}
.site-header.is-scrolled { padding-block: 12px; }
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-110%); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav ul { display: flex; gap: clamp(20px, 4vw, 64px); }
.site-nav a { position: relative; font-size: 15px; font-weight: 600; }
.site-nav sup { font-size: 10px; font-weight: 500; color: var(--muted-2); margin-left: 2px; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); place-items: center; }
.menu-toggle__bars, .menu-toggle__bars::before { display: block; width: 18px; height: 1.8px; background: #fff; border-radius: 2px; transition: transform .4s var(--ease); }
.menu-toggle__bars { position: relative; transform: translateY(-3px); }
.menu-toggle__bars::before { content: ""; position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(-6px) rotate(-90deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: -2; display: flex; flex-direction: column; justify-content: center; gap: 40px;
  padding: 100px var(--gutter) 40px; background: var(--bg);
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io);
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu li { overflow: hidden; }
.mobile-menu a:not(.btn) { display: inline-block; font-family: var(--font-display); font-weight: 700; font-stretch: 112%; font-size: clamp(36px, 11vw, 56px); line-height: 1.1; text-transform: uppercase; transform: translateY(105%); transition: transform .7s var(--ease); }
.mobile-menu.is-open a:not(.btn) { transform: none; }
.mobile-menu li:nth-child(2) a { transition-delay: .05s; } .mobile-menu li:nth-child(3) a { transition-delay: .1s; }
.mobile-menu li:nth-child(4) a { transition-delay: .15s; } .mobile-menu li:nth-child(5) a { transition-delay: .2s; }
.mobile-menu sup { font-size: 14px; color: var(--muted-2); vertical-align: top; }
.mobile-menu .btn { align-self: flex-start; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero::after { /* soft floor so the portrait sits in the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(10, 9, 9, .025));
  pointer-events: none;
}
.hero__inner {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  min-height: 100svh; padding-top: 120px;
  --name-size: clamp(54px, 8.4vw, 150px);
}
.hero__name {
  position: relative; z-index: 1; width: 100%;
  display: flex; justify-content: center; gap: .22em;
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
  font-size: var(--name-size); line-height: .9; letter-spacing: .01em;
  white-space: nowrap;
}
.hero__word { display: inline-flex; }
.hero__word--outline { color: transparent; -webkit-text-stroke: max(1.5px, .018em) var(--ink); }
.hero__word--solid { color: var(--ink); text-shadow: 0 6px 18px rgba(10, 9, 9, .18); }
.char-wrap { display: inline-block; overflow: hidden; padding-block: .06em; margin-block: -.06em; }
.char { display: inline-block; will-change: transform; }
.js .char { transform: translateY(105%); }
.is-ready .char { transform: none; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 45ms + .1s); }

.hero__portrait {
  position: relative; z-index: 2; flex: none;
  height: min(calc(100svh - 120px - var(--name-size) * .62), 540px); min-height: 300px;
  aspect-ratio: 268 / 300; margin-top: calc(var(--name-size) * -.3);
}
.hero__portrait-frame {
  height: 100%; overflow: hidden; border-radius: 999px 999px 0 0;
  background: #ddd; box-shadow: 0 -20px 60px -20px rgba(10, 9, 9, .25);
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 20%; filter: grayscale(1) contrast(1.05); transform: scale(1.04); transition: filter .9s var(--ease), transform 1.4s var(--ease); }
.hero__portrait:hover img { filter: grayscale(0); transform: scale(1.08); }
.hero__sticker {
  position: absolute; top: 14%; right: -16%;
  padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md);
  font-size: 13px; font-weight: 700; line-height: 1.25; transform: rotate(8deg);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: rotate(4deg) translateY(-8px); } }
.js .hero__portrait { opacity: 0; transform: translateY(80px); }
.is-ready .hero__portrait { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .35s, transform 1.4s var(--ease) .35s; }

.hero__intro { position: absolute; left: var(--gutter); bottom: clamp(40px, 9vh, 90px); max-width: 330px; z-index: 3; }
.hero__role { font-family: var(--font-display); font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -.01em; line-height: 1.1; margin-bottom: 12px; }
.hero__text { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.hero__links { position: absolute; right: var(--gutter); bottom: clamp(40px, 9vh, 90px); display: grid; gap: 12px; justify-items: end; z-index: 3; }
.js [data-hero-fade] { opacity: 0; transform: translateY(24px); }
.is-ready [data-hero-fade] { opacity: 1; transform: none; transition: opacity 1s var(--ease) .8s, transform 1s var(--ease) .8s; }
.is-ready .hero__links[data-hero-fade] { transition-delay: .95s; }
.js .site-header { opacity: 0; transform: translateY(-20px); }
.is-ready .site-header { opacity: 1; transform: none; transition: opacity .8s var(--ease) .6s, transform .8s var(--ease) .6s, padding .4s var(--ease); }
.is-ready .site-header.is-hidden { transform: translateY(-110%); transition: transform .6s var(--ease); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(80px, 12vw, 160px); overflow: hidden; }
.section-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); padding-top: clamp(30px, 5vw, 70px); }
.section-head--center { justify-content: center; text-align: center; }
.section-head__ghost {
  position: absolute; top: 0; left: -.04em; z-index: 0;
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(64px, 12.5vw, 210px); line-height: .8; letter-spacing: .02em;
  color: rgba(10, 9, 9, .045); white-space: nowrap; pointer-events: none; user-select: none;
  transform: translateY(calc(var(--p, 0) * -40px));
}
.section-head--center .section-head__ghost { left: 50%; translate: -50% 0; }
.section-head__title {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(32px, 4.4vw, 60px); line-height: 1; letter-spacing: -.02em;
}
.section-head__title span { display: inline-block; color: #C9C9C9; transition: color .9s var(--ease); }
.section-head.is-in .section-head__title span { color: var(--ink); }
.section-head.is-in .section-head__title span + span { transition-delay: .25s; }
.section-head__meta { position: relative; z-index: 1; color: var(--muted); font-size: 15px; text-align: right; }

.js [data-reveal] { opacity: 0; transform: translateY(42px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .section-head[data-reveal] { opacity: 1; transform: none; }
.js .section-head[data-reveal] .section-head__ghost { opacity: 0; transition: opacity 1.4s var(--ease); }
.js .section-head.is-in .section-head__ghost { opacity: 1; }

/* ---------- About ---------- */
.about { background: var(--bg); }
.about__statement {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.6vw, 52px);
  line-height: 1.16; letter-spacing: -.02em; max-width: 34ch; margin-bottom: clamp(48px, 7vw, 96px);
}
.about__statement .w { opacity: .14; transition: opacity .25s linear; }
.about__statement .w.on { opacity: 1; }
.about__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__sign img { width: min(360px, 80%); margin-bottom: 36px; }
.about__stats { display: flex; gap: clamp(28px, 4vw, 56px); }
.about__stats dt { font-family: var(--font-display); font-weight: 700; font-stretch: 115%; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; }
.about__stats dd { color: var(--muted); font-size: 14px; margin-top: 6px; }
.about__body p { font-size: clamp(16px, 1.25vw, 18px); color: var(--ink-2); margin-bottom: 20px; }
.about__body .link-arrow { margin-top: 12px; }

.blocks { margin-top: clamp(64px, 9vw, 120px); 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); }
.blocks__track { display: flex; width: max-content; animation: marquee var(--dur, 50s) linear infinite; }
.blocks:hover .blocks__track { animation-play-state: paused; }
.blocks__item { flex: none; display: block; margin-right: 16px; border-radius: 16px; cursor: zoom-in; }
.blocks__item img { width: clamp(150px, 16vw, 230px); aspect-ratio: 1; object-fit: cover; border-radius: 16px; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.blocks__item:hover img, .blocks__item:focus-visible img { transform: translateY(-8px) rotate(-2deg); box-shadow: var(--shadow-md); }
.blocks:focus-within .blocks__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Work ---------- */
.work { background: var(--bg-2); }
.work__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.filters { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters__btn { padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background-color .3s, color .3s; }
.filters__btn:hover { color: var(--ink); }
.filters__btn.is-active { background: var(--ink); color: #fff; }

.work__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); }
@media (max-width: 1100px) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work-card { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.work-card.is-hidden { display: none; }
.work-card.is-fading { opacity: 0; transform: translateY(20px) scale(.98); }
.work-card__btn {
  display: block; width: 100%; text-align: left; padding: 10px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.work-card__btn:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.work-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: #F4F4F4; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.work-card[data-category="books"] .work-card__media img,
.work-card[data-category="reports"] .work-card__media img { object-fit: contain; padding: 7% 10%; filter: drop-shadow(0 18px 24px rgba(10, 9, 9, .22)); }
.work-card[data-category="web"] .work-card__media img { object-fit: contain; padding: 4%; }
.work-card__btn:hover .work-card__media img { transform: scale(1.05); }
.work-card__go {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%) scale(0); transition: transform .5s var(--ease);
}
.work-card__go .icon { width: 20px; height: 20px; }
.work-card__btn:hover .work-card__go { transform: translate(-50%, -50%) scale(1); }
.work-card__body { padding: 16px 8px 8px; }
.work-card__title { font-size: clamp(15px, 1.15vw, 17px); font-weight: 600; line-height: 1.35; margin-bottom: 12px; }

/* ---------- Services ---------- */
.services { background: var(--bg-2); padding-top: 0; }
.svc { border-top: 1px solid var(--line); }
.svc__item { border-bottom: 1px solid var(--line); border-radius: 0; transition: background-color .5s var(--ease), color .5s var(--ease), border-radius .5s var(--ease); }
.svc__head {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px;
  width: 100%; padding: clamp(22px, 2.6vw, 34px) clamp(8px, 1.4vw, 20px); text-align: left;
}
.svc__ghost {
  position: absolute; left: 56px; top: 50%; translate: 0 -50%;
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-size: clamp(40px, 7vw, 110px);
  color: rgba(10, 9, 9, .04); white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(30%); transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.svc__num { font-size: 13px; font-weight: 600; color: var(--muted-2); position: relative; }
.svc__title {
  position: relative; font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -.02em;
  transition: transform .6s var(--ease), color .3s;
}
.svc__icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; }
.svc__icon .icon { grid-area: 1 / 1; width: 28px; height: 28px; transition: transform .5s var(--ease), opacity .3s; }
.svc__icon .icon--close { opacity: 0; transform: rotate(-90deg); }
@media (hover: hover) {
  .svc__item:not(.is-open):hover { background: #EAEAEA; }
  .svc__item:not(.is-open):hover .svc__ghost { opacity: 1; transform: none; }
  .svc__item:not(.is-open):hover .svc__title { transform: translateX(14px); }
  .svc__item:not(.is-open):hover .icon--arrow { transform: rotate(45deg); }
}
.svc__item.is-open { background: var(--dark); color: #fff; border-radius: 16px; border-bottom-color: transparent; }
.svc__item.is-open .svc__num { color: rgba(255, 255, 255, .45); }
.svc__item.is-open .icon--arrow { opacity: 0; transform: rotate(90deg); }
.svc__item.is-open .icon--close { opacity: 1; transform: none; }
.svc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.svc__item.is-open .svc__panel { grid-template-rows: 1fr; }
.svc__panel-inner { overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; padding-inline: calc(56px + 16px + clamp(8px, 1.4vw, 20px)) clamp(8px, 1.4vw, 20px); }
.svc__panel p { max-width: 46ch; color: rgba(255, 255, 255, .72); font-size: clamp(15px, 1.2vw, 17px); padding-bottom: 32px; }
.svc__panel img {
  width: clamp(160px, 18vw, 240px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4); transform: rotate(6deg) translateY(30px); opacity: 0;
  transition: transform .9s var(--ease) .15s, opacity .6s var(--ease) .15s; background: #fff;
}
.svc__item.is-open .svc__panel img { transform: rotate(6deg); opacity: 1; }

/* ---------- Skills (dark) ---------- */
/* Scroll-linked fade into the dark section: --dark-p (0..1) is set by main.js */
.services::after, .testimonials::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: var(--dark); opacity: var(--dark-p, 0);
}
body.theme-dark .site-header::before { background: rgba(30, 29, 29, .8); border-bottom-color: rgba(255, 255, 255, .06); }
body.theme-dark .site-nav { color: #fff; }
.site-nav { transition: color .5s var(--ease); }
.skills { background: var(--dark); color: #F4F4F4; }
.skills .section-head__ghost { color: rgba(255, 255, 255, .045); }
.skills .section-head__title span { color: #4A4848; }
.skills .section-head.is-in .section-head__title span { color: #fff; }
.skills .section-head__meta { color: #A8A8A8; }
.roles { border-top: 1px solid rgba(255, 255, 255, .1); }
.roles__row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 2vw, 26px) 8px; border-bottom: 1px solid rgba(255, 255, 255, .1);
  transition: opacity .4s var(--ease), padding .5s var(--ease);
}
.roles__row h3 { font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.roles__row p { font-size: 14.5px; color: #9B9999; }
.roles__meta { font-size: 14px; color: #BDBBBB; white-space: nowrap; }
@media (hover: hover) {
  .roles:hover .roles__row:not(:hover) { opacity: .35; }
  .roles__row:hover { padding-left: 20px; }
}

/* ---------- Testimonials ---------- */
.testimonials { background: var(--bg); }
.quotes { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.quotes__people { position: relative; display: grid; gap: 10px; }
.person {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; text-align: left;
  border: 1px solid transparent; opacity: .5; transition: opacity .4s, background-color .4s, box-shadow .4s, border-color .4s;
}
.person:hover { opacity: .85; }
.person.is-active { opacity: 1; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-md); }
.person img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.person.is-active img { filter: none; }
.person strong { display: block; font-size: 15px; }
.person small { display: block; font-size: 13px; color: var(--muted); }
.quotes__progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 14px 14px 0; }
.quotes__progress span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.quotes__stage { position: relative; }
.quote[hidden] { display: none; }
.quote.is-active { animation: quoteIn .8s var(--ease) both; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(24px); } }
.quote__headline { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.2vw, 46px); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 28px; }
.quote__body p { color: var(--muted); font-size: clamp(15px, 1.2vw, 17px); margin-bottom: 14px; max-width: 64ch; }
.quote__cite { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.quote__cite strong { font-size: 16px; }
.quote__cite span { color: var(--muted); font-size: 14px; }
.quotes__controls { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.quotes__count { margin-right: auto; font-size: 14px; color: var(--muted); }
.quotes__count b { color: var(--ink); }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; background: #ECECEC; padding-top: clamp(100px, 14vw, 180px); }
.contact__clouds span {
  position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  animation: drift 26s ease-in-out infinite alternate;
}
.contact__clouds span:nth-child(1) { width: 60vw; height: 30vw; left: -15vw; top: -6vw; }
.contact__clouds span:nth-child(2) { width: 50vw; height: 26vw; right: -12vw; top: 10%; animation-duration: 32s; }
.contact__clouds span:nth-child(3) { width: 70vw; height: 34vw; left: 10vw; bottom: -14vw; animation-duration: 38s; }
.contact__clouds span:nth-child(4) { width: 34vw; height: 18vw; left: 40%; top: 30%; opacity: .7; animation-duration: 22s; }
@keyframes drift { to { transform: translate(6vw, 2vw) scale(1.08); } }
.contact__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: clamp(80px, 10vw, 140px); }
.contact__title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(40px, 7.4vw, 112px); line-height: .95; letter-spacing: -.025em; margin: 28px 0 22px; }
.contact__text { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); max-width: 52ch; margin-bottom: 34px; }
.contact__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: clamp(56px, 7vw, 88px); }
.contact__inner > [data-reveal]:nth-child(2) { --d: .08s; } .contact__inner > [data-reveal]:nth-child(3) { --d: .16s; }
.contact__inner > [data-reveal]:nth-child(4) { --d: .24s; } .contact__inner > [data-reveal]:nth-child(5) { --d: .32s; }
.site-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 28px; border-top: 1px solid rgba(10, 9, 9, .08); font-size: 14px; color: var(--muted); }
.site-footer__logo { width: 170px; }
.site-footer .link-arrow { color: var(--ink); }

/* ---------- Project overlay ---------- */
.project { position: fixed; inset: 0; z-index: 120; background: var(--bg-2); transform: translateY(100%); transition: transform .9s var(--ease-io); }
.project.is-open { transform: none; }
.project[hidden] { display: block; visibility: hidden; }
.project__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 100px; }
.project__top { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; position: sticky; top: 0; z-index: 2; }
.project__head { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding-block: clamp(32px, 6vw, 72px) 40px; }
.project__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 5.6vw, 80px); line-height: 1; letter-spacing: -.025em; margin: 22px 0 18px; }
.project__title small { font-family: var(--font-body); font-size: clamp(15px, 1.4vw, 19px); font-weight: 500; color: var(--muted); letter-spacing: 0; vertical-align: middle; }
.project__desc { color: var(--muted); max-width: 56ch; font-size: clamp(15px, 1.2vw, 17px); margin-bottom: 26px; }
.project__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.project__meta { display: grid; gap: 22px; text-align: right; min-width: 220px; }
.project__meta dt { font-size: 12.5px; color: var(--muted-2); margin-bottom: 4px; }
.project__meta dd { font-weight: 600; font-size: 17px; max-width: 28ch; margin-left: auto; }
.project__media img { width: 100%; max-height: 82vh; object-fit: contain; background: var(--surface); border-radius: 20px; padding: clamp(12px, 3vw, 48px); box-shadow: var(--shadow-sm); }
.project__more { padding-top: clamp(64px, 9vw, 120px); }
.project__more-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3.6vw, 48px); text-transform: uppercase; text-align: center; letter-spacing: -.02em; margin-bottom: 36px; }
.project .js [data-reveal], .project [data-reveal] { opacity: 1; transform: none; }
.project.is-open .project__head > *, .project.is-open .project__media { animation: quoteIn 1s var(--ease) both .35s; }
.project.is-open .project__media { animation-delay: .5s; }

/* ---------- Location + read badge ---------- */
.hero__loc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.hero__loc-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }
.work-card { position: relative; }
.work-card__read {
  position: absolute; top: 24px; right: 24px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 18px -6px rgba(10, 9, 9, .5); transition: transform .35s var(--ease), background-color .3s;
}
.work-card__read .icon { width: 14px; height: 14px; }
.work-card__read:hover { transform: translateY(-2px); background: #000; }

/* ---------- Book reader (built-in PDF viewer) ---------- */
.reader {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  padding: clamp(12px, 2.5vw, 32px); background: rgba(14, 13, 13, .88); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.reader[hidden] { display: none; }
.reader.is-open { opacity: 1; }
.reader__panel {
  display: grid; grid-template-rows: auto 1fr; width: min(1280px, 100%); height: 100%;
  background: #1E1D1D; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 100px rgba(0, 0, 0, .55);
  transform: translateY(24px) scale(.98); transition: transform .5s var(--ease);
}
.reader.is-open .reader__panel { transform: none; }
.reader__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 22px; color: #EDEBEA; }
.reader__info { min-width: 0; }
.reader__kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8F8B88; }
.reader__info strong { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader__tools { display: flex; gap: 6px; flex: none; }
.reader__tool { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #EDEBEA; transition: background-color .3s; }
.reader__tool:hover { background: rgba(255, 255, 255, .18); }
.reader__tool--close { background: #fff; color: var(--ink); margin-left: 4px; }
.reader__tool--close:hover { background: #E6E3E0; }
.reader__frame { width: 100%; height: 100%; border: 0; background: #525659; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 160; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(8px, 2vw, 24px);
  padding: clamp(16px, 4vw, 48px); background: rgba(14, 13, 13, .92); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure { display: grid; justify-items: center; gap: 14px; min-width: 0; }
.lightbox__figure img {
  width: auto; height: auto; max-width: min(100%, 833px); max-height: calc(100svh - 150px); /* never upscale past the original */
  border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); cursor: zoom-out;
  transform: scale(.94); opacity: 0; transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.lightbox.is-open .lightbox__figure img.is-loaded { transform: none; opacity: 1; }
.lightbox__caption { display: flex; gap: 14px; align-items: baseline; color: #EDEBEA; font-size: 15px; font-weight: 600; }
.lightbox__count { color: #8F8B88; font-size: 13px; font-variant-numeric: tabular-nums; }
.lightbox .round-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.lightbox .round-btn:hover { background: #fff; color: var(--ink); }
.lightbox__close { position: absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); }
@media (max-width: 860px) {
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding-top: 72px; }
  .lightbox__figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox__nav--prev { grid-row: 2; justify-self: end; }
  .lightbox__nav--next { grid-row: 2; justify-self: start; }
  .lightbox__figure img { max-height: calc(100svh - 200px); }
}

/* ---------- Floating preview ---------- */
.float-img {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 230px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .3);
  opacity: 0; scale: .4; transition: opacity .35s var(--ease), scale .45s var(--ease);
}
.float-img.is-on { opacity: 1; scale: 1; }
.float-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .site-nav ul { gap: 24px; }
}
@media (max-width: 860px) {
  .site-nav, .site-header__cta { display: none; }
  .menu-toggle { display: grid; }

  .hero__inner { padding-top: 110px; min-height: auto; justify-content: flex-start; --name-size: 15.6vw; }
  .hero__name { flex-direction: column; align-items: center; gap: 0; line-height: .92; }
  .hero__portrait { height: auto; min-height: 0; width: min(70vw, 320px); margin-top: calc(var(--name-size) * -.18); }
  .hero__sticker { right: -12%; top: 8%; }
  .hero__intro { position: static; max-width: 420px; text-align: center; padding: 36px 0 16px; }
  .hero__intro .btn { margin-inline: auto; }
  .hero__links { position: static; display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 56px; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head--center { align-items: center; }
  .section-head__meta { text-align: left; }
  .about__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .work__bar { flex-direction: column; align-items: stretch; }
  .work__bar .btn { align-self: flex-start; }

  .svc__head { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .svc__ghost { left: 34px; }
  .svc__panel-inner { grid-template-columns: 1fr; padding-inline: clamp(8px, 1.4vw, 20px); gap: 0; }
  .svc__panel p { padding-bottom: 20px; }
  .svc__panel img { width: 70%; justify-self: end; }

  .roles__row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .quotes { grid-template-columns: 1fr; }
  .quotes__people { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .quotes__progress { grid-column: 1 / -1; grid-row: 2; }

  .project__head { grid-template-columns: 1fr; }
  .project__meta { text-align: left; grid-template-columns: 1fr 1fr; }
  .project__meta dd { margin-left: 0; }
  .site-footer { justify-content: center; text-align: center; }
  .float-img { display: none; }
}
@media (max-width: 480px) {
  .status-pill { font-size: 12.5px; padding: 9px 13px 9px 12px; }
  .hero__sticker { display: none; }
  .btn--lg { padding: 18px 22px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
