/* =========================================================
   Joseph Bopp – Portfolio  |  Global Styles
   ========================================================= */

:root {
  --navy:   #1b3254;
  --navy-d: #112140;
  --gold:   #c4902a;
  --gold-l: #e0ab48;
  --cream:  #f7f4ef;
  --white:  #ffffff;
  --ink:    #1e1e1e;
  --muted:  #6b7280;
  --border: #ddd8cf;

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --shadow: 0 4px 24px rgba(27,50,84,.10);
  --shadow-lg: 0 12px 48px rgba(27,50,84,.18);

  --nav-h: 68px;
  --max-w: 900px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-l); }

/* ── Typography ── */
h1,h2,h3,h4 {
  font-family: var(--font-serif);
  font-weight: normal;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p  { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

/* ── Utility ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--wide { max-width: 1100px; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(17,33,64,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(196,144,42,.25);
  display: flex;
  align-items: center;
}
.nav__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: .02em;
}
.nav__logo span { color: var(--gold); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: .25s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav__links a {
  display: block;
  padding: .4rem .75rem;
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  border-radius: 4px;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .2s, background .2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--gold); background: rgba(196,144,42,.1); }

/* dropdown */
.nav__links .has-dropdown { position: relative; }
.nav__links .has-dropdown > a::after { content: ' ▾'; font-size: .7em; }
.nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--navy-d);
  border: 1px solid rgba(196,144,42,.2);
  border-radius: var(--radius);
  padding: .5rem;
  box-shadow: var(--shadow-lg);
}
.has-dropdown:hover .nav__dropdown { display: block; }
.nav__dropdown a {
  display: block;
  padding: .5rem .85rem;
  font-size: .82rem;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,.8);
  border-radius: 4px;
}
.nav__dropdown a:hover { color: var(--gold); background: rgba(196,144,42,.12); }

/* ── Hero photo layout ── */
.hero__layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.hero__photo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.hero__photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(196,144,42,.15), var(--shadow-lg);
}
@media (max-width: 640px) {
  .hero__layout { grid-template-columns: 1fr; }
  .hero__photo { display: none; }
}

/* ── Stats strip ── */
.stats-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.stat__number {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--navy);
  font-weight: normal;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat__number em {
  color: var(--gold);
  font-style: normal;
}
.stat__label {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}
.stats-caption {
  text-align: center;
  font-size: .95rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.7;
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Page body offset for fixed nav ── */
.page-body { padding-top: var(--nav-h); }

/* ── Hero (Home) ── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-d) 0%, #1b3254 60%, #213f6b 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(196,144,42,.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(196,144,42,.08) 0%, transparent 40%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--gold);
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  border: none;
  letter-spacing: .04em;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--gold);
  color: var(--navy-d);
  box-shadow: 0 4px 20px rgba(196,144,42,.35);
}
.btn--primary:hover {
  background: var(--gold-l);
  color: var(--navy-d);
  box-shadow: 0 8px 28px rgba(196,144,42,.45);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
}
.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(196,144,42,.08);
}
.btn--sm { padding: .5rem 1.2rem; font-size: .82rem; }

/* ── Section ── */
.section {
  padding: 5rem 0;
}
.section--alt { background: var(--white); }
.section__label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section__label::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--gold);
}
.section__title { margin-bottom: 1rem; }
.section__intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 3rem;
}

/* ── Cards ── */
.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: box-shadow .25s, transform .25s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(196,144,42,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.card p  { font-size: .9rem; color: var(--muted); }

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-d) 0%, var(--navy) 100%);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}
.page-hero__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero__sub { color: rgba(255,255,255,.68); font-size: 1rem; max-width: 540px; margin: 0 auto; }

/* ── Prose content ── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.025rem;
  line-height: 1.85;
}
.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
}
.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: .5rem;
  color: var(--navy);
}
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1em;
}
.prose li { margin-bottom: .4em; }
.prose blockquote {
  border-left: 4px solid var(--gold);
  padding: .75rem 1.25rem;
  margin: 1.75rem 0;
  background: rgba(196,144,42,.06);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--navy);
  font-size: 1.08rem;
}

/* ── Resume ── */
.resume-section { margin-bottom: 3rem; }
.resume-section h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1.5rem;
}
.job { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.job:last-child { border-bottom: none; }
.job__header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.job__title { font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.job__date  { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.job__org   { font-size: .9rem; color: var(--gold); margin-bottom: .5rem; }
.job__desc  { font-size: .9rem; color: #444; line-height: 1.7; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.skill-tag {
  background: rgba(27,50,84,.08);
  color: var(--navy);
  border: 1px solid rgba(27,50,84,.15);
  padding: .35rem .9rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
}

/* ── Tutorials ── */
.tutorial-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.tutorial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.tutorial-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tutorial-card__thumb {
  aspect-ratio: 16/9;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}
.tutorial-card__thumb-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy-d), #2a4a7f);
}
.tutorial-card__play {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.tutorial-card__play svg { width: 20px; height: 20px; fill: var(--navy-d); margin-left: 3px; }
.tutorial-card__body { padding: 1.4rem; }
.tutorial-card__label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}
.tutorial-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.tutorial-card p  { font-size: .88rem; color: var(--muted); }

/* ── Timeline (Outreach) ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item h3 { margin-bottom: .3rem; }
.timeline-item .meta { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }

/* ── Contact strip ── */
.contact-strip {
  background: linear-gradient(135deg, var(--navy-d), var(--navy));
  padding: 4rem 0;
  text-align: center;
}
.contact-strip h2 { color: var(--white); margin-bottom: .75rem; }
.contact-strip p  { color: rgba(255,255,255,.65); margin-bottom: 2rem; }

/* ── Footer ── */
.footer {
  background: var(--navy-d);
  padding: 2rem 0;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer a { color: rgba(255,255,255,.5); }
.footer a:hover { color: var(--gold); }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: .1s; }
.reveal--delay-2 { transition-delay: .2s; }
.reveal--delay-3 { transition-delay: .3s; }
.reveal--delay-4 { transition-delay: .4s; }

/* ── Divider ── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1.25rem 0 2rem;
}

/* ── Highlight box ── */
.highlight-box {
  background: rgba(27,50,84,.05);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.highlight-box p { margin: 0; font-size: .95rem; color: var(--navy); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--navy-d); padding: 1rem; gap: 0; border-bottom: 1px solid rgba(196,144,42,.2); }
  .nav__links.open { display: flex; }
  .nav__links .has-dropdown > a::after { display: none; }
  .nav__dropdown { display: none !important; } /* handled by accordion on mobile */
  .nav__toggle { display: flex; }
  .hero { min-height: auto; padding: 3rem 0; }
  .hero__ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .section { padding: 3rem 0; }
  .job__header { flex-direction: column; }
}
