/* ============================================================
   site.css — Design System for jadgardner.github.io
   Dark cinematic theme: GitHub dark meets Nerfies/DreamFusion
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Playfair+Display:wght@700&family=JetBrains+Mono&display=swap');

/* --- Custom Properties --- */
:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-tertiary:   #21262d;
  --text-primary:  #e6edf3;
  --text-secondary:#8b949e;
  --accent:        #7c3aed;
  --accent-glow:   rgba(124, 58, 237, 0.15);

  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --max-width:     1000px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-pill:   20px;
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* --- Links --- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* --- Media --- */
img,
video {
  max-width: 100%;
  display: block;
}

/* ============================================================
   LAYOUT
   ============================================================ */

/* --- Section --- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-alt {
  background-color: var(--bg-secondary);
  width: 100%;
}

.section-alt > .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Convenience: section-alt can also be used with nested content directly */
.section-alt.section {
  max-width: 100%;
  padding: 0;
}

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 3px var(--bg-primary),
    0 0 0 5px var(--accent),
    0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero-text h1 {
  margin-bottom: 0.5rem;
}

.hero-text .subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.hero-text .bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 600px;
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.hero-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.hero-links a svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   PROJECT PAGE HERO (video background)
   ============================================================ */

.hero-project {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 30%,
    rgba(0, 0, 0, 0.65) 60%,
    rgba(0, 0, 0, 0.85) 100%
  );
  padding: 4rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  max-width: 800px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* --- Author List --- */
.author-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.author-list li {
  white-space: nowrap;
}

.author-list li:not(:last-child)::after {
  content: ',';
}

.author-list a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.author-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.author-list .self {
  font-weight: 700;
  color: var(--text-primary);
}

.venue-info {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* --- Pill Buttons --- */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-pill {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-pill:hover {
  background-color: #6d28d9;
  box-shadow: 0 0 16px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff;
}

.btn-pill:active {
  transform: translateY(0);
}

.btn-pill--outline {
  background-color: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-pill--outline:hover {
  background-color: var(--accent-glow);
  color: #ffffff;
}

/* ============================================================
   PROJECT CARDS (homepage grid)
   ============================================================ */

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.project-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  text-decoration: none;
  color: inherit;
}

.card-video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.card-video video,
.card-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.venue-badge {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  padding: 2px 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 8px 0 4px;
  line-height: 1.4;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.card-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-links a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.card-links a:hover {
  color: #a78bfa;
}

/* ============================================================
   NEWS LIST
   ============================================================ */

.news-list {
  list-style: none;
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: baseline;
}

.news-date {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   EDUCATION LIST
   ============================================================ */

.education-list {
  list-style: none;
  padding: 0;
}

.education-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.education-item svg,
.education-item .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-top: 2px;
}

.education-item .details {
  flex: 1;
}

.education-item .degree {
  font-weight: 600;
  color: var(--text-primary);
}

.education-item .institution {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.education-item .year {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================================
   CITATION BLOCK
   ============================================================ */

.citation-block {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  margin: 1rem 0;
  border: 1px solid var(--bg-tertiary);
}

.citation-block pre {
  margin: 0;
  overflow-x: auto;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.citation-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.citation-copy:hover {
  background-color: var(--accent);
  color: #ffffff;
}

/* ============================================================
   IMAGE GRID (dataset galleries)
   ============================================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.image-grid img {
  border-radius: var(--radius-sm);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   ABSTRACT / CONTENT SECTIONS (project pages)
   ============================================================ */

.abstract {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  max-width: 750px;
  margin: 0 auto;
}

.abstract p:first-child {
  margin-top: 0;
}

.method-figure {
  margin: 2rem 0;
  text-align: center;
}

.method-figure img,
.method-figure video {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.method-figure figcaption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   COMPARISON SLIDER (for result images)
   ============================================================ */

.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.comparison-container img {
  border-radius: var(--radius-sm);
  width: 100%;
}

.comparison-label {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================================
   RESPONSIVE — 768px breakpoint
   ============================================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Hero: stack vertically */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    gap: 1.5rem;
  }

  .hero-text .bio {
    max-width: 100%;
  }

  .hero-links {
    justify-content: center;
  }

  /* Project hero */
  .hero-project {
    height: 60vh;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-overlay {
    padding: 3rem 1rem 2rem;
  }

  .author-list {
    font-size: 0.9rem;
  }

  /* Sections */
  .section {
    padding: 2.5rem 1rem;
  }

  .section-alt > .section-inner {
    padding: 2.5rem 1rem;
  }

  /* Cards: single column */
  .project-cards {
    grid-template-columns: 1fr;
  }

  /* News: single column */
  .news-item {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 20px;
  }

  /* Buttons */
  .hero-buttons {
    gap: 0.5rem;
  }

  .btn-pill {
    font-size: 0.85rem;
    padding: 6px 16px;
  }

  /* Image grid */
  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

/* Extra-small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.7rem;
  }

  .hero-photo img {
    width: 140px;
    height: 140px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-project {
    height: 50vh;
  }
}
