/* =========================================================
   Cem Bora Pak — Art Director Portfolio
   Editorial / bold layout
   ========================================================= */

:root {
  --paper: #efece3;
  --paper-2: #e6e2d6;
  --ink: #111110;
  --ink-soft: #4a4842;
  --line: rgba(17, 17, 16, 0.16);
  --dark: #111110;
  --dark-soft: #a7a49b;
  --accent: #ff3b1f;
  --accent-ink: #efece3;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shell: min(1440px, 92vw);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gap: clamp(1rem, 2.4vw, 2.4rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }
body.is-loading { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(17, 17, 16, 0.07);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.shell { width: var(--shell); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.2rem; border-radius: 999px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Grain + progress ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 9000; pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent); z-index: 9500; transition: width 0.1s linear;
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); z-index: 9600;
  pointer-events: none;
  display: grid; place-items: center;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), background 0.3s ease;
  mix-blend-mode: normal;
}
.cursor.is-hover {
  width: 84px; height: 84px;
  background: var(--ink);
}
.cursor__label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper); opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}
.cursor.is-hover .cursor__label { opacity: 1; transform: scale(1); }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  padding: 1.1rem 0;
  transition: padding 0.4s var(--ease), background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding: 0.6rem 0;
  background: rgba(239, 236, 227, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-weight: 600; letter-spacing: -0.01em;
}
.brand__mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  transition: transform 0.5s var(--ease), background 0.3s ease;
}
.brand:hover .brand__mark { transform: rotate(-12deg); background: var(--accent); }
.brand__name { font-size: 0.95rem; }

.site-nav ul { display: flex; align-items: center; gap: 0.4rem; }
.site-nav a {
  position: relative; display: inline-block;
  padding: 0.55rem 1rem; border-radius: 999px;
  font-size: 0.82rem; letter-spacing: 0.02em;
  transition: color 0.25s ease, background 0.25s ease;
}
.site-nav a::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0.35rem;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="true"] { color: var(--accent); }
.nav-cta {
  background: var(--ink); color: var(--paper) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); }

