/* Eralp Erman portfolio — white and neutral, with a bold display face, faint dot
   patterns and one warm accent. The work brings the rest of the colour. */

:root {
  --bg: #ffffff;
  --tint: #f6f6f4;        /* soft band behind About */
  --ink: #141414;         /* headings, buttons */
  --body: #5a5a58;        /* running text */
  --quiet: #8c8c89;       /* captions, counts */
  --line: #e4e4e2;
  --dot: #d6d6d2;         /* halftone pattern */
  --ghost: #f1f1ef;       /* oversized words behind headings */
  --accent: #f4c430;      /* the single accent: blocks, bars, underlines — never text */

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --gap: clamp(12px, 1.8vw, 24px);
  --space: clamp(80px, 10vw, 150px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 5;
  padding: .5rem .9rem; background: var(--ink); color: #fff;
}
.skip:focus { top: .75rem; }

/* ---------- Top bar ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: clamp(20px, 3vw, 34px);
}
.brand {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.02em;
}
.brand::after { content: "."; color: var(--accent); }
.nav { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.nav a {
  font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--body);
  padding-block: .3rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center; gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(40px, 7vw, 96px) var(--space);
}

.hello {
  display: flex; align-items: center; gap: .9rem;
  color: var(--ink); font-weight: 500;
}
.hello::before { content: ""; width: 36px; height: 4px; background: var(--accent); }

.hero h1 {
  margin-top: 1.1rem;
  font-family: var(--display);
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.hero-sub { max-width: 33rem; margin-top: clamp(20px, 2.4vw, 30px); font-size: 1.0625rem; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; margin-top: clamp(26px, 3vw, 40px); }
.btn {
  display: inline-block; padding: .95rem 1.6rem;
  background: var(--ink); color: #fff; text-decoration: none;
  font-size: .9375rem; font-weight: 500;
  box-shadow: 6px 6px 0 var(--accent);
  transition: box-shadow .15s, transform .15s;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--accent); }
.text-link {
  color: var(--ink); font-size: .9375rem; font-weight: 500; text-decoration: none;
  border-bottom: 2px solid var(--line); padding-bottom: .15rem;
}
.text-link:hover { border-bottom-color: var(--accent); }

/* Collage: a looping film, a still overlapping it, an accent block and dots behind. */
.hero-art { position: relative; justify-self: end; width: min(100%, 430px); padding: 0 0 9% 14%; }
.hero-art::before {
  content: ""; position: absolute; z-index: -1;
  top: -22px; right: -22px; width: 52%; height: 46%;
  background: var(--accent);
}
.hero-art::after {
  content: ""; position: absolute; z-index: -2;
  left: -70px; top: 2%; width: 300px; height: 300px;
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.8px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
          mask-image: radial-gradient(closest-side, #000 35%, transparent);
}
.art-main { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--tint); }
.art-side {
  position: absolute; left: 0; bottom: 0; width: 44%;
  border: 8px solid #fff; box-shadow: 0 18px 40px rgb(0 0 0 / .12);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { justify-self: start; width: min(78%, 340px); margin-left: 6%; }
}

/* ---------- Section headings ---------- */

h2 {
  position: relative;
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -.03em;
}
/* Oversized pale word behind the heading. */
h2[data-ghost]::after {
  content: attr(data-ghost);
  position: absolute; z-index: -1; left: -.05em; bottom: -.12em;
  font-size: clamp(5.5rem, 15vw, 12rem); font-weight: 800; line-height: .8;
  color: var(--ghost); white-space: nowrap; pointer-events: none;
}
h2 sup {
  margin-left: .3em; font-family: var(--font); font-size: .34em; font-weight: 500;
  color: var(--quiet); vertical-align: super; letter-spacing: 0;
}

.films, .stills, .about, .contact { position: relative; isolation: isolate; }
.films h2, .stills h2 { padding-top: clamp(40px, 6vw, 80px); }

/* ---------- Films ---------- */

.films { padding-bottom: var(--space); }

.reel {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap);
  margin-top: clamp(28px, 4vw, 52px);
}

