/* ─────────────────────────────────────────────────────────────────────────
   HALİL UTKU ŞİMŞEK — ENDÜSTRİYEL TASARIMCI PORTFOLYOsu
   ───────────────────────────────────────────────────────────────────────── */

/* ── İçerik koruma katmanı (protect.js ile birlikte çalışır) ── */
html.protect-on img,
html.protect-on video,
html.protect-on model-viewer,
html.protect-on .protected {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  /* iOS Safari long-press → kayıt menüsünü engeller */
}

/* Gallery ve cover görselleri — tıklamayı korur (lightbox/zoom için)
   ama drag/save işlemlerini engeller */
html.protect-on .gallery-item img,
html.protect-on .proj-cover-img {
  pointer-events: auto;
}

/* Korunma toast bildirimi */
.protect-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 99999;
  padding: 14px 24px;
  background: rgba(10, 10, 11, 0.92);
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 40px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
  max-width: 90vw;
  text-align: center;
}
.protect-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body.light .protect-toast {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  border-color: rgba(201, 169, 110, 0.5);
}


/* ── Tokens ── */
:root {
  --bg:          #0a0a0b;
  --bg2:         #0f0f11;
  --surface:     #141416;
  --border:      rgba(255,255,255,.08);
  --text:        #e8e8e8;
  --text-muted:  #888;
  --accent:      #c9a96e;
  --accent2:     #7b6cf6;
  --white:       #ffffff;

  --font-sans:   'Inter', sans-serif;
  --font-serif:  'Playfair Display', serif;

  --ease-out-expo: cubic-bezier(0.16,1,0.3,1);
  --ease-in-out:   cubic-bezier(0.45,0,0.55,1);

  --nav-h: 72px;

  /* ── Glass system ── */
  --glass-bg:        rgba(255,255,255,.025);
  --glass-bg-hover:  rgba(255,255,255,.05);
  --glass-border:    rgba(255,255,255,.07);
  --glass-border-hi: rgba(255,255,255,.14);
  --glass-blur:      blur(28px) saturate(180%);
  --glass-blur-sm:   blur(14px) saturate(160%);
  --glass-shadow:    0 8px 32px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05);
  --glass-shadow-lg: 0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
}

