/* ============================================================
   Jeremy Forest Price, PhD — Personal Site
   Aesthetic: Editorial refinement meets academic gravitas.
   Warm off-white ground, deep slate, IU crimson accent.
   Typography: Playfair Display + Source Serif 4
   ============================================================ */

:root {
  --cream:       #FAF8F3;
  --cream-mid:   #F2EDE4;
  --cream-deep:  #E8E0D0;
  --slate-dark:  #1C2430;
  --slate-mid:   #2E3A4A;
  --slate-light: #4A5568;
  --crimson:     #8B1A1A;
  --crimson-mid: #A52020;
  --crimson-light: #C9504A;
  --gold:        #B8860B;
  --gold-light:  #D4A017;
  --text-main:   #22303E;
  --text-body:   #3D4F5F;
  --text-muted:  #6B7C8D;
  --border:      #D8D0C4;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;

  --max-width:   1120px;
  --nav-h:       64px;
  --section-pad: clamp(60px, 8vw, 100px);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── LINKS ── */
a { color: var(--crimson); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--crimson-mid); }

/* ── LAYOUT ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.section { padding: var(--section-pad) 0; }
.section-tinted { background: var(--cream-mid); }
.section-dark { background: var(--slate-dark); color: var(--cream); }

/* ── NAV ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--crimson);
  letter-spacing: 0.04em;
  margin-right: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 2vw, 1.8rem);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-body);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--crimson); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-main);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 45%, rgba(139, 26, 26, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(184, 134, 11, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px clamp(20px, 5vw, 48px);
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.1s;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--slate-dark);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.25s;
}

.hero-name em {
  font-style: italic;
  font-weight: 400;
  color: var(--crimson);
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  color: var(--text-body);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.55s;
}

/* Decorative rings */
.hero-accent {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards 0.8s;
}

.accent-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 26, 26, 0.12);
}

.ring-1 { width: 600px; height: 600px; top: 0; left: 0; }
.ring-2 { width: 420px; height: 420px; top: 90px; left: 90px; border-color: rgba(139, 26, 26, 0.18); }
.ring-3 { width: 240px; height: 240px; top: 180px; left: 180px; border-color: rgba(139, 26, 26, 0.1); background: rgba(139, 26, 26, 0.025); }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--crimson);
  color: var(--cream);
  border: 1px solid var(--crimson);
}

.btn-primary:hover {
  background: var(--crimson-mid);
  border-color: var(--crimson-mid);
  color: var(--cream);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--slate-mid);
  color: var(--slate-dark);
}

/* ── SECTION LABELS / HEADINGS ── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.75rem;
}

.section-label.light { color: var(--crimson-light); }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--slate-dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.section-heading.light { color: var(--cream); }

.section-intro {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-body);
  margin-bottom: 1.1rem;
  font-size: 1.025rem;
  line-height: 1.75;
}

.about-text p em { font-style: italic; color: var(--text-main); font-weight: 400; }

.about-affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.affiliation-tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  background: var(--cream);
}

.sidebar-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.sidebar-card-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.edu-item { margin-bottom: 0.9rem; }
.edu-item:last-child { margin-bottom: 0; }

.edu-degree {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.edu-school {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.honor-item {
  font-size: 0.84rem;
  color: var(--text-body);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--cream-deep);
  line-height: 1.5;
}
.honor-item:last-child { border-bottom: none; }

/* ── WORK / PROJECTS ── */
.work-category { margin-bottom: 3rem; }

.work-category-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--slate-mid);
  margin-bottom: 1.25rem;
}

.category-marker {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crimson);
  flex-shrink: 0;
}
.category-marker.cat-2 { background: var(--gold); }
.category-marker.cat-3 { background: var(--slate-mid); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: rgba(139, 26, 26, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 36, 48, 0.08);
}

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--slate-dark);
}

.project-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.project-tagline {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--crimson);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.project-collaborators {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-deep);
}

/* Grants strip */
.grants-strip {
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.grants-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.grants-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.grant-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem;
  border-left: 3px solid var(--crimson);
  background: var(--cream-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.grant-agency {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 500;
}

.grant-title {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.4;
}

.grant-amount {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── TOOLS ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  border-color: rgba(139, 26, 26, 0.25);
  box-shadow: 0 6px 20px rgba(28, 36, 48, 0.07);
}

.tool-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-dark);
  letter-spacing: -0.01em;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
  flex: 1;
}

.tool-links {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--cream-deep);
}

.tool-link {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--crimson);
  border-bottom: 1px solid rgba(139, 26, 26, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.tool-link:hover { border-color: var(--crimson); }

/* ── TEACHING ── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s;
}

.course-card:hover {
  box-shadow: 0 8px 28px rgba(28, 36, 48, 0.1);
}

.course-number {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crimson);
  font-family: var(--font-body);
}

.course-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate-dark);
  line-height: 1.3;
}

.course-level {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.course-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.65;
  flex: 1;
}

.course-question {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-deep);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── PUBLICATIONS ── */
.pubs-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.pubs-category {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--slate-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--crimson);
}

.pub-entry {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.pub-entry:last-child { border-bottom: none; }

.pub-entry p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.6;
}

.pub-entry em { font-style: italic; color: var(--text-main); }

.cv-cta {
  text-align: center;
  padding: 2rem;
  background: var(--cream-mid);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cv-cta p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  font-size: 1.05rem;
  color: rgba(250, 248, 243, 0.75);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 2rem;
  max-width: 480px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(250, 248, 243, 0.1);
}

.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.4);
}

.contact-value {
  font-size: 0.9rem;
  color: rgba(250, 248, 243, 0.8);
  line-height: 1.4;
}

a.contact-value:hover { color: var(--cream); }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link-card {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  grid-template-rows: auto auto;
  gap: 0 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(250, 248, 243, 0.06);
  border: 1px solid rgba(250, 248, 243, 0.12);
  border-radius: var(--radius-md);
  transition: background 0.2s, border-color 0.2s;
  align-items: center;
}

.contact-link-card:hover {
  background: rgba(250, 248, 243, 0.1);
  border-color: rgba(250, 248, 243, 0.2);
}

.link-card-icon {
  grid-row: span 2;
  font-size: 1.3rem;
  color: var(--crimson-light);
  display: flex;
  align-items: center;
}

.link-card-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1;
}

.link-card-sub {
  font-size: 0.78rem;
  color: rgba(250, 248, 243, 0.5);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--slate-dark);
  border-top: 1px solid rgba(250, 248, 243, 0.08);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(250, 248, 243, 0.35);
}

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

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

/* scroll-fade class added by JS */
.scroll-fade {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pubs-columns { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem 2rem;
    gap: 1.25rem;
    z-index: 99;
  }
  .nav-toggle { display: block; }
  .hero-accent { display: none; }
  .about-sidebar { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .project-grid, .tools-grid, .courses-grid { grid-template-columns: 1fr; }
}
