/* ==========================================================================
   MUHAMMET EMİN KARAMAN — 3D SCROLL-DRIVEN BIOGRAPHY & PORTFOLIO
   1. Frameless HUD Reticle Portrait (.open-portrait-hud)
   2. 5-Stage Scroll-Morphing 3D Background (scene3d.js)
   3. Rondesignlab Smoked Liquid Glass Squircle Cards + 3D Mouse Tilt
   4. Dark & Light Mode + TR/EN Language Switcher + 120FPS GPU Optimization
   ========================================================================== */

:root {
  --bg-core: #050706;
  --bg-elevated: #0b0f0d;

  /* Rondesignlab Image 4 Smoked Dark Liquid Glass (Slightly more translucent so 3D background animations shine through clearly) */
  --liquid-dark: linear-gradient(
    145deg,
    rgba(24, 30, 27, 0.36) 0%,
    rgba(9, 13, 11, 0.46) 60%,
    rgba(16, 26, 20, 0.38) 100%
  );
  --liquid-emerald-tint: linear-gradient(
    145deg,
    rgba(18, 36, 28, 0.38) 0%,
    rgba(9, 15, 12, 0.48) 55%,
    rgba(28, 52, 36, 0.34) 100%
  );
  --liquid-warm-horizon: linear-gradient(
    155deg,
    rgba(26, 28, 28, 0.38) 0%,
    rgba(12, 15, 15, 0.48) 62%,
    rgba(78, 56, 38, 0.28) 100%
  );

  --glass-border: 1px solid rgba(255, 255, 255, 0.15);
  --glass-shadow:
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 44px -12px rgba(0, 0, 0, 0.72);

  --hacker-green: #10b981;
  --hacker-green-bright: #34d399;
  --hacker-mint: #6ee7b7;

  --text-white: #f4f7f5;
  --text-secondary: #a8b5af;
  --text-muted: #687870;

  --surface-subtle: rgba(255, 255, 255, 0.05);
  --surface-border-subtle: rgba(255, 255, 255, 0.12);
  --feature-box-bg: rgba(0, 0, 0, 0.24);

  --radius-card: 28px;
  --radius-inner: 20px;
  --radius-pill: 9999px;

  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}


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

html {
  background-color: var(--bg-core);
  color: var(--text-white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  transition: background-color 280ms var(--ease-out-strong), color 280ms var(--ease-out-strong);
}

body {
  background-color: var(--bg-core);
  color: var(--text-white);
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
  transition: background-color 280ms var(--ease-out-strong), color 280ms var(--ease-out-strong);
}

::selection {
  background: rgba(16, 185, 129, 0.28);
  color: var(--text-white);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-core);
}
::-webkit-scrollbar-thumb {
  background: #1f2924;
  border-radius: 3px;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #b7c8c0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--hacker-green);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   1. 5-STAGE MORPHING BACKGROUND CANVAS & VIGNETTE
   ========================================================================== */
#binary-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#binary-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.binary-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(5, 7, 6, 0.26) 0%, rgba(5, 7, 6, 0.78) 100%);
}

html[data-theme="light"] .binary-vignette {
  background:
    radial-gradient(circle at 50% 45%, rgba(238, 243, 240, 0.22) 0%, rgba(238, 243, 240, 0.78) 100%);
}

/* Disabled heavy live SVG feTurbulence filter for locked 120fps scrolling */
.film-grain {
  display: none;
}

/* ==========================================================================
   2. FLOATING SMOKED LIQUID GLASS NAVIGATION BAR + CONTROLS
   ========================================================================== */
.nav-wrapper {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  z-index: 90;
  width: calc(100% - 32px);
  max-width: 1100px;
}

.smoked-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(14, 18, 16, 0.82);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: background-color 260ms var(--ease-out-strong), border-color 260ms var(--ease-out-strong);
}

html[data-theme="light"] .smoked-nav {
  background: rgba(255, 255, 255, 0.86);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-width: 195px;
}

