/* ============================================================
   HOME  ·  Portfolio Iryna Nechytailo
   Topbar nav · hero · section headers · projects grid
   experience section · approach section · scroll hint
   ============================================================ */

/* ── TOPBAR: HOME NAV ───────────────────────────────────────── */
.brand {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  gap: 10px;
  align-items: center;
  transition: color var(--d-fast) var(--ease);
}
.brand__short { display: none; }

@media (max-width: 700px) {
  .brand__full  { display: none; }
  .brand__short { display: inline; }

  /* Project cards: vertical stack (override 900px grid) */
  .project {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none;
    gap: 16px;
    padding: 20px;
  }
  .project__thumb {
    width: 100% !important;
    aspect-ratio: 16 / 9;
  }
  .project__arrow {
    position: static;
    align-self: flex-end;
  }
}

.brand__dot {
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 999px;
  flex-shrink: 0;
}


/* ── SECTION HEADER ─────────────────────────────────────────── */
/* Two-column: left = label, right = tags */
.sec-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 14px;
  align-items: baseline;
}
.sec-head__label {
  font-family: var(--f-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.sec-head__tags {
  display: flex;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
  gap: 0;
}
.sec-head__tags span:not(:last-child)::after {
  content: " •";
  margin-right: 8px;
  color: var(--muted);
  opacity: 0.6;
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero { padding: 112px 0 96px; }

.hero__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.eyebrow {
  color: var(--muted);
}

.hero__intro {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}
.hero__intro strong { color: var(--ink); font-weight: 500; }

.hero__statement {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 22ch;
}
:root[data-type="serif-display"] .hero__statement {
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* Word-by-word reveal animation */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: rise calc(var(--d-slow) * 1.1) var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 0.08s + 0.05s);
}

.hero__meta {
  margin-top: 48px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fade-in var(--d-med) var(--ease) 0.6s forwards;
}
.hero__meta span {
  position: relative;
  padding-right: 28px;
}
.hero__meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 4px; height: 4px;
  background: var(--rule);
  border-radius: 999px;
  transform: translateY(-50%);
}

/* ── PROJECTS SECTION ───────────────────────────────────────── */
.projects-section { padding-bottom: 40px; }

/* ── PROJECTS GRID ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}

.project {
  background: var(--bg);
  padding: 28px 32px 32px;
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 28px;
  align-items: start;
  position: relative;
  transition:
    opacity    var(--d-fast) var(--ease),
    background var(--d-fast) var(--ease);
}
.project[aria-disabled="true"] { pointer-events: none; }

/* ─ Large hover preview ─ */
.project__preview {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  box-shadow: 0 24px 48px -16px rgba(21, 17, 12, 0.22);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity   var(--d-fast) var(--ease),
    transform var(--d-fast) var(--ease);
  z-index: 20;
}
.projects-grid:hover .project:hover .project__preview {
  opacity: 1;
  transform: none;
}

/* ─ Hover style: lift (default) ─ */
:root[data-hover="lift"] .project:hover .project__thumb {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -22px rgba(21, 17, 12, 0.30);
}

/* ─ Hover style: zoom ─ */
:root[data-hover="zoom"] .project:hover .project__thumb-img {
  transform: scale(1.06);
}

/* ─ Hover style: reveal ─ */
:root[data-hover="reveal"] .project__thumb-cover         { display: flex; }
:root[data-hover="reveal"] .project:hover .project__thumb-cover { transform: translateY(-101%); }

/* ─ Thumbnail ─ */
.project__thumb {
  width: 168px;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition:
    transform    var(--d-med) var(--ease),
    box-shadow   var(--d-med) var(--ease);
}
.project__thumb-img {
  position: absolute;
  inset: 0;
  transition: transform var(--d-med) var(--ease);
}
.project__thumb-cover {
  position: absolute;
  inset: 0;
  background: var(--bg-2);
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform var(--d-med) var(--ease-curtain);
}
.project__thumb-badge {
  position: absolute;
  left: 10px; bottom: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 8px;
  border-radius: 3px;
}

/* ─ Project meta ─ */
.project__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.project__eyebrow {
  color: var(--muted);
}
.project__eyebrow-dot {
  opacity: 0.6;
}
.project__eyebrow-dot::before {
  content: "•";
}
.project__title {
  font-size: 17px;
  line-height: 1.32;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 30ch;
}
:root[data-type="serif-display"] .project__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.015em;
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  gap: 0;
}
.project__tags span:not(:last-child)::after {
  content: " •";
  margin-right: 8px;
  color: var(--muted);
  opacity: 0.6;
}

/* ─ Arrow button ─ */
.project__arrow {
  position: absolute;
  top: 28px; right: 32px;
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all var(--d-fast) var(--ease);
}
.project:hover .project__arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: rotate(-45deg);
}

/* ── EXPERIENCE SECTION ─────────────────────────────────────── */
.experience { padding: 140px 0 0; }

