/* ========================================
   TUGAY İLHAN — Personal Portfolio
   Design: Dark Mode + Glassmorphism
   ======================================== */

/* Google Fonts — index.html'den preload + async olarak yükleniyor */

/* ── Font Display: Swap Override (FOIT önleme) ──────
   Font Awesome CDN fontlarına font-display:swap uygular.
   Bu sayede fontlar yüklenirken metin görünmez kalmaz (FCP iyileşir). */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-display: swap;
}

@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-display: swap;
}

/* ── Font Metric Overrides (CLS önleme) ─────────────
   Inter yüklenince fallback font ile ölçüleri eşleştirir.
   Font swap olduğunda layout kayması olmaz → CLS = 0. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('sans-serif');
  size-adjust: 100.06%;
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Fira Code Fallback';
  src: local('Courier New'), local('monospace');
  size-adjust: 87%;
  ascent-override: 85%;
  descent-override: 21%;
  line-gap-override: 0%;
}


/* ── CSS Variables ── */
:root {
  --bg-primary: #050b14;
  --bg-secondary: #0a1628;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);

  --accent-cyan: #00d4ff;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-green: #10b981;

  --gradient-hero: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
  --gradient-border: linear-gradient(135deg, #00d4ff, #8b5cf6, #ec4899);

  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #4a5568;

  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-glow-cyan: 0 0 30px rgba(0, 212, 255, 0.15);
  --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.15);

  --font-main: 'Inter', 'Inter Fallback', sans-serif;
  --font-code: 'Fira Code', 'Fira Code Fallback', monospace;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-border);
  border-radius: 3px;
}

/* ── Background Mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section ── */
section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.section-title {
  margin-bottom: 60px;
}

.section-title h2 {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.section-title p {
  font-size: 1.1rem;
  max-width: 600px;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  transition: var(--transition);
}

#header.scrolled {
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--gradient-hero);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-cyan);
}

.logo-text span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

/* Nav CTA */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(5, 11, 20, 0.97);
  backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border-glass);
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.mobile-menu.open {
  display: flex;
  animation: slideDown 0.3s ease;
}

.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-glass);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-main);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: var(--shadow-glow-cyan);
}

/* ========================================
   HERO SECTION
   ======================================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 28px;
  animation: badgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title .greeting {
  display: block;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-title .name {
  background: linear-gradient(270deg, #00d4ff, #8b5cf6, #ec4899, #00d4ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  /* gradientShift: GPU-uyumlu opacity animasyonu (background-position GPU'da çalışmaz) */
  animation: gradientShift 6s ease infinite;
  will-change: opacity;
}

.hero-title .role {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.role-tag {
  font-family: var(--font-code);
  font-size: 0.9em;
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border-glass);
  min-height: 72px;
  /* CLS önleme: font swap'ta yükseklik değişmez */
}

.stat-item .num {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
  min-height: 2rem;
  /* CLS önleme */
  /* counterGlow: GPU-uyumlu filter:brightness */
  animation: counterGlow 3s ease-in-out infinite;
}

.stat-item .num:nth-child(1) {
  animation-delay: 0s;
}

.stat-item:nth-child(2) .num {
  animation-delay: 0.4s;
}

.stat-item:nth-child(3) .num {
  animation-delay: 0.8s;
}

.stat-item .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}

.avatar-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #00d4ff, #8b5cf6, #ec4899, #00d4ff);
  animation: spin 8s linear infinite;
  padding: 3px;
}

.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-primary);
}

.avatar-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-secondary);
}

.floating-card {
  position: absolute;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: float 6s ease-in-out infinite;
  z-index: 3;
  white-space: nowrap;
}

.floating-card:nth-child(2) {
  top: 10%;
  left: -20px;
  animation-delay: 0s;
}

.floating-card:nth-child(3) {
  bottom: 15%;
  right: -20px;
  animation-delay: 2s;
}

.floating-card:nth-child(4) {
  bottom: 40%;
  left: -30px;
  animation-delay: 4s;
}

.floating-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.floating-card .icon.cyan {
  background: rgba(0, 212, 255, 0.15);
}

.floating-card .icon.purple {
  background: rgba(139, 92, 246, 0.15);
}

.floating-card .icon.green {
  background: rgba(16, 185, 129, 0.15);
}

.floating-card .info strong {
  font-size: 0.85rem;
  display: block;
}

.floating-card .info span {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
#about {
  background: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.about-image-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
  animation: rotate 20s linear infinite;
}

.code-block {
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.code-block .comment {
  color: #4a5568;
}

.code-block .keyword {
  color: #8b5cf6;
}

.code-block .string {
  color: #10b981;
}

.code-block .variable {
  color: #00d4ff;
}

.code-block .prop {
  color: #f59e0b;
}

.code-block .value {
  color: var(--text-secondary);
}

.code-block .bracket {
  color: var(--text-muted);
}

.about-content {}

.about-text {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}

.skill-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-glow-cyan);
}

.skill-item .skill-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: var(--transition);
  display: inline-block;
}

.skill-item:hover .skill-icon {
  animation: iconBounce 0.5s ease;
  color: var(--accent-cyan);
}