#nav-dynamic-title {
  display: inline-block;
  transition: opacity 150ms var(--ease-out-strong), transform 150ms var(--ease-out-strong), color 150ms var(--ease-out-strong);
}

#nav-dynamic-title.switching {
  opacity: 0;
  transform: translate3d(0, -5px, 0);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hacker-green-bright);
  box-shadow: 0 0 10px var(--hacker-green-bright);
  animation: pulseDot 2.2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  transition: color 160ms var(--ease-out-strong), background-color 160ms var(--ease-out-strong);
}

.nav-links a.active {
  color: var(--hacker-green-bright);
  background: rgba(16, 185, 129, 0.14);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--text-white);
    background: var(--surface-subtle);
  }
}

.nav-right-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Live Design Mode Switcher Pill in Header */
.mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--surface-border-subtle);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 180ms var(--ease-out-strong), color 180ms var(--ease-out-strong);
  white-space: nowrap;
}

.mode-btn.active {
  background: var(--hacker-green);
  color: #031c12;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

/* Language Switcher Button */
.nav-icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms var(--ease-out-strong), border-color 150ms var(--ease-out-strong), background-color 150ms var(--ease-out-strong);
}

@media (hover: hover) and (pointer: fine) {
  .nav-icon-pill:hover {
    border-color: var(--hacker-green-bright);
    background: rgba(16, 185, 129, 0.14);
    transform: translate3d(0, -1px, 0);
  }
}

/* ==========================================================================
   3. ZERO-CLS LIVE CODE TYPEWRITER CURSOR
   ========================================================================== */
.tw-typed { color: inherit; }
.tw-untyped { visibility: hidden; }
.tw-cursor {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  background: var(--hacker-green-bright);
  box-shadow: 0 0 8px var(--hacker-green-bright);
  vertical-align: text-bottom;
  margin: 0 2px;
  animation: blinkCursor 0.75s steps(2, start) infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   4. SMOKED LIQUID GLASS CARDS + INSTANT ZERO-DELAY 3D MOUSE TILT
   ========================================================================== */
.liquid-glass-card {
  background: var(--liquid-dark);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(6.5px) saturate(135%);
  -webkit-backdrop-filter: blur(6.5px) saturate(135%);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateZ(0);
  transition: transform 160ms var(--ease-out-strong), border-color 200ms var(--ease-out-strong), box-shadow 200ms var(--ease-out-strong);
}

.card-lg-pad {
  padding: 34px;
}

.project-showcase-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

/* Instant 0ms response when hovering/moving mouse on any card! */
.liquid-glass-card.is-hovered,
.cascade-card.card-revealed.is-hovered {
  transition: border-color 180ms var(--ease-out-strong), box-shadow 180ms var(--ease-out-strong) !important;
}

.liquid-glass-card.emerald-glow {
  background: var(--liquid-emerald-tint);
}

.liquid-glass-card.warm-horizon {
  background: var(--liquid-warm-horizon);
}

/* Top Specular Reflection Glint */
.liquid-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  pointer-events: none;
  z-index: 2;
}

html[data-theme="light"] .liquid-glass-card::before {
  background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.38), transparent);
}

/* Interactive Mouse-Following Specular Spotlight inside Liquid Glass */
.liquid-glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(52, 211, 153, 0.13),
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

.liquid-glass-card > * {
  position: relative;
  z-index: 1;
}

