/* ============================================
   style.css — Christopher Ernst-Fortin Portfolio
   ============================================ */

/* === CSS Variables === */
:root {
  --bg-primary: #111214;
  --bg-secondary: #17191c;
  --bg-card: #1d2023;
  --accent-stone: #a89a8a;
  --accent-stone-dark: #8d7f72;
  --accent-stone-light: #c2b5a6;
  --accent-slate: #8a9cae;
  --accent-slate-dark: #728496;
  --accent-slate-light: #a4b4c4;
  --text-primary: #dddfe2;
  --text-secondary: #7e8490;
  --text-muted: #454950;
  --border: #252830;
  --border-subtle: rgba(221, 223, 226, 0.06);
  --glow-stone: rgba(168, 154, 138, 0.12);
  --glow-slate: rgba(138, 156, 174, 0.12);
  --glass-bg: rgba(221, 223, 226, 0.02);
  --transition-snap: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* === Container === */
.container {
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* === Header === */
.site-header {
  background-color: rgba(17, 18, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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

.site-header .logo h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text-primary);
  font-weight: 600;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  justify-content: flex-end;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.25s ease;
  padding: 4px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-stone), var(--accent-slate));
  border-radius: 1px;
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* === Hero Section === */
.hero-section {
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 110px 0 90px;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Animated gradient blobs */
.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}

.blob-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #8a9cae, transparent 68%);
  top: -180px;
  right: -120px;
  opacity: 0.1;
  animation: blobFloat 10s ease-in-out infinite;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #a89a8a, transparent 68%);
  bottom: -140px;
  left: -100px;
  opacity: 0.07;
  animation: blobFloat 12s ease-in-out infinite reverse;
  animation-delay: -5s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(0.97); }
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  color: var(--text-primary);
}

/* "Open to Work" badge */
.badge-available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(138, 156, 174, 0.12), rgba(138, 156, 174, 0.05));
  border: 1px solid rgba(138, 156, 174, 0.3);
  color: #a4b4c4;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  box-shadow: none;
}

.badge-available::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #6ef57e;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(110, 245, 126, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

.hero-text h2 {
  font-size: 1.1rem;
  color: var(--accent-slate);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-text h1 span {
  color: var(--accent-slate);
}

/* Typewriter cursor */
.hero-text h1 span::after {
  content: '|';
  color: var(--accent-slate-light);
  animation: blink 1s step-end infinite;
  margin-left: 3px;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-text p {
  max-width: 480px;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Hero image */
.hero-image {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-wrapper {
  position: relative;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(145deg, #8a9cae, #a89a8a, #8a9cae);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: box-shadow 0.35s ease, transform 0.35s var(--transition-snap);
}

.hero-img-wrapper:hover {
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.hero-img-wrapper img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  background-color: var(--bg-card);
}

/* Social icons */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  align-items: center;
}

/* Inside contact-info card, remove top margin so icons align inline */
.contact-info .social-icons {
  margin-top: 0;
}

.social-icons img {
  width: 36px;
  height: auto;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: brightness(0.85);
}

.social-icons a:hover img {
  filter: brightness(1);
}

/* Scroll indicator */
.scroll-indicator {
  display: inline-block;
  margin-top: 2.5rem;
  text-decoration: none;
}

.scroll-mouse {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 11px;
  position: relative;
  transition: border-color 0.3s ease;
}

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

@keyframes scrollDot {
  0%       { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%      { transform: translateX(-50%) translateY(12px); opacity: 0; }
  100%     { transform: translateX(-50%) translateY(0); opacity: 0; }
}

.scroll-indicator:hover .scroll-mouse {
  border-color: var(--accent-stone);
}

/* Hero responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 70px 0 60px;
  }

  .hero-content {
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    width: 100%;
  }

  .hero-image {
    width: 100%;
  }

  .hero-img-wrapper img {
    max-width: 220px;
  }

  .hero-text h1 {
    font-size: 1.9rem;
  }

  .hero-text p {
    max-width: 100%;
    margin: 0 auto 1.5rem;
  }

  .social-icons {
    justify-content: center;
  }

  .scroll-indicator {
    display: none;
  }
}

/* === Buttons === */
.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.8rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--transition-snap), box-shadow 0.25s ease, background-color 0.25s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-slate);
  color: #111214;
  box-shadow: 0 4px 16px rgba(138, 156, 174, 0.15);
}

.btn-primary:hover {
  background: var(--accent-slate-dark);
  box-shadow: 0 6px 24px rgba(138, 156, 174, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-slate);
  border: 1.5px solid rgba(138, 156, 174, 0.45);
}

.btn-secondary:hover {
  background: rgba(138, 156, 174, 0.08);
  border-color: var(--accent-slate);
  box-shadow: 0 4px 12px rgba(138, 156, 174, 0.1);
}

/* === Section heading accent line === */
.about-section h2,
.portfolio-section h2,
.resume-section h2,
.contact-section h2 {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
}

.about-section h2::after,
.portfolio-section h2::after,
.resume-section h2::after,
.contact-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-stone), var(--accent-slate));
  border-radius: 2px;
}

