/* ============================================================
   Emre Kızılkaya — personal site
   Dark, cinematic, motion-rich.
   ============================================================ */

:root {
  --bg: #070a12;
  --bg-soft: #0c111e;
  --bg-card: #111828;
  --ink: #e9edf5;
  --ink-dim: #9aa5bc;
  --line: rgba(255, 255, 255, 0.08);
  --accent-1: #5b8cff;
  --accent-2: #a06bff;
  --accent-3: #ff5da2;
  --grad: linear-gradient(100deg, var(--accent-1), var(--accent-2) 50%, var(--accent-3));
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; }

main a:not(.nav__cta),
.about a, .timeline a, .card a, .highlights__note a, .more__list a {
  color: #aac2ff;
  border-bottom: 1px solid rgba(170, 194, 255, 0.35);
  transition: color 0.25s, border-color 0.25s;
}
main a:not(.nav__cta):hover { color: #fff; border-color: #fff; }

::selection { background: rgba(160, 107, 255, 0.45); color: #fff; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- scroll progress ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1000;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  z-index: 900;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav--solid {
  background: rgba(7, 10, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
}
.nav__logo-dot {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 34px);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav__links a:not(.nav__cta) {
  color: var(--ink-dim);
  transition: color 0.25s;
}
.nav__links a:not(.nav__cta):hover { color: #fff; }
.nav__cta {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.3s, border-color 0.3s;
}
.nav__cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.62) contrast(1.02) brightness(1.02);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 20%, rgba(7, 10, 18, 0) 40%, rgba(7, 10, 18, 0.55) 100%),
    linear-gradient(to bottom, rgba(7, 10, 18, 0.35), rgba(7, 10, 18, 0.15) 40%, var(--bg) 98%);
}
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px;
  margin-bottom: clamp(64px, 9vh, 120px);
}
.hero__kicker {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(233, 237, 245, 0.85);
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 6px 60px rgba(0, 0, 0, 0.55);
}
.hero__line {
  display: block;
  overflow: hidden;
}
.hero__line span {
  display: block;
  transform: translateY(110%);
  animation: heroRise 1.1s var(--ease-out) forwards;
}
.hero__line:nth-child(2) span {
  animation-delay: 0.18s;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 30px rgba(90, 100, 255, 0.35));
}
@keyframes heroRise { to { transform: translateY(0); } }

.hero__sub {
  max-width: 560px;
  margin: 26px auto 0;
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(233, 237, 245, 0.92);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}
.hero__sub em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}
.hero__hint {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(233, 237, 245, 0.5);
}
.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -60%;
  left: 0;
  width: 100%;
  height: 60%;
  background: #fff;
  animation: scrollDrip 2s ease-in-out infinite;
}
@keyframes scrollDrip {
  0% { top: -60%; }
  100% { top: 110%; }
}

/* ---------- sections ---------- */
.section { padding: clamp(90px, 12vw, 150px) 0; }

.section__kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  max-width: 720px;
}

/* ---------- about ---------- */
.about { padding-bottom: clamp(60px, 8vw, 100px); }
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.about__text p { margin-bottom: 18px; color: var(--ink-dim); }
.about__text p strong { color: var(--ink); }
.about__text p em { color: var(--ink); }

.tilt-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: perspective(900px) rotateX(0) rotateY(0);
  transition: transform 0.2s ease-out;
  will-change: transform;
}
.tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.tilt-card img { width: 100%; }

