/* =========================================================================
   KAHRAMAN KARAFİL — MINIMALIST EXECUTIVE PRE-LAUNCH EXPERIENCE
   ========================================================================= */

:root {
  --bg: #040406;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --surface-glass: rgba(255, 255, 255, 0.03);
  --surface-active: rgba(255, 255, 255, 0.09);
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-specular: rgba(255, 255, 255, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-silk: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-curtain: cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-intro-active {
  overflow: hidden;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* =========================================================================
   1. SİNEMATİK GİRİŞ ANİMASYONU (INTRO OVERLAY & SPLIT CURTAINS)
   ========================================================================= */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.intro-overlay.is-done {
  pointer-events: none;
  visibility: hidden;
}

.intro-curtain {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.2%;
  background: #040406;
  z-index: 1;
  transition: transform 1.15s var(--ease-curtain);
  will-change: transform;
}

.intro-curtain--top {
  top: 0;
}

.intro-curtain--bottom {
  bottom: 0;
}

.intro-horizon-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 25%,
    #ffffff 50%,
    rgba(255, 255, 255, 0.55) 75%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.65);
  z-index: 2;
  transform: scaleX(0);
  opacity: 0;
  transition:
    transform 0.55s var(--ease-silk),
    opacity 0.4s ease;
}

.intro-overlay.is-splitting .intro-horizon-line {
  transform: scaleX(1);
  opacity: 1;
}

.intro-overlay.is-opening .intro-horizon-line {
  opacity: 0;
}

.intro-overlay.is-opening .intro-curtain--top {
  transform: translateY(-102%);
}

.intro-overlay.is-opening .intro-curtain--bottom {
  transform: translateY(102%);
}

.intro-stage {
  position: relative;
  z-index: 3;
  width: min(84vw, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.65rem;
  transition:
    opacity 0.45s ease,
    transform 0.55s var(--ease-silk),
    filter 0.45s ease;
}

.intro-overlay.is-opening .intro-stage {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(10px);
}

.intro-logo-box {
  position: relative;
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-svg {
  width: 100%;
  height: 100%;
}

.intro-rect {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: drawLine 1.3s var(--ease-silk) forwards;
}

.intro-stroke {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: drawLine 1.15s var(--ease-silk) 0.15s forwards;
}

.intro-ring-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  animation: introPulse 2.2s ease-out infinite;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes introPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}

.intro-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.intro-title-preview {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
}

.intro-first {
  font-weight: 300;
  color: var(--text-secondary);
}

.intro-last {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.16em;
}

.intro-loader-row {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.intro-pct {
  color: var(--text-secondary);
}

.intro-track {
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
}

.intro-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), #ffffff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

/* =========================================================================
   2. AMBIENT SILK WAVE & STARDUST CANVAS
   ========================================================================= */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.subtle-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 25%, rgba(4, 4, 6, 0.8) 100%);
}

/* =========================================================================
   3. CUSTOM MAGNETIC CURSOR (MASAÜSTÜ)
   ========================================================================= */
@media (pointer: fine) {
  .cursor-dot,
  .cursor-aura {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9000;
    transform: translate3d(-100px, -100px, 0);
  }

  .cursor-dot {
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.06s linear, opacity 0.25s ease;
  }

  .cursor-aura {
    width: 34px;
    height: 34px;
    margin-left: -17px;
    margin-top: -17px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.015);
    transition:
      width 0.35s var(--ease-silk),
      height 0.35s var(--ease-silk),
      margin 0.35s var(--ease-silk),
      border-color 0.35s ease,
      background-color 0.35s ease;
  }

  .cursor-aura.is-hover {
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.04);
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-aura {
    display: none !important;
  }
}

/* =========================================================================
   4. SINGLE-VIEWPORT LAYOUT (100dvh + MOBİL SAFE-AREA UYUMLU)
   ========================================================================= */
.viewport {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top, 1.5rem))
    clamp(1.25rem, 5vw, 4rem)
    max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* =========================================================================
   5. TOP BAR (SADECE SAĞ ÜST DİL SEÇİCİ)
   ========================================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.8125rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-btn {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.2rem 0.35rem;
  transition: color 0.3s ease;
}

.lang-btn:hover {
  color: var(--text-secondary);
}

.lang-btn.is-active {
  color: var(--text-primary);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
}

/* =========================================================================
   6. CENTER STAGE: `Kahraman KARAFİL` & İLGİ ALANLARI
   ========================================================================= */
.center-stage {
  margin: auto 0;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(2rem, 4.5vh, 3.25rem);
}

