/* ═══════════════════════════════════════════════════════════════
   Dogukan Akkaya – iOS Developer Portfolio
   Cinematic hero: letter-spacing collapse · focus pull · shimmer
   Black & white only. No colors. No loops. Plays once.
═══════════════════════════════════════════════════════════════ */

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  cursor: default;
}
::-webkit-scrollbar { width: 0; height: 0; }
a, button { cursor: pointer; }
img { display: block; }

/* ── Navigation ───────────────────────────────────────────── */
.nav-glass {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s ease;
}
.nav-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.4px;
}
.nav-apps-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.8);
  padding: 7px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-apps-btn:hover { background: rgba(255,255,255,0.17); color: #fff; }

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 52px;   /* nav height offset */
  background: #000;
  overflow: hidden;
}

/* ── Vignette — subtle dark edges, cinematic depth ────────── */
/*
   Radial gradient: transparent center → dark edges.
   Barely noticeable. Just adds lens-like depth.
*/
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    transparent   38%,
    rgba(0,0,0,0.18) 70%,
    rgba(0,0,0,0.42) 100%
  );
}

/* ── Film grain — static SVG fractal noise ────────────────── */
/*
   Uses feTurbulence SVG filter as a repeated background tile.
   seed="5" keeps it deterministic (same pattern every load).
   mix-blend-mode: overlay integrates naturally with black bg.
   opacity is kept extremely low — just cinematic texture.
*/
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.048;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 165px 165px;
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* ── Shimmer — single pass, plays once, very subtle ──────────
   A narrow white-light stripe sweeps left → right once.
   Timing: starts at 1 150ms (after primary text is ~80% done).
   Duration: 1 100ms.
   Opacity at peak: 0.08 — barely perceptible. Premium feel.
────────────────────────────────────────────────────────────── */
.hero-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}
.hero-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 55%;
  background: linear-gradient(
    90deg,
    transparent              0%,
    rgba(255,255,255,0.035)  30%,
    rgba(255,255,255,0.08)   50%,
    rgba(255,255,255,0.035)  70%,
    transparent              100%
  );
  /* Start off-screen left, end off-screen right */
  transform: translateX(-210%);
  animation: shimmer-pass 1100ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 1150ms both;
}

@keyframes shimmer-pass {
  from { transform: translateX(-210%); }
  to   { transform: translateX(310%); }
}

/* ── Hero content ─────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 48px 28px 64px;
  width: 100%;
  max-width: 1040px;
}

/* ── Title group (name + subtitle) ───────────────────────────
   Grouped tightly. Subtitle sits close below the name.
   Both animate, subtitle starts 120ms after name.
────────────────────────────────────────────────────────────── */
.hero-title-group {
  margin-bottom: clamp(44px, 6.5vw, 80px);
}

/* ────────────────────────────────────────────────────────────
   PRIMARY TITLE — "Dogukan Akkaya"

   Animation: text-reveal-name
   · Starts: opacity 0, letter-spacing 0.35em, blur 10px, translateY 8px
   · Ends:   opacity 1, letter-spacing -0.03em, blur 0px, translateY 0
   · Duration: 1 400ms
   · Easing: cubic-bezier(0.25, 0.46, 0.45, 0.94) — Apple ease-out
   · animation-fill-mode: both → hidden before start, stays at end
──────────────────────────────────────────────────────────── */
.hero-name {
  font-size: clamp(54px, 9.5vw, 128px);
  font-weight: 800;
  color: #fff;
  line-height: 0.94;
  letter-spacing: -0.03em;          /* final resting state */
  user-select: none;
  /* Very faint luminous depth — not glow, just texture */
  text-shadow: 0 1px 80px rgba(255,255,255,0.055);

  animation: text-reveal-name 1400ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes text-reveal-name {
  0% {
    opacity: 0;
    letter-spacing: 0.35em;
    filter: blur(10px);
    transform: translateY(8px);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    letter-spacing: -0.03em;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* ────────────────────────────────────────────────────────────
   SUBTITLE — "iOS Developer"

   Starts 120ms after title. Slightly shorter duration.
   Final letter-spacing: 0.02em (nearly zero — tight, precise).
   Color: 44% white — subordinate but legible.
──────────────────────────────────────────────────────────── */
.hero-subtitle {
  font-size: clamp(13px, 1.7vw, 19px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.44);
  letter-spacing: 0.02em;           /* final resting state */
  margin-top: clamp(10px, 1.5vw, 18px);
  user-select: none;

  animation: text-reveal-sub 1280ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 120ms both;
}

@keyframes text-reveal-sub {
  0% {
    opacity: 0;
    letter-spacing: 0.35em;
    filter: blur(9px);
    transform: translateY(7px);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    letter-spacing: 0.02em;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* ────────────────────────────────────────────────────────────
   TAGLINE — "LESS BUT EXACT"

   All-caps. Starts 220ms after title.
   Final letter-spacing: 0.22em — appropriate for small caps.
   (Wide caps tracking reads better at small sizes.)
   Color: 26% white — recessive, signature-like.
──────────────────────────────────────────────────────────── */
.hero-tagline {
  font-size: clamp(10px, 1.05vw, 12px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.26);
  letter-spacing: 0.22em;           /* final resting state */
  user-select: none;

  animation: text-reveal-tag 1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 220ms both;
}

@keyframes text-reveal-tag {
  0% {
    opacity: 0;
    letter-spacing: 0.35em;
    filter: blur(8px);
    transform: translateY(5px);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    letter-spacing: 0.22em;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* ── Minimal CTA — appears quietly after all text is done ─── */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: clamp(48px, 7vw, 84px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
  transition: color 0.25s ease;

  opacity: 0;
  animation: fade-in 700ms ease 1900ms both;
}
.hero-cta:hover { color: rgba(255, 255, 255, 0.72); }
.hero-cta svg { flex-shrink: 0; }

/* ── Fade-in utility (used for CTA) ──────────────────────── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   All animations collapse to instant. Elements appear at their
   final state immediately. Shimmer is suppressed entirely.
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-name,
  .hero-subtitle,
  .hero-tagline,
  .hero-cta {
    animation-duration: 0.001ms !important;
    animation-delay:    0ms     !important;
  }
  .hero-shimmer::after {
    animation: none;
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   ABOUT SECTION
══════════════════════════════════════════════════════════════ */
.about-section {
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  padding: 128px 0 144px;
}
@media (max-width: 768px) {
  .about-section { padding: 80px 0 96px; }
}

/* Scroll reveal — IntersectionObserver adds .in */
.about-block {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform  1s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-block.in { opacity: 1; transform: none; }

.about-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 36px;
  user-select: none;
}
.about-statement {
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: clamp(-0.5px, -0.2vw, -1.2px);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 20px;
}
.about-dim {
  font-size: clamp(15px, 1.8vw, 19px);
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: -0.1px;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
footer {
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  padding: 40px 0;
  background: #000;
}
.footer-links {
  color: rgba(255, 255, 255, 0.25);
}
footer a {
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  transition: color 0.2s ease;
}
footer a:hover { color: rgba(255, 255, 255, 0.65); }