/* === About Section === */
.about-section {
  background-color: var(--bg-secondary);
  padding: 100px 0 90px;
}

.about-section h2 {
  font-size: 1.8rem;
  color: var(--accent-slate);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 160px;
}

.stat-item {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  transition: border-color 0.3s ease;
}

.stat-item:hover {
  border-color: rgba(138, 156, 174, 0.15);
}

.stat-num {
  display: inline;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--accent-slate);
}

.stat-plus {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-slate);
}

.stat-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    min-width: unset;
  }

  .stat-item {
    flex: 0 1 130px;
  }
}

/* === Portfolio Teaser Section === */
.portfolio-section {
  background-color: var(--bg-primary);
  padding: 70px 0 80px;
}

.portfolio-section h2 {
  font-size: 1.8rem;
  color: var(--accent-slate);
}

.portfolio-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.portfolio-intro h2::after {
  left: 50%;
  transform: translateX(-50%);
}

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

/* Featured project grid (2 cards on homepage) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-btn-wrapper {
  text-align: center;
}

/* === Resume Section === */
.resume-section {
  background-color: var(--bg-secondary);
  padding: 90px 0;
}

.resume-section h2 {
  font-size: 2rem;
  color: var(--accent-slate);
}

.resume-section a {
  color: #c2b5a6;
  text-decoration: none;
  transition: color 0.25s ease;
}

.resume-section a:hover {
  color: #a4b4c4;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
}

.contact-item strong {
  display: inline-block;
  width: 80px;
  color: var(--text-primary);
}

.contact-item a {
  color: #c2b5a6;
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact-item a:hover {
  color: #a4b4c4;
}

.resume-block {
  margin-bottom: 2.5rem;
}

.resume-block h3 {
  font-size: 1.4rem;
  color: var(--accent-slate);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-block h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.resume-block p,
.resume-block li {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === Skills (Categorized) === */
.skills-category {
  margin-bottom: 1.25rem;
}

.skills-cat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.skill-tag:hover {
  background: rgba(138, 156, 174, 0.1);
  color: var(--accent-stone-light);
  border-color: rgba(138, 156, 174, 0.2);
}

.education-entry {
  margin-bottom: 1.5rem;
}

.education-entry h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.education-entry p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.education-entry strong {
  color: var(--text-primary);
}

.coursework-list {
  list-style: disc;
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.65;
  columns: 3;
  column-gap: 2rem;
}

.coursework-list li {
  margin-bottom: 0.5rem;
}

.job-entry {
  margin-bottom: 1.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s ease, padding-left 0.2s ease;
}

.job-entry:hover {
  border-left-color: var(--accent-stone);
}

.job-entry:last-child {
  margin-bottom: 0;
}

.job-entry h4 {
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  font-weight: 600;
}

.job-dates {
  display: block;
  font-size: 0.82rem;
  color: var(--accent-slate);
  margin-bottom: 0.6rem;
  font-weight: 400;
}

.job-entry ul {
  list-style: disc;
  margin-left: 1.2rem;
  margin-top: 0.5rem;
}

.job-entry li {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  line-height: 1.65;
  font-size: 0.93rem;
}

/* === Contact Section === */
.contact-section {
  background-color: var(--bg-primary);
  padding: 100px 0 80px;
}

.contact-section h2 {
  font-size: 1.8rem;
  color: var(--accent-slate);
}

.contact-section > .container > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-info {
  margin-bottom: 2rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: #c2b5a6;
  text-decoration: none;
}

.contact-info a:hover {
  color: #a4b4c4;
}

.contact-form {
  max-width: 600px;
  background: linear-gradient(145deg, var(--bg-card), rgba(138, 156, 174, 0.02));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent-slate);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: rgba(17, 18, 20, 0.7);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(138, 156, 174, 0.15);
  background-color: rgba(138, 156, 174, 0.02);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-stone);
  box-shadow: 0 0 0 4px rgba(138, 156, 174, 0.06), 0 2px 8px rgba(0, 0, 0, 0.2);
  background-color: rgba(138, 156, 174, 0.02);
}

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

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

.form-success {
  display: none;
  background-color: #0f2a0f;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  color: #81c784;
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.5;
}

/* === Footer === */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px 0;
}

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