/* Hero Name: `Kahraman KARAFİL` */
.hero-name {
  font-size: clamp(2.4rem, 7.2vw, 5.75rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.24em;
  user-select: none;
  perspective: 900px;
}

.name-word--first {
  font-weight: 300;
  color: #e4e4e7;
}

.name-word--last {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.char-mask {
  display: inline-block;
  overflow: visible;
  vertical-align: bottom;
}

.char {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, 42px, 0) rotateX(-38deg) scale(0.92);
  transform-origin: 50% 100%;
  transition:
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.25s ease,
    text-shadow 0.25s ease;
  will-change: transform, opacity, filter;
}

.name-word--last .char {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #f4f4f6 40%,
    #9ca3af 78%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: metallicSweep 7s linear infinite;
}

@keyframes metallicSweep {
  to {
    background-position: 200% center;
  }
}

body.is-revealed .char {
  animation: charEntrance 1.05s var(--ease-silk) forwards;
  animation-delay: calc(0.06s + var(--char-index, 0) * 0.034s);
}

@keyframes charEntrance {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 42px, 0) rotateX(-38deg) scale(0.92);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translate3d(0, 0px, 0) scale(1);
  }
}

/* =========================================================================
   7. GLIDING INTEREST PILLS & MINIMALIST SUB-KEYWORDS
   ========================================================================= */
.interests-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  width: 100%;
  max-width: 780px;
}

.interests-track {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.28rem;
  padding: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--border-hairline);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* 2D Gliding Glass Pill (Hem Masaüstü Hem Mobil Çoklu Satır Uyumlu) */
.pill-glider {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: var(--surface-active);
  border: 1px solid var(--border-specular);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 6px 22px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.52s var(--ease-silk),
    width 0.52s var(--ease-silk),
    height 0.52s var(--ease-silk);
  pointer-events: none;
  z-index: 0;
}

.interest-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.54rem 1.05rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  transition: color 0.35s ease;
  white-space: nowrap;
}

.pill-icon {
  opacity: 0.5;
  transition: transform 0.45s var(--ease-silk), opacity 0.35s ease;
}

.interest-pill:hover {
  color: rgba(255, 255, 255, 0.9);
}

.interest-pill.is-active {
  color: #ffffff;
  font-weight: 500;
}

.interest-pill.is-active .pill-icon {
  opacity: 1;
  transform: scale(1.12);
}

/* Sade Alt Anahtar Kelimeler (İddialı Cümleler Yerine) */
.interest-keywords-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95rem;
  min-height: 2.2rem;
}

.interest-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.kw-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(6px);
  animation: kwReveal 0.55s var(--ease-silk) forwards;
  animation-delay: calc(var(--k-idx, 0) * 0.065s);
}

.kw-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

@keyframes kwReveal {
  to {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

.cycle-progress {
  width: 48px;
  height: 1.5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cycle-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7));
}

/* =========================================================================
   8. BOTTOM BAR
   ========================================================================= */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.social-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-silk);
}

.social-link:hover {
  color: var(--text-primary);
}

.social-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.social-link svg {
  opacity: 0.6;
  transition: transform 0.35s var(--ease-silk), opacity 0.35s ease;
}

.social-link:hover svg {
  opacity: 1;
  transform: translate(2.5px, -2.5px);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #e4e4e7;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.35; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.12); }
}

/* =========================================================================
   9. STAGGERED ENTRANCE FOR VIEWPORT ELEMENTS AFTER INTRO
   ========================================================================= */
.entrance-item {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(16px) scale(0.985);
}

body.is-revealed .entrance-item {
  animation: silkItemReveal 1.1s var(--ease-silk) forwards;
  animation-delay: calc(var(--order, 1) * 0.09s);
}

@keyframes silkItemReveal {
  to {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
  }
}

/* =========================================================================
   10. MOBİL VE TABLET UYUMLULUK (RESPONSIVE BREAKPOINTS)
   ========================================================================= */
@media (max-width: 720px) {
  .interests-track {
    border-radius: 24px;
    padding: 0.42rem;
    gap: 0.25rem;
    max-width: 100%;
  }

  .interest-pill {
    padding: 0.48rem 0.85rem;
    font-size: 0.77rem;
  }

  .interest-keywords {
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  .kw-item {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2.15rem, 10.5vw, 3rem);
    gap: 0.18em;
  }

  .interest-pill {
    padding: 0.44rem 0.75rem;
    font-size: 0.74rem;
  }

  .bottombar {
    flex-direction: column-reverse;
    gap: 1rem;
    text-align: center;
  }
}
