/* ============================================================
   Emre Öcel — Portfolio Design System
   Monochrome palette + electric blue accent
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   CSS Custom Properties — Dark Theme (Default)
   ============================================================ */
:root,
[data-theme="dark"] {
  /* Background */
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-card: #0f0f0f;
  --bg-card-hover: #161616;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
  --text-muted: #444444;

  /* Accent */
  --accent: #e5e5e5;
  --accent-dim: rgba(255, 255, 255, 0.1);
  --accent-glow: rgba(255, 255, 255, 0.2);

  /* Borders */
  --border-primary: rgba(255, 255, 255, 0.06);
  --border-secondary: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(255, 255, 255, 0.3);

  /* Gradients */
  --gradient-hero: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
  --gradient-text: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  --gradient-accent: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.1);

  /* Misc */
  --scrollbar-track: #0a0a0a;
  --scrollbar-thumb: #333;
  --selection-bg: rgba(255, 255, 255, 0.2);
  --selection-text: #ffffff;
  --btn-text: #050505;
  color-scheme: dark;
}

/* ============================================================
   Light Theme
   ============================================================ */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-tertiary: #e8e8e8;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-hover: rgba(0, 0, 0, 0.04);

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --text-muted: #bbbbbb;

  --accent: #222222;
  --accent-dim: rgba(34, 34, 34, 0.08);
  --accent-glow: rgba(34, 34, 34, 0.15);

  --border-primary: rgba(0, 0, 0, 0.06);
  --border-secondary: rgba(0, 0, 0, 0.1);
  --border-accent: rgba(34, 34, 34, 0.3);

  --gradient-hero: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  --gradient-text: linear-gradient(135deg, #111111 0%, #555555 100%);
  --gradient-accent: linear-gradient(135deg, #333333 0%, #050505 100%);
  --gradient-card: linear-gradient(145deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.01) 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(34, 34, 34, 0.1);

  --scrollbar-track: #f0f0f0;
  --scrollbar-thumb: #cccccc;
  --selection-bg: rgba(34, 34, 34, 0.15);
  --selection-text: #111111;
  --btn-text: #ffffff;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}
a:hover {
  opacity: 0.8;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

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

.accent-text {
  color: var(--accent);
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.container-narrow {
  max-width: 800px;
}

.section {
  position: relative;
  padding: clamp(4rem, 10vh, 8rem) 0;
  z-index: 2;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  margin: 0 auto;
  color: var(--text-tertiary);
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-block;
}

/* ============================================================
   Three.js Canvas Container
   ============================================================ */
#three-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#three-canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.55; /* increased to make the object clearer */
}

#three-canvas-container.interactive {
  pointer-events: auto;
}

/* Non-hero sections get a semi-transparent backing so text stays readable */
.section {
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0.82;
  z-index: 1;
  pointer-events: none;
}

.section > * {
  position: relative;
  z-index: 2;
}

/* Hero has no backing — pure 3D */
.hero::before {
  display: none;
}

/* Footer backing */
.site-footer {
  position: relative;
  background: var(--bg-primary);
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-primary);
  padding: 0.6rem 0;
}

[data-theme="light"] .site-header.scrolled {
  background-color: rgba(250, 250, 250, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
}

.site-logo:hover {
  color: var(--accent);
  opacity: 1;
}

.site-logo span {
  color: var(--accent);
}

/* Desktop Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background-color: var(--bg-glass-hover);
  opacity: 1;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.control-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.lang-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  width: auto;
  padding: 0 0.65rem;
  letter-spacing: 0.05em;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: var(--bg-primary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(25px);
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.35s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--btn-text);
  border-color: var(--accent);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  opacity: 1;
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--bg-primary);
  background: var(--accent);
  opacity: 1;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 2.2s;
}

.scroll-indicator span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 0.6; transform: translate(-50%, 0); }
}

/* ============================================================
   About Section
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   Projects Section
   ============================================================ */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border-primary);
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

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

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.project-card-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.05);
}

.project-card-body {
  padding: 1.5rem;
}

.project-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.project-card-body p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.thesis-card {
  order: -1;
}

.thesis-badge {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-primary);
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Thesis Card Special */
.project-card.thesis-card {
  border-color: var(--border-accent);
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--accent-dim) 100%);
}

.thesis-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--gradient-accent);
  color: #000;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Skills Section
   ============================================================ */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.skill-category:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.skill-category-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-icon img,
.skill-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-info {
  flex: 1;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 2px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   Blog Preview Section
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.blog-card .blog-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.blog-card .blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.5rem 1.75rem 1.75rem;
}

.blog-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.blog-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.blog-card-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--accent-dim);
  color: var(--accent);
  text-transform: uppercase;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.blog-card h3 a {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.blog-card h3 a:hover {
  color: var(--accent);
  opacity: 1;
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--text-tertiary);
  flex: 1;
  line-height: 1.6;
}

.blog-cta {
  text-align: center;
}

/* ============================================================
   Contact Section
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
  opacity: 1;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-secondary);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Honeypot anti-spam */
.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-primary);
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-tertiary);
  margin-top: 0.75rem;
  max-width: 40ch;
  line-height: 1.7;
}

.footer-brand p a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-secondary);
  transition: all 0.3s ease;
}

.footer-brand p a:hover {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-primary);
}

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

.footer-bottom a {
  color: var(--text-tertiary);
}

.footer-bottom a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ============================================================
   Blog Post Layout
   ============================================================ */
.post-header {
  padding-top: 8rem;
  padding-bottom: 3rem;
  text-align: center;
}

.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.post-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.post-content p {
  margin-bottom: 1.25rem;
  max-width: none;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-glass);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content code {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.post-content pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem 0;
}

.post-content a {
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.3s ease;
}

.post-content a:hover {
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* Blog listing page */
.blog-listing {
  padding-top: 8rem;
}

/* ============================================================
   404 Page
   ============================================================ */
.page-404 {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-404 h1 {
  font-size: 8rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.page-404 p {
  margin: 1rem auto;
}

/* ============================================================
   Animation States (used for GSAP/ScrollTrigger)
   CSS safety-net: if GSAP doesn't fire within 2.5s, elements
   auto-reveal via the gsapFallback keyframe.
   ============================================================ */
@keyframes gsapFallback {
  to {
    opacity: 1 !important;
    transform: none !important;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  animation: gsapFallback 0.6s ease forwards 2.5s;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: gsapFallback 0.6s ease forwards 2.5s;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  animation: gsapFallback 0.6s ease forwards 2.5s;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  animation: gsapFallback 0.6s ease forwards 2.5s;
}

.hero-label,
.hero h1,
.hero-subtitle,
.hero-cta-group {
  animation: gsapFallback 0.6s ease forwards 2s;
}

/* ============================================================
   Prefers Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .hero-label,
  .hero h1,
  .hero-subtitle,
  .hero-cta-group {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Responsive — Tablet
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

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

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

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

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .section {
    padding: clamp(3rem, 8vh, 5rem) 0;
  }
}

/* ============================================================
   Responsive — Small Mobile
   ============================================================ */
@media (max-width: 400px) {
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .header-controls {
    gap: 0.3rem;
  }
}

/* ============================================================
   Skip Link (Accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
}

/* ============================================================
   Loading Screen
   ============================================================ */
.loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-secondary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Section Divider
   ============================================================ */
.section-divider {
  width: 60px;
  height: 1px;
  background: var(--gradient-accent);
  margin: 0 auto 2rem;
}
