/* ==========================================================================
   layout.css — header, social rail, hero, sections, about, footer
   ========================================================================== */

/* ---------- Sticky header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: 575ms all ease-in-out; /* thmbtng: transition:.5s all ease-in-out */
}
/* Blur layer so we can fade blur smoothly without re-painting text */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-80);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 575ms ease-in-out; /* thmbtng literal */
  pointer-events: none;
}
.site-header.is-scrolled::before { opacity: 1; }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: var(--header-h);
  transition: height 575ms ease-in-out; /* thmbtng literal */
}
.site-header.is-scrolled .site-header__inner { height: var(--header-h-scrolled); }

.site-header__logo {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-header__mark {
  font-size: 1.25rem;
  padding: 0.1em 0.35em;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  transition: transform var(--dur-med) var(--ease-out);
}
.site-header__mark sup { font-size: 0.55em; font-weight: 500; }
.site-header__logo:hover .site-header__mark { transform: rotate(-4deg); }
.site-header__logo-img {
  height: 2.25rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  align-self: center;
  transition: transform var(--dur-med) var(--ease-out);
}
.site-header__logo:hover .site-header__logo-img { transform: rotate(-4deg); }
.site-header__name { font-size: 1rem; font-weight: 600; }

@media (max-width: 40em) {
  .site-header__name { display: none; }
  .site-nav__list { gap: var(--s-3); }
  .site-nav__link { font-size: 0.875rem; }
  .btn--cv { padding: 0.5rem 0.75rem; }
  .btn--cv-long { display: none; } /* button collapses to "CV" */
}

/* Nav */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-4), 3vw, var(--s-6));
}
.site-nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: var(--s-2);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease-out);
}
.site-nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(var(--s-6), 6vw, var(--s-9));
  align-items: center;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + var(--s-6));
  padding-bottom: var(--s-7);
}

.hero__intro { max-width: 34rem; }
.hero__intro .kicker { margin-bottom: var(--s-5); }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-5);
}

.hero__text {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--ink-70);
  max-width: 30rem;
  margin-bottom: var(--s-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.hero__carousel-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: var(--s-3);
  text-align: left;
}

@media (max-width: 54em) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-7);
    align-items: start;
    min-height: 0;
  }
  .hero__carousel-label { text-align: left; }
}

/* ---------- Hero X-ray asset (floria-style pop) ---------- */
.hero__carousel { position: relative; z-index: 1; }

.hero__asset {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 0;
  height: min(128vh, 80rem);
  aspect-ratio: 833 / 1080;
  transform: translate(32%, -50%);
  pointer-events: none;
}
.hero__asset img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
  transform: rotate(-2deg);
  transition:
    transform 800ms var(--ease-out),
    filter 800ms var(--ease-out);
}
.hero__asset img:hover {
  transform: scale(1.05) rotate(-3.5deg);
  filter: brightness(0.97) contrast(1.06);
}
@media (max-width: 64em) {
  .hero__asset { display: none; }
}

/* ---------- Sections ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  margin-bottom: var(--s-6);
}
.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head__note {
  font-size: 0.875rem;
  color: var(--ink-50);
  white-space: nowrap;
}

.work { padding-bottom: var(--s-9); }

/* ---------- About ---------- */
.about {
  position: relative;
  isolation: isolate; /* keeps the z-index:-1 background inside this section */
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(var(--s-6), 6vw, var(--s-9));
  align-items: start;
  padding-block: var(--s-9);
  border-top: 1px solid var(--line);
}

/* animo-style word reveal on the About headline: blur + rise per word,
   staggered via --d (copied from animo-lemon's tsWord recipe, ~15% slower) */
