/* =============================================
   SPENCER PURDY — PORTFOLIO STYLES
   Light Theme: White · Slate · Deep Blue
   ============================================= */

:root {
  /* Backgrounds */
  --bg:           #f8fafc;   /* page bg — barely off-white, not tinted         */
  --surface:      #ffffff;   /* cards, nav — pure white; pops against bg        */
  --surface-2:    #f1f5f9;   /* skill/course tag fills — cool light gray        */

  /* Borders */
  --border:       #e2e8f0;   /* standard dividers — clean slate-200             */
  --border-light: #94a3b8;   /* stronger borders, separators — slate-400        */

  /* Accent — rich deep blue, not generic corporate blue */
  --accent:       #1d4ed8;
  --accent-hover: #1e40af;
  --accent-dim:   rgba(29, 78, 216, 0.07);
  --accent-glow:  rgba(29, 78, 216, 0.15);

  /* Text — high contrast, readable hierarchy */
  --text:         #0f172a;   /* primary — near-black slate-900                  */
  --text-dim:     #334155;   /* body paragraphs — slate-700, clearly readable   */
  --text-muted:   #64748b;   /* metadata, labels — slate-500, still legible     */
  --text-faint:   #94a3b8;   /* decorative only (numbers, tech tags) — slate-400*/

  /* Shadows — neutral, not blue-tinted */
  --shadow-sm:    0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:    0 4px 16px rgba(15, 23, 42, 0.09), 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-lg:    0 12px 36px rgba(15, 23, 42, 0.13), 0 4px 8px rgba(15, 23, 42, 0.06);

  --font-display: 'Syne', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }
.mono  { font-family: var(--font-mono); }
.accent { color: var(--accent); }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }
p { color: var(--text-dim); }

/* Utility */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

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

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-resume {
  border: 1.5px solid var(--accent);
  color: var(--accent) !important;
  padding: 7px 16px;
  border-radius: 4px;
  transition: background 0.2s, box-shadow 0.2s !important;
}

.nav-resume:hover {
  background: var(--accent-dim) !important;
  box-shadow: var(--shadow-sm);
}

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 32px 80px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-name {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 28px;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-md);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 12px 22px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Hero Photo */
.hero-photo-wrap {
  position: relative;
  width: 240px;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
}

.hero-photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(5%);
  box-shadow: var(--shadow-lg);
}

.hero-photo-border {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 240px;
  height: 240px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  z-index: 0;
  opacity: 0.4;
}

.hero-badge {
  position: absolute;
  bottom: -14px;
  right: -14px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

/* Scroll hint */
.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 80px;
  opacity: 0;
  animation: fadeIn 1s ease 1s forwards;
}

.hero-scroll-hint span {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 60px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: slideLine 2s ease-in-out infinite;
}

@keyframes slideLine {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* =============================================
   SECTIONS — SHARED
   ============================================= */
section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

#hero { border-top: none; }

.section-label {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 48px;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text p:last-child { margin-bottom: 0; }

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.skill-group-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

.skill-group {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-group.visible { opacity: 1; transform: translateY(0); }
.skill-group:nth-child(2) { transition-delay: 0.1s; }
.skill-group:nth-child(3) { transition-delay: 0.2s; }

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.15s; }
.project-card:nth-child(4) { transition-delay: 0.2s; }

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-number {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-title span { color: var(--text-muted); font-weight: 600; }

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-tech {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project-links {
  display: flex;
  gap: 20px;
}

.project-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: color 0.2s, opacity 0.2s;
}

.project-links a:hover { color: var(--accent-hover); }

/* =============================================
   EXPERIENCE
   ============================================= */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }
.timeline-item:last-child { border-bottom: none; }

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  padding-top: 2px;
}

.timeline-period {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-align: right;
  line-height: 1.4;
  padding-right: 14px;
  white-space: nowrap;
}

.timeline-dot {
  position: absolute;
  right: -6px;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.7;
}

.timeline-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border-light);
  font-size: 0.8rem;
}

/* =============================================
   EDUCATION
   ============================================= */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s;
}

.edu-card:hover { box-shadow: var(--shadow-md); }
.edu-card.visible { opacity: 1; transform: translateY(0); }

.edu-school {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.edu-degree {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.edu-cert {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.edu-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.edu-right {
  display: flex;
  gap: 48px;
  flex-shrink: 0;
}

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

.edu-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--accent);
}

.edu-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coursework {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.coursework-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding-top: 5px;
  flex-shrink: 0;
}

.coursework-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coursework-tags span {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, color 0.2s;
}

.coursework-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   CONTACT
   ============================================= */
#contact { text-align: center; }

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}

.contact-heading {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  margin-bottom: 36px;
  letter-spacing: 0.02em;
  transition: color 0.2s, border-color 0.2s;
}

.contact-email:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

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

.dot-sep { color: var(--border-light); }

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .mono {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-card { flex-direction: column; align-items: flex-start; padding: 32px; }
  .timeline::before { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-meta { flex-direction: row; align-items: center; gap: 12px; }
  .timeline-dot { display: none; }
}

@media (max-width: 600px) {
  .nav-links { gap: 20px; }
  .nav-links li:not(:last-child):not(:nth-last-child(2)) { display: none; }
  .container { padding: 0 20px; }
  .edu-right { gap: 28px; }
  section { padding: 72px 0; }
}