/* ── Light mode overrides ── */
body.light {
  --bg:              #f0ede8;
  --bg2:             #e8e4de;
  --surface:         rgba(255,255,255,.6);
  --border:          rgba(0,0,0,.08);
  --text:            #1a1a1a;
  --text-muted:      #666;
  --white:           #1a1a1a;
  --glass-bg:        rgba(255,255,255,.40);
  --glass-bg-hover:  rgba(255,255,255,.55);
  --glass-border:    rgba(255,255,255,.65);
  --glass-border-hi: rgba(255,255,255,.85);
  --glass-shadow:    0 8px 32px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.75);
  --glass-shadow-lg: 0 20px 60px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.85);
}
body.light ::-webkit-scrollbar-track { background: var(--bg); }
body.light .hero-title { color: #1a1a1a; }
body.light .showcase-title { color: #1a1a1a; }
body.light .section-title { color: #1a1a1a; }
body.light blockquote p { color: #1a1a1a; }
body.light .project-info h3 { color: #1a1a1a; }
body.light .about-text h2 { color: #1a1a1a; }
body.light .contact-text h2 { color: #1a1a1a; }
body.light .stat-num,
body.light .stat-num-dec { color: var(--accent); }
body.light .footer-logo { color: var(--accent); }
body.light #footer {
  background: rgba(240, 237, 232, 0.85);
  border-top-color: rgba(0, 0, 0, 0.08);
}
body.light #footer p { color: #444; }
body.light .footer-socials a {
  border-color: rgba(0, 0, 0, 0.18);
  color: #444;
}
body.light .footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
body.light .nav-links a { color: #555; }
body.light .nav-links a:hover { color: #1a1a1a; }
body.light .skill-block h4 { color: #1a1a1a; }
body.light .edu-card strong { color: #1a1a1a; }
body.light .exp-item strong { color: #1a1a1a; }
body.light .category-label { color: #444; }
body.light .hero-tag {
  background: rgba(0,0,0,.04);
  color: rgba(201,169,110,.95);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.7),
    inset 0 -0.5px 0 rgba(0,0,0,.06);
}

/* ── Light-mode mobile nav: light background + dark readable text ── */
body.light .nav-links.open {
  background: rgba(240,237,232,.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
body.light .nav-links.open li a {
  color: #1a1a1a;
}
body.light .nav-links.open li a:hover {
  color: var(--accent);
}
/* Light-mode burger lines visible on dark hero/showcase */
body.light .burger span { background: #1a1a1a; }

/* ── Light-mode body & surface readability ── */
body.light .project-info p,
body.light .hero-sub,
body.light .section-header p,
body.light .contact-text p,
body.light .about-text p {
  color: #3a3a3a;
}
body.light .edu-card span,
body.light .exp-item span,
body.light .skill-block li {
  color: #444;
}
body.light .project-tags span {
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.55);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.7),
    inset 0 -0.5px 0 rgba(0,0,0,.06);
}
body.light .project-card:hover .project-tags span {
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.78);
}
body.light .project-badge {
  background: rgba(255,255,255,.62);
  color: #1a1a1a;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.85),
    inset 0 -0.5px 0 rgba(0,0,0,.05),
    0 4px 14px rgba(0,0,0,.1);
}
body.light .project-overlay span {
  background: rgba(255,255,255,.62);
  color: #1a1a1a;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.85),
    0 6px 20px rgba(0,0,0,.1);
}
body.light .mq-item img { filter: grayscale(100%) opacity(.85); }
body.light .mq-item:hover img { filter: grayscale(0%) opacity(1); }

/* ── Tema geçişi: yumuşak, lüks his için Material standart easing ── */
body, body * {
  transition:
    background-color .55s cubic-bezier(0.4, 0, 0.2, 1),
    color .5s cubic-bezier(0.4, 0, 0.2, 1),
    border-color .55s cubic-bezier(0.4, 0, 0.2, 1),
    fill .5s cubic-bezier(0.4, 0, 0.2, 1),
    stroke .5s cubic-bezier(0.4, 0, 0.2, 1),
    filter .55s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow .55s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Performans: video/canvas'a transition uygulama. Img'lar logo gibi
   filter geçişine ihtiyaç duyabilir — onları engellemiyoruz; gerek
   olmadığında zaten filter property'si değişmediği için tetiklenmez. */
canvas, video { transition: none !important; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════════
   AI SHOWCASE — DottedSurface (Three.js dalga animasyonu)
═══════════════════════════════════════════════════════════════ */
#ai-showcase {
  position: relative;
  width: 100%;
  height: 88vh;       /* Slogan viewport'a görsel olarak ortalı dursun */
  min-height: 560px;
  overflow: hidden;
  background: transparent; /* Particle canvas hero'da da görünsün */
  /* Flex centering: animasyon transform ile çakışmadan dikey ortalama */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay'ler kaldırıldı — particle canvas tüm sayfada kesintisiz akışı için.
   Hero başlığı kendi text-shadow'u ile okunaklı kalır. */
.showcase-overlay-bottom,
.showcase-overlay-top { display: none; }

/* Content — flex center'da, animasyon translateY ile çakışma yok */
.showcase-content {
  position: relative;
  width: 100%;
  z-index: 3; text-align: center;
  padding: 0 24px;
  animation: showcaseFadeUp .9s .2s both cubic-bezier(0.16,1,0.3,1);
}
@keyframes showcaseFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
.showcase-badge { display: none; }
.showcase-sub { display: none; }

/* SEO/screen reader için görünmez başlık — agresif gizleme */
.sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  font-size: 1px !important;
  line-height: 1 !important;
}

/* Gooey text morph — React component port, iOS Safari uyumlu */
.gooey-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: clamp(200px, 22vw, 360px);
  margin: 0 auto;
  pointer-events: none;
}
.gooey-svg {
  position: absolute;
  width: 1px; height: 1px;
  top: -1px; left: -1px;
  visibility: hidden;
  pointer-events: none;
}
.gooey-stage {
  position: relative;
  width: 100%;
  height: 100%;
  /* SVG threshold filter — feColorMatrix alpha cutoff sonucu blurlu kenarlar
     gooey/akışkan birleşir. iOS için -webkit-filter prefix + GPU compositing zorunlu */
  -webkit-filter: url(#gooey-threshold);
          filter: url(#gooey-threshold);
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  isolation: isolate;
}
.gooey-text {
  position: absolute;
  top: 50%;
  left: 50%;
  /* translateZ(0): iOS'ta filter:blur child'ı compositor'a iter — parent
     SVG filter cascade'ı düzgün çalışsın */
  -webkit-transform: translate(-50%, -50%) translate3d(0, 0, 0);
          transform: translate(-50%, -50%) translate3d(0, 0, 0);
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1;
  text-align: center;
  color: var(--white);
  user-select: none;
  white-space: nowrap;
  transition: color .4s ease;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: filter, opacity;
}

/* Reduced motion: blur'ları kapat, sadece opacity fade */
@media (prefers-reduced-motion: reduce) {
  .gooey-stage { -webkit-filter: none; filter: none; }
  .gooey-text { transition: opacity .5s ease, color .4s ease !important; }
}

/* Switcher */
.media-switcher {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 4;
  display: flex; gap: 6px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 8px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 8px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.switcher-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer; color: rgba(255,255,255,.45);
  transition: all .35s cubic-bezier(0.16,1,0.3,1);
  white-space: nowrap;
  font-family: var(--font-sans);
}
.switcher-btn:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.switcher-btn.active {
  background: rgba(201,169,110,.15);
  border-color: rgba(201,169,110,.45);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 2px 12px rgba(201,169,110,.15);
}
.switcher-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.switcher-icon svg { width: 14px; height: 14px; }
.switcher-btn span:not(.switcher-icon) { font-size: .82rem; font-weight: 600; }
.switcher-btn small { font-size: .68rem; color: inherit; opacity: .6; margin-left: 2px; }

/* Progress bar */
.showcase-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: rgba(255,255,255,.06); z-index: 5;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  width: 0%;
  transition: width linear;
  border-radius: 99px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV — Floating glass pill
═══════════════════════════════════════════════════════════════ */
/* ── 3D Adaptive Navigation Pill ──
   Multi-layer shadow stack + gloss reflections + premium metalik his.
   "3d-adaptive-navigation-bar" referansından vanilla CSS port. */
/* ── Nav: GPU-only scroll animation — sıfır layout reflow ──
   Layout property'lerini (width, top, max-width) hiç değiştirmiyoruz.
   Scroll'a göre tek değişen şey: transform (translate + scale).
   Bu 100% GPU-composited, mobilde bile 60fps smooth. */
:root { --scroll-p: 0; }

#nav {
  position: fixed;
  top: 14px;
  left: 50%;
  width: calc(100% - 24px);
  max-width: 1120px;
  z-index: 100;
  display: flex; align-items: center;

  background: rgba(255, 255, 255, calc(0.045 + 0.030 * var(--scroll-p)));
  backdrop-filter:
    blur(calc(40px + 6px * var(--scroll-p)))
    saturate(calc(180% + 15% * var(--scroll-p)));
  -webkit-backdrop-filter:
    blur(calc(40px + 6px * var(--scroll-p)))
    saturate(calc(180% + 15% * var(--scroll-p)));
  border: 0;
  border-radius: 9999px;

  /* Liquid Glass: uzun yumuşak drop + inset highlight (üst sheen) +
     inset bottom (gravity). Dış halka yok — çift çerçeve izi yapardı. */
  box-shadow:
    0 calc(8px + 3px * var(--scroll-p))
      calc(24px + 6px * var(--scroll-p)) -8px
      rgba(0, 0, 0, calc(0.30 + 0.06 * var(--scroll-p))),
    0 calc(20px + 6px * var(--scroll-p))
      calc(48px + 8px * var(--scroll-p)) -16px
      rgba(0, 0, 0, calc(0.24 + 0.06 * var(--scroll-p))),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);

  /* Tek transform: scroll'a göre yukarı kayma + nazik küçülme.
     transform-origin: top center → küçülme üst kenara doğru olur,
     daha doğal his. Pure GPU, hiç layout reflow yok. */
  transform:
    translate(-50%, calc(-3px * var(--scroll-p)))
    scale(calc(1 - 0.025 * var(--scroll-p)));
  transform-origin: 50% 0%;

  animation: navSlideIn .9s cubic-bezier(.22,1,.36,1) both;
  will-change: transform;
}
@keyframes navSlideIn {
  from { opacity: 0; transform: translate(-50%, -140%); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Light mode — aynı scroll-linked interpolation */
body.light #nav {
  background: rgba(255, 255, 255, calc(0.55 + 0.17 * var(--scroll-p)));
  box-shadow:
    0 calc(8px + 3px * var(--scroll-p))
      calc(24px + 6px * var(--scroll-p)) -8px
      rgba(0, 0, 0, calc(0.10 + 0.03 * var(--scroll-p))),
    0 calc(20px + 6px * var(--scroll-p))
      calc(48px + 8px * var(--scroll-p)) -16px
      rgba(0, 0, 0, calc(0.10 + 0.04 * var(--scroll-p))),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}
.nav-inner {
  width: 100%;
  height: 56px;
  padding: 0 10px 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700;
  color: var(--accent);
  display: flex; align-items: center;
  letter-spacing: .05em;
  /* Renkli arka planlarda da görünür kalsın */
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.nav-links {
  display: flex; gap: 36px;
  position: relative; z-index: 2;
}
.nav-links a {
  font-size: .875rem; font-weight: 530;
  color: rgba(255,255,255,.78); letter-spacing: .045em;
  position: relative; padding: 4px 2px;
  /* Renkli/parlak arka planlarda da okunaklı kalsın */
  text-shadow:
    0 1px 2px rgba(0,0,0,.55),
    0 0 8px rgba(0,0,0,.35);
  transition:
    color .3s ease,
    transform .3s cubic-bezier(0.34, 1.56, 0.64, 1),
    text-shadow .3s ease,
    font-weight .2s ease;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .35s var(--ease-out-expo);
}
.nav-links a:hover {
  color: #ffffff;
  transform: translateY(-1px);
  text-shadow:
    0 1px 3px rgba(0,0,0,.65),
    0 0 12px rgba(0,0,0,.45);
}
.nav-links a:hover::after { width: 100%; }
/* Active link — bold + güçlü kontrast (her arka planda okunur) */
.nav-links a.active {
  color: #ffffff;
  font-weight: 680;
  transform: translateY(-1.5px);
  text-shadow:
    0 1px 3px rgba(0,0,0,.7),
    0 0 14px rgba(0,0,0,.5);
}
.nav-links a.active::after { width: 100%; background: var(--accent); }

/* Light mode — koyu yazı + ince beyaz halo (renkli görsellerde de okunur) */
body.light .nav-links a {
  color: #1f1f1f;
  font-weight: 530;
  letter-spacing: .045em;
  text-shadow:
    0 1px 2px rgba(255,255,255,.7),
    0 0 8px rgba(255,255,255,.5);
}
body.light .nav-links a:hover {
  color: #000000;
  text-shadow:
    0 1px 3px rgba(255,255,255,.8),
    0 0 12px rgba(255,255,255,.6);
}
body.light .nav-links a.active {
  color: #000000;
  font-weight: 680;
  text-shadow:
    0 1px 3px rgba(255,255,255,.9),
    0 0 14px rgba(255,255,255,.7);
}
body.light .lang-toggle {
  background: rgba(255,255,255,.55);
  border-color: rgba(0,0,0,.08);
  color: #1f1f1f;
  text-shadow: 0 1px 2px rgba(255,255,255,.7);
}
body.light .burger span {
  background: #1a1a1a;
  box-shadow: 0 1px 2px rgba(255,255,255,.7);
}
body.light .logo { filter: drop-shadow(0 1px 3px rgba(255,255,255,.6)); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.burger { display: none; flex-direction: column; gap: 5px; }
.burger span {
  display: block; width: 24px; height: 1.5px;
  background: #ffffff; transition: .3s;
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* ── Theme Toggle — icon-only glass circle ── */
/* ── Apple Liquid Glass Theme Switcher (vanilla port) ──
   2-segment pill + sliding indicator. SVG turbulence filter atlandı
   (Firefox desteklemiyor + her sayfada inline base64 olur). Aynı
   premium glass+sliding pattern multi-layer shadow ile yakalandı. */
.theme-toggle {
  position: relative;
  display: inline-flex; align-items: center; justify-content: flex-start;
  width: 76px; height: 38px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.06) 0%,
      rgba(255,255,255,.02) 50%,
      rgba(0,0,0,.04) 100%
    );
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 4px 14px rgba(0,0,0,.18),
    inset 0 0.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
  transition:
    box-shadow .35s cubic-bezier(0.4,0,0.2,1),
    background .35s cubic-bezier(0.4,0,0.2,1) !important;
}

/* Sliding indicator pill — body.light class'ına göre pozisyon değişir */
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 32px; height: 32px;
  border-radius: 100px;
  background: linear-gradient(180deg,
    rgba(201,169,110,0.95) 0%,
    rgba(155,135,63,1) 100%
  );
  box-shadow:
    0 2px 6px rgba(201,169,110,.45),
    0 1px 2px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,253,221,.7),
    inset 0 -1px 0 rgba(85,68,20,.3),
    inset 0 0 0 0.5px rgba(255,253,221,.25);
  /* Default (dark mode): indicator sağda — ay tarafında */
  transform: translateX(38px);
  transition: transform .45s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
/* Light mode: indicator sola kayar (güneş tarafına) */
body.light .theme-toggle::before {
  transform: translateX(0);
}

.theme-toggle:hover {
  box-shadow:
    0 8px 22px rgba(0,0,0,.24),
    inset 0 0.5px 0 rgba(255,235,180,.18),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
}

/* İki icon yan yana — hep görünür, indicator altında active olan vurgulu */
.theme-icon {
  position: relative;
  z-index: 2;
  display: flex !important;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  color: rgba(255,255,255,.45);
  transition: color .35s cubic-bezier(0.4,0,0.2,1);
}
.theme-icon svg { width: 16px; height: 16px; }

/* Default (dark mode): ay (sağdaki) aktif — koyu metalik üstünde beyaz */
body:not(.light) .theme-icon-dark { color: #1a1410; }
body:not(.light) .theme-icon-light { color: rgba(255,255,255,.45); }

/* Light mode: güneş (soldaki) aktif */
body.light .theme-icon-light { color: #1a1410; }
body.light .theme-icon-dark { color: rgba(0,0,0,.35); }

/* Light mode container — daha açık glass */
body.light .theme-toggle {
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.7) 0%,
      rgba(255,255,255,.5) 50%,
      rgba(0,0,0,.04) 100%
    );
  box-shadow:
    0 4px 12px rgba(0,0,0,.10),
    0 1px 3px rgba(0,0,0,.06),
    inset 2px 2px 0.5px -2px rgba(255,255,255,.95),
    inset -2px -2px 0.5px -2px rgba(0,0,0,.10),
    inset 1px 1px 1px -0.5px rgba(255,255,255,.7),
    inset -1px -1px 1px -0.5px rgba(0,0,0,.06),
    inset 0 0 4px 4px rgba(0,0,0,.02),
    inset 0 0 0 1px rgba(0,0,0,.06);
}

/* Label hidden — only iconlar görünür */
.theme-label { display: none; }

/* ═══════════════════════════════════════════════════════════════
   SPLASH SCREEN — fast intro: logo letters fade-up, name wipes in
═══════════════════════════════════════════════════════════════ */
#splash {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  pointer-events: auto;
  transition: opacity .5s cubic-bezier(0.65,0,0.35,1),
              visibility 0s linear .5s;
}
#splash.splash-out {
  opacity: 0;
  visibility: hidden;
}
.splash-inner {
  display: flex; align-items: center; justify-content: center;
}
.splash-logo {
  width: 140px; height: auto;
  transform: scale(.94);
  filter: drop-shadow(0 0 36px rgba(255,255,255,.08));
  animation: splashScale 1s cubic-bezier(0.16,1,0.3,1) forwards;
}

/* The 3 letter shapes — fade + slight rise, staggered */
.splash-p {
  opacity: 0;
  transform: translateY(6px);
  transform-origin: center;
  animation: splashRise .55s cubic-bezier(0.16,1,0.3,1) forwards;
}
.splash-p1 { animation-delay: .05s; }
.splash-p2 { animation-delay: .12s; }
.splash-p3 { animation-delay: .19s; }

/* The "HALİL UTKU ŞİMŞEK" name wipes in left-to-right after the letters */
.splash-text {
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
  opacity: 0;
  animation: splashWipe .65s cubic-bezier(0.22,1,0.36,1) .35s forwards;
}

@keyframes splashScale { to { transform: scale(1); } }
@keyframes splashRise  {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashWipe  {
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
  }
}

/* Light mode splash — softer drop shadow + dark logo & text fill */
body.light .splash-logo { filter: drop-shadow(0 0 24px rgba(0,0,0,.10)); }
body.light .splash-p { fill: #1a1a1a; }
body.light .splash-text { fill: #1a1a1a; }

/* Synchronous early hint for light theme (set on <html> by splash.js before
   <body> arrives) — prevents a dark flash on first paint for light-mode users */
html.pre-light #splash { background: #f0ede8; }
html.pre-light .splash-p { fill: #1a1a1a; }
html.pre-light .splash-text { fill: #1a1a1a; }

/* Skip splash entirely on in-session navigations (set synchronously by splash.js).
   `display: none` before first paint = no flash. */
html.splash-skip #splash { display: none !important; }

/* Reduce motion — skip animations, show static logo */
@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-p, .splash-text {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
  }
}

/* ── Language Toggle — adapts to theme, smooth animated text flip ── */
.lang-toggle {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; min-width: 44px; padding: 0 14px;
  border-radius: 19px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  font-family: var(--font-sans);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  overflow: hidden;
  transition:
    border-color .5s var(--ease-out-expo),
    color        .5s var(--ease-out-expo),
    background   .5s var(--ease-out-expo),
    box-shadow   .5s var(--ease-out-expo),
    transform    .25s var(--ease-out-expo) !important;
}
.lang-toggle:hover {
  border-color: rgba(201,169,110,.55);
  color: var(--accent);
  background: var(--glass-bg-hover);
  box-shadow: 0 8px 24px rgba(201,169,110,.18), inset 0 1px 0 rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.lang-toggle:active { transform: translateY(0) scale(.94); }

/* Light mode — explicit, slightly stronger contrast */
body.light .lang-toggle {
  color: #444;
  border-color: rgba(0,0,0,.08);
}
body.light .lang-toggle:hover {
  color: var(--accent);
  border-color: rgba(201,169,110,.55);
}

/* Animated text flip on language change */
.lang-current {
  display: inline-block;
  line-height: 1;
  transition: transform .35s var(--ease-out-expo), opacity .25s var(--ease-out-expo);
  will-change: transform, opacity;
}
.lang-current.flipping {
  transform: translateY(-110%);
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   BUTTONS — Liquid Glass + Metallic Gold tasarım dili
   (Apple iOS 18 / Vision OS estetiği, vanilla CSS port)
═══════════════════════════════════════════════════════════════ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: .875rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  border: 0;
  isolation: isolate;
  transition:
    transform .35s var(--ease-out-expo),
    box-shadow .35s var(--ease-out-expo),
    filter .25s ease,
    color .3s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.985); transition-duration: .15s; }

/* ── Primary: Metallic Gold (MetalButton port) ─────────────────────────
   3 katmanlı yapı (wrapper, inner, button) ::before/::after ile çözüldü.
   Multi-stop gradient + inset highlight + subtle ring + soft shadow. */
/* ── Primary: sade altın pill, hairline yok, shimmer yok ── */
.btn-primary {
  color: #1a1410;
  background: linear-gradient(180deg, #E8C887 0%, #C9A96E 100%);
  box-shadow: 0 6px 20px rgba(201,169,110,.28);
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(201,169,110,.40);
}

/* ── Ghost: sade şeffaf cam pill ── */
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
}
.btn-ghost:hover {
  color: var(--accent);
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
  border-color: rgba(201,169,110,.25);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

/* Light mode — sade glass pill */
body.light .btn-ghost {
  color: #1a1a1a;
  background: rgba(255,255,255,.55);
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
body.light .btn-ghost:hover {
  background: rgba(255,255,255,.7);
  border-color: rgba(201,169,110,.4);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

/* Full-width primary form butonu — dolu altın görünüm korunur */
.full-w { width: 100%; justify-content: center; border-radius: 14px; }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  row-gap: 32px;
  overflow: hidden;
  margin-top: -120px;
  padding-top: 120px;
  padding-bottom: 48px;
  z-index: 1;
}
/* Global fixed particle background — behind all content */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
}
/* Content layers above canvas */
#ai-showcase, #hero, #work, #about, #skills, #contact, #footer, nav, .marquee-wrap {
  position: relative;
  z-index: 1;
}

/* ── Off-fold sections: content-visibility ──
   Tarayıcı viewport dışındaki bölümleri layout/paint etmez → ilk render hızlanır.
   contain-intrinsic-size yaklaşık yükseklik olarak rezerve edilir (CLS'siz).
   #work hariç (LCP olabilir), tipografi üstündeki ilk bölümler eager kalır. */
@supports (content-visibility: auto) {
  #about, #skills, #testimonial, #contact, #footer {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1200px;
  }
  #footer { contain-intrinsic-size: 1px 240px; }
  #testimonial { contain-intrinsic-size: 1px 360px; }
}
/* Make section backgrounds transparent so particles show through */
#hero, #work, #about, #skills, #contact { background: transparent; }
.hero-content {
  position: relative; z-index: 1;
  max-width: 1300px; margin: 0 auto;
  padding: 0 40px;
  padding-top: var(--nav-h);
  align-self: center;
  width: 100%;
}
.hero-tag {
  display: inline-block;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(201,169,110,.85);
  padding: 8px 18px;
  border: none;
  border-radius: 100px;
  margin-bottom: 32px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.12),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic; color: var(--accent);
}
.hero-sub {
  max-width: 520px;
  font-size: 1.05rem; line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.hero-cta {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.hero-scroll-hint {
  justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-muted); z-index: 1;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ═══════════════════════════════════════════════════════════════
   TEXT MARQUEE
═══════════════════════════════════════════════════════════════ */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  position: relative;
}
.text-marquee-wrap { padding: 20px 0; }

/* Edge fade masks */
.marquee-fade {
  position: absolute; top: 0; bottom: 0; width: 120px;
  z-index: 2; pointer-events: none;
}
.marquee-fade-l {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.marquee-fade-r {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

/* Track */
.text-marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  will-change: transform;
  animation: text-marquee 28s linear infinite;
  animation-play-state: running !important;
}

@keyframes text-marquee {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .text-marquee-track { animation-duration: 60s; }
}

/* Program logo */
.mq-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 28px;
  transition: transform .3s ease, filter .3s ease;
}
.mq-item img {
  height: 44px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  filter: grayscale(100%) opacity(.7);
  transition: filter .3s ease, transform .3s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.mq-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════════════════════════ */
.container {
  max-width: 1300px; margin: 0 auto;
  padding: 0 40px;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════════════════════ */
.section-tag {
  display: inline-block;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(201,169,110,.85); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700; color: var(--white);
}
.section-header { margin-bottom: 64px; }

/* ═══════════════════════════════════════════════════════════════
   LAMP INTRO — dramatik bölüm geçişi (conic-gradient ışık konileri)
   #work section'ının başında kullanılır. Tamamen şeffaf zemin —
   sayfa arka planı / particle canvas görünür. Lamp ışığı katman
   olarak üzerine düşer. Scroll'la element viewport'a girince
   IntersectionObserver `.in-view` ekler, animasyon CSS variable
   ile sürülür (kasmasız, GPU-only transform).
═══════════════════════════════════════════════════════════════ */
.lamp-intro {
  position: relative;
  width: 100%;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  margin: 60px 0;
  /* Animasyon ilerlemesi — initial 0, .in-view geldiğinde 1 */
  --lamp-progress: 0;
  transition: --lamp-progress 1.4s var(--ease-out-expo, cubic-bezier(.16,1,.3,1));
}
.lamp-intro.in-view { --lamp-progress: 1; }

/* CSS Custom Property animation registration — Houdini destekli
   tarayıcılarda smooth interpolation. Desteklemeyenlerde fallback
   olarak alt'taki ayrı class transition'ları kullanılır. */
@property --lamp-progress {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}

.lamp-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* İki konik ışık — container'ın dikey ortasından açılır.
   Genişlik scroll'da 16rem → 32rem büyür, transform-only (GPU). */
.lamp-cone {
  position: absolute;
  top: 50%;
  height: 14rem;
  width: 32rem;                                            /* Final genişlik */
  opacity: 1;
  /* scaleX 0.5 → 1 ile 16rem etkisinden 32rem'e expand olur.
     scale dönüşümü pure GPU, layout reflow yok → asla kasmaz. */
  transform-origin: center top;
  transform: scaleX(calc(.5 + .5 * var(--lamp-progress)));
  will-change: transform;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}
.lamp-cone-l {
  right: 50%;
  background: conic-gradient(from 70deg at center top,
    rgba(232,201,138,.85) 0deg,
    rgba(232,201,138,.35) 14deg,
    transparent 32deg,
    transparent 360deg);
}
.lamp-cone-r {
  left: 50%;
  background: conic-gradient(from 290deg at center top,
    transparent 0deg,
    transparent 328deg,
    rgba(232,201,138,.35) 346deg,
    rgba(232,201,138,.85) 360deg);
}

/* Pivot çizgisi — lamp'in asıldığı yatay altın çizgi.
   scaleX ile genişler, pure GPU. */
.lamp-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -1px) scaleX(calc(.5 + .5 * var(--lamp-progress)));
  width: 32rem;
  height: 2px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(232,201,138,.95) 30%,
    rgba(232,201,138,.95) 70%,
    transparent 100%);
  z-index: 3;
  will-change: transform;
  box-shadow: 0 0 24px rgba(232,201,138,.35);
}

/* Pivot etrafında parlaklık — lamp body glow */
.lamp-glow-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(calc(.6 + .4 * var(--lamp-progress)));
  width: 14rem;
  height: 5rem;
  background: radial-gradient(ellipse at center, rgba(232,201,138,.7) 0%, transparent 65%);
  filter: blur(18px);
  z-index: 2;
  will-change: transform;
}
.lamp-glow-wide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -25%) scale(calc(.7 + .3 * var(--lamp-progress)));
  width: 28rem;
  height: 7rem;
  background: radial-gradient(ellipse at center, rgba(201,169,110,.35) 0%, transparent 70%);
  filter: blur(36px);
  z-index: 1;
  will-change: transform;
}

/* İçerik — koni ışığının altında, ortalı */
.lamp-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px;
  margin-top: 60px;
}
.lamp-content .section-tag {
  color: rgba(232,201,138,.9);
  text-shadow: 0 0 24px rgba(201,169,110,.4);
  opacity: calc(var(--lamp-progress));
  transition: opacity .9s ease .3s;
}
.lamp-content .section-title {
  background: linear-gradient(to bottom right, #f4e6c4, #c9a96e);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  letter-spacing: -.01em;
  /* opacity ve translateY pure variable-driven — JS yok, kasma yok */
  opacity: calc(var(--lamp-progress));
  transform: translateY(calc(30px * (1 - var(--lamp-progress))));
  transition: opacity .9s ease .3s, transform .9s var(--ease-out-expo, cubic-bezier(.16,1,.3,1)) .3s;
}

/* Houdini @property desteklemeyen tarayıcılar için fallback:
   classic class-based transition. CSS yeterince güvenli. */
@supports not (background: paint(test)) {
  .lamp-cone {
    transform: scaleX(.5);
    transition: transform 1.4s var(--ease-out-expo, cubic-bezier(.16,1,.3,1));
  }
  .lamp-intro.in-view .lamp-cone { transform: scaleX(1); }
  .lamp-line {
    transform: translate(-50%, -1px) scaleX(.5);
    transition: transform 1.4s var(--ease-out-expo, cubic-bezier(.16,1,.3,1));
  }
  .lamp-intro.in-view .lamp-line { transform: translate(-50%, -1px) scaleX(1); }
  .lamp-glow-core { transform: translate(-50%, -50%) scale(.6); transition: transform 1.4s var(--ease-out-expo); }
  .lamp-intro.in-view .lamp-glow-core { transform: translate(-50%, -50%) scale(1); }
  .lamp-glow-wide { transform: translate(-50%, -25%) scale(.7); transition: transform 1.4s var(--ease-out-expo); }
  .lamp-intro.in-view .lamp-glow-wide { transform: translate(-50%, -25%) scale(1); }
  .lamp-content .section-tag,
  .lamp-content .section-title { opacity: 0; }
  .lamp-intro.in-view .lamp-content .section-tag,
  .lamp-intro.in-view .lamp-content .section-title { opacity: 1; transform: translateY(0); }
}

/* Reduced motion — animasyonu kapat, final state'i direkt göster */
@media (prefers-reduced-motion: reduce) {
  .lamp-intro { --lamp-progress: 1; transition: none; }
  .lamp-cone, .lamp-line, .lamp-glow-core, .lamp-glow-wide,
  .lamp-content .section-tag, .lamp-content .section-title { transition: none; }
}

/* Mobile */
@media (max-width: 768px) {
  .lamp-intro { min-height: 360px; margin: 32px 0; }
  .lamp-cone { height: 10rem; width: 22rem; }
  .lamp-line { width: 22rem; }
  .lamp-glow-core { width: 11rem; height: 4rem; }
  .lamp-glow-wide { width: 20rem; height: 6rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SHOWREEL — ContainerScroll (vanilla port)
   Scroll progress'ine bağlı: rotateX 20→0, scale + translateY
═══════════════════════════════════════════════════════════════ */
.reel-section {
  /* Scroll progress hesaplaması için yüksek bir container — kart bu
     container içinde scroll edildikçe rotate + scale ediyor.
     Başlık kaldırıldığı için 60→48rem kısaldı (daha sıkı oran). */
  height: 48rem;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 8px;
}
.reel-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 0;
  position: relative;
  /* Perspective parent — children'da rotateX 3D çalışsın */
  perspective: 1000px;
}
.reel-card {
  max-width: 1100px;
  margin: 0 auto;
  height: 30rem;
  width: 100%;
  /* Mac monitor / device frame estetiği — site paletine uyarlandı */
  border: 1px solid rgba(255,255,255,.08);
  padding: 8px;
  background: linear-gradient(180deg, #1a1a1c 0%, #141416 100%);
  border-radius: 28px;
  /* Çok katmanlı uzun gölge (orijinal Aceternity stack) */
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 9px 20px rgba(0,0,0,.30),
    0 37px 37px rgba(0,0,0,.26),
    0 84px 50px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.06);
  /* JS scroll progress'ine göre rotateX + scale */
  transform: rotateX(var(--reel-rotate, 12deg)) scale(var(--reel-scale, 1.02));
  transform-origin: 50% 100%;
  will-change: transform;
  transition: box-shadow .4s ease;
}
.reel-card-inner {
  position: relative;
  height: 100%; width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #0a0a0b;
}
.reel-deck {
  position: absolute; inset: 0;
  border-radius: 16px;
  overflow: hidden;
}
.reel-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  transform: scale(1.03);
}
.reel-video.is-active {
  opacity: 1;
  transform: scale(1.06);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 7s linear;
}

/* Subtle progress bar — gold thread along the bottom of the card */
.reel-progress {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  height: 2px; z-index: 4;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}
.reel-progress-bar {
  display: block;
  height: 100%; width: 0%;
  background: linear-gradient(to right, transparent, var(--accent) 60%, #f0d999);
  box-shadow: 0 0 10px rgba(201,169,110,.55);
  transition: width .12s linear;
}
body.light .reel-progress { background: rgba(0,0,0,.08); }
/* Light mode — kart çerçevesi açık paletteki ile harmanlansın */
body.light .reel-card {
  background: linear-gradient(180deg, #ffffff 0%, #f5f1ea 100%);
  border-color: rgba(0,0,0,.08);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.04),
    0 9px 20px rgba(0,0,0,.10),
    0 37px 37px rgba(0,0,0,.08),
    0 84px 50px rgba(0,0,0,.05),
    inset 0 1px 0 rgba(255,255,255,.85);
}
body.light .reel-card-inner { background: #f0ede8; }
body.light .reel-title { color: #1a1a1a; }

/* Tablet & mobile — yükseklik düşür, padding sıkıştır */
@media (max-width: 768px) {
  .reel-section { height: 44rem; padding: 4px; }
  .reel-inner { padding: 24px 0; }
  .reel-card { height: 24rem; padding: 6px; border-radius: 22px; }
  .reel-card-inner { border-radius: 16px; }
  .reel-video { border-radius: 12px; }
}
@media (max-width: 480px) {
  .reel-section { height: 36rem; }
  .reel-card { height: 19rem; }
}

/* Reduced motion — 3D rotate kapalı, sadece görsel görünür */
@media (prefers-reduced-motion: reduce) {
  .reel-card { transform: none !important; }
  .reel-header { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   WORK
═══════════════════════════════════════════════════════════════ */
#work {
  padding: 140px 0;
  background: transparent;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  contain: layout style;
}
/* Project card — Safari pill stili: minimalist smooth glass */
.project-card {
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  position: relative;
  isolation: isolate;
  /* contain: layout style → paint scope daralt, scroll'da diğer kartları
     etkilemez. content-visibility KULLANMA — viewport'a girince ilk-render
     maliyeti backdrop-filter'la birleşip jank yaratıyordu. */
  contain: layout style;
  box-shadow:
    0 8px 28px rgba(0,0,0,.22),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
  transition: transform .5s var(--ease-out-expo), box-shadow .45s ease, background .35s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.04);
  box-shadow:
    0 18px 48px rgba(0,0,0,.32),
    0 0 60px rgba(201,169,110,.06),
    inset 0 0.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
}
body.light .project-card {
  background: rgba(255,255,255,.55);
  box-shadow:
    0 8px 28px rgba(0,0,0,.08),
    inset 0 0.5px 0 rgba(255,255,255,.85),
    inset 0 -0.5px 0 rgba(0,0,0,.05);
}
body.light .project-card:hover {
  background: rgba(255,255,255,.7);
  box-shadow:
    0 16px 44px rgba(0,0,0,.12),
    0 0 60px rgba(201,169,110,.08),
    inset 0 0.5px 0 rgba(255,255,255,.9),
    inset 0 -0.5px 0 rgba(0,0,0,.06);
}
.project-card.wide { grid-column: 1 / -1; display: flex; }
.project-card.wide .project-visual { flex: 0 0 55%; }
.project-card.wide .project-info { flex: 1; }

.project-visual {
  position: relative; overflow: hidden;
  aspect-ratio: 16/10;
  background: #1e1e22;
}
.project-card.wide .project-visual { aspect-ratio: unset; min-height: 320px; }

/* Cover image inside project visual */
.project-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transition: transform .6s var(--ease-out-expo);
}
.project-card:hover .project-cover-img { transform: scale(1.05); }

/* Project gradient backgrounds — Yat */
.p1 { background: linear-gradient(135deg, #0a1628 0%, #0d2347 50%, #0f3460 100%); }
.p2 { background: linear-gradient(135deg, #0a1f1a 0%, #0d3028 50%, #0a2820 100%); }
.p3 { background: linear-gradient(135deg, #1a1530 0%, #211850 50%, #1a1440 100%); }
/* Endüstriyel */
.p4 { background: linear-gradient(135deg, #1c1a10 0%, #2e2a18 50%, #3a3020 100%); }
.p5 { background: linear-gradient(135deg, #1a1010 0%, #2e1818 50%, #3a1010 100%); }
.p6 { background: linear-gradient(135deg, #101820 0%, #182030 50%, #0e1c2a 100%); }
.p9 { background: linear-gradient(135deg, #0d1018 0%, #181e2a 50%, #0a1422 100%); }
/* Kentsel */
.p7 { background: linear-gradient(135deg, #0e1e10 0%, #162816 50%, #0a200c 100%); }
.p8 { background: linear-gradient(135deg, #1e1010 0%, #301818 50%, #3a1414 100%); }
.p10 { background: linear-gradient(135deg, #1a0a0c 0%, #2a1014 50%, #4a0e10 100%); }

/* Category blocks */
.category-block { margin-bottom: 72px; }
.category-block:last-child { margin-bottom: 0; }
.category-label {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.category-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.cat-icon { font-size: 1rem; }

/* Project badge — Safari pill stilinde, kenarlıksız smooth glass */
.project-badge {
  position: absolute; top: 18px; left: 18px;
  font-size: .62rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(0,0,0,.42);
  border: none;
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.18),
    inset 0 -0.5px 0 rgba(255,255,255,.04),
    0 4px 14px rgba(0,0,0,.18);
  z-index: 2;
}

/* Eski morphing blob kaldırıldı — görseli kapatıyor ve buton ile
   bağlantısı yoktu. CTA artık tek odak noktası. */
.project-shape { display: none; }

/* Detay overlay — alt orta spotlight + glass pill button.
   Spotlight, butonun arkasında yumuşak altın halo veriyor; buton ve
   gradient tek bir tasarım birimi olarak okunuyor. */
.project-overlay {
  position: absolute; inset: 0;
  background:
    /* alt orta altın spotlight (butonu çevreliyor) */
    radial-gradient(ellipse 60% 38% at 50% 86%,
      rgba(201,169,110,.18) 0%,
      rgba(201,169,110,.06) 35%,
      transparent 70%),
    /* okunaklılık için alt karartma gradient */
    linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 24px;
  opacity: 0;
  transition: opacity .4s cubic-bezier(0.4,0,0.2,1);
  z-index: 3;
}
.project-overlay span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 100px;
  background: rgba(10,10,11,.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  color: rgba(255,255,255,.95);
  /* Liquid Glass: inset highlight + drop + altın spotlight'la harmanlanmış glow */
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.22),
    inset 0 -0.5px 0 rgba(0,0,0,.20),
    0 6px 20px rgba(0,0,0,.30),
    0 0 24px rgba(201,169,110,.12);
  transform: translateY(8px);
  transition: transform .45s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-card:hover .project-overlay span { transform: translateY(0); }

/* Touch cihazlarda (mobile/tablet) hover yok — overlay her zaman görünür.
   Buton ve spotlight bir bütün olarak okunsun, kullanıcı CTA'yı görsün. */
@media (hover: none) {
  .project-overlay { opacity: 1; }
  .project-overlay span { transform: translateY(0); }
}

.project-info { padding: 32px 36px; }
.project-meta {
  display: flex; gap: 14px;
  font-size: .65rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 14px;
}
.project-info h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 700;
  color: var(--white); margin-bottom: 12px;
  transition: color .3s;
}
.project-card:hover .project-info h3 { color: var(--accent); }
.project-info p { font-size: .9rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 20px; }
/* Project tags — Safari pill stilinde, sessiz ve smooth */
/* Yazılım/program tag'leri gizli — proje sayfalarında ve kartlarda
   hangi araçların kullanıldığını ifşa etmiyoruz */
.project-tags, .proj-tags { display: none !important; }
.project-tags span {
  font-size: .65rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 100px;
  background: rgba(255,255,255,.04);
  border: none;
  color: rgba(255,255,255,.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.07),
    inset 0 -0.5px 0 rgba(0,0,0,.2);
  transition: color .3s, background .3s, box-shadow .3s;
}
.project-card:hover .project-tags span {
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.06);
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════ */
#about {
  padding: 140px 0;
  background: rgba(15,15,17,.55);
  backdrop-filter: blur(2px);
  border-top: 1px solid var(--border);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: center;
}
/* Education card */
/* Edu card — liquid glass treatment */
.edu-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 18px; padding: 18px 22px;
  margin-top: 20px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  position: relative;
  box-shadow:
    0 6px 22px rgba(0,0,0,.18),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1), box-shadow .35s ease, background .3s ease;
}
.edu-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.04);
  box-shadow:
    0 12px 30px rgba(0,0,0,.22),
    inset 0 0.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
}
body.light .edu-card {
  background: rgba(255,255,255,.55);
  box-shadow:
    0 6px 22px rgba(0,0,0,.08),
    inset 0 0.5px 0 rgba(255,255,255,.85),
    inset 0 -0.5px 0 rgba(0,0,0,.05);
}
body.light .edu-card:hover {
  background: rgba(255,255,255,.7);
  box-shadow:
    0 12px 30px rgba(0,0,0,.10),
    inset 0 0.5px 0 rgba(255,255,255,.9),
    inset 0 -0.5px 0 rgba(0,0,0,.06);
}
.edu-icon { font-size: 1.4rem; flex-shrink: 0; }
.edu-card strong { display: block; font-size: .9rem; color: var(--white); margin-bottom: 2px; }
.edu-card span { display: block; font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.edu-gpa {
  display: inline-block; margin-top: 6px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 100px; padding: 2px 10px;
}

/* Experience timeline */
.experience-list {
  display: flex; flex-direction: column; gap: 0;
  margin: 28px 0; border-left: 2px solid var(--border);
  padding-left: 24px;
}
.exp-item {
  position: relative; padding-bottom: 20px;
}
.exp-item:last-child { padding-bottom: 0; }
.exp-dot {
  position: absolute; left: -31px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg2);
}
.exp-item strong { display: block; font-size: .88rem; color: var(--white); margin-bottom: 3px; }
.exp-item span { font-size: .78rem; color: var(--text-muted); line-height: 1.5; }

/* Skills — cert list */
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-list li { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--text-muted); }
.cert-badge { font-size: .85rem; flex-shrink: 0; }

/* Location tag */
.location-tag { pointer-events: none; }

.about-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  max-width: 380px;
}
.about-img-placeholder {
  width: 100%; height: 100%;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}
.about-img-placeholder svg { width: 120px; opacity: .4; }
.about-portrait {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .6s var(--ease-out-expo);
}
.about-img-wrap:hover .about-portrait { transform: scale(1.03); }
.about-accent {
  position: absolute; bottom: -24px; right: -24px;
  width: 60%; height: 60%;
  border: 2px solid rgba(201,169,110,.2);
  border-radius: 12px;
  z-index: -1;
}
.about-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700; color: var(--white);
  line-height: 1.2; margin-bottom: 24px;
}
.about-text h2 em { font-style: italic; color: var(--accent); }
.about-text p { font-size: .95rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 20px; }
.about-stats {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 24px; margin-top: 40px;
}
.stat {
  padding: 24px;
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 6px 22px rgba(0,0,0,.18),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease-out-expo), box-shadow .35s, background .3s;
}
.stat:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.04);
  box-shadow:
    0 12px 32px rgba(0,0,0,.24),
    inset 0 0.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.15);
}
.stat-num {
  display: inline;
  font-family: var(--font-serif);
  font-size: 2.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat-num-dec {
  font-family: var(--font-serif);
  font-size: 2.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat > span:first-child { display: block; margin-bottom: 6px; }
.stat-label {
  display: block;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════════════════ */
#skills {
  padding: 140px 0;
  background: transparent;
  border-top: 1px solid var(--border);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px;
}
/* Skill block — liquid glass treatment */
.skill-block {
  padding: 36px 28px;
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 22px;
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  position: relative; overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 8px 28px rgba(0,0,0,.22),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
  transition: transform .45s var(--ease-out-expo), box-shadow .4s ease, background .35s ease;
}
.skill-block:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.04);
  box-shadow:
    0 14px 40px rgba(0,0,0,.28),
    inset 0 0.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
}
body.light .skill-block {
  background: rgba(255,255,255,.55);
  box-shadow:
    0 8px 28px rgba(0,0,0,.08),
    inset 0 0.5px 0 rgba(255,255,255,.85),
    inset 0 -0.5px 0 rgba(0,0,0,.05);
}
body.light .skill-block:hover {
  background: rgba(255,255,255,.7);
  box-shadow:
    0 14px 40px rgba(0,0,0,.12),
    inset 0 0.5px 0 rgba(255,255,255,.9),
    inset 0 -0.5px 0 rgba(0,0,0,.06);
}
.skill-icon {
  width: 48px; height: 48px; color: var(--accent);
  margin-bottom: 20px;
}
.skill-block h4 {
  font-size: 1rem; font-weight: 700;
  color: var(--white); margin-bottom: 20px;
}
.skill-block ul { display: flex; flex-direction: column; gap: 12px; }
.skill-block li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; color: var(--text-muted);
}
.bar {
  display: block; width: 80px; height: 3px;
  background: rgba(255,255,255,.06); border-radius: 99px;
  overflow: hidden; flex-shrink: 0; margin-left: 8px;
}
.bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 99px;
  width: 0;
  transition: width 1.2s var(--ease-out-expo);
}
.skill-block.in-view .bar span { width: var(--w); }

/* ═══════════════════════════════════════════════════════════════
   TESTIMONIAL
═══════════════════════════════════════════════════════════════ */
#testimonial {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.testimonial-wrap {
  max-width: 860px; margin: 0 auto; text-align: center;
  padding: 56px 48px;
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 28px;
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  box-shadow:
    0 12px 36px rgba(0,0,0,.22),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
}
blockquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.7; color: var(--white);
  font-style: italic; margin-bottom: 32px;
}
blockquote p::before { content: '"'; color: var(--accent); }
blockquote p::after  { content: '"'; color: var(--accent); }
blockquote footer { display: flex; flex-direction: column; align-items: center; gap: 4px; }
blockquote strong { font-size: 1rem; color: var(--accent); }
blockquote span { font-size: .82rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */
#contact {
  padding: 140px 0;
  background: rgba(15,15,17,.4);
  border-top: 1px solid var(--border);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700; color: var(--white);
  line-height: 1.2; margin-bottom: 20px;
}
.contact-text h2 em { font-style: italic; color: var(--accent); }
.contact-text p { font-size: .95rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 40px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-link {
  display: flex; align-items: center; gap: 12px;
  font-size: .9rem; color: var(--text-muted);
  transition: color .3s;
}
.contact-link svg { width: 18px; flex-shrink: 0; }
.contact-link:hover { color: var(--accent); }

/* Contact form — Safari pill stili minimalist glass */
.contact-form {
  display: flex; flex-direction: column; gap: 20px;
  padding: 40px;
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 26px;
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  position: relative;
  box-shadow:
    0 12px 36px rgba(0,0,0,.24),
    inset 0 0.5px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
}
body.light .contact-form {
  background: rgba(255,255,255,.55);
  box-shadow:
    0 12px 36px rgba(0,0,0,.10),
    inset 0 0.5px 0 rgba(255,255,255,.85),
    inset 0 -0.5px 0 rgba(0,0,0,.05);
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}

/* Inputs — Safari pill stili minimalist */
.form-group input, .form-group textarea {
  background: rgba(255,255,255,.025);
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-sans); font-size: .9rem;
  color: var(--text); outline: none;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  resize: vertical;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.08),
    inset 0 -0.5px 0 rgba(0,0,0,.18);
  transition: background .3s, box-shadow .35s cubic-bezier(0.4,0,0.2,1);
}
.form-group input:hover, .form-group textarea:hover {
  background: rgba(255,255,255,.04);
}
.form-group input:focus, .form-group textarea:focus {
  background: rgba(201,169,110,.05);
  box-shadow:
    inset 0 0.5px 0 rgba(255,235,180,.18),
    inset 0 -0.5px 0 rgba(0,0,0,.18),
    0 0 0 3px rgba(201,169,110,.18);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }

body.light .form-group input,
body.light .form-group textarea {
  background: rgba(255,255,255,.65);
  color: #1a1a1a;
  box-shadow:
    inset 2px 2px 0.5px -2px rgba(0,0,0,.20),
    inset -2px -2px 0.5px -2px rgba(0,0,0,.14),
    inset 1px 1px 1px -0.5px rgba(0,0,0,.10),
    inset -1px -1px 1px -0.5px rgba(0,0,0,.07),
    inset 0 0 6px 6px rgba(0,0,0,.02),
    inset 0 0 0 1px rgba(0,0,0,.10),
    0 2px 6px rgba(0,0,0,.06);
}
body.light .form-group input:focus,
body.light .form-group textarea:focus {
  background: rgba(255,250,235,.85);
  box-shadow:
    inset 2px 2px 0.5px -2px rgba(0,0,0,.20),
    inset -2px -2px 0.5px -2px rgba(0,0,0,.14),
    inset 1px 1px 1px -0.5px rgba(0,0,0,.10),
    inset -1px -1px 1px -0.5px rgba(0,0,0,.07),
    inset 0 0 6px 6px rgba(201,169,110,.05),
    inset 0 0 0 1px rgba(201,169,110,.55),
    0 4px 16px rgba(201,169,110,.20);
}

/* reCAPTCHA widget — formla aynı görsel ritim */
.form-captcha {
  display: flex; justify-content: center;
  min-height: 78px;
}
/* Widget yüklenirken layout shift'i önle */
.form-captcha .g-recaptcha:empty {
  width: 304px; height: 78px;
  border-radius: 4px;
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
}

/* Form durum mesajı (success / error) */
.form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: .85rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
  transition: color .3s;
}
.form-status[data-state="ok"]  { color: #6dd49e; }
.form-status[data-state="err"] { color: #e57373; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
#footer {
  padding: 32px 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(10,10,11,.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 700;
  color: var(--accent); letter-spacing: .05em;
  display: flex; align-items: center;
}

/* Site logo image */
.site-logo-img {
  height: 36px;
  width: auto;
  display: block;
  /* Logo is white — looks great on dark mode by default */
  filter: brightness(1);
  transition: opacity .25s, filter .55s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-logo-img:hover { opacity: .75; }

.footer-logo-img {
  height: 32px;
  opacity: .7;
}

/* Light mode: invert to dark */
body.light .site-logo-img {
  filter: invert(1) brightness(.3);
}
#footer p { font-size: .8rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  color: var(--text-muted);
  transition: border-color .3s, color .3s;
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }

/* Telif Hakkı link — copyright satırının yanında, sade ve kibar */
.footer-legal {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: border-color .3s, color .3s;
}
.footer-legal:hover { border-color: var(--accent); color: var(--accent); }
body.light .footer-legal { color: #555; border-color: rgba(0,0,0,.12); }

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
═══════════════════════════════════════════════════════════════ */
.reveal-up, .reveal-left, .reveal-right, .reveal-card {
  opacity: 0;
  transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo);
  will-change: transform, opacity;
}
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-card  { transform: translateY(32px) scale(.98); }

.reveal-up.in-view,
.reveal-left.in-view,
.reveal-right.in-view,
.reveal-card.in-view {
  opacity: 1; transform: none;
  /* Reveal tek seferlik — composited layer'ı boşalt, GPU memory'sini geri kazan */
  will-change: auto;
}

/* Delay utilities */
.delay-0 { transition-delay: 0ms; }
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.wide { flex-direction: column; }
  .project-card.wide .project-visual { flex: unset; min-height: 260px; aspect-ratio: 16/9; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* Prevent horizontal overflow */
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  section, header, footer, nav, main, article { max-width: 100%; }
  #ai-showcase, #hero, #work, #about, #skills, #contact, #footer { width: 100%; max-width: 100vw; }
  /* Let fullbleed media fill their containers */
  .media-layer img, .media-layer video { width: 100%; height: 100%; object-fit: cover; }

  /* Nav — iOS Liquid Glass: yumuşak drop + inset highlight, dış halka YOK */
  #nav {
    top: 14px;
    width: calc(100% - 40px); /* daha dar — floating pill hissi */
    background: rgba(255, 255, 255, calc(0.10 + 0.04 * var(--scroll-p)));
    /* iOS-grade glass: yoğun blur + saturation (mobil GPU için optimize) */
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    /* Liquid Glass shadow:
       — uzun, çok yumuşak drop (depth)
       — inset top highlight (üst kenarda sheen)
       — inset bottom subtle dark (volume / "yer çekimi")
       Dış halka (0 0 0 7px) kaldırıldı: çift çerçeve izi yapıyordu. */
    box-shadow:
      0 8px 24px -8px rgba(0, 0, 0, 0.38),
      0 22px 56px -16px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  }
  body.light #nav {
    background: rgba(255, 255, 255, calc(0.78 + 0.12 * var(--scroll-p)));
    box-shadow:
      0 8px 24px -8px rgba(0, 0, 0, 0.10),
      0 22px 56px -16px rgba(0, 0, 0, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  }

  /* Bar dolgun + büyük ikonlar — iOS Dock orantısı */
  .nav-inner { padding: 0 8px 0 16px; height: 56px; gap: 10px; }
  .nav-right { gap: 8px; }

  /* Logo — büyütüldü (bar'ın %64'ü) */
  .site-logo-img { height: 36px; }

  /* Theme toggle — 42h × 72w (büyük + iOS Switch ratio 1.71) */
  .theme-toggle { width: 72px; height: 42px; }
  .theme-toggle::before { width: 36px; height: 36px; top: 3px; left: 3px; }
  body.light .theme-toggle::before { transform: translateX(0); }
  body:not(.light) .theme-toggle::before { transform: translateX(30px); }
  .theme-icon { width: 36px; height: 42px; }
  .theme-icon svg { width: 18px; height: 18px; }

  /* Lang toggle — büyük ve okunaklı */
  .lang-toggle {
    height: 42px; min-width: 48px; padding: 0 14px;
    border-radius: 21px; box-shadow: none; font-size: .82rem;
  }

  /* Burger — büyük tap target + kalın çizgiler */
  .burger { padding: 10px; }
  .burger span { width: 26px; height: 2.2px; }
  .burger.open span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 10px;
    list-style: none;
    z-index: 99;
    box-shadow: 0 14px 50px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
    animation: navMenuIn .35s cubic-bezier(.22,1,.36,1) both;
  }
  body.light .nav-links.open {
    background: rgba(255,255,255,.92);
    border-color: rgba(0,0,0,.06);
    box-shadow: 0 14px 50px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,1);
  }
  @keyframes navMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open li a {
    display: block;
    padding: 12px 18px;
    font-size: .95rem;
    color: var(--text);
    border-radius: 14px;
    transition: background .25s ease;
  }
  .nav-links.open li a:hover { background: rgba(255,255,255,.05); }
  body.light .nav-links.open li a:hover { background: rgba(0,0,0,.05); }
  .burger { display: flex; }
  /* Burger → X animation */
  /* Theme toggle — gizle label, sadece ikon */
  .theme-label { display: none; }

  /* Hero */
  .hero-content { padding: 0 24px; padding-top: calc(var(--nav-h) + 32px); }
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.6rem); }
  .hero-sub { font-size: .92rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; text-align: center; }
  .hero-scroll-hint { display: none; }
  #hero { padding-bottom: 60px; }

  /* Showcase — vapor canvas viewport'a göre dengeli ortalı */
  #ai-showcase { height: 78vh; min-height: 520px; }
  .media-switcher { gap: 6px; padding: 8px; border-radius: 14px; }
  .switcher-btn { padding: 8px 12px; gap: 6px; font-size: .72rem; }
  .showcase-content { padding: 0 20px; }
  .gooey-wrap { height: clamp(170px, 28vw, 260px); }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* About stats */
  .about-stats { grid-template-columns: repeat(2,1fr); }

  /* Section padding */
  section { padding: 72px 0; }
  .container { padding: 0 24px; }
  .section-title { font-size: 2rem; }

  /* Project cards */
  .project-card.wide .project-visual { min-height: 200px; }
  .project-card:hover { transform: none; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: 12px; }
  .footer-socials { justify-content: center; }

  /* Marquee fade daralt */
  .marquee-fade { width: 60px; }
}

/* ── Small phone (≤480px) ── */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content { padding: 0 16px; padding-top: calc(var(--nav-h) + 24px); }
  .hero-title { font-size: clamp(2rem, 11vw, 2.8rem); }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .switcher-btn span:not(.switcher-icon) { display: none; }
  .switcher-btn { padding: 10px; }
  .skills-grid { grid-template-columns: 1fr; }
  .proj-stats { grid-template-columns: repeat(2,1fr); }
  /* Showcase — dar telefon, circular reveal nav ile hero metni arasında ortalı */
  #ai-showcase { height: auto; min-height: 480px; padding: 120px 20px 40px; overflow: visible; }
  /* Daireyi viewport içinde aşağı kaydır — section büyümeden, badge sabit kalsın */
  .cr-wrap { top: 80px; }
}

/* ═══════════════════════════════════════════════════════════════
   CIRCULAR REVEAL HEADING — site giriş sahnesi (ai-showcase içinde)
   Ortasında HUŞ logosu, etrafında dönen 4 kelime; hover'da
   merkeze proje görseli açılır. Light tema'da neumorphic taşbaskı,
   dark tema'da glass + gold accent.
═══════════════════════════════════════════════════════════════ */
.cr-wrap {
  position: relative;
  width: clamp(280px, 42vw, 460px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  isolation: isolate;
  /* Yumuşak yüzme — vapor/gooey'in zarif titremine paralel */
  animation: cr-float 6s ease-in-out infinite;
  /* Default (dark) palette */
  background: radial-gradient(ellipse at 30% 30%, rgba(40,40,46,.85), rgba(14,14,16,.85));
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(201,169,110,.15),
    inset 0 1px 0 rgba(255,255,255,.04);
}
@keyframes cr-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* İç çerçeveler — neumorphic depth, light/dark için iki ayrı set */
.cr-frame-1, .cr-frame-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cr-frame-1 { inset: 4px; }
.cr-frame-2 { inset: 18px; }
/* Dark tema iç çerçeveler — soft accent ring */
.cr-frame-1 { box-shadow: inset 0 0 24px rgba(201,169,110,.06); }
.cr-frame-2 { box-shadow: inset 0 0 14px rgba(0,0,0,.4); }

/* Merkez içerik — logo veya text */
.cr-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: opacity .4s ease;
}
.cr-center img {
  width: clamp(56px, 9vw, 88px);
  height: auto;
  filter: drop-shadow(0 4px 18px rgba(201,169,110,.35));
  transition: transform .5s var(--ease-out-expo, cubic-bezier(.16,1,.3,1));
}
.cr-wrap:hover .cr-center img { transform: scale(.92); }
.cr-wrap.has-active .cr-center { opacity: 0; }

/* Hover'da açılan görsel overlay — daire içinde */
.cr-overlay {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  background: #0a0a0b;
}
.cr-overlay::after {
  /* Görselin üzerine yumuşak vinyet */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 55%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
}
.cr-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.85) saturate(.95);
}
.cr-wrap.has-active .cr-overlay { opacity: 1; }

/* Dönen SVG katman */
.cr-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  animation: cr-spin 36s linear infinite;
  transform-origin: 50% 50%;
  /* will-change: GPU compositor layer hint (static transform EKLEME —
     animation'ın transform keyframe'iyle çakışıp discrete interpolation
     yapar, dönüş smooth olmaz). */
  will-change: transform;
  backface-visibility: hidden;
}
/* Keyframe'i from/to ile explicit yaz — bazı tarayıcılar implicit from'da
   matris interpolasyonu yerine fonksiyon-bazlı yapsın, daha smooth olur. */
@keyframes cr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.cr-wrap:hover .cr-rotor { animation-play-state: paused; }

.cr-rotor text {
  font-family: var(--font-sans, system-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .35em;
  text-transform: uppercase;
  fill: rgba(232,201,138,.78);
  cursor: pointer;
  transition: fill .25s ease;
}
.cr-rotor text:hover,
.cr-rotor text.cr-active { fill: var(--white); }

/* ── Light theme: neumorphic palette (orijinal aceternity hissiyatı) ── */
body.light .cr-wrap {
  background: linear-gradient(145deg, #efece6, #d8d4cc);
  box-shadow:
    14px 14px 32px #c5c1ba,
    -14px -14px 32px #ffffff,
    inset 0 0 0 1px rgba(0,0,0,.04);
}
body.light .cr-frame-1 { box-shadow: inset 5px 5px 12px #c8c4bc, inset -5px -5px 12px #ffffff; }
body.light .cr-frame-2 { box-shadow: inset 3px 3px 8px #c8c4bc, inset -3px -3px 8px #ffffff; }
body.light .cr-rotor text { fill: rgba(80,70,55,.75); }
body.light .cr-rotor text:hover,
body.light .cr-rotor text.cr-active { fill: #1a1a1a; }
body.light .cr-overlay { background: #f0ede8; }
body.light .cr-center img { filter: drop-shadow(0 4px 14px rgba(0,0,0,.18)); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .cr-wrap, .cr-rotor { animation: none; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .cr-wrap { width: min(86vw, 360px); }
  .cr-rotor text { font-size: 11px; letter-spacing: .28em; }
}