/* Dark context: override tokens when experience is the mid-page beneath */
.beneath--experience {
  --ink:       #F5EFE2;
  --muted:     #BFBAB0;
  --rule:      rgba(245, 239, 226, 0.14);
  --rule-soft: rgba(245, 239, 226, 0.08);
  --bg:        #191B1C;
  --bg-2:      #1F2223;
  background:  #111313;
  color: #BFBAB0;
}
.beneath--experience .exp-case__media--studio { background: #1A1714; }

/* Footer inside experience section */
.exp-footer {
  margin-top: 64px;
  padding-bottom: 52px;
}

.exp-footer__behance {
  padding-bottom: 8px;
}
.exp-footer__behance a {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(245, 239, 226, 0.45);
  transition: color var(--d-fast) var(--ease);
}
.exp-footer__behance a:hover { color: #F5EFE2; }

.exp-footer__bar {
  margin-top: 8px;
  border-top: 1px solid rgba(245, 239, 226, 0.10);
  padding-top: 20px;
}

.exp-case {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}
.exp-case + .exp-case { margin-top: 96px; }

.exp-case__aside {
  position: sticky;
  top: 96px;
}
.exp-case__aside-label {
  color: var(--muted);
}
.exp-case__aside-num {
  font-family: var(--f-mono);
  font-size: 36px;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: -0.02em;
}

/* ─ Experience case media (placeholder art per project) ─ */
.exp-case__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.exp-case__media .media-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent 0 16px, rgba(21, 17, 12, 0.04) 16px 17px
  );
}
.exp-case__media .media-caption {
  position: absolute;
  left: 18px; bottom: 18px;
  color: var(--muted);
}

/* Placeholder variants — replace with real media when ready */
.exp-case__media--daw {
  background: #0F0F12;
}
.exp-case__media--daw .media-stripes {
  background-image: repeating-linear-gradient(
    0deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 18px 19px
  );
}
.exp-case__media--daw .media-caption { color: rgba(255, 255, 255, 0.5); }
.exp-case__media--daw { aspect-ratio: unset; height: auto; overflow: visible; }
.exp-case__media--daw img { width: 100%; height: auto; object-fit: unset; display: block; }

.exp-case__media--xstar {
  background: #191B1C;
  aspect-ratio: unset;
  height: auto;
  overflow: hidden;
}
.exp-case__media--xstar video {
  width: 100%;
  height: auto;
  display: block;
}

.exp-case__media--studio {
  background: var(--bg-2);
  aspect-ratio: unset;
  height: auto;
  overflow: hidden;
}
.exp-case__media--studio img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─ Experience case body ─ */
.exp-case__body { margin-top: 36px; max-width: 64ch; }

.exp-case__meta {
  display: flex;
  flex-wrap: wrap;
  color: var(--muted);
  gap: 0;
}
.exp-case__meta span:not(:last-child)::after {
  content: " •";
  margin-right: 8px;
  opacity: 0.6;
}

.exp-case__title {
  margin-top: 18px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 500;
  max-width: 24ch;
}
:root[data-type="serif-display"] .exp-case__title {
  font-family: var(--f-display);
  font-weight: 400;
}

.exp-case__desc {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.exp-case__desc strong { color: var(--ink); font-weight: 500; }

/* ─ Impact row ─ */
.exp-case__impacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--rule-soft);
}
.exp-case__impacts--4col { grid-template-columns: repeat(4, 1fr); }
.exp-case__impact {
  padding: 20px 24px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-case__impact-num {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
:root[data-type="serif-display"] .exp-case__impact-num { font-weight: 400; }

.exp-case__impact-label {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 22ch;
}

/* ── APPROACH SECTION ───────────────────────────────────────── */
.approach { padding: 80px 0 120px; }

.approach__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
}

.approach__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 980px;
}

.approach__item-label {
  color: var(--muted);
  margin-bottom: 12px;
}

.approach__item-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

/* ── SCROLL HINT ────────────────────────────────────────────── */
.scroll-hint { padding: 0 0 80px; }

.scroll-hint__inner {
  border-top: 1px solid var(--rule-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
}

.scroll-hint__label {
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__grid,
  .sec-head,
  .exp-case,
  .approach__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exp-case__aside { position: relative; top: auto; }

  .projects-grid { grid-template-columns: 1fr; }

  .project {
    grid-template-columns: 120px 1fr;
    padding: 22px;
  }
  .project__thumb { width: 120px; }

  .exp-case__impacts { grid-template-columns: 1fr; }
  .exp-case__impact {
    border-right: none;
    border-bottom: 1px solid var(--rule-soft);
    padding: 16px 0;
  }

  .approach__items { grid-template-columns: 1fr; }

  /* Hero: smaller font + allow wrapping within &nbsp; sequences */
  .hero { padding: 112px 0 64px; }
  .hero__statement { font-size: clamp(26px, 7.5vw, 36px); }
  /* On mobile: flatten reveal-lines into inline flow, no animation */
  .hero__statement .reveal-line {
    display: inline;
    overflow: visible;
  }
  .hero__statement .reveal-line > span {
    display: inline;
    overflow-wrap: break-word;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
}

/* ── NO HOVER on touch displays ─────────────────────────────── */
@media (hover: none) {
  .projects-grid:hover .project:hover .project__preview { opacity: 0; }
  :root[data-hover="lift"] .project:hover .project__thumb { transform: none; box-shadow: none; }
  :root[data-hover="zoom"] .project:hover .project__thumb-img { transform: none; }
  :root[data-hover="reveal"] .project:hover .project__thumb-cover { transform: none; }
  .project:hover .project__arrow { background: none; border-color: var(--rule); color: var(--muted); }
}