.ts-words .tsw {
  display: inline-block;
  opacity: 0;
}
@keyframes ts-word {
  from { opacity: 0; filter: blur(12px); transform: translateY(70px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
.ts-words.in .tsw {
  animation: ts-word 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 1s);
}
@media (prefers-reduced-motion: reduce) {
  .ts-words .tsw { opacity: 1; animation: none; }
}

/* Editable section background (image / GIF / video), full-bleed behind the
   content with a paper wash that stays lighter on the portrait side */
.about__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  overflow: hidden;
}
.about__bg img,
.about__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(244, 242, 237, 0.55), rgba(244, 242, 237, 0.88));
}

.about__portrait {
  position: sticky;
  top: calc(var(--header-h) + var(--s-6));
  border-radius: var(--radius);
  overflow: hidden;
  background: #e6e1d6;
}

.about__body .kicker { margin-bottom: var(--s-4); }

.about__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
}

.about__text {
  color: var(--ink-70);
  max-width: 34rem;
  margin-bottom: var(--s-7);
}

.about__lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
}
.about__list dt {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.about__list dd {
  padding-block: var(--s-1);
  font-size: 0.9375rem;
}

@media (max-width: 54em) {
  .about { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 24rem; }
}
@media (max-width: 34em) {
  .about__lists { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-8) var(--s-5);
  background: var(--ink);
  color: var(--paper);
}
.footer .kicker { color: rgba(244, 242, 237, 0.55); margin-bottom: var(--s-4); }

.footer__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-6);
}

.footer__email { margin-bottom: var(--s-7); }
.footer__email a {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 0.15em;
  transition:
    color var(--dur-fast) var(--ease-out),
    background-size var(--dur-med) var(--ease-out);
}
.footer__email a:hover { color: var(--accent); background-size: 35% 1px; }

.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin-bottom: var(--s-8);
}
.footer__socials a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(244, 242, 237, 0.75);
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__socials a span { transition: transform var(--dur-fast) var(--ease-out); }
.footer__socials a:hover { color: var(--paper); }
.footer__socials a:hover span { transform: translate(2px, -2px); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(244, 242, 237, 0.16);
  font-size: 0.8125rem;
  color: rgba(244, 242, 237, 0.55);
}
.footer__top { transition: color var(--dur-fast) var(--ease-out); }
.footer__top:hover { color: var(--paper); }

/* ---------- Load choreography (JS-gated, replaces generic reveal on hero) ---------- */
html.js .hero__intro > *:not(.hero__title) {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 920ms var(--ease-out),
    transform 920ms var(--ease-out);
}
html.js.is-loaded .hero__intro > *:not(.hero__title) {
  opacity: 1;
  transform: none;
}
html.js .hero__intro .kicker { transition-delay: 60ms; }
html.js .hero__intro .hero__text { transition-delay: 420ms; }
html.js .hero__intro .hero__actions { transition-delay: 540ms; }

html.js .hero__carousel {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1035ms var(--ease-out) 300ms,
    transform 1035ms var(--ease-out) 300ms;
}
html.js.is-loaded .hero__carousel {
  opacity: 1;
  transform: none;
}

/* Hero asset entrance — floria's choreography: fade + scale 0.9→1 with a 5°
   settle spin, 1.5s-class ease, 300ms delay (durations ~15% slower per owner) */
html.js .hero__asset {
  opacity: 0;
  transform: translate(32%, -50%) scale(0.9) rotate(5deg);
  transition:
    opacity 1725ms cubic-bezier(0.16, 1, 0.3, 1) 300ms,
    transform 1725ms cubic-bezier(0.16, 1, 0.3, 1) 300ms;
}
html.js.is-loaded .hero__asset {
  opacity: 1;
  transform: translate(32%, -50%);
}

/* ---------- Social hover — brand color on hover (footer socials) ---------- */
.footer__socials li:nth-child(1) a:hover { color: #bb3693; } /* instagram */
.footer__socials li:nth-child(2) a:hover { color: #1769ff; } /* behance */
.footer__socials li:nth-child(3) a:hover { color: #0a66c2; } /* linkedin */
