/* =====================================================
   Roy Johnson — Personal Portfolio
   Theme: Dark & Bold | Accent: Electric Blue #00bfff
   ===================================================== */

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

/* === CSS VARIABLES === */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --accent: #00bfff;
  --accent-dim: rgba(0, 191, 255, 0.1);
  --accent-border: rgba(0, 191, 255, 0.3);
  --accent-glow: 0 0 28px rgba(0, 191, 255, 0.2);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border: #30363d;
  --success: #3fb950;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --nav-height: 70px;
  --transition: 0.25s ease;
  --transition-slow: 0.45s ease;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --section-padding: 80px 0;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === SELECTION === */
::selection { background: var(--accent-dim); color: var(--accent); }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
p { color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }
em { color: var(--text-primary); font-style: italic; }

/* === LAYOUT === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-padding { padding: var(--section-padding); }

/* === UTILITY === */
.accent { color: var(--accent); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.tag {
  display: inline-block;
  padding: 3px 11px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  white-space: nowrap;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-border);
}
.btn-outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--accent-glow);
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition);
}
.nav.scrolled {
  background: rgba(13, 17, 23, 0.98);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo:hover { color: var(--text-primary); }
.nav-logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px; right: 16px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 1px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-links .nav-cta { margin-left: 8px; }
.nav-links .nav-cta a {
  padding: 8px 20px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  transition: all var(--transition);
}
.nav-links .nav-cta a:hover {
  background: var(--accent);
  color: var(--bg-primary);
}
.nav-links .nav-cta a::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === MOBILE NAV === */
.mobile-nav {
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  display: none;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block;
  padding: 11px 16px;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-left-color: var(--accent);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 191, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 191, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 75% 40%, rgba(0, 191, 255, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 100% 40% at 50% 100%, var(--bg-primary) 20%, transparent 70%);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 130px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
}
.hero-name {
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 24px;
}
.hero-name .line2 {
  color: var(--accent);
  display: block;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 580px;
  line-height: 1.6;
}
.hero-title strong { color: var(--text-primary); font-weight: 600; }
.hero-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 1.5em;
}
.hero-tagline::before {
  content: '>';
  color: var(--accent);
}
.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}
.scroll-indicator {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-indicator-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* === FEATURE CARDS === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform var(--transition-slow);
}
.feature-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35), var(--accent-glow);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 52px; height: 52px;
  background: var(--accent-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.feature-card p { font-size: 0.9rem; line-height: 1.7; }

/* === SKILLS CLOUD === */
.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.skill-badge {
  padding: 7px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all var(--transition);
  cursor: default;
}
.skill-badge:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}

/* === CTA BAND === */
.cta-band {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--accent-dim) 0%, transparent 70%);
}
.cta-band-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { margin-bottom: 36px; font-size: 1.05rem; }
.btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* === PAGE HERO (inner pages) === */
.page-hero {
  padding: calc(var(--nav-height) + 56px) 0 56px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 191, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 191, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 12px; }
.page-hero p { font-size: 1.05rem; max-width: 520px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--accent); }

/* === ABOUT PAGE === */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.profile-card {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.profile-photo-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.profile-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.profile-photo-placeholder svg { width: 56px; height: 56px; opacity: 0.35; }

.profile-status {
  position: absolute;
  top: 16px; right: 16px;
  padding: 6px 14px;
  background: rgba(13, 17, 23, 0.88);
  border: 1px solid var(--success);
  border-radius: 100px;
  font-size: 0.73rem;
  font-family: var(--font-mono);
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.profile-info { padding: 24px 24px 8px; }
.profile-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.profile-role {
  font-size: 0.82rem;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 20px;
}
.profile-meta { display: flex; flex-direction: column; gap: 10px; }
.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.profile-meta-item svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.profile-actions {
  padding: 20px 24px 24px;
  display: flex;
  gap: 10px;
}
.profile-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.85rem;
  padding: 10px 16px;
}

.bio-section h2 { margin-bottom: 20px; }
.bio-section p {
  margin-bottom: 16px;
  font-size: 0.97rem;
  line-height: 1.78;
}

.skills-section { margin-top: 48px; }
.skills-section > h3 {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.skill-category h4 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 14px;
}
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.skill-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.skill-list li::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.fun-facts {
  margin-top: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.fun-facts h3 { margin-bottom: 24px; }
.fun-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
}
.fun-fact { display: flex; flex-direction: column; gap: 8px; }
.fun-fact-emoji { font-size: 2rem; }
.fun-fact-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 191, 255, 0.08);
  transition: opacity 0.2s ease;
  display: block;
}
.lightbox-img.swapping { opacity: 0; }