.nav-toggle {
  display: none; width: 46px; height: 46px;
  border: 1px solid var(--line); border-radius: 50%;
  position: relative;
}
.nav-toggle span:not(.sr-only) {
  position: absolute; left: 50%; width: 18px; height: 1.5px;
  background: var(--ink); transform: translateX(-50%);
  transition: transform 0.35s var(--ease), opacity 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 19px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle.is-open span:nth-child(1) { top: 22px; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { top: 22px; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.5rem; border-radius: 999px;
  font-size: 0.82rem; letter-spacing: 0.02em; font-weight: 500;
  border: 1px solid var(--ink);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

/* Hero lines: clip reveal */
.line { display: block; overflow: hidden; }
.line__inner {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
}
.line.reveal { opacity: 1; transform: none; }
.line.reveal.is-visible .line__inner { transform: translateY(0); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding-top: clamp(8rem, 16vh, 12rem);
  padding-bottom: 0;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: clamp(2rem, 6vh, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero__meta-status { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); }
.hero__meta-status i {
  width: 7px; height: 7px; border-radius: 50%; background: #1fae61;
  box-shadow: 0 0 0 0 rgba(31, 174, 97, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 174, 97, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(31, 174, 97, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 174, 97, 0); }
}

.hero__title {
  margin: clamp(1.5rem, 5vh, 3rem) 0;
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero__dot { color: var(--accent); }

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
}
.hero__lead {
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  margin: 0;
}
.hero__cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Ticker */
.hero__ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
}
.ticker {
  display: inline-flex; align-items: center; gap: 1.6rem;
  white-space: nowrap; will-change: transform;
}
.ticker span {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 500; letter-spacing: -0.02em;
}
.ticker i { color: var(--accent); font-style: normal; font-size: 1.1rem; }

/* =========================================================
   Section scaffolding
   ========================================================= */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding-bottom: 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.section-index {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); letter-spacing: 0.05em;
}
.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500; letter-spacing: -0.03em;
}
.section-desc {
  margin: 0; max-width: 34ch;
  font-size: 0.88rem; color: var(--ink-soft); text-align: right;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin: 0 0 1rem;
}
.eyebrow--light { color: var(--accent); }

/* =========================================================
   WORKS
   ========================================================= */
.works { padding: clamp(4rem, 12vh, 8rem) 0; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.work { grid-column: span 6; }
.work--wide { grid-column: span 12; }
.work--tall { grid-column: span 6; }

.work__link { display: block; position: relative; }
.work__index {
  position: absolute; top: 0.9rem; left: 1rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--paper); mix-blend-mode: difference;
}
.work__media {
  position: relative; margin: 0; overflow: hidden;
  border-radius: 6px; background: var(--paper-2);
  aspect-ratio: 4 / 3;
}
.work--tall .work__media { aspect-ratio: 3 / 4; }
.work--wide .work__media { aspect-ratio: 16 / 9; }
.work__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transform: scale(1.02);
  transition: transform 1s var(--ease), filter 0.7s ease;
}
.work__media::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent); mix-blend-mode: multiply;
  opacity: 0; transition: opacity 0.6s ease;
}
.work__overlay {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 1.3rem;
  display: flex; justify-content: flex-end;
  transform: translateY(120%);
  transition: transform 0.6s var(--ease);
}
.work__overlay span {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.work__link:hover .work__media img { transform: scale(1.08); filter: grayscale(0); }
.work__link:hover .work__media::after { opacity: 0.14; }
.work__link:hover .work__overlay { transform: translateY(0); }

.work__body {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 0.4rem 1rem;
  padding: 1rem 0.2rem 0;
}
.work__title {
  margin: 0; font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500; letter-spacing: -0.02em;
  transition: transform 0.5s var(--ease), color 0.3s ease;
}
.work__link:hover .work__title { transform: translateX(6px); color: var(--accent); }
.work__cat {
  grid-column: 1; margin: 0;
  font-size: 0.82rem; color: var(--ink-soft);
}
.work__year {
  grid-row: 1 / span 2; align-self: start;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft);
}

/* =========================================================
   MARQUEE BAND
   ========================================================= */
.band {
  background: var(--ink); color: var(--paper);
  overflow: hidden; padding: 1.6rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.band .ticker { gap: 1.8rem; }
.band .ticker span {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 500; letter-spacing: -0.03em;
  text-transform: uppercase;
}
.band .ticker span:nth-child(even) {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
}
.band .ticker i { color: var(--accent); font-size: 1.5rem; }

/* =========================================================
   ABOUT
   ========================================================= */
.about { padding: clamp(4rem, 12vh, 8rem) 0; }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.about__statement {
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 3.2rem);
  line-height: 1.12; font-weight: 500; letter-spacing: -0.03em;
}
.about__statement em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent);
}
.about__body p {
  margin: 0 0 1.2rem; color: var(--ink-soft);
  font-size: 1rem; max-width: 46ch;
}
.about__facts {
  display: grid; gap: 0;
  margin-top: 2.5rem; border-top: 1px solid var(--line);
}
.about__facts > div {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.about__facts dt {
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft);
}
.about__facts dd { margin: 0; font-size: 0.9rem; text-align: right; }

/* =========================================================
   SERVICES
   ========================================================= */