.crosshair-bg {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

html[data-theme="light"] .crosshair-bg {
  background-image:
    radial-gradient(rgba(5, 150, 105, 0.14) 1px, transparent 1px),
    linear-gradient(to right, rgba(5, 150, 105, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(5, 150, 105, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

@media (hover: hover) and (pointer: fine) {
  .liquid-glass-card:hover {
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow:
      inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.28),
      0 26px 56px -12px rgba(0, 0, 0, 0.55),
      0 0 28px -8px rgba(16, 185, 129, 0.22);
  }
  html[data-theme="light"] .liquid-glass-card:hover {
    border-color: rgba(5, 150, 105, 0.48);
    box-shadow:
      inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.98),
      0 24px 48px -12px rgba(6, 48, 35, 0.18),
      0 0 24px -8px rgba(5, 150, 105, 0.18);
  }
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.glass-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.glass-pill-tag.green {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--hacker-green-bright);
}

.circle-btn-glass {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 180ms var(--ease-out-strong), background-color 180ms var(--ease-out-strong);
}

@media (hover: hover) and (pointer: fine) {
  .circle-btn-glass:hover {
    background: var(--hacker-green);
    color: #ffffff;
    border-color: var(--hacker-green-bright);
    transform: scale(1.06) rotate(8deg);
  }
}

/* ==========================================================================
   5. HERO SECTION: SMOKED LIQUID GLASS BIO + APPROVED FRAMELESS HUD PORTRAIT
   ========================================================================== */
main {
  position: relative;
  z-index: 20;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  position: relative;
}

.hero-section {
  min-height: 100dvh;
  padding-top: 104px;
  padding-bottom: 56px;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: center;
}

.hero-bio-card {
  padding: 36px;
}

.binary-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--hacker-green-bright);
  margin-bottom: 20px;
  width: fit-content;
}

.hero-name {
  font-size: clamp(2.2rem, 3.8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--text-white);
  margin-bottom: 12px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--hacker-green-bright);
  margin-bottom: 20px;
  line-height: 1.5;
}

.hero-quote {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-white);
  padding: 15px 18px;
  border-radius: 18px;
  background: var(--surface-subtle);
  border-left: 3px solid var(--hacker-green-bright);
  margin-bottom: 20px;
}

.hero-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-hacker-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--hacker-green);
  color: #031c12;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px -6px rgba(16, 185, 129, 0.40);
  transition: transform 150ms var(--ease-out-strong), background-color 150ms var(--ease-out-strong);
}

html[data-theme="light"] .btn-hacker-primary {
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .btn-hacker-primary:hover {
    background: var(--hacker-green-bright);
    transform: translate3d(0, -2px, 0);
  }
}

.btn-hacker-glass {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  color: var(--text-white);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms var(--ease-out-strong), border-color 150ms var(--ease-out-strong), background-color 150ms var(--ease-out-strong);
}

.btn-hacker-glass.active {
  border-color: var(--hacker-green-bright);
  background: rgba(16, 185, 129, 0.16);
  color: var(--hacker-green-bright);
}

@media (hover: hover) and (pointer: fine) {
  .btn-hacker-glass:hover {
    border-color: var(--hacker-green-bright);
    background: rgba(16, 185, 129, 0.12);
    transform: translate3d(0, -2px, 0);
  }
}

/* ==========================================================================
   APPROVED FRAMELESS HUD RETICLE PORTRAIT ("fotografım bu şekil çok iyi duruyor")
   ========================================================================== */
.open-portrait-hud {
  position: relative;
  width: 100%;
  max-width: 365px;
  margin: 0 auto;
  padding: 14px;
}

.hud-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--hacker-green-bright);
  pointer-events: none;
  z-index: 4;
}
.hud-corner.tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.hud-corner.tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.hud-corner.bl { bottom: 52px; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner.br { bottom: 52px; right: 0; border-bottom: 2px solid; border-right: 2px solid; }

.open-portrait-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.8;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

.open-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: contrast(1.04);
  transition: transform 700ms var(--ease-out-expo);
}

@media (hover: hover) and (pointer: fine) {
  .open-portrait-hud:hover .open-portrait-img {
    transform: scale(1.03);
  }
}

.open-portrait-caption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid rgba(52, 211, 153, 0.32);
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   6. SECTION HEADERS, FORM INPUTS & BENTO GRIDS
   ========================================================================== */