.lightbox-close {
  position: fixed;
  top: 20px; right: 20px;
  width: 46px; height: 46px;
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  z-index: 9001;
  line-height: 1;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.lightbox-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  background: rgba(22, 27, 34, 0.88);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  z-index: 9001;
  line-height: 1;
}
.lightbox-nav:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-nav.lb-prev { left: 20px; }
.lightbox-nav.lb-next { right: 20px; }
.lightbox-nav.lb-hidden { display: none; }

.lightbox-counter {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(13, 17, 23, 0.75);
  padding: 5px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  letter-spacing: 0.12em;
}

.lightbox-hint {
  position: fixed;
  bottom: 24px; right: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
}

/* Zoom cursor hint on all project images that have real photos */
.project-image.has-photo { cursor: zoom-in; }
.project-image.has-photo::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(13, 17, 23, 0.75);
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300bfff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
  pointer-events: none;
}
.project-image.has-photo:hover::after { opacity: 1; }

/* === IMAGE CAROUSEL === */
.carousel { position: relative; overflow: hidden; }
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  z-index: 3;
  opacity: 0.7;
  line-height: 1;
  padding: 0;
}
.carousel-btn:hover { opacity: 1; background: var(--accent); color: var(--bg-primary); transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 3;
}
.carousel-dot {
  width: 7px; height: 7px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 6px var(--accent);
}

/* === PORTFOLIO PAGE === */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(0,0,0,0.4), var(--accent-glow);
}
.project-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}
.project-image.carousel { overflow: hidden; }
.project-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-image img { transform: scale(1.05); }
.project-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.project-image-placeholder svg { width: 36px; height: 36px; opacity: 0.25; }
.project-type-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--accent);
  backdrop-filter: blur(4px);
}
.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.project-card:hover .project-body h3 { color: var(--accent); }
.project-body p { font-size: 0.88rem; line-height: 1.65; flex: 1; margin-bottom: 18px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.project-links { display: flex; gap: 16px; margin-top: auto; }
.project-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: color var(--transition);
}
.project-link:hover { color: var(--accent); }
.project-link svg { width: 13px; height: 13px; }

/* === RESUME PAGE === */
.resume-actions { display: flex; gap: 14px; margin-top: 24px; }
.resume-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 40px;
  align-items: start;
}
.resume-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.resume-sidebar-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.resume-sidebar-section h3 {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}
.cert-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.cert-icon {
  width: 30px; height: 30px;
  background: var(--accent-dim);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--accent-border);
}
.resume-sidebar .skills-cloud { flex-direction: column; align-items: flex-start; gap: 8px; }
.resume-sidebar .skill-badge { font-size: 0.78rem; padding: 5px 12px; }

.resume-main { display: flex; flex-direction: column; gap: 32px; }
.resume-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.resume-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.resume-section-title svg { width: 17px; height: 17px; color: var(--accent); }

.experience-item {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.experience-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.exp-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; }
.exp-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  padding: 4px 10px;
  background: var(--accent-dim);
  border-radius: 4px;
  border: 1px solid var(--accent-border);
}
.exp-company { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 16px; }
.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.exp-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.exp-bullets li::before { content: '▸'; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  text-decoration: none;
  transition: all var(--transition);
}
.contact-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: var(--accent-glow);
}
.contact-icon {
  width: 50px; height: 50px;
  background: var(--accent-dim);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.contact-icon svg { width: 22px; height: 22px; color: var(--accent); }
.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.contact-value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-word;
}