/* ========================================
   SKILLS / EXPERTISE SECTION
   ======================================== */
#skills {
  background: var(--bg-secondary);
  position: relative;
}

#skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition);
}

/* Shimmer line */
.skill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.skill-card:hover::after {
  left: 150%;
}

.skill-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--shadow-glow-cyan);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.skill-card-icon.cyan {
  background: rgba(0, 212, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.skill-card-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.skill-card-icon.pink {
  background: rgba(236, 72, 153, 0.12);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
}

.skill-card-icon.green {
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.skill-card h3 {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.skill-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  font-family: var(--font-code);
  border: 1px solid;
}

.tech-tag.cyan {
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.2);
}

.tech-tag.purple {
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

.tech-tag.pink {
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.2);
}

.tech-tag.green {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
#projects {}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), var(--shadow-glow-purple);
}

.project-thumbnail {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.project-thumb-bg.grad-1 {
  background: linear-gradient(135deg, #0a1628, #1a0a3d);
}

.project-thumb-bg.grad-2 {
  background: linear-gradient(135deg, #0a1628, #0a2820);
}

.project-thumb-bg.grad-3 {
  background: linear-gradient(135deg, #0a1628, #3d0a2a);
}

.project-thumb-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
}

.project-thumb-bg.grad-1 .project-thumb-glow {
  background: var(--accent-purple);
}

.project-thumb-bg.grad-2 .project-thumb-glow {
  background: var(--accent-green);
}

.project-thumb-bg.grad-3 .project-thumb-glow {
  background: var(--accent-pink);
}

.project-emoji {
  position: relative;
  z-index: 1;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 20, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-year {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
}

.project-status.live {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-status.wip {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.project-body h3 {
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.9rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact {
  background: var(--bg-secondary);
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(139, 92, 246, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.contact-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.contact-card h2 {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.contact-card>p {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 48px;
  position: relative;
  z-index: 1;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  margin-bottom: 48px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
  color: var(--text-secondary);
}

.contact-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.contact-link .cl-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.contact-link.github .cl-icon {
  background: rgba(255, 255, 255, 0.08);
}

.contact-link.linkedin .cl-icon {
  background: rgba(0, 119, 181, 0.15);
}

.contact-link.twitter .cl-icon {
  background: rgba(29, 161, 242, 0.15);
}

.contact-link.email .cl-icon {
  background: rgba(236, 72, 153, 0.15);
}

.contact-divider {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 0 0 32px;
  position: relative;
  z-index: 1;
}

.contact-email {
  position: relative;
  z-index: 1;
}

.contact-email a {
  font-family: var(--font-code);
  font-size: 1.2rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact-email a:hover {
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ========================================
   FOOTER
   ======================================== */
#footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-glass);
  position: relative;
  z-index: 1;
}

.footer-inner {
  padding: 60px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-glass);
}

.footer-brand {}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 24px;
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
}

.social-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-col ul li a:hover {
  color: var(--accent-cyan);
  gap: 12px;
}

.footer-col ul li a::before {
  content: '→';
  font-size: 0.75rem;
  opacity: 0;
  transition: var(--transition);
}

.footer-col ul li a:hover::before {
  opacity: 1;
}

.footer-bottom {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom p span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.footer-tech {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--gradient-hero);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  color: #fff;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.4);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-14px) rotate(1deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Shimmer sweep gradient */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Badge pop-in */
@keyframes badgePop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-6px);
  }

  70% {
    transform: scale(1.05) translateY(2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Counter number glow — GPU-uyumlu: filter:brightness kullanır (text-shadow değil) */
@keyframes counterGlow {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.4);
  }
}

/* Gradient hero title — GPU-uyumlu: opacity animasyonu (background-position değil) */
@keyframes gradientShift {

  0%,
  100% {
    opacity: 0.85;
  }

  50% {
    opacity: 1;
  }
}

/* Skill icon bounce on hover */
@keyframes iconBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  30% {
    transform: translateY(-6px) scale(1.15);
  }

  60% {
    transform: translateY(-2px) scale(1.05);
  }
}

/* Scroll Reveal — sadece JS yüklenince aktif */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-ready .reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.js-ready .reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-ready .reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-visual {
    display: flex;
    order: -1;
    margin-bottom: 47px;
  }
  .avatar-wrapper {
    width: 240px;
    height: 240px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .contact-card {
    padding: 36px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }
}

/* ── Typewriter cursor ── */
.typewriter::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent-cyan);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Neural Network canvas ── */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 1s ease;
}

/* Tech tag shimmer on hover */
.tech-tag {
  transition: var(--transition);
}

.tech-tag:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Section tag enhanced */
.section-tag {
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Contact link — shimmer border */
.contact-link {
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.contact-link:hover::before {
  left: 150%;
}

/* Scroll-to-top pulse ring */
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ripplePing 2s ease-out infinite;
  opacity: 0;
}

@keyframes ripplePing {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Logo mark rotation on hover */
.nav-logo:hover .logo-mark {
  animation: spin 1s ease;
}