.services { padding: 0 0 clamp(4rem, 12vh, 8rem); }
.services-list { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service__row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.1fr) auto;
  align-items: center; gap: 1.5rem;
  padding: clamp(1.3rem, 3vw, 2.2rem) 0.4rem;
  position: relative;
  transition: padding 0.5s var(--ease);
}
.service__row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.5s var(--ease);
}
.service__num {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent);
}
.service__title {
  margin: 0; font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 500; letter-spacing: -0.03em;
  transition: color 0.4s ease, transform 0.5s var(--ease);
}
.service__text {
  margin: 0; font-size: 0.9rem; color: var(--ink-soft);
  transition: color 0.4s ease;
}
.service__arrow {
  font-size: 1.4rem; color: var(--ink-soft);
  transition: color 0.4s ease, transform 0.5s var(--ease);
}
.service__row:hover { padding-left: 1.4rem; }
.service__row:hover::before { transform: scaleY(1); transform-origin: top; }
.service__row:hover .service__title { color: var(--paper); }
.service__row:hover .service__text { color: var(--dark-soft); }
.service__row:hover .service__arrow { color: var(--accent); transform: translate(4px, -4px); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 14vh, 9rem) 0;
  border-top: 1px solid var(--ink);
}
.section-index--light { color: var(--accent); }
.contact__inner { max-width: 1000px; }
.contact__title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.4rem, 8vw, 7rem);
  line-height: 0.98; font-weight: 500; letter-spacing: -0.04em;
}
.contact__title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent);
}
.contact__lead {
  margin: 0 0 2.5rem; max-width: 44ch;
  color: var(--dark-soft); font-size: 1.05rem;
}
.contact__mail {
  display: inline-block; position: relative;
  font-size: clamp(1.1rem, 3vw, 2rem);
  font-weight: 500; letter-spacing: -0.02em;
  padding-bottom: 0.3rem; margin-bottom: 3rem;
}
.contact__mail::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.contact__mail:hover { color: var(--accent); }
.contact__mail:hover::after { transform: scaleX(0.35); }

.contact__socials {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  padding-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.contact__socials a {
  display: inline-block; padding: 0.55rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px;
  font-size: 0.82rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.contact__socials a:hover {
  background: var(--accent); border-color: var(--accent); color: var(--paper);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: var(--dark-soft); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
}
.footer__brand { color: var(--paper); font-weight: 600; margin: 0; }
.footer__copy { margin: 0; }
.footer__top {
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: color 0.3s ease;
}
.footer__top:hover { color: var(--accent); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: auto 1fr; }
  .section-desc { grid-column: 1 / -1; text-align: left; }
  .service__row { grid-template-columns: 3rem 1fr auto; }
  .service__text { grid-column: 2 / -1; grid-row: 2; margin-top: -0.4rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; z-index: 8100; }
  .site-nav {
    position: fixed; inset: 0; z-index: 8050;
    background: var(--ink); color: var(--paper);
    display: grid; align-content: center;
    padding: 2rem var(--shell);
    clip-path: circle(0% at calc(100% - 3rem) 3rem);
    transition: clip-path 0.7s var(--ease);
    pointer-events: none;
  }
  .site-nav.is-open { clip-path: circle(150% at calc(100% - 3rem) 3rem); pointer-events: auto; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .site-nav a {
    font-size: clamp(2rem, 11vw, 4rem); font-weight: 500;
    letter-spacing: -0.03em; padding: 0.2rem 0; border-radius: 0;
  }
  .site-nav a::after { left: 0; right: 0; bottom: 0; }
  .nav-cta { background: none; color: var(--accent) !important; }
  .site-header.is-scrolled .brand__name,
  .site-header.is-scrolled .brand__mark { color: inherit; }
  .site-header.is-scrolled.nav-open { background: transparent; }
  .brand { position: relative; z-index: 8100; }
  body.nav-open .brand__mark { background: var(--accent); }
  body.nav-open .brand__name { color: var(--paper); }
  body.nav-open .nav-toggle { border-color: rgba(255, 255, 255, 0.3); }
  body.nav-open .nav-toggle span { background: var(--paper); }

  .hero__foot { grid-template-columns: 1fr; align-items: start; }
  .work, .work--tall { grid-column: span 12; }
  .work--tall .work__media { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .hero__title { font-size: clamp(2.6rem, 15vw, 4.5rem); }
  .contact__mail { font-size: 1.15rem; }
  .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .line__inner { opacity: 1 !important; transform: none !important; }
  .grain { display: none; }
}