/* === Modal === */
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  margin: 0;
  padding: 32px;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  position: relative;
  color: var(--text-primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  0%   { opacity: 0; transform: translateY(-16px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.close {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background: var(--accent-slate);
  border-radius: 50%;
  color: #111214;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.close:hover,
.close:focus {
  background: #fff;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--accent-slate);
  font-size: 1.6rem;
}

.modal-content p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
}

.modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-content li {
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
}

.modal-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-slate);
}

.modal-content a {
  color: #c2b5a6;
  text-decoration: none;
  transition: color 0.25s ease;
}

.modal-content a:hover {
  color: #a4b4c4;
}

/* === Project Cards (shared by homepage featured + portfolio.html) === */
.project-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(29, 32, 35, 0.95));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  text-align: left;
  color: var(--text-secondary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--transition-snap), border-color 0.3s ease, box-shadow 0.35s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(138, 156, 174, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Image wrapper for overlay effect */
.project-card .img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.project-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
  background-color: var(--bg-secondary);
  display: block;
  transition: transform 0.4s var(--transition-snap);
}

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

.project-card h3 {
  color: var(--accent-slate);
  font-size: 1.15rem;
  margin: 0;
}

.project-card p {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.9rem;
  flex: 1;
}

/* "Live" badge on card */
.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: var(--accent-slate);
  color: #111214;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Tech stack tags on project cards */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-tag {
  background-color: rgba(138, 156, 174, 0.06);
  border: 1px solid rgba(138, 156, 174, 0.15);
  color: #c2b5a6;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.project-card .btn {
  align-self: flex-start;
}

/* === Portfolio Gallery (portfolio.html) === */
.portfolio-gallery {
  background-color: var(--bg-primary);
  padding: 80px 0;
}

.portfolio-gallery h2 {
  font-size: 1.8rem;
  color: var(--accent-slate);
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.portfolio-gallery h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-stone), var(--accent-slate));
  border-radius: 2px;
}

.portfolio-gallery > .container > p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 2.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  align-items: start;
}

.portfolio-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  transition: color 0.25s ease;
}

.portfolio-back:hover {
  color: var(--text-primary);
}

/* === Hamburger Nav Toggle === */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

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

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-header {
    position: sticky;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(17, 18, 20, 0.97);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    border-top: 1px solid var(--border);
  }

  .main-nav.open {
    max-height: 320px;
    padding: 0.75rem 0 1rem;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .main-nav ul li {
    width: 100%;
    text-align: center;
  }

  .main-nav a {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 1rem;
  }

  .main-nav a::after {
    display: none;
  }

  .project-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .coursework-list {
    columns: 2;
  }
}

/* === Scroll-to-Top Button === */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--accent-slate);
  color: #111214;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(138, 156, 174, 0.15);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--accent-slate-dark);
  transform: translateY(-3px);
}

