@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&family=Syne:wght@600;700;800;900&family=Caveat:wght@600;700&display=swap');

:root {
  --bg-page: #F3F8F7;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-subtle: #EBF5F3;
  --bg-pill: #E2F2EF;
  
  --text-main: #133532;
  --text-muted: #4F6A66;
  --text-subtle: #7A9591;

  --border-light: rgba(19, 53, 50, 0.08);
  --border-hover: rgba(56, 163, 143, 0.35);

  --brand-lime: #D5E54E;
  --brand-mint: #48B6A3;
  --brand-cyan: #38A3A5;
  --brand-teal: #1F7A73;
  --brand-purple: #798DCB;

  --brand-gradient: linear-gradient(135deg, #D4E353 0%, #48B6A3 45%, #6A86D8 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(212, 227, 83, 0.15) 0%, rgba(72, 182, 163, 0.15) 45%, rgba(106, 134, 216, 0.15) 100%);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
}

.font-display {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
}

.font-script {
  font-family: 'Caveat', cursive, sans-serif;
}

/* Custom Gradients & Text */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-brand-gradient {
  background: var(--brand-gradient);
}

/* Apple Dynamic Island Navbar */
.dynamic-island {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(19, 53, 50, 0.1);
  box-shadow: 0 10px 30px -5px rgba(19, 53, 50, 0.08), 0 0 1px 1px rgba(19, 53, 50, 0.04);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dynamic-island:hover {
  box-shadow: 0 16px 36px -6px rgba(19, 53, 50, 0.12), 0 0 0 1px rgba(56, 163, 143, 0.25);
}

.nav-link {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .nav-link {
  color: #9BB3AF;
}

.dark .nav-link:hover,
.dark .nav-link.text-cv-tealDark {
  color: #6CE0D0 !important;
  background-color: rgba(72, 182, 163, 0.18) !important;
}

.dark .dynamic-island {
  background: rgba(18, 28, 26, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6);
}

/* Crisp Clean Paper Card Styles (CV Aesthetic) */
.cv-card {
  background: #FFFFFF;
  border: 1px solid rgba(19, 53, 50, 0.08);
  box-shadow: 0 4px 20px -2px rgba(19, 53, 50, 0.03), 0 1px 3px 0 rgba(19, 53, 50, 0.02);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 163, 143, 0.35);
  box-shadow: 0 20px 35px -8px rgba(19, 53, 50, 0.09), 0 0 0 1px rgba(56, 163, 143, 0.18);
}

.cv-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  background: #E4F4F1;
  color: #165650;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 1px solid rgba(42, 140, 130, 0.22);
}

/* Micro-interaction Button Styles */
.interactive-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.interactive-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.interactive-btn:active {
  transform: translateY(0px) scale(0.98);
}

/* Sub-Brand Pill Badges */
.subbrand-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.subbrand-card:hover {
  transform: translateY(-3px) scale(1.03);
}

/* Dark Mode overrides (optional toggle) */
.dark {
  --bg-page: #0B1211;
  --bg-surface: #121C1A;
  --bg-card: #152422;
  --bg-subtle: #192D2A;
  --text-main: #F0F6F5;
  --text-muted: #9BB3AF;
  --text-subtle: #69827E;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(72, 182, 163, 0.4);
}

.dark body {
  background-color: var(--bg-page);
  color: var(--text-main);
}

.dark .cv-card {
  background: #142220;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.dark .cv-card:hover {
  background: #182B28;
  border-color: rgba(72, 182, 163, 0.45);
}

.dark .cv-section-badge {
  background: #192F2B;
  color: #6CE0D0;
  border-color: rgba(72, 182, 163, 0.35);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #F3F8F7;
}

.dark ::-webkit-scrollbar-track {
  background: #0B1211;
}

::-webkit-scrollbar-thumb {
  background: #C2D8D4;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A3C5C0;
}

/* Toast Notification */
#toast {
  visibility: hidden;
  min-width: 250px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#toast.show {
  visibility: visible;
  transform: translateY(0);
  opacity: 1;
}

/* Modal Transitions */
#projectModal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#projectModal.active {
  opacity: 1;
  pointer-events: auto;
}

#projectModal.active .modal-content {
  transform: scale(1);
}

.modal-content {
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll-Driven Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Privacy text mask */
.privacy-masked {
  font-family: monospace;
  letter-spacing: 0.1em;
}

/* YouTube-Style Video Card Hover Preview */
.yt-preview-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #0b1413;
}

.yt-preview-poster {
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.yt-preview-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.yt-preview-scrub {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: #FF0000;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
  transition: width 3.5s linear;
  z-index: 10;
  pointer-events: none;
}

.yt-preview-container:hover .yt-preview-poster {
  opacity: 0;
  transform: scale(1.04);
}

.yt-preview-container:hover .yt-preview-media {
  opacity: 1;
}

.yt-preview-container:hover .yt-preview-scrub {
  width: 100%;
}

.yt-preview-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
}