/* === FOOTER === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }

/* === SCROLL ANIMATIONS === */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 280px 1fr; gap: 40px; }
  .resume-layout { grid-template-columns: 240px 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; --section-padding: 60px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .profile-card { position: relative; top: 0; }

  .resume-layout { grid-template-columns: 1fr; }
  .resume-sidebar { position: relative; top: 0; }

  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .resume-actions { flex-wrap: wrap; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { justify-content: center; }
  .cta-band .btn-group { flex-direction: column; align-items: center; }
}

/* =====================================================
   PRINT / PDF STYLES
   Open resume.html in Chrome → Cmd+P → Save as PDF
   ===================================================== */
@media print {
  /* Page setup */
  @page {
    size: letter;
    margin: 0.6in 0.65in;
  }

  /* Reset colors for print */
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0f0f0;
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #666666;
    --accent: #0077aa;
    --border: #dddddd;
    --accent-dim: #eef6fb;
    --accent-border: #99ccee;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Hide everything except the resume content */
  .nav,
  .mobile-nav,
  .page-hero,
  .cta-band,
  #contact,
  .footer,
  .scroll-indicator,
  .fade-up { /* remove animation class interference */
    display: none !important;
  }

  /* Make fade-up items visible (animation won't run in print) */
  .resume-section,
  .resume-sidebar-section,
  .experience-item {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Print header — name + contact */
  .section-padding::before {
    content: "ROY E. JOHNSON II";
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22pt;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.03em;
    margin-bottom: 4pt;
  }
  .section-padding::after {
    content: "Roy@RoyJohnson.info  ·  352.318.5932  ·  Caldwell, Idaho  ·  royjohnson.info";
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8.5pt;
    color: #0077aa;
    margin-bottom: 18pt;
    padding-bottom: 12pt;
    border-bottom: 2px solid #0077aa;
  }

  /* Full width layout for print */
  .section-padding {
    padding: 0 !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .resume-layout {
    display: grid !important;
    grid-template-columns: 2.2in 1fr !important;
    gap: 0.3in !important;
  }

  /* Sidebar */
  .resume-sidebar {
    position: static !important;
    gap: 14pt !important;
  }
  .resume-sidebar-section {
    background: #f8f8f8 !important;
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    padding: 12pt !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .resume-sidebar-section h3 {
    font-size: 7pt !important;
    letter-spacing: 0.12em !important;
    color: #0077aa !important;
    margin-bottom: 8pt !important;
  }

  /* Education block */
  .resume-sidebar-section div[style] {
    font-size: 8.5pt !important;
  }

  /* Cert list */
  .cert-list { gap: 8pt !important; }
  .cert-item { font-size: 8.5pt !important; }
  .cert-icon {
    width: 22pt !important;
    height: 22pt !important;
    font-size: 6.5pt !important;
    background: #eef6fb !important;
    border-color: #99ccee !important;
  }

  /* Skills cloud — stacked for print */
  .skills-cloud {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4pt !important;
    margin-top: 0 !important;
  }
  .skill-badge {
    font-size: 7.5pt !important;
    padding: 2pt 7pt !important;
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
    border-radius: 100pt !important;
  }

  /* Main resume sections */
  .resume-main { gap: 14pt !important; }
  .resume-section {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    padding: 14pt !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .resume-section-title {
    font-size: 8pt !important;
    color: #555 !important;
    border-bottom-color: #ddd !important;
    margin-bottom: 10pt !important;
    padding-bottom: 8pt !important;
  }
  .resume-section-title svg { display: none !important; }

  /* Experience */
  .experience-item {
    margin-bottom: 14pt !important;
    padding-bottom: 14pt !important;
    border-bottom-color: #eee !important;
    break-inside: avoid;
  }
  .exp-title { font-size: 10.5pt !important; }
  .exp-date {
    font-size: 7.5pt !important;
    padding: 2pt 7pt !important;
    background: #eef6fb !important;
    border-color: #99ccee !important;
    color: #0077aa !important;
  }
  .exp-company { font-size: 8.5pt !important; margin-bottom: 8pt !important; }
  .exp-bullets li {
    font-size: 8.5pt !important;
    line-height: 1.45 !important;
    gap: 6pt !important;
  }
  .exp-bullets li::before { color: #0077aa !important; }

  /* Summary paragraph */
  .resume-section p { font-size: 9pt !important; line-height: 1.6 !important; color: #333 !important; }

  /* No box shadows, no transitions anywhere */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