/* === Section Reveal Animation (set by JS) === */
.reveal {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.show {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* === Nav link reveal animation === */
.nav-item {
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.nav-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* === Button ripple === */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 700ms ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(5); opacity: 0; }
}

/* ============================================================
   === UI Enhancement Layer (ui-ux-pro-max powered) ===
   ============================================================ */

/* === Global Focus Ring (keyboard a11y) === */
:focus-visible {
  outline: 2px solid var(--accent-slate);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Section headings — animated underline === */
.about-section h2,
.portfolio-section h2,
.resume-section h2,
.contact-section h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.about-section h2::after,
.portfolio-section h2::after,
.resume-section h2::after,
.contact-section h2::after {
  height: 3px;
  width: 48px;
  background: linear-gradient(90deg, var(--accent-stone), var(--accent-slate));
  transition: width 0.4s var(--transition-snap);
}

/* === About Section body text === */
.about-section {
  background: var(--bg-secondary);
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* === Portfolio Section heading centred underline === */
.portfolio-intro h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* === Tech tags on project cards === */
.tech-tag {
  background-color: rgba(168, 154, 138, 0.08);
  border: 1px solid rgba(168, 154, 138, 0.2);
  color: var(--accent-stone-light);
  font-size: 0.62rem;
  padding: 2px 7px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-tag:hover {
  background-color: rgba(168, 154, 138, 0.14);
}

/* === "Live" badge — slate accent === */
.card-badge {
  background: var(--accent-slate);
  color: #111214;
  font-size: 0.68rem;
}

/* === Resume section link color === */
.resume-section a {
  color: var(--accent-stone-light);
  text-decoration: none;
  transition: color 0.25s ease;
}

.resume-section a:hover {
  color: var(--accent-slate);
}

/* === Resume section h3 accent === */
.resume-block h3 {
  position: relative;
  letter-spacing: -0.01em;
}

/* === Contact info card === */
.contact-info {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.contact-info a {
  color: var(--accent-stone-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info a:hover {
  color: var(--accent-slate);
}

/* === Contact form label === */
.form-group label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === Form success message === */
.form-success {
  background: linear-gradient(135deg, rgba(15, 42, 15, 0.8), rgba(0, 80, 0, 0.15));
  border: 1px solid rgba(76, 175, 80, 0.5);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.1);
}

/* === Footer enhancement === */
.site-footer {
  background: var(--bg-secondary);
}

/* === Scroll-to-top button enhancement === */
.scroll-top-btn {
  background: var(--accent-slate);
  color: #111214;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  box-shadow: 0 6px 24px rgba(138, 156, 174, 0.15);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s var(--transition-snap), box-shadow 0.2s ease;
}

.scroll-top-btn:hover {
  background: var(--accent-slate-dark);
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(138, 156, 174, 0.25);
}

/* === Nav active link === */
.main-nav a.active {
  color: var(--text-primary);
}

/* === Section divider glow line === */
.about-section,
.portfolio-section,
.resume-section,
.contact-section {
  position: relative;
}

/* === Blob opacity override (already set inline above; fine) === */
.blob {
  opacity: 0.25;
}

/* ============================================================
   === Accessibility: 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;
    scroll-behavior: auto !important;
  }

  .blob {
    animation: none;
  }

  .hero-img-wrapper {
    animation: none;
    background: linear-gradient(135deg, #8a9cae, #a89a8a);
  }

  .badge-available::before {
    animation: none;
  }
}

/* ============================================================
   === DISTINCTIVE REDESIGN LAYER ===
   ============================================================ */

/* --- Typography: Archivo headings + Space Grotesk body --- */
body {
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', 'Poppins', sans-serif;
}

/* Logo text also uses Archivo */
.logo h1 {
  font-family: 'Archivo', 'Poppins', sans-serif;
}

/* --- Floating Pill Navbar (desktop only) --- */
@media (min-width: 769px) {
  .site-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 3rem);
    border-radius: 100px;
    padding: 10px 24px;
    border: 1px solid rgba(221, 223, 226, 0.08);
    border-bottom: 1px solid rgba(221, 223, 226, 0.08);
    background-color: rgba(17, 18, 20, 0.90);
  }

  .site-header.scrolled {
    border-color: rgba(221, 223, 226, 0.12);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(221, 223, 226, 0.04);
    background-color: rgba(14, 15, 17, 0.96);
  }

  .site-header .container {
    width: auto;
    max-width: none;
    padding: 0;
    gap: 2rem;
  }

  .site-header .logo h1 {
    font-size: 1.05rem;
    white-space: nowrap;
    letter-spacing: -0.01em;
  }

  /* Hero needs more top padding since pill navbar no longer takes flow space */
  .hero-section {
    padding-top: 130px;
    min-height: 100vh;
  }
}

/* --- Skills Ticker --- */
.skills-ticker {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
}

.ticker-track span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 1.5rem;
}

.ticker-track .ticker-sep {
  color: var(--accent-stone);
  padding: 0;
  opacity: 0.6;
  font-size: 0.9rem;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Fade edges */
.skills-ticker::before,
.skills-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.skills-ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.skills-ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* --- Bento Grid — About Section --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "main main main loc"
    "s1   s2   s3   s3";
  gap: 1rem;
  margin-top: 2rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--transition-snap);
  cursor: default;
}

.bento-card:hover {
  border-color: rgba(138, 156, 174, 0.15);
}

/* Main about text card */
.bento-main {
  grid-area: main;
}

.bento-main p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.93rem;
  margin-bottom: 0.9rem;
}

.bento-main p:last-child {
  margin-bottom: 0;
}

/* Location card */
.bento-location {
  grid-area: loc;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
}

.bento-location-icon {
  width: 26px;
  height: 26px;
  color: var(--accent-stone-light);
  margin-bottom: 0.25rem;
}

.bento-city {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Archivo', sans-serif;
  letter-spacing: -0.02em;
}

.bento-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Stat cards */
.bento-s1 { grid-area: s1; }
.bento-s2 { grid-area: s2; }
.bento-s3 { grid-area: s3; }

.bento-s1,
.bento-s2,
.bento-s3 {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bento-stat-row {
  display: flex;
  align-items: baseline;
  gap: 0;
}

/* Override stat-num/stat-plus within bento to use gradient purple→yellow */
.bento-s1 .stat-num,
.bento-s2 .stat-num,
.bento-s3 .stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: 'Archivo', sans-serif;
  color: var(--accent-slate);
  line-height: 1;
}

.bento-s1 .stat-plus,
.bento-s2 .stat-plus,
.bento-s3 .stat-plus {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Archivo', sans-serif;
  color: var(--accent-slate);
}

.bento-s1 .stat-label,
.bento-s2 .stat-label,
.bento-s3 .stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.2rem;
  line-height: 1.45;
}

/* Bento grid responsive */
@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "main main"
      "loc  loc"
      "s1   s2"
      "s3   s3";
  }
}

@media (max-width: 560px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "loc"
      "s1"
      "s2"
      "s3";
  }

  .bento-card {
    padding: 1.25rem;
  }
}
