/* ============================================
   Santiago Rodriguez Portfolio — Stylesheet
   Design system mirrored from rodsanis.com
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --primary-mint:      #7FFFD4;
  --primary-teal:      #20B2AA;
  --background-navy:   #0A1628;
  --dark-blue:         #0F1E33;
  --accent-light-teal: #5CE1E6;
  --accent-cyan:       #38B2AC;

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted:     #94A3B8;

  /* Gradients */
  --gradient-primary:  linear-gradient(135deg, #7FFFD4, #20B2AA);
  --gradient-hero-bg:  linear-gradient(180deg, #0A1628 0%, #0F1E33 100%);

  /* Spacing */
  --section-padding:    5rem 0;
  --container-max:      1200px;
  --container-padding:  0 1.5rem;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;

  /* Borders */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card:       0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 40px rgba(32, 178, 170, 0.15);
  --shadow-glow:       0 0 20px rgba(127, 255, 212, 0.15);

  /* Status (ETL) */
  --status-success: #22c55e;
  --status-warning: #f59e0b;
  --status-error:   #ef4444;
  --status-running: #3b82f6;

  /* Flow diagram accents */
  --flow-pain:    #f97316;
  --flow-success: #22c55e;
}

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

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

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--background-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

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

.section {
  padding: var(--section-padding);
  position: relative;
}

.section--alt { background: var(--dark-blue); }

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section__label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-mint);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--background-navy);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(127, 255, 212, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--primary-mint);
  border-color: var(--primary-mint);
}
.btn--outline:hover {
  background: rgba(127, 255, 212, 0.1);
  transform: translateY(-2px);
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(127, 255, 212, 0.08);
  color: var(--primary-mint);
  border: 1px solid rgba(127, 255, 212, 0.15);
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- Skills Grid ---------- */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.skill-pill {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(127, 255, 212, 0.06);
  color: var(--primary-mint);
  border: 1px solid rgba(127, 255, 212, 0.18);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.skill-pill:hover {
  background: rgba(127, 255, 212, 0.12);
  border-color: rgba(127, 255, 212, 0.4);
  transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar--scrolled {
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 0;
  box-shadow: 0 1px 0 rgba(127, 255, 212, 0.08);
}

.navbar__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.navbar__monogram {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--background-navy);
  flex-shrink: 0;
}

.navbar__brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
  border-radius: 1px;
}

.navbar__link:hover,
.navbar__link.active { color: var(--text-primary); }

.navbar__link.active::after,
.navbar__link:hover::after { width: 100%; }

.navbar__cta { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.navbar__hamburger-line {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

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

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

/* ---------- Hero / About ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero-bg);
  padding: 7rem 0 5rem;
}

.hero__bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    radial-gradient(circle at 2px 2px, var(--primary-teal) 1px, transparent 1px),
    linear-gradient(90deg, transparent 49.5%, rgba(32,178,170,0.3) 49.5%, rgba(32,178,170,0.3) 50.5%, transparent 50.5%),
    linear-gradient(0deg,  transparent 49.5%, rgba(32,178,170,0.3) 49.5%, rgba(32,178,170,0.3) 50.5%, transparent 50.5%);
  background-size: 40px 40px, 80px 80px, 80px 80px;
  animation: patternDrift 30s linear infinite;
  z-index: 0;
}

@keyframes patternDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, 40px); }
}

.hero__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
  display: flex;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__content { flex: 1; min-width: 0; }

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-mint);
  margin-bottom: 1rem;
}

.hero__name {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero__title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent-light-teal);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.hero__bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.hero__link:hover {
  color: var(--primary-mint);
  border-color: rgba(127, 255, 212, 0.3);
  background: rgba(127, 255, 212, 0.05);
}

.hero__link svg { width: 15px; height: 15px; flex-shrink: 0; }

.hero__photo-wrapper {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient-primary);
}

.hero__photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--background-navy);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-mint), var(--primary-teal), transparent);
  opacity: 0.25;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.3rem;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 12px rgba(127, 255, 212, 0.4);
}

.timeline-item--edu::before {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.timeline-item__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-mint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.timeline-item--edu .timeline-item__date { color: #f59e0b; }

.timeline-item__org {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-item__role {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--accent-light-teal);
  margin-bottom: 0.6rem;
}

.timeline-item__location {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.timeline-item__bullets {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.timeline-item__bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}

.timeline-item__bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-mint);
  font-size: 0.7rem;
  top: 0.2rem;
}

/* ---------- Project Cards ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--dark-blue);
  border: 1px solid rgba(127, 255, 212, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(127, 255, 212, 0.2);
  box-shadow: var(--shadow-card-hover);
}

.project-card:hover::before { opacity: 1; }

.project-card__thumb {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.project-card__thumb--etl {
  background: linear-gradient(135deg, #061420 0%, #0a2236 60%, #062030 100%);
}
.project-card__thumb--intake {
  background: linear-gradient(135deg, #0a1020 0%, #0e1e38 60%, #081a28 100%);
}
.project-card__thumb--salesforce {
  background: linear-gradient(135deg, #061624 0%, #0a1e30 60%, #06141e 100%);
}

.project-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(circle at 2px 2px, var(--primary-teal) 1px, transparent 1px);
  background-size: 24px 24px;
}

.project-card__thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.project-card__thumb-icon svg { width: 60px; height: 60px; opacity: 0.55; }

.project-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(127, 255, 212, 0.06);
  margin-top: auto;
}

.project-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-mint);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast);
}
.project-card:hover .project-card__link { gap: 0.6rem; }

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(127, 255, 212, 0.06);
  background: var(--background-navy);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer__social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(127, 255, 212, 0.1);
  color: var(--text-muted);
  transition: all var(--transition-base);
}
.footer__social-link:hover {
  color: var(--primary-mint);
  border-color: rgba(127, 255, 212, 0.3);
  background: rgba(127, 255, 212, 0.05);
}
.footer__social-link svg { width: 18px; height: 18px; }

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

/* ---------- Back Link (project pages) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--primary-mint); }
.back-link svg { width: 16px; height: 16px; }

/* ---------- Project Header (project pages) ---------- */
.project-header {
  padding: 8rem 0 3.5rem;
  background: var(--gradient-hero-bg);
  position: relative;
  overflow: hidden;
}

.project-header::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle at 2px 2px, var(--primary-teal) 1px, transparent 1px);
  background-size: 32px 32px;
}

.project-header__content { position: relative; z-index: 1; }

.project-header__title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.project-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(127, 255, 212, 0.08);
  color: var(--primary-mint);
  border: 1px solid rgba(127, 255, 212, 0.15);
}

