/* ============================================================
   Yana Y. — Design portfolio
   Shared styles: tokens, layout grid, header/footer, components
   ============================================================ */

/* Self-hosted Inter (variable) — deterministic, no external CDN dependency */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable-Italic.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --ink: #0d0d0d;
  --muted: #8c8c8c;     /* labels, dates, secondary */
  --muted-2: #5f5f5f;   /* body secondary text */
  --line: #e7e7e7;      /* hairlines */
  --line-strong: #d7d7d7;
  --max: 2560px;                          /* full-bleed; only caps on huge displays */
  --pad: clamp(16px, 1.6vw, 36px);        /* small fluid side gutters, like AVERY */
  --sans: "Inter", "Inter Placeholder", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --label: 13px;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "cv11" 1, "ss01" 1;  /* Inter: single-story a fallback off, stylistic */
}

a { color: inherit; text-decoration: none; }

::selection { background: #111; color: #fff; }

/* ---------- Layout shell ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Magnetic cursor dot ---------- */
@media (hover: hover) and (pointer: fine) {
  body.has-fxdot, body.has-fxdot a, body.has-fxdot button { cursor: none; }
  .fxdot { position: fixed; z-index: 9999; width: 10px; height: 10px; border-radius: 50%; background: #0d0d0d;
    pointer-events: none; translate: -50% -50%; left: -20px; top: -20px;
    transition: width .22s ease, height .22s ease; mix-blend-mode: multiply; }
  .fxdot.is-link { width: 34px; height: 34px; background: rgba(13,13,13,.14); }
}
@media (hover: none), (pointer: coarse) { .fxdot { display: none; } }

/* ---------- Page transition — best-practice parallax reveal ----------
   Elements fade + rise from below one after another (staggered via JS, in DOM
   order starting with the heading). JS-gated via .rise, with a safety net that
   forces the final state, so content is never left invisible. */
@media (prefers-reduced-motion: no-preference) {
  main.wrap .rise { animation: pageRise .72s cubic-bezier(.22,.61,.36,1) both; will-change: transform, opacity; }
}
@keyframes pageRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* 12-column editorial grid: left label column + content */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 28px;
}

.section {
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
}

.section__label,
.eyebrow {
  grid-column: 1 / 4;
  font-size: 14px;
  line-height: 19px;
  font-weight: 500;
  color: rgb(115,115,115);
  letter-spacing: -0.01em;
}
.eyebrow { grid-column: auto; }

.section__body { grid-column: 4 / 13; }

/* shared case-study text styles */
.cs-body p { font-size: 15.5px; line-height: 1.6; letter-spacing: -0.012em; color: #1b1b1b; max-width: 62ch; margin: 0 0 14px; }
.cs-body p:last-child { margin-bottom: 0; }
.cs-list { list-style: none; padding: 0; margin: 0; max-width: 62ch; }
.cs-list li { padding: 11px 0; line-height: 1.55; border-top: 1px solid var(--line); font-size: 15px; }
.cs-list li:first-child { border-top: 0; }
.cs-list strong { font-weight: 600; }
.section__body--narrow { grid-column: 4 / 9; }

/* ---------- Project meta row (shared atomic component) ---------- */
.meta-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 28px;
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 26px;
  padding-bottom: 30px;
}
.meta-row__item:nth-child(1) { grid-column: 1 / 5; }
.meta-row__item:nth-child(2) { grid-column: 5 / 9; }
.meta-row__item:nth-child(3) { grid-column: 10 / 13; }
.meta-row__k { font-size: 15px; font-weight: 400; color: #5e5e5e; letter-spacing: -0.01em; margin-bottom: 8px; }
.meta-row__v { font-size: 15px; font-weight: 500; color: var(--ink); }
@media (max-width: 820px) {
  .meta-row__item:nth-child(1),
  .meta-row__item:nth-child(2),
  .meta-row__item:nth-child(3) { grid-column: 1 / -1; margin-bottom: 8px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  height: 58px;
  padding: 0 var(--pad);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand__name { font-size: 14px; font-weight: 500; letter-spacing: -0.015em; white-space: nowrap; }
.brand__sub { font-size: 13px; font-weight: 500; color: #6f6f6f; white-space: nowrap; margin-left: 26px; }

/* logo — YY badge flip (concept 01) */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: -0.06em; flex: none;
  perspective: 240px; overflow: hidden;
  transition: transform .5s cubic-bezier(.34,1.4,.5,1), border-radius .45s ease, background .35s ease;
}
.logo-mark b { display: inline-block; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.34,1.5,.5,1); }
.logo-mark b:last-child { margin-left: -0.5px; }
.brand:hover .logo-mark { transform: rotate(-9deg) scale(1.08); border-radius: 50%; background: #1a1a1a; }
.brand:hover .logo-mark b:first-child { transform: rotateY(360deg); }
.brand:hover .logo-mark b:last-child  { transform: rotateY(360deg); transition-delay: .09s; }
@media (prefers-reduced-motion: reduce) {
  .logo-mark, .logo-mark b { transition: none; }
  .brand:hover .logo-mark { transform: none; border-radius: 8px; }
  .brand:hover .logo-mark b { transform: none; }
}

.nav { display: flex; gap: 22px; }
.nav a {
  position: relative;
  font-size: 14px; font-weight: 500; color: #2b2b2b;
  transition: color .15s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s cubic-bezier(.22,.61,.36,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn .bars span { width: 18px; height: 1.5px; background: var(--ink); display: block; }

/* mobile dropdown */
.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  padding: 8px var(--pad) 20px;
}
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}
.mobile-nav a:first-child { border-top: 0; }
.mobile-nav.open { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--muted-2); }
.site-footer a:hover { color: var(--ink); }
.site-footer__right { color: var(--muted); font-size: 13px; }

/* Made in Framer badge */
.framer-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--ink);
  text-decoration: none; transition: box-shadow .15s;
}
.framer-badge:hover { box-shadow: 0 2px 8px rgba(0,0,0,.10); color: var(--ink); }
.framer-badge svg { flex: none; }

