/* ========================================
   Design System — Joe Laurendi Resume
   ======================================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --bg-muted: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border: #475569;
  --accent: #0ea5e9;
  --accent-secondary: #8b5cf6;
  --state-completed: #22c55e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Manrope', 'Inter', system-ui, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-secondary);
}

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

/* ========================================
   Nav
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(71, 85, 105, 0.3);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-social a {
  color: var(--text-tertiary);
  transition: color 0.2s ease;
  display: flex;
}

.nav-social a:hover {
  color: var(--text-primary);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(14, 165, 233, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  animation: hero-bg-shift 12s ease-in-out infinite alternate;
}

@keyframes hero-bg-shift {
  0% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.1) translate(-2%, 3%);
  }
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 24px;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 32px;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.hero-social-link:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.08);
}

.hero-social-link svg {
  flex-shrink: 0;
}


/* ========================================
   Sections (shared)
   ======================================== */
.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-align: center;
}

/* ========================================
   About
   ======================================== */
.about-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 32px;
  min-width: 150px;
}

.stat-pill-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--accent);
}

.stat-pill-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  border-color: var(--state-completed);
  background: var(--state-completed);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.timeline-role {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-top: 4px;
}

.timeline-company {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  margin-top: 2px;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 8px;
}

/* Desktop alternating layout */
@media (min-width: 768px) {
  .timeline {
    max-width: 800px;
    padding-left: 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    width: 50%;
    margin-bottom: 48px;
  }

  .timeline-item:nth-child(odd) {
    padding-right: 48px;
    text-align: right;
  }

  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 48px;
  }

  .timeline-dot {
    left: auto;
  }

  .timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
    left: auto;
  }

  .timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
  }

  .timeline-card:hover {
    transform: none;
  }

  .timeline-item:nth-child(odd) .timeline-card:hover {
    transform: translateX(-4px);
  }

  .timeline-item:nth-child(even) .timeline-card:hover {
    transform: translateX(4px);
  }
}

/* ========================================
   Running
   ======================================== */
.running {
  position: relative;
  padding-bottom: 120px;
}

.running-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.pr-time {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  position: relative;
  border-bottom: 2px dashed var(--accent);
  transition: color 0.2s ease;
}

.pr-time:hover {
  color: var(--accent-secondary);
}

.pr-time.counting {
  color: var(--state-completed);
  border-color: var(--state-completed);
}

.running-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.running-stat {
  text-align: center;
}

.running-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-primary);
}

.running-stat-dim {
  color: var(--text-tertiary);
  font-size: 1.25rem;
}

.running-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.running-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  text-align: center;
}

.running .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.running-cta:hover {
  background: var(--accent-secondary);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Tall Grass --- */
.tall-grass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  cursor: pointer;
}

.grass-blade {
  width: 14px;
  flex-shrink: 0;
  background: #22c55e;
  border-radius: 50% 50% 0 0;
  transform-origin: bottom center;
  animation: grass-sway 3s ease-in-out infinite;
}

.grass-blade:nth-child(odd) {
  height: 40px;
  opacity: 0.7;
  animation-delay: -0.5s;
}

.grass-blade:nth-child(even) {
  height: 55px;
  opacity: 0.85;
}

.grass-blade:nth-child(3n) {
  height: 48px;
  opacity: 0.6;
  animation-delay: -1.2s;
  background: #16a34a;
}

@keyframes grass-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-social a {
  color: var(--text-tertiary);
  transition: color 0.2s ease;
  display: flex;
}

.footer-social a:hover {
  color: var(--text-primary);
}

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

/* ========================================
   Fade-in Sections
   ======================================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   Konami Overlay
   ======================================== */
.konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.konami-overlay.active {
  opacity: 1;
  visibility: visible;
}

.konami-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.konami-flash.flash {
  animation: battle-flash 0.6s ease-out forwards;
}

@keyframes battle-flash {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

.konami-content {
  position: relative;
  width: 100%;
  max-width: 680px;
  padding: 24px;
}

.konami-box {
  background: var(--bg-surface);
  border: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  animation: konami-slide-up 0.5s ease-out 0.3s both;
}

@keyframes konami-slide-up {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.konami-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

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

.konami-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.konami-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.konami-btn:hover {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.1);
}

.konami-btn:active {
  transform: scale(0.95);
}

.konami-subtitle {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.konami-pokemon {
  margin-top: 24px;
  text-align: center;
}

.konami-pokemon-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.konami-pokemon-art {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.konami-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.konami-close:hover {
  color: var(--text-primary);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 639px) {
  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .about-text {
    font-size: 1rem;
  }

  .stat-pill {
    padding: 16px 24px;
    min-width: 120px;
  }

  .stat-pill-value {
    font-size: 1.4rem;
  }

  .running-stat-value {
    font-size: 1.5rem;
  }

  .running-stats {
    gap: 20px;
  }

  .hero-social {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .nav-social {
    display: none;
  }

  .stats-row {
    gap: 12px;
  }

  .stat-pill {
    padding: 14px 18px;
    min-width: 100px;
  }
}

/* ========================================
   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-section {
    opacity: 1;
    transform: none;
  }

  .hero-bg {
    animation: none;
  }
}