/* ---------- Case Study Sections ---------- */
.case-study-section {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(127, 255, 212, 0.06);
}
.case-study-section:last-child { border-bottom: none; }

.case-study-section p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 760px;
}
.case-study-section p + p { margin-top: 1rem; }

/* ---------- Flow Diagrams ---------- */
.flow-diagrams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-diagram__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  width: 100%;
  text-align: center;
  max-width: 280px;
}

.flow-diagram__title--before {
  color: var(--flow-pain);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.flow-diagram__title--after {
  color: var(--flow-success);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.flow-step {
  width: 100%;
  max-width: 280px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  background: var(--dark-blue);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.flow-step--pain {
  border-left: 3px solid var(--flow-pain);
  color: var(--text-primary);
}

.flow-step__pain-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--flow-pain);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

.flow-step--auto {
  border-left: 3px solid var(--flow-success);
  color: var(--text-primary);
}

.flow-arrow {
  width: 2px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 auto;
  position: relative;
  flex-shrink: 0;
}

.flow-arrow::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Results Grid ---------- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.result-card {
  background: var(--dark-blue);
  border: 1px solid rgba(127, 255, 212, 0.1);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all var(--transition-base);
}
.result-card:hover {
  border-color: rgba(127, 255, 212, 0.25);
  transform: translateY(-3px);
}

.result-card__metric {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.result-card__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Tech Stack Badges ---------- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(32, 178, 170, 0.08);
  color: var(--accent-light-teal);
  border: 1px solid rgba(32, 178, 170, 0.15);
}

/* ---------- ETL Pipeline Tool ---------- */
.etl-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  border: 2px solid rgba(127, 255, 212, 0.3);
  color: var(--primary-mint);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  background: transparent;
}
.file-label:hover {
  background: rgba(127, 255, 212, 0.08);
  border-color: var(--primary-mint);
}

#file-input { display: none; }

.pipeline-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pipeline-stage {
  flex: 1;
  min-width: 160px;
  background: var(--dark-blue);
  border: 1px solid rgba(127, 255, 212, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition-base);
}

.pipeline-stage--running {
  border-color: var(--status-running);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.pipeline-stage--complete {
  border-color: var(--status-success);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.12);
}

.pipeline-stage--error {
  border-color: var(--status-error);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.12);
}