/* Subbrand Card Hover Glow */
.subbrand-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.subbrand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px -5px rgba(56, 163, 165, 0.15);
}

/* ============================================================
   MECHANICAL DRUM ODOMETER & VISUAL ICON ANIMATIONS
   ============================================================ */

/* 1. Mechanical Drum Odometer */
.drum-odometer-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.25em;
  line-height: 1.25em;
  overflow: hidden;
  vertical-align: middle;
  position: relative;
  font-variant-numeric: tabular-nums;
  perspective: 250px;
}

.drum-col {
  display: inline-block;
  height: 1.25em;
  line-height: 1.25em;
  overflow: hidden;
  position: relative;
  width: 0.68em;
  text-align: center;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.drum-col.drum-col-rightmost {
  width: 0.72em;
}

.drum-reel {
  display: flex;
  flex-direction: column;
  will-change: transform;
  transform: translateY(0);
}

.drum-num {
  height: 1.25em;
  line-height: 1.25em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-weight: 800;
  transform: scaleY(0.97);
}

.drum-suffix {
  margin-left: 2px;
  line-height: 1.25em;
  display: inline-block;
}

/* Metric Card Box */
.metric-card-box {
  position: relative;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-card-box:hover {
  transform: translateY(-3px);
}

/* 2. Visual Icon Badge Box */
.visual-icon-box {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.65rem auto;
  border-radius: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  overflow: visible;
}

.visual-icon-box:hover {
  transform: translateY(-2px) scale(1.05);
}

/* --- Coffee Pouring Visual Animation --- */
.coffee-pot-svg {
  position: absolute;
  top: -11px;
  left: 0px;
  width: 1.5rem;
  height: 1.5rem;
  transform-origin: 80% 90%;
  transform: rotate(0deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 15;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

#cardCoffee:hover .coffee-pot-svg,
.is-pouring .coffee-pot-svg {
  transform: rotate(-36deg) translate(-2px, -3px);
}

.coffee-pour-stream {
  position: absolute;
  top: 14px;
  left: 21px;
  width: 2.5px;
  height: 0px;
  background: linear-gradient(to bottom, #92400E, #451A03);
  border-radius: 2px;
  opacity: 0;
  z-index: 12;
  transition: height 0.3s ease, opacity 0.2s ease;
}

#cardCoffee:hover .coffee-pour-stream,
.is-pouring .coffee-pour-stream {
  height: 15px;
  opacity: 1;
  animation: streamFlow 0.3s ease-in-out infinite alternate;
}

@keyframes streamFlow {
  0% { transform: scaleX(0.85); }
  100% { transform: scaleX(1.15); }
}

.coffee-steam-wrap {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
  z-index: 20;
}

.steam-curl {
  width: 2px;
  height: 8px;
  background: linear-gradient(to top, rgba(217, 119, 6, 0.8), transparent);
  border-radius: 9999px;
  opacity: 0;
}

#cardCoffee:hover .steam-curl:nth-child(1),
.is-pouring .steam-curl:nth-child(1) {
  animation: steamRise 1.6s ease-out infinite 0.2s;
}
#cardCoffee:hover .steam-curl:nth-child(2),
.is-pouring .steam-curl:nth-child(2) {
  animation: steamRise 1.8s ease-out infinite 0.4s;
  height: 11px;
}
#cardCoffee:hover .steam-curl:nth-child(3),
.is-pouring .steam-curl:nth-child(3) {
  animation: steamRise 1.5s ease-out infinite 0.6s;
}

#cardCoffee:hover .visual-icon-box {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}

@keyframes steamRise {
  0% { opacity: 0; transform: translateY(0) scaleX(0.7); }
  35% { opacity: 0.9; transform: translateY(-5px) scaleX(1.1); }
  100% { opacity: 0; transform: translateY(-16px) scaleX(1.5); }
}

/* --- Clapperboard Scissor Snap & REC Pulse Animation --- */
.clapper-stick {
  transform-origin: 4% 82%;
  transform: rotate(0deg);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes clapperScissorMotion {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-32deg); }
  55% { transform: rotate(0deg); }
  75% { transform: rotate(-18deg); }
  100% { transform: rotate(0deg); }
}

#cardVideo:hover .clapper-stick {
  animation: clapperScissorMotion 0.85s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.is-clapping .clapper-stick {
  animation: snapClapper 1.6s ease forwards;
}

@keyframes snapClapper {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-28deg); }
  45% { transform: rotate(0deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.video-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #EF4444;
  position: absolute;
  top: 7px;
  right: 7px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

#cardVideo:hover .video-rec-dot,
.is-clapping .video-rec-dot,
.is-recording .video-rec-dot {
  animation: recBlink 0.5s ease infinite;
  opacity: 1;
}

#cardVideo:hover .visual-icon-box {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 14px rgba(49, 151, 149, 0.25);
}

@keyframes recBlink {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.15; transform: scale(0.85); }
}

/* --- Vector Pen Tool & Bezier Curve Animation --- */
.vector-curve-path {
  stroke-dasharray: 45;
  stroke-dashoffset: 45;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes curveDrawLoop {
  0% { stroke-dashoffset: 45; }
  40% { stroke-dashoffset: 0; }
  85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 45; }
}

@keyframes penScribble {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(4px, -6px) rotate(18deg); }
  50% { transform: translate(9px, 2px) rotate(-6deg); }
  75% { transform: translate(5px, -3px) rotate(12deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

#cardBrand:hover .vector-pen-nib {
  animation: penScribble 1.2s ease-in-out infinite;
}

#cardBrand:hover .vector-curve-path {
  animation: curveDrawLoop 2s ease-in-out infinite;
}

#cardBrand:hover .vector-node {
  transform: scale(1);
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.is-drawing .vector-curve-path {
  stroke-dashoffset: 0;
}

.vector-node {
  transform-origin: center;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.is-drawing .vector-node.node-1 {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.2s;
}

.is-drawing .vector-node.node-2 {
  transform: scale(1);
  opacity: 1;
  transition-delay: 1.1s;
}

.vector-pen-nib {
  transform-origin: 30% 70%;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.is-drawing .vector-pen-nib {
  transform: translate(6px, -4px) rotate(15deg);
}

#cardBrand:hover .visual-icon-box {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

/* --- Audio Equalizer Jumping Bars Animation --- */
.eq-live-bar {
  display: inline-block;
  width: 3px;
  height: 5px;
  border-radius: 9999px;
  transition: height 0.2s ease;
}

#cardAudio:hover .eq-live-bar:nth-child(1),
.is-playing .eq-live-bar:nth-child(1) {
  animation: eqBeat1 0.4s ease-in-out infinite alternate;
}
#cardAudio:hover .eq-live-bar:nth-child(2),
.is-playing .eq-live-bar:nth-child(2) {
  animation: eqBeat2 0.32s ease-in-out infinite alternate 0.08s;
}
#cardAudio:hover .eq-live-bar:nth-child(3),
.is-playing .eq-live-bar:nth-child(3) {
  animation: eqBeat3 0.44s ease-in-out infinite alternate 0.16s;
}
#cardAudio:hover .eq-live-bar:nth-child(4),
.is-playing .eq-live-bar:nth-child(4) {
  animation: eqBeat4 0.36s ease-in-out infinite alternate 0.1s;
}

@keyframes musicGroove {
  0% { transform: rotate(-8deg) scale(0.96); }
  100% { transform: rotate(8deg) scale(1.12); }
}

#cardAudio:hover [data-lucide="music-2"] {
  animation: musicGroove 0.5s ease-in-out infinite alternate;
}

#cardAudio:hover .visual-icon-box {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

@keyframes eqBeat1 { 0% { height: 4px; } 100% { height: 18px; } }
@keyframes eqBeat2 { 0% { height: 7px; } 100% { height: 22px; } }
@keyframes eqBeat3 { 0% { height: 12px; } 100% { height: 6px; } }
@keyframes eqBeat4 { 0% { height: 5px; } 100% { height: 17px; } }

/* --- Kurumsal Kimlik Hover Brand Carousel --- */
@keyframes brandCarouselSlide {
  0% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-115px);
  }
  32% {
    transform: translateX(-115px); /* Dwells/pauses softly on prominent brands */
  }
  50% {
    transform: translateX(-250px);
  }
  64% {
    transform: translateX(-250px); /* Dwells on Kırıkkale & TASECS */
  }
  82% {
    transform: translateX(-390px);
  }
  100% {
    transform: translateX(-530px);
  }
}

.brand-carousel-track {
  display: flex;
  width: max-content;
  animation: brandCarouselSlide 11s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.brand-carousel-track:hover {
  animation-play-state: paused;
}

.brand-carousel-track-container {
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.brand-pill {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-pill:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}

/* ── Dual-Row Infinite Logo Marquee (Çalıştığım Şirketler & Referans Markalar) ── */
@keyframes marqueeScrollRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

@keyframes marqueeScrollLeft {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marqueeScrollRight 40s linear infinite;
  will-change: transform;
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marqueeScrollLeft 40s linear infinite;
  will-change: transform;
}

.marquee-container:hover .animate-marquee-right,
.marquee-container:hover .animate-marquee-left {
  animation-play-state: paused;
}

.brand-marquee-card {
  width: 220px;
  height: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: #FFFFFF;
  border: 1px solid rgba(19, 53, 50, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 2px 10px rgba(19, 53, 50, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.dark .brand-marquee-card {
  background: #142422;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.brand-marquee-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(49, 151, 149, 0.4);
  box-shadow: 0 10px 25px -4px rgba(19, 53, 50, 0.09);
}

.dark .brand-marquee-card:hover {
  border-color: rgba(71, 194, 178, 0.45);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5);
}
