/* ===================================================================
   EVOLUTION OF AHMET CAGATAY — Portfolio CSS
   Ancient → Medieval → Industrial → Digital → Modern
   Illustrations as backgrounds, content overlaid
   =================================================================== */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #e8dcc8;
  background: #3d3730;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ===== Scroll Progress Bar ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, #c45e2b, #E0C477, #8b7355, #00ff88, #52b788);
  transition: width 0.05s linear;
}


/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 150;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.6s ease, border-color 0.6s ease, color 0.6s ease;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.05em;
  transition: color 0.5s;
}

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

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s, opacity 0.3s;
  opacity: 0.6;
  letter-spacing: 0.02em;
}
.nav-links a:hover { opacity: 1; }

.nav-cv {
  display: inline-flex;
  padding: 6px 14px;
  border: 1.5px solid currentColor;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  opacity: 1 !important;
  transition: all 0.25s;
}
.nav-cv:hover { transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Nav era colors */
.nav[data-era="ancient"] { background: rgba(61,55,48,0.92); color: #e8dcc8; }
.nav[data-era="ancient"] .nav-cv { border-color: #c45e2b; color: #c45e2b; }
.nav[data-era="ancient"] .nav-cv:hover { background: #c45e2b; color: #e8dcc8; }

.nav[data-era="medieval"] { background: rgba(20,38,28,0.92); color: #E0C477; }
.nav[data-era="medieval"] .nav-brand { color: #E0C477; }
.nav[data-era="medieval"] .nav-links a { color: #E0C477; }
.nav[data-era="medieval"] .nav-cv { border-color: #E0C477; color: #E0C477; }
.nav[data-era="medieval"] .nav-cv:hover { background: #E0C477; color: #14261c; }
.nav[data-era="medieval"] .nav-hamburger { color: #E0C477; }

.nav[data-era="industrial"] { background: rgba(245,230,200,0.92); color: #5a4a36; }
.nav[data-era="industrial"] .nav-brand { color: #5a4a36; }
.nav[data-era="industrial"] .nav-links a { color: #5a4a36; }
.nav[data-era="industrial"] .nav-cv { border-color: #8b7355; color: #5a4a36; }
.nav[data-era="industrial"] .nav-cv:hover { background: #8b7355; color: #f5e6c8; }
.nav[data-era="industrial"] .nav-hamburger { color: #5a4a36; }

.nav[data-era="digital"] { background: rgba(8,8,12,0.94); color: #00ff88; }
.nav[data-era="digital"] .nav-brand { color: #00ff88; }
.nav[data-era="digital"] .nav-links a { color: #00ff88; }
.nav[data-era="digital"] .nav-cv { border-color: #00ff88; color: #00ff88; }
.nav[data-era="digital"] .nav-cv:hover { background: #00ff88; color: #08080c; }
.nav[data-era="digital"] .nav-hamburger { color: #00ff88; }

.nav[data-era="modern"] { background: rgba(254,253,246,0.92); color: #2d3436; }
.nav[data-era="modern"] .nav-brand { color: #2d6a4f; }
.nav[data-era="modern"] .nav-links a { color: #2d3436; }
.nav[data-era="modern"] .nav-cv { border-color: #52b788; color: #2d6a4f; }
.nav[data-era="modern"] .nav-cv:hover { background: #52b788; color: #fff; }
.nav[data-era="modern"] .nav-hamburger { color: #2d3436; }


/* ===== Era Indicator ===== */
.era-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.era-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.era-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.era-dot.active::after {
  width: 12px;
  height: 12px;
}

.era-dot-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.3s ease;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.era-dot:hover .era-dot-label,
.era-dot.active .era-dot-label {
  opacity: 1;
  transform: translateX(0);
}

.era-dot.active[data-era="ancient"]::after { background: #c45e2b; border-color: #c45e2b; box-shadow: 0 0 10px rgba(196,94,43,0.5); }
.era-dot.active[data-era="ancient"] .era-dot-label { color: #c45e2b; }
.era-dot.active[data-era="medieval"]::after { background: #E0C477; border-color: #E0C477; box-shadow: 0 0 10px rgba(224,196,119,0.5); }
.era-dot.active[data-era="medieval"] .era-dot-label { color: #E0C477; }
.era-dot.active[data-era="industrial"]::after { background: #8b7355; border-color: #8b7355; box-shadow: 0 0 10px rgba(139,115,85,0.5); }
.era-dot.active[data-era="industrial"] .era-dot-label { color: #8b7355; }
.era-dot.active[data-era="digital"]::after { background: #00ff88; border-color: #00ff88; box-shadow: 0 0 10px rgba(0,255,136,0.5); }
.era-dot.active[data-era="digital"] .era-dot-label { color: #00ff88; }
.era-dot.active[data-era="modern"]::after { background: #40916c; border-color: #40916c; box-shadow: 0 0 10px rgba(64,145,108,0.5); }
.era-dot.active[data-era="modern"] .era-dot-label { color: #40916c; }


/* ===== Shared: Era Background Layer ===== */
.era {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* Sections 1-4: exactly 100vh; Modern (last) is taller */
.era-ancient,
.era-medieval,
.era-industrial,
.era-digital {
  height: 100vh;
}

/* Transition gradient at bottom of each snap section */
.era-ancient::after,
.era-medieval::after,
.era-industrial::after,
.era-digital::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 3;
  pointer-events: none;
}
.era-ancient::after { background: linear-gradient(transparent, #14261c); }
.era-medieval::after { background: linear-gradient(transparent, #f5e6c8); }
.era-industrial::after { background: linear-gradient(transparent, #08080c); }
.era-digital::after { background: linear-gradient(transparent, #d8f3dc); }

.era-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.era-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.era-content {
  position: relative;
  z-index: 2;
}

.era-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
  opacity: 0.5;
}


/* ===== Shared: Content Blocks ===== */
.content-block {
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}


/* ===== Era Stats (shared) ===== */
.era-stats {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.era-stat {
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.era-stat-num {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.era-stat-lbl {
  display: block;
  font-size: 11px;
  opacity: 0.5;
}

/* Medieval stats: 2 cols, pixel style */
.medieval-stats { grid-template-columns: repeat(2, 1fr); }
.medieval-stats .era-stat {
  background: rgba(42,74,56,0.5);
  border: 1px solid rgba(224,196,119,0.12);
}
.medieval-stats .era-stat-num { font-family: 'Press Start 2P', monospace; font-size: 20px; color: #E0C477; }
.medieval-stats .era-stat-lbl { font-family: 'Press Start 2P', monospace; font-size: 8px; color: #E0C477; }

/* Industrial stats: 2 cols, sepia */
.industrial-stats { grid-template-columns: repeat(2, 1fr); }
.industrial-stats .era-stat {
  background: rgba(255,255,255,0.4);
  border: 1.5px solid rgba(139,115,85,0.15);
}
.industrial-stats .era-stat-num { font-family: 'Playfair Display', serif; font-size: 32px; color: #5a4a36; }
.industrial-stats .era-stat-lbl { font-family: 'Inter', sans-serif; color: #8b7355; }

/* Digital stats: 3 cols, neon */
.digital-stats { grid-template-columns: repeat(3, 1fr); }
.digital-stats .era-stat {
  background: rgba(0,255,136,0.02);
  border: 1px solid rgba(0,255,136,0.12);
}
.digital-stats .era-stat:hover { border-color: rgba(0,255,136,0.35); box-shadow: 0 0 20px rgba(0,255,136,0.08); }
.digital-stats .era-stat-num { font-family: 'JetBrains Mono', monospace; font-size: clamp(24px, 4vw, 40px); color: #00ff88; text-shadow: 0 0 24px rgba(0,255,136,0.3); }
.digital-stats .era-stat-lbl { font-family: 'JetBrains Mono', monospace; color: #00ff88; }

/* Modern stats: 3 cols, green glass */
.modern-stats { grid-template-columns: repeat(3, 1fr); }
.modern-stats .era-stat {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
}
.modern-stats .era-stat-num { font-family: 'Inter', sans-serif; font-size: 32px; color: #2d6a4f; }
.modern-stats .era-stat-lbl { color: #888d91; }


/* ===== Fade-in ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===================================================================
   ERA 1: ANCIENT — Cave Painting Hero
   =================================================================== */

.era-ancient {
  background: #3d3730;
  font-family: 'Nunito', sans-serif;
  color: #e8dcc8;
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(80,72,62,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(60,55,48,0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(50,45,40,0.3) 0%, transparent 40%);
}

.era-ancient .bg-svg {
  opacity: 0.2;
}

.ancient-overlay {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(40,36,30,0.4) 100%);
}

.ancient-hero-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(100vh - 56px);
  padding: 40px 0 20px;
}

.ancient-hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.ancient-accent {
  color: #c45e2b;
}

.ancient-hero-hook {
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(232,220,200,0.65);
  line-height: 1.6;
  max-width: 550px;
  margin-bottom: 8px;
}

.ancient-hero-sub {
  font-size: 14px;
  color: rgba(232,220,200,0.35);
  margin-bottom: 40px;
}

.ancient-block {
  background: rgba(61,55,48,0.7);
  border: 1px solid rgba(196,94,43,0.15);
  max-width: 580px;
}

.ancient-block h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #e8dcc8;
}

.ancient-block p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(232,220,200,0.7);
}

.ancient-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}

.btn-ancient-primary {
  display: inline-flex;
  padding: 13px 28px;
  background: #c45e2b;
  color: #e8dcc8;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.25s;
  box-shadow: 0 2px 16px rgba(196,94,43,0.3);
}
.btn-ancient-primary:hover {
  background: #a84d22;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(196,94,43,0.4);
}

.btn-ancient-secondary {
  display: inline-flex;
  padding: 13px 28px;
  background: transparent;
  color: #e8dcc8;
  border: 1.5px solid rgba(196,94,43,0.35);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.25s;
}
.btn-ancient-secondary:hover {
  border-color: #c45e2b;
  background: rgba(196,94,43,0.08);
  transform: translateY(-2px);
}


/* ===================================================================
   ERA 2: MEDIEVAL — Pixel Art, Kingdom Style, Parallax Forest
   =================================================================== */

.era-medieval {
  background: #14261c;
  font-family: 'Inter', sans-serif;
  color: #E0C477;
}

.medieval-parallax {
  position: absolute;
  inset: 0;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.parallax-layer .bg-svg {
  width: 100%;
  height: 100%;
}

.medieval-overlay {
  background: linear-gradient(
    to bottom,
    rgba(20,38,28,0.5) 0%,
    rgba(20,38,28,0.7) 30%,
    rgba(20,38,28,0.85) 60%,
    rgba(20,38,28,0.95) 100%
  );
}

.medieval-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(100vh - 56px);
  padding: 30px 0 20px;
}

.pixel-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px !important;
  letter-spacing: 2px !important;
}

.medieval-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(18px, 3vw, 28px);
  margin-bottom: 40px;
  text-shadow: 2px 2px 0 #692F11;
}

.medieval-block {
  background: rgba(42,74,56,0.65);
  border: 1.5px solid rgba(224,196,119,0.15);
  max-width: 620px;
}

.medieval-card-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 4px;
}

.block-meta {
  font-size: 12px;
  opacity: 0.45;
  margin-bottom: 14px;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.quest-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.quest strong {
  display: block;
  font-size: 13px;
  color: #E0C477;
  margin-bottom: 2px;
}

.quest p {
  font-size: 12px;
  color: rgba(224,196,119,0.55);
  line-height: 1.4;
}

/* Windmill rotation */
.windmill-blades { animation: spin 6s linear infinite; }
.water-wheel { animation: spin 4s linear infinite; }

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


/* ===================================================================
   ERA 3: INDUSTRIAL — Sepia, Victorian, Gears Background
   =================================================================== */

.era-industrial {
  background: #f5e6c8;
  font-family: 'Playfair Display', Georgia, serif;
  color: #5a4a36;
}

.era-industrial .bg-svg {
  opacity: 0.12;
}

.industrial-overlay {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245,230,200,0.6) 0%, rgba(245,230,200,0.3) 100%);
}

.industrial-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(100vh - 56px);
  padding: 30px 0 20px;
}

.industrial-label {
  color: #8b7355 !important;
}

.industrial-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  font-style: italic;
  margin-bottom: 40px;
  color: #5a4a36;
}

.industrial-block {
  background: rgba(255,255,255,0.55);
  border: 2px solid rgba(139,115,85,0.15);
  max-width: 620px;
  backdrop-filter: blur(8px);
}

.industrial-block h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #5a4a36;
}

.industrial-meta {
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  color: #8b7355;
  margin-bottom: 16px;
}

.industrial-list {
  list-style: none;
  padding: 0;
}

.industrial-list li {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #6b5b47;
  padding-left: 22px;
  margin-bottom: 10px;
  position: relative;
}

.industrial-list li::before {
  content: '\2699';
  position: absolute;
  left: 0;
  color: #8b7355;
}

/* Gear animations */
.gear-large { animation: gear-spin 14s linear infinite; transform-origin: 250px 400px; }
.gear-medium { animation: gear-spin-r 10s linear infinite; transform-origin: 1100px 280px; }
.gear-small { animation: gear-spin 7s linear infinite; transform-origin: 1150px 680px; }

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

/* Steam */
.industrial-steam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.steam-particle {
  position: absolute;
  bottom: 15%;
  width: 10px;
  height: 10px;
  background: rgba(139,115,85,0.12);
  border-radius: 50%;
  left: calc(15% + var(--d) * 13%);
  animation: steam-rise calc(5s + var(--d) * 1.2s) ease-out infinite;
  animation-delay: calc(var(--d) * -0.9s);
}

@keyframes steam-rise {
  0% { transform: translateY(0) scale(1); opacity: 0.25; }
  50% { transform: translateY(-140px) translateX(25px) scale(2.5); opacity: 0.1; }
  100% { transform: translateY(-300px) translateX(-15px) scale(4); opacity: 0; }
}


/* ===================================================================
   ERA 4: DIGITAL — Terminal, Matrix, Neon Green Background
   =================================================================== */

.era-digital {
  background: #08080c;
  font-family: 'JetBrains Mono', monospace;
  color: #00ff88;
}

.digital-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(100vh - 56px);
  padding: 30px 0 20px;
}

/* Grid bg */
.digital-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

.digital-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,136,0.012) 2px, rgba(0,255,136,0.012) 4px);
}

/* Matrix rain */
.digital-matrix-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.digital-matrix-rain span {
  position: absolute;
  top: -120px;
  width: 2px;
  height: 100px;
  background: linear-gradient(transparent, #00ff88);
  opacity: 0.06;
  left: calc(var(--i) * 5.26%);
  animation: matrix-fall calc(3s + var(--i) * 0.3s) linear infinite;
  animation-delay: calc(var(--i) * -0.5s);
}

@keyframes matrix-fall {
  0% { transform: translateY(-120px); opacity: 0.06; }
  50% { opacity: 0.1; }
  100% { transform: translateY(calc(100vh + 120px)); opacity: 0; }
}

/* Background workflow diagram */
.digital-bg-workflow {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.digital-flow-line {
  animation: flow-dash 2.5s linear infinite;
}
@keyframes flow-dash {
  from { stroke-dashoffset: 36; }
  to { stroke-dashoffset: 0; }
}

.digital-label {
  color: #00ff88 !important;
  font-family: 'JetBrains Mono', monospace;
}

/* Terminal */
.digital-terminal {
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  background: rgba(0,255,136,0.02);
  backdrop-filter: blur(4px);
}

.digital-terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,255,136,0.04);
  border-bottom: 1px solid rgba(0,255,136,0.08);
}

.digital-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.digital-terminal-title {
  margin-left: 12px;
  font-size: 12px;
  color: #00ff8855;
}

.digital-terminal-body {
  padding: 24px;
}

.digital-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(0,255,136,0.25);
}

.digital-cursor {
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.digital-subtitle {
  font-size: 15px;
  color: #00ff8888;
  margin-bottom: 4px;
}

.digital-meta {
  font-size: 13px;
  color: #00ff8844;
}

/* Stats */
.digital-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.digital-stat {
  border: 1px solid rgba(0,255,136,0.12);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(0,255,136,0.02);
  backdrop-filter: blur(4px);
  transition: all 0.3s;
}
.digital-stat:hover {
  border-color: rgba(0,255,136,0.35);
  box-shadow: 0 0 24px rgba(0,255,136,0.08);
}

.digital-stat-number {
  display: block;
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  text-shadow: 0 0 28px rgba(0,255,136,0.35);
  margin-bottom: 4px;
}

.digital-stat-label {
  font-size: 11px;
  color: #00ff8855;
}

/* Digital content blocks */
.digital-block {
  background: rgba(0,255,136,0.03);
  border: 1px solid rgba(0,255,136,0.1);
  max-width: 700px;
}

.digital-block p {
  font-size: 14px;
  line-height: 1.7;
  color: #00ff88bb;
  margin-bottom: 6px;
}

.digital-prompt {
  color: #00ff88;
  font-weight: 700;
}

.digital-project-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.digital-badge-inline {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #00ff8844;
  border-radius: 6px;
  color: #00ff8877;
  margin-left: 6px;
  vertical-align: middle;
}

.digital-project-desc {
  color: #00ff8899 !important;
}

.digital-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.digital-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 6px;
  color: #00ff8877;
}


/* ===================================================================
   ERA 5: MODERN — Glassmorphism, AI, Clean
   =================================================================== */

.era-modern {
  background: linear-gradient(160deg, #d8f3dc 0%, #fefdf6 25%, #fefdf6 60%, #fff3bf 85%, #ffecd2 100%);
  font-family: 'Inter', sans-serif;
  color: #2d3436;
}

.modern-layout {
  padding: 80px 0 60px;
}

/* Background blobs */
.modern-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: blob-float 12s ease-in-out infinite;
}

.modern-blob-1 {
  top: -60px;
  right: -40px;
  width: 320px;
  height: 320px;
  background: #ffd166;
  opacity: 0.14;
  border-radius: 60% 40% 50% 70% / 50% 60% 40% 60%;
}
.modern-blob-2 {
  bottom: 10%;
  left: -60px;
  width: 260px;
  height: 260px;
  background: #52b788;
  opacity: 0.08;
  border-radius: 40% 60% 70% 30% / 60% 30% 70% 40%;
  animation-delay: -5s;
  animation-duration: 15s;
}
.modern-blob-3 {
  top: 50%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: #f4845f;
  opacity: 0.06;
  border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%;
  animation-delay: -9s;
  animation-duration: 18s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(12px, -18px) rotate(4deg); }
  66% { transform: translate(-8px, 8px) rotate(-3deg); }
}

/* Background dashboard SVG */
.modern-bg-dashboard {
  position: absolute;
  right: -10%;
  top: 10%;
  width: 60%;
  height: auto;
  opacity: 1; /* already has very low fill-opacity in the SVG itself */
}

.modern-label {
  color: #52b788 !important;
}

.modern-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  color: #2d3436;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.modern-subtitle {
  font-size: 18px;
  color: #888d91;
  margin-bottom: 48px;
}

/* Modern content blocks */
.modern-block {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 12px rgba(45,106,79,0.06);
  transition: all 0.3s;
}
.modern-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(45,106,79,0.1);
}

.modern-block-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #52b788;
  margin-bottom: 16px;
}

.modern-block p {
  font-size: 15px;
  color: #555a5e;
  line-height: 1.7;
}

.modern-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.modern-skill {
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
  transition: transform 0.2s;
}
.modern-skill:hover { transform: translateY(-2px); }
.modern-skill:nth-child(3n+1) { background: #d8f3dc; color: #2d6a4f; }
.modern-skill:nth-child(3n+2) { background: #fff3bf; color: #b07d10; }
.modern-skill:nth-child(3n) { background: #ffecd2; color: #c45e2b; }

/* Projects */
.modern-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.modern-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.modern-card-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: #2d3436;
}

.modern-badge {
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 700;
  background: #fff3bf;
  color: #b07d10;
  white-space: nowrap;
}
.modern-badge.accent { background: #d8f3dc; color: #2d6a4f; }

.modern-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.modern-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  background: rgba(82,183,136,0.1);
  color: #2d6a4f;
  border-radius: 10px;
}

/* Project links */
.modern-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #40916c;
  margin-top: 10px;
  transition: opacity 0.2s;
}
.modern-link:hover { opacity: 0.7; }

/* Writing */
.modern-writing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.modern-writing-card {
  display: block;
}

.modern-writing-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #2d3436;
}

.modern-writing-link {
  font-size: 13px;
  font-weight: 700;
  color: #40916c;
  margin-top: 8px;
  display: inline-block;
}

/* Contact */
.modern-contact {
  text-align: center;
  max-width: 480px;
  margin: 40px auto 0;
}

.modern-contact-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 900;
  margin-bottom: 10px;
  color: #2d3436;
}

.modern-contact-sub {
  font-size: 16px;
  color: #888d91;
  margin-bottom: 28px;
}

.modern-contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-modern-primary {
  display: inline-flex;
  padding: 13px 28px;
  background: #40916c;
  color: #fff;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.25s;
  box-shadow: 0 2px 12px rgba(64,145,108,0.25);
}
.btn-modern-primary:hover {
  background: #2d6a4f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(64,145,108,0.35);
}

.btn-modern-secondary {
  display: inline-flex;
  padding: 13px 28px;
  background: transparent;
  color: #2d3436;
  border: 1.5px solid #e0ddd4;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.25s;
}
.btn-modern-secondary:hover {
  border-color: #52b788;
  background: rgba(82,183,136,0.06);
  color: #40916c;
  transform: translateY(-2px);
}


/* Digital project line (compact) */
.digital-project-line {
  opacity: 0.7;
  font-size: 13px !important;
}


/* ===== Footer ===== */
.footer {
  background: #fefdf6;
  border-top: 1px solid rgba(45,106,79,0.1);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #888d91;
}


/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .nav-hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px 24px;
    gap: 14px;
    border-bottom: 1px solid rgba(128,128,128,0.1);
  }
  .nav-links.open { display: flex; }

  .nav[data-era="ancient"] .nav-links { background: rgba(61,55,48,0.98); }
  .nav[data-era="medieval"] .nav-links { background: rgba(20,38,28,0.98); }
  .nav[data-era="industrial"] .nav-links { background: rgba(245,230,200,0.98); }
  .nav[data-era="digital"] .nav-links { background: rgba(8,8,12,0.98); }
  .nav[data-era="modern"] .nav-links { background: rgba(254,253,246,0.98); }

  /* Era indicator → bottom horizontal */
  .era-indicator {
    top: auto;
    right: auto;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 10px;
  }
  .era-dot-label { display: none; }

  /* Free scroll on mobile */
  .era-ancient, .era-medieval, .era-industrial, .era-digital {
    height: auto;
    min-height: 100vh;
  }

  .ancient-hero-layout, .medieval-layout, .industrial-layout, .digital-layout {
    height: auto;
    min-height: calc(100vh - 56px);
    padding: 30px 0 40px;
  }

  .modern-layout { padding: 70px 0 40px; }

  .ancient-hero-title { font-size: clamp(28px, 8vw, 44px); }
  .content-block { padding: 20px 18px; }

  .medieval-stats, .industrial-stats, .modern-stats { grid-template-columns: repeat(2, 1fr); }
  .digital-stats { grid-template-columns: repeat(3, 1fr); }

  .modern-projects { grid-template-columns: 1fr; }
  .modern-writing { grid-template-columns: 1fr; }
  .modern-bg-dashboard { display: none; }

  .modern-contact { margin-top: 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .digital-stats { grid-template-columns: 1fr; }
  .medieval-title { font-size: clamp(14px, 5vw, 22px); }
  .digital-terminal-body { padding: 16px; }
  .digital-title { font-size: clamp(22px, 6vw, 32px); }
  .modern-contact-links { flex-direction: column; align-items: center; }
}


/* ===================================================================
   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; }
  .fade-in { opacity: 1; transform: none; }
  .modern-blob, .windmill-blades, .water-wheel { animation: none; }
  .gear-large, .gear-medium, .gear-small { animation: none; }
  .steam-particle { display: none; }
  .digital-matrix-rain span { display: none; }
  .digital-cursor { animation: none; }
  .digital-flow-line { animation: none; }
  .transition-arrow { animation: none; }
}