.film { display: block; text-decoration: none; }
.film-frame { position: relative; display: block; overflow: hidden; background: var(--tint); }
.film video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }

/* Small play mark so a still poster reads as a film. */
.film-frame::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 44px; height: 44px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M18 15v14l11-7z' fill='%23141414'/%3E%3C/svg%3E") center / 100% no-repeat;
  transition: width .2s, height .2s;
}
.film:hover .film-frame::after { width: 52px; height: 52px; }

.film-title {
  display: block; margin-top: .9rem;
  font-family: var(--display); color: var(--ink); font-weight: 600; font-size: 1.0625rem; line-height: 1.3;
}
.film-meta { display: block; font-size: .8125rem; color: var(--quiet); }

.reel-note { margin-top: clamp(22px, 3vw, 36px); font-size: .8125rem; color: var(--quiet); }

@media (max-width: 860px) {
  .reel {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(58vw, 260px);
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .reel::-webkit-scrollbar { display: none; }
  .reel > li { scroll-snap-align: start; }
}

/* ---------- Stills ---------- */

.stills { padding-bottom: var(--space); }

.grid { columns: 3; column-gap: var(--gap); margin-top: clamp(28px, 4vw, 52px); }
.still { break-inside: avoid; margin-bottom: var(--gap); }
.still a { display: block; overflow: hidden; background: var(--tint); }
.still img { width: 100%; transition: transform .5s ease; }
.still a:hover img { transform: scale(1.03); }
.still figcaption { padding-top: .55rem; font-size: .8125rem; color: var(--quiet); }

@media (max-width: 720px) { .grid { columns: 2; } }

/* ---------- About ---------- */

.about { background: var(--tint); padding-block: var(--space); overflow: hidden; --ghost: #ebebe8; }
/* Dot field in the corner. */
.about::before {
  content: ""; position: absolute; z-index: -1; right: -90px; top: -90px; width: 420px; height: 420px;
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.8px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
          mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); }
.about-body { max-width: 39rem; }
.about-body p + p { margin-top: 1.1rem; }
.about-first {
  font-family: var(--display); color: var(--ink); font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.4; letter-spacing: -.015em;
}

.facts { margin-top: clamp(28px, 3.5vw, 44px); border-top: 2px solid var(--ink); }
.facts > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding-block: .9rem; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.facts dt { color: var(--quiet); }
.facts dd { color: var(--ink); font-weight: 500; }

@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact { padding-block: var(--space); overflow: hidden; }
.contact h2 { max-width: 12em; padding-top: clamp(40px, 6vw, 80px); font-size: clamp(2.1rem, 5vw, 4rem); font-weight: 800; }
.email {
  display: inline-block; margin-top: clamp(24px, 3vw, 40px);
  color: var(--ink); font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 1.75rem); letter-spacing: -.01em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% .38em no-repeat;
  transition: background-size .2s;
}
.email:hover { background-size: 100% 100%; }

.footer { border-top: 1px solid var(--line); padding-block: 1.75rem; font-size: .8125rem; color: var(--quiet); }

/* ---------- Viewer ---------- */

.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #fff; color: var(--ink);
}
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
.viewer::backdrop { background: #fff; }
.viewer form { display: flex; justify-content: flex-end; padding: 16px var(--gutter) 0; }
.viewer-close {
  font: inherit; font-size: .875rem; font-weight: 500; color: #fff; cursor: pointer;
  background: var(--ink); border: 0; padding: .55rem 1.2rem;
}
.viewer-close:hover { background: var(--accent); color: var(--ink); }
.viewer-stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px var(--gutter); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.viewer-title { text-align: center; padding: 0 var(--gutter) 20px; font-family: var(--display); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .still img, .film-frame::after, .btn, .email { transition: none; }
  .still a:hover img { transform: none; }
}