/* Footer badges group */
.footer-badges { display: flex; align-items: center; gap: 8px; }
.footer-badges__label { font-size: 13px; color: var(--muted-2); margin-right: 2px; }

/* Individual tool icon badges */
.tool-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff;
  text-decoration: none; transition: box-shadow .15s; line-height: 0;
  color: var(--ink);
}
.tool-badge:hover { box-shadow: 0 2px 8px rgba(0,0,0,.10); color: var(--ink); }
.tool-badge svg { flex: none; display: block; }

/* available-for-work badge */
.avail { display: inline-flex; align-items: center; gap: 9px; color: var(--muted-2); font-size: 13px; }
.avail i { width: 8px; height: 8px; border-radius: 50%; background: #25a85e; display: block; flex: none; box-shadow: 0 0 0 0 rgba(37,168,94,.55); }
@media (prefers-reduced-motion: no-preference) {
  .avail i { animation: availPulse 1.9s cubic-bezier(.4,0,.2,1) infinite; }
}
@keyframes availPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,168,94,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(37,168,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,168,94,0); }
}

/* ---------- Type ---------- */
.display {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(48px, 6vw, 82px);
}
.display sup {
  font-size: 0.26em;
  vertical-align: super;
  letter-spacing: 0;
  color: var(--ink);
  top: -0.2em;
  position: relative;
}
.lead {
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 58px;
  font-size: 48px;
  color: rgb(13, 13, 13);
}

/* unified big page title (home heading, About, Articles) */
.page-title {
  margin: 0;
  font-weight: 500;
  font-size: 65px;
  line-height: 69px;
  letter-spacing: -0.022em;
  color: rgb(13, 13, 13);
}

/* ---------- Placeholder media ---------- */
.ph {
  position: relative;
  background-color: #f3f3f3;
  background-image: repeating-linear-gradient(
    135deg, #efefef 0, #efefef 11px, #f6f6f6 11px, #f6f6f6 22px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a4a4a4;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.ph span {
  background: rgba(255,255,255,0.7);
  padding: 4px 9px;
  border-radius: 3px;
}

/* round avatar — real portrait from the reference, gradient fallback */
.avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background-image: url("https://framerusercontent.com/images/V2JnYUUMeTwmER1TxlkFfq3Bo.png?width=950&height=950"), linear-gradient(135deg, #cfcfcf, #9a9a9a);
  background-size: cover; background-position: center;
  flex: none;
}

/* generic link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted-2);
}
.link-arrow:hover { color: var(--ink); }
.link-arrow svg { width: 13px; height: 13px; }

/* row list (articles / works links) */
.rowlist { border-top: 1px solid var(--line); }
.rowlist a, .rowlist .row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.rowlist a:hover .rowlist__title { opacity: .55; }
.rowlist__title { transition: opacity .15s ease; font-weight: 500; }
.rowlist__date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* right-side meta group + in-progress status (shared) */
.rowlist__meta { display: flex; align-items: center; gap: 16px; }
.row-status {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border: 0; border-radius: 6px;
  background: #efefef; color: #6e6e6e;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap;
}
.row-status i { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .row-status i { animation: statusPulse 1.9s cubic-bezier(.4,0,.2,1) infinite; }
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(163,163,163,.5); }
  70% { box-shadow: 0 0 0 6px rgba(163,163,163,0); }
  100% { box-shadow: 0 0 0 0 rgba(163,163,163,0); }
}
@media (max-width: 600px) {
  .row-status { display: none; }
}

@media (max-width: 1100px) {
  .section__body--narrow { grid-column: 4 / 11; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .brand__sub { display: none; }
  .grid { grid-template-columns: 1fr; row-gap: 18px; }
  .section { padding: 22px 0 44px; }
  .section__label { grid-column: auto; }
  .section__body, .section__body--narrow { grid-column: auto; }
}