.section-header {
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-white);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 62ch;
}

.bento-grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card-metric-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-border-subtle);
}

.big-code-stat {
  font-size: clamp(1.65rem, 2.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.feature-inner-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 22px;
  background: var(--feature-box-bg);
  border: 1px solid var(--surface-border-subtle);
}

.bio-row-divider {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-border-subtle);
}

.contact-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  color: var(--text-white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
  text-align: left;
  transition: border-color 160ms var(--ease-out-strong), transform 160ms var(--ease-out-strong);
}

@media (hover: hover) and (pointer: fine) {
  .contact-link-row:hover {
    border-color: var(--hacker-green-bright);
    transform: translate3d(2px, 0, 0);
  }
}

.contact-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border-subtle);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms var(--ease-out-strong);
}

.contact-input:focus {
  border-color: var(--hacker-green-bright);
}

/* ==========================================================================
   7. DESIGN MODE VARIATIONS (SWITCHABLE LIVE IN HEADER!)
   ========================================================================== */
body[data-design-mode="cinematic"] .liquid-glass-card {
  background: linear-gradient(180deg, rgba(16, 26, 21, 0.40) 0%, rgba(6, 10, 8, 0.56) 100%);
  border-radius: 36px;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

body[data-design-mode="minimal"] .liquid-glass-card {
  background: rgba(10, 14, 12, 0.58);
  border-radius: 18px;
  border: 1px solid var(--surface-border-subtle);
  border-left: 3px solid var(--hacker-green-bright);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 130;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--hacker-green-bright);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 12.5px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transform: translate3d(0, 12px, 0) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms var(--ease-spring), opacity 180ms var(--ease-out-strong);
}

.toast-notification.show {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

/* ==========================================================================
   8. SCROLL-RESPONSIVE 3D PERSPECTIVE FLOW & LASER SCANLINE
   ========================================================================== */

.section-laser-track {
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--surface-border-subtle);
  margin-bottom: 34px;
  overflow: visible;
}

.laser-scan-line {
  position: absolute;
  top: -0.5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(16, 185, 129, 0.55) 35%,
    var(--hacker-green-bright) 50%,
    rgba(16, 185, 129, 0.55) 65%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
  transform: scaleX(0);
  transform-origin: center center;
  opacity: 0;
  transition:
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1) 20ms,
    opacity 360ms var(--ease-out-strong) 20ms;
}

.section.section-in-view .laser-scan-line {
  transform: scaleX(1);
  opacity: 1;
}

/* Section Header Smooth Glide (Snappy, responsive — GPU transform/opacity only) */
.cascade-header {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  will-change: transform, opacity;
  transition:
    opacity 540ms cubic-bezier(0.16, 1, 0.3, 1) 60ms,
    transform 540ms cubic-bezier(0.16, 1, 0.3, 1) 60ms;
}

.section.section-in-view .cascade-header {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Liquid Glass Cards: Snappy Per-Card 3D Perspective Unfold (GPU-composited, zero lag) */
.cascade-card {
  opacity: 0;
  transform: perspective(1100px) translate3d(0, 38px, -28px) rotateX(8deg) scale(0.96);
  transform-origin: center top;
  will-change: transform, opacity;
  transition:
    opacity 540ms cubic-bezier(0.16, 1, 0.3, 1) var(--card-delay, 35ms),
    transform 580ms cubic-bezier(0.16, 1, 0.3, 1) var(--card-delay, 35ms),
    border-color 200ms var(--ease-out-strong),
    box-shadow 200ms var(--ease-out-strong);
}

.cascade-card.card-revealed {
  opacity: 1;
  transform: perspective(1100px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
}

/* Once card is revealed, remove entrance delay so mouseleave & hover are 100% delay-free */
.cascade-card.card-revealed.tilt-ready {
  transition:
    transform 150ms var(--ease-out-strong) 0ms,
    opacity 350ms var(--ease-out-strong) 0ms,
    border-color 200ms var(--ease-out-strong) 0ms,
    box-shadow 200ms var(--ease-out-strong) 0ms;
}

/* Diagonal Glass Light Reflection Sweep across card when revealed */
.card-sheen-sweep {
  position: absolute;
  top: 0;
  left: -130%;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 35%,
    rgba(52, 211, 153, 0.18) 50%,
    rgba(255, 255, 255, 0.05) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2;
  transition: none;
}

.cascade-card.card-revealed > .card-sheen-sweep {
  left: 145%;
  transition: left 780ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--card-delay, 35ms) + 70ms);
}