.pipeline-connector {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  color: rgba(127, 255, 212, 0.3);
  font-size: 1.4rem;
}

.pipeline-stage__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--background-navy);
  font-size: 0.875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.pipeline-stage__name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pipeline-stage__icon {
  font-size: 1.25rem;
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.pipeline-stage__status {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1.1rem;
}

.pipeline-stage__stat {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-mint);
  margin-top: 0.5rem;
  min-height: 1.1rem;
}

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

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(127, 255, 212, 0.2);
  border-top-color: var(--primary-mint);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

/* Log Panel */
.log-panel {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(127, 255, 212, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  height: 220px;
  overflow-y: auto;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.log-panel::-webkit-scrollbar { width: 4px; }
.log-panel::-webkit-scrollbar-track { background: transparent; }
.log-panel::-webkit-scrollbar-thumb { background: rgba(127, 255, 212, 0.2); border-radius: 2px; }

.log-entry { display: flex; gap: 0.75rem; }
.log-entry__time { color: var(--text-muted); flex-shrink: 0; }
.log-entry--info    { color: var(--text-secondary); }
.log-entry--success { color: var(--status-success); }
.log-entry--warn    { color: var(--status-warning); }
.log-entry--error   { color: var(--status-error); }

/* Results Panel */
.results-panel {
  background: var(--dark-blue);
  border: 1px solid rgba(127, 255, 212, 0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  display: none;
}
.results-panel.visible { display: block; }

.quality-score {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(127, 255, 212, 0.08);
}

.quality-score__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.quality-score__value {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quality-score__suffix {
  font-size: 2.5rem;
  font-weight: 700;
}

.quality-score__desc {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(127, 255, 212, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.metric-box__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.metric-box__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.validation-results-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.validation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.validation-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.validation-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.validation-table tr:last-child td { border-bottom: none; }

.v-pass { color: var(--status-success); font-weight: 600; }
.v-fail { color: var(--status-error); font-weight: 600; }
.v-warn { color: var(--status-warning); font-weight: 600; }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE — Tablet (641px+)
   ============================================ */
@media (min-width: 641px) {
  .section__title { font-size: 2.5rem; }
  .hero__name { font-size: 4rem; }
}

/* ============================================
   RESPONSIVE — Desktop (1025px+)
   ============================================ */
@media (min-width: 1025px) {
  :root { --section-padding: 6rem 0; }
  .section__title { font-size: 2.75rem; }
  .hero__name { font-size: 4.5rem; }
  .navbar__cta { display: inline-flex; }
  .projects__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   RESPONSIVE — Large Desktop (1440px+)
   ============================================ */
@media (min-width: 1440px) {
  :root { --container-max: 1280px; }
}

/* ============================================
   RESPONSIVE — Mobile (<641px)
   ============================================ */
@media (max-width: 640px) {
  .navbar__links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: var(--dark-blue);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-base);
    border-left: 1px solid rgba(127, 255, 212, 0.1);
    z-index: 1000;
  }
  .navbar__links.active { right: 0; }
  .navbar__link { font-size: 1.1rem; }
  .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }

  .hero { padding: 6rem 0 4rem; min-height: auto; }
  .hero__container {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }
  .hero__name { font-size: 2.4rem; }
  .hero__bio { max-width: 100%; }
  .hero__links { justify-content: center; }
  .hero__photo-wrapper { width: 180px; height: 180px; }

  .section { padding: 3.5rem 0; }
  .section__title { font-size: 1.75rem; }
  .section__header { margin-bottom: 2.5rem; }

  .timeline { padding-left: 1.5rem; }
  .timeline-item { padding-left: 1.5rem; }

  .flow-diagrams { grid-template-columns: 1fr; }

  .project-header__title { font-size: 1.75rem; }

  .pipeline-diagram { flex-direction: column; gap: 0.5rem; }
  .pipeline-stage { min-width: unset; }
  .pipeline-connector { transform: rotate(90deg); justify-content: center; padding: 0.25rem 0; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr 1fr; }
}