/* ---------- stats ---------- */
.stats {
  margin-top: clamp(60px, 8vw, 100px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat {
  padding: 30px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- press marquee ---------- */
.press {
  padding: 30px 0 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
}
.press__label {
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 14px 0 26px;
}
.marquee {
  display: flex;
  width: max-content;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 42px;
  padding-right: 42px;
  animation: marquee 38s linear infinite;
  white-space: nowrap;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 600;
  color: rgba(233, 237, 245, 0.75);
}
.marquee__track i {
  font-style: normal;
  font-size: 13px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ---------- timeline ---------- */
.timeline {
  margin-top: 30px;
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2), var(--accent-3));
  opacity: 0.5;
}
.timeline__item {
  position: relative;
  padding: 0 0 44px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
  box-shadow: 0 0 18px rgba(160, 107, 255, 0.7);
}
.timeline__year {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.timeline__body h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 600;
  margin: 6px 0 8px;
}
.timeline__body p {
  color: var(--ink-dim);
  max-width: 640px;
}

/* ---------- highlights ---------- */
.highlights { background: var(--bg-soft); }
.cards {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  padding: 30px 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at var(--mx, 50%) var(--my, 0%), rgba(120, 130, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(160, 170, 255, 0.35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.card:hover::before { opacity: 1; }
.card__icon {
  font-size: 28px;
  display: inline-block;
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p { font-size: 15.5px; color: var(--ink-dim); }

.highlights__note {
  margin-top: 44px;
  color: var(--ink-dim);
  font-size: 15.5px;
  max-width: 860px;
}

/* ---------- publications ---------- */
.pub-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  align-items: start;
}
.pub {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.pub > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  border-bottom: 0;
}
.pub > a:hover { color: inherit; }
.pub figcaption strong { transition: color 0.25s; }
.pub:hover figcaption strong { color: #aac2ff; }
.pub:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}
.pub img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.pub:hover img { transform: scale(1.05); }
.pub figcaption {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pub figcaption strong {
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.35;
}
.pub figcaption span {
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
}

/* ---------- reel / on screen ---------- */
.reel__inner { text-align: center; }
.reel .section__kicker { text-align: center; }
.reel__frame {
  position: relative;
  margin: 12px auto 0;
  width: min(920px, 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
  background: #000;
}
.reel__frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.45;
  pointer-events: none;
}
.reel__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

/* ---------- quote band ---------- */
.band {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.band__video {
  position: absolute;
  inset: -12% 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  will-change: transform;
}
.band__scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 18, 0.66);
}
.band__quote {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px;
}
.band__quote p {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #fff, #aac2ff 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- more ---------- */
.more__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.more__list {
  list-style: none;
  margin-bottom: 34px;
}
.more__list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--ink-dim);
}
.more__list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.more__subhead {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 16px;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chips li {
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-dim);
  transition: border-color 0.3s, color 0.3s;
}
.chips li:hover { border-color: rgba(160, 170, 255, 0.5); color: var(--ink); }
.more__personal {
  color: var(--ink-dim);
  font-size: 15.5px;
  border-left: 3px solid;
  border-image: var(--grad) 1;
  padding-left: 18px;
}
.more__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.more__photo {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  will-change: transform;
}
.more__photo img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.more__photo:hover img { transform: scale(1.06); }
.more__photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233, 237, 245, 0.9);
  background: linear-gradient(to top, rgba(7, 10, 18, 0.85), transparent);
}

/* ---------- contact ---------- */
.contact {
  position: relative;
  padding: clamp(100px, 14vw, 170px) 0 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(91, 140, 255, 0.13), transparent 70%),
    var(--bg);
  text-align: center;
  border-top: 1px solid var(--line);
}
.contact .section__kicker { text-align: center; }
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 34px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact__email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 600;
  padding: 16px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.contact__email:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(90, 100, 255, 0.2);
}
.contact__links {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 14.5px;
  letter-spacing: 0.06em;
}
.contact__links a {
  color: var(--ink-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.contact__links a:hover { color: #fff; border-color: #fff; }

.footer {
  margin-top: clamp(70px, 9vw, 110px);
  padding: 26px 20px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-dim);
  width: min(1140px, 92%);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Parallax elements get their transform from JS every frame —
   restrict the reveal transition to opacity so they don't lag. */
.reveal[data-parallax] {
  transform: none;
  transition: opacity 0.9s var(--ease-out);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .about__grid, .more__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .more__media { margin-top: 10px; }
}

@media (max-width: 640px) {
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 30px 0 36px;
    background: rgba(7, 10, 18, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.45s var(--ease-out);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__burger { display: flex; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .cards { grid-template-columns: 1fr; }
  .footer { justify-content: center; text-align: center; }
  /* "move your cursor" is meaningless on touch; the ribbon effect is off there. */
  .hero__hint { display: none; }
}

/* Touch devices: the cursor-driven ribbon effect is disabled, so hide its hint. */
@media (hover: none), (pointer: coarse) {
  .hero__hint { display: none; }
  .hero__canvas { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__line span { animation: none; transform: none; }
  .marquee__track { animation: none; }
  .hero__scroll-line::after { animation: none; }
  .hero__canvas { display: none; }
}
