/* ==========================================================================
   home — Figma "Ana sayfa — 1440 / 390"; hero from "04 — Revizyon: logo + hero"
   ========================================================================== */

@layer pages {
  /* ---- Hero: greeting, statement, work collage ------------------------- */
  .hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
    padding-top: clamp(1.75rem, 0.5rem + 3.5vw, 4.5rem);
  }
  /* Soft window light: a white bloom and one faint diagonal shade band. */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(60% 70% at 18% 30%, rgb(255 255 255 / 0.95), rgb(255 255 255 / 0) 70%),
      linear-gradient(118deg, transparent 52%, rgb(191 204 224 / 0.16) 60%, transparent 68%);
    pointer-events: none;
  }
  .hero__inner { display: grid; gap: clamp(2.5rem, 1rem + 5vw, 4rem) var(--gutter); align-items: center; }
  .hero__copy { display: grid; justify-items: start; gap: var(--s-5); min-width: 0; }
  .hero__title { display: grid; gap: clamp(1.25rem, 0.8rem + 1.4vw, 2rem); margin: 0; font-weight: var(--w-regular); }
  .hero__hello {
    display: block;
    font-size: clamp(4rem, 2.6rem + 6vw, 8.75rem);
    font-weight: var(--w-light);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--ink);
    padding-top: var(--s-2);
  }
  .hero__line { display: block; }
  /* Only the name switches voice: Instrument Serif italic, optically matched. */
  .hero__hello em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: -0.02em; line-height: 0; }
  .hero__lede {
    display: block;
    max-width: 30ch;
    font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem);
    line-height: 1.38;
    letter-spacing: -0.012em;
  }
  .hero__disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0;
    margin: 0;
    font-size: var(--fs-sm);
    font-weight: var(--w-medium);
    letter-spacing: 0.01em;
    color: var(--ink-2);
  }
  .hero__disciplines li:not(:last-child)::after { content: "/"; margin-inline: 0.9em; color: var(--line-strong); }
  .hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-2); }

  .hero__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2) var(--s-5);
    margin-top: clamp(2.5rem, 1rem + 4vw, 4.5rem);
    border-top: 1px solid var(--line-strong);
    padding-block: var(--s-3);
    font-size: var(--fs-sm);
  }
  .hero__now { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--mute); }
  .hero__now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
  .hero__scroll {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    min-height: var(--target);
    font-size: var(--fs-sm);
    font-weight: var(--w-medium);
    letter-spacing: 0.01em;
    color: var(--ink-2);
    text-decoration: none;
  }
  .hero__scroll .icon { width: 1rem; height: 1rem; }
  .hero__scroll:hover { color: var(--ink); }

  /* Collage: prints pinned on a board. Positions are percentages of the board,
     so one composition scales from 360 px to 1440 px without reflow. */
  .hero__collage {
    position: relative;
    aspect-ratio: 600 / 640;
    width: 100%;
    max-width: 37rem;
    justify-self: center;
    --px: 0;
    --py: 0;
  }
  .collage { position: absolute; inset: 0; margin: 0; }
  .collage__tile {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    z-index: var(--z, 1);
    transform: translate(calc(var(--px) * var(--depth, 6px)), calc(var(--py) * var(--depth, 6px))) rotate(var(--r));
    transition: transform 900ms var(--ease-out);
  }
  .collage__tile--1 { --x: 21%; --y: 9%;  --w: 71%; --r: -2.5deg; --z: 2; --depth: 10px; }
  .collage__tile--2 { --x: 55%; --y: 2%;  --w: 44%; --r: 3.5deg;  --z: 3; --depth: 16px; }
  .collage__tile--3 { --x: 43%; --y: 49%; --w: 54%; --r: -1.5deg; --z: 4; --depth: 12px; }
  .collage__tile--4 { --x: 2%;  --y: 53%; --w: 44%; --r: 2.5deg;  --z: 5; --depth: 18px; }
  .collage__tile--5 { --x: 46%; --y: 78%; --w: 38%; --r: -3deg;   --z: 6; --depth: 8px; }
  .collage__link {
    display: grid;
    gap: 0.45rem;
    padding: 0.4rem 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--mute);
    text-decoration: none;
    box-shadow: 0 2px 6px rgb(18 21 27 / 0.06), 0 22px 40px -18px rgb(18 21 27 / 0.28);
    transition: box-shadow var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), color var(--d-fast) ease;
  }
  .collage__link img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.625rem; background: var(--sunken); }
  .collage__label { padding-inline: 0.2rem; font-size: 0.6875rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .collage__link:focus-visible { outline-offset: 3px; }
  @media (hover: hover) and (pointer: fine) {
    .collage__tile:hover { z-index: 9; }
    .collage__tile:hover .collage__link { transform: translateY(-6px) rotate(calc(var(--r) * -1)); box-shadow: 0 2px 6px rgb(18 21 27 / 0.06), 0 34px 60px -24px rgb(18 21 27 / 0.34); color: var(--ink); }
  }
  .collage__sticker {
    position: absolute;
    left: 86%;
    top: 37%;
    z-index: 7;
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--inverse);
    color: rgb(255 255 255 / 0.82);
    font-size: 0.625rem;
    font-weight: var(--w-medium);
    line-height: 1.3;
    letter-spacing: 0.02em;
    transform: rotate(6deg);
    box-shadow: var(--shadow-float);
  }
  .collage__sticker .mark { width: 1.6rem; height: 1.6rem; color: #fff; }
  .collage__note {
    position: absolute;
    left: 3%;
    top: 86%;
    z-index: 1;
    width: 6.5em;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.125rem, 0.9rem + 0.7vw, 1.625rem);
    line-height: 1;
    color: var(--ink-2);
    transform: rotate(-4deg);
  }
  .collage__arrow { position: absolute; left: 22%; top: 80%; width: 18%; color: var(--ink-2); transform: rotate(-6deg); }
  .collage__plus { position: absolute; width: 14px; height: 14px; color: var(--mute); }
  .collage__plus::before, .collage__plus::after { content: ""; position: absolute; background: currentColor; }
  .collage__plus::before { left: 6.5px; top: 0; width: 1px; height: 14px; }
  .collage__plus::after { top: 6.5px; left: 0; height: 1px; width: 14px; }
  .collage__plus--a { left: 0; top: 30%; }
  .collage__plus--b { left: 97%; top: 95%; }

  @media (max-width: 47.99em) {
    .collage__label { font-size: 0.625rem; }
    .collage__tile--4 .collage__label, .collage__tile--5 .collage__label { display: none; }
    .collage__sticker { left: 80%; padding: 0.6rem; font-size: 0.5625rem; }
    .collage__sticker .mark { width: 1.25rem; height: 1.25rem; }
  }
  @media (min-width: 64em) {
    .hero__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: min(calc(100svh - var(--header-h) - 9rem), 46rem); }
    .hero__copy { grid-column: 1 / span 6; }
    .hero__collage { grid-column: 7 / -1; justify-self: end; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .hero__copy > * { animation: rise 900ms var(--ease-out) both; }
    .hero__copy > :nth-child(2) { animation-delay: 70ms; }
    .hero__copy > :nth-child(3) { animation-delay: 140ms; }
    .hero__copy > :nth-child(4) { animation-delay: 200ms; }
    .collage__tile { animation: pin 1000ms var(--ease-out) both; animation-delay: calc(220ms + var(--i) * 90ms); }
    .collage__sticker, .collage__note, .collage__arrow { animation: rise 900ms var(--ease-out) 760ms both; }
  }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes pin { from { opacity: 0; translate: 0 28px; scale: 0.96; } }

  /* ---- Selected work: editorial rhythm --------------------------------- */
  .work-grid { margin: 0; display: grid; gap: var(--s-7) var(--gutter); }
  @media (min-width: 48em) {
    .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-grid__item:first-child { grid-column: 1 / -1; }
  }
  @media (min-width: 64em) {
    .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: var(--s-8); }
    .work-grid__item:nth-child(1) { grid-column: 1 / span 8; }
    .work-grid__item:nth-child(2) { grid-column: 9 / -1; align-self: end; }
    .work-grid__item:nth-child(n + 3) { grid-column: span 4; }
  }

  /* ---- Services panel --------------------------------------------------- */
  .panel { border-radius: var(--radius-xl); background: var(--surface); padding: clamp(1.5rem, 0.8rem + 3vw, 3rem); }
  .services-panel { display: grid; gap: var(--s-6) var(--gutter); }
  .services-panel__head { display: grid; gap: var(--s-4); align-content: start; justify-items: start; }
  .services-panel__title { font-size: var(--fs-2xl); font-weight: var(--w-light); line-height: 1; letter-spacing: var(--track-head); }
  .services-panel__list { margin: 0; display: grid; }
  .svc {
    display: grid;
    gap: var(--s-2);
    padding-block: var(--s-5);
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
  }
  .svc__title { font-size: var(--fs-read); font-weight: var(--w-medium); letter-spacing: var(--track-title); color: var(--ink); }
  .svc__text { font-size: var(--fs-label); line-height: 1.55; color: var(--mute); max-width: 40ch; }
  @media (hover: hover) and (pointer: fine) { .svc:hover .svc__title { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.22em; } }
  @media (min-width: 48em) { .services-panel__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); } }
  @media (min-width: 64em) {
    .services-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .services-panel__head { grid-column: 1 / span 4; }
    .services-panel__list { grid-column: 5 / -1; }
  }

  /* ---- Experience -------------------------------------------------------- */
  .experience__label { margin-bottom: var(--s-4); }
  .experience { margin: 0 0 var(--s-3); display: grid; gap: var(--s-5) var(--gutter); }
  .experience__item { display: grid; gap: 0.2rem; padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
  .experience__company { font-size: var(--fs-lg); font-weight: var(--w-regular); letter-spacing: -0.02em; }
  .experience__role { font-size: var(--fs-label); color: var(--ink-2); }
  .experience__when { font-size: var(--fs-sm); color: var(--mute); font-variant-numeric: tabular-nums; }
  @media (min-width: 40em) { .experience { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 64em) { .experience { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

  /* ---- Journal: text cards ---------------------------------------------- */
  .note-grid { margin: 0; display: grid; gap: var(--gutter); }
  @media (min-width: 48em) { .note-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 47.99em) {
    .note-grid { grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scroll-padding-inline: var(--margin); }
    .note-grid > li { scroll-snap-align: start; }
  }
}