@keyframes cardLaserRimPulse {
  0% {
    border-color: rgba(52, 211, 153, 0.62);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.14);
  }
}

.cascade-card.card-laser-pulse {
  animation: cardLaserRimPulse 760ms var(--ease-out-expo) forwards;
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS (FULL-SIZE MOBILE & TABLET PROPORTIONS)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-section {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .project-showcase-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .span-4, .span-5, .span-6, .span-7, .span-8 {
    grid-column: span 12;
  }

  .nav-links {
    display: none;
  }

  .open-portrait-hud {
    max-width: 440px;
    width: 100%;
  }

  .section {
    padding: 68px 0;
  }
}

@media (max-width: 640px) {
  html, body {
    overflow-x: clip;
  }

  .container {
    padding: 0 16px;
  }

  .nav-wrapper {
    top: 12px;
    width: calc(100% - 24px);
  }

  .smoked-nav {
    padding: 8px 10px 8px 14px;
    gap: 8px;
  }

  .nav-brand {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Keep top mobile header single-line and uncluttered with Dynamic Section Title + TR/EN toggle */
  .mode-switcher {
    display: none;
  }

  .hero-section {
    padding-top: 78px;
    padding-bottom: 36px;
  }

  .hero-bio-card,
  .liquid-glass-card,
  .card-lg-pad {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .binary-kicker {
    font-size: 11px;
    padding: 5px 12px;
    max-width: 100%;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }

  .hero-name {
    font-size: clamp(2rem, 8.2vw, 2.55rem);
    line-height: 1.08;
  }

  .hero-role {
    font-size: 12.5px;
    margin-bottom: 16px;
  }

  .hero-quote {
    font-size: 0.98rem;
    padding: 13px 15px;
    margin-bottom: 16px;
  }

  .hero-summary {
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 22px;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .hero-buttons .btn-hacker-primary,
  .hero-buttons .btn-hacker-glass {
    width: 100%;
    justify-content: center;
    padding: 0 12px;
    height: 46px;
    font-size: 13px;
  }

  /* Full-size mobile portrait proportions */
  .open-portrait-hud {
    max-width: 100%;
    width: 100%;
    padding: 12px;
  }

  .open-portrait-img-wrap {
    aspect-ratio: 4 / 4.45;
  }

  .hud-corner.bl,
  .hud-corner.br {
    bottom: 54px;
  }

  .section {
    padding: 54px 0;
  }

  .section-header {
    margin-bottom: 26px;
  }

  .section-laser-track {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: clamp(1.6rem, 6.8vw, 2.1rem);
  }

  .section-subtitle {
    font-size: 14px;
  }

  .bento-grid-12 {
    gap: 16px;
  }

  .card-top-row {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .glass-pill-tag {
    font-size: 11px;
    padding: 5px 11px;
    max-width: 100%;
    white-space: normal;
  }

  .feature-inner-box {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .card-metric-footer {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
  }

  .contact-link-row {
    padding: 13px 14px;
    font-size: 12.5px;
    border-radius: 15px;
  }

  .btn-hacker-primary {
    height: auto;
    min-height: 46px;
    padding: 10px 16px;
    text-align: center;
    line-height: 1.3;
  }

  .toast-notification {
    left: 16px;
    right: 16px;
    bottom: 18px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cascade-header,
  .cascade-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
