/* ==========================================================================
   Abigail Schidler — Portfolio
   styles.css
   ==========================================================================

   Table of contents
   1.  Variables
   2.  Reset & base
   3.  Typography
   4.  Layout
   5.  Navigation
   6.  Buttons
   7.  Tags
   8.  Hero
   9.  Interests
   10. Projects
   11. Courses
   12. Music
   13. Page hero (inner pages)
   14. Footer
   15. Responsive
   ========================================================================== */


/* ==========================================================================
   1. Variables
   ========================================================================== */

:root {
  /* ── Core palette ────────────────────────────────────────── */
  --color-bg:             #f9faf8;   /* warm off-white */
  --color-surface:        #ffffff;   /* card/panel white */
  --color-text:           #24302b;   /* deep forest green-black */
  --color-muted:          #6f7a73;   /* muted sage grey */
  --color-border:         #e6e9e5;   /* soft warm-grey border */

  --color-accent:         #7c9a8b;   /* sage green — primary accent */
  --color-accent-hover:   #5f7f72;   /* darker sage — hover states */

  --color-accent-warm:    #c17c66;   /* terracotta — tags, warm highlights */
  --color-accent-blossom: #e7c3cb;   /* cherry blossom — music section */
  --color-accent-water:   #8faec2;   /* soft blue — project glow, water tones */

  /* ── Derived fills (alpha tints — not new colors) ────────── */
  --color-accent-tint:    rgba(124, 154, 139, 0.10); /* sage tint */
  --color-warm-tint:      rgba(193, 124, 102, 0.10); /* terracotta tint */

  /* ── Layout ──────────────────────────────────────────────── */
  --radius: 10px;
  --max-w:  1080px;
  --gap:    2rem;
}


/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}


/* ==========================================================================
   3. Typography
   ========================================================================== */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.7;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
}


/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

h2.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2.5rem;
}


/* ==========================================================================
   5. Navigation
   ========================================================================== */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  /* matches --color-bg at 88% opacity */
  background: rgba(249, 250, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-text);
  opacity: 1;
}

.nav-links a[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}


/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  opacity: 1;
  box-shadow: 0 2px 8px rgba(124, 154, 139, 0.30);
}

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

.btn-outline:hover {
  background: var(--color-surface);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost:hover {
  opacity: 0.65;
}


/* ==========================================================================
   7. Tags
   ========================================================================== */

/*
 * Warm tint fill + terracotta outline.
 * Text stays in --color-text for accessibility (#c17c66 alone is ~3:1 on
 * white — insufficient for 12px text). Warm colour reads through the border.
 */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--color-warm-tint);
  color: var(--color-text);
  border: 1px solid rgba(193, 124, 102, 0.30);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}


/* ==========================================================================
   8. Hero (homepage)
   ========================================================================== */

#hero {
  padding: 6rem 0 5rem;
  border-top: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: 1.1rem;
  color: var(--color-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-intro {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  filter: grayscale(8%);
}


/* ==========================================================================
   9. Interests
   ========================================================================== */

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

.interest-card {
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.interest-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.interest-icon {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.interest-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}


/* ==========================================================================
   10. Projects
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: var(--color-accent);
  /* water-toned glow — cool and calm */
  box-shadow: 0 4px 20px rgba(143, 174, 194, 0.18);
}

.project-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

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

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

/* Project detail pages */
.project-detail {
  max-width: 720px;
}

.project-detail h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.project-detail .lead {
  font-size: 1.05rem;
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.project-detail .tag-group {
  margin-bottom: 1.75rem;
}

.project-screenshot {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
  background: var(--color-surface);
}

.project-screenshot img {
  width: 100%;
}

.screenshot-placeholder {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* Project card thumbnail */
.project-card__thumbnail {
  margin: -1.75rem -1.75rem 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.project-card__thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card__thumbnail img {
  transform: scale(1.03);
}

/* Screenshot gallery */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.gallery-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  display: block;
  aspect-ratio: 16 / 9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(143, 174, 194, 0.18);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* CSS-only lightbox via :target */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox:target {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 48, 43, 0.88);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1080px);
  max-height: 90vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.lightbox-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-size: 1.1rem;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lightbox-close:hover {
  background: var(--color-accent-tint);
  border-color: var(--color-accent);
}

.project-section {
  margin-top: 2.5rem;
}

.project-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-section p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.75;
}


/* Additional / supporting projects
 * Smaller cards, lighter weight, simpler hover — signals secondary status
 * without hiding the work.
 */
.section-description {
  font-size: 0.875rem;
  color: var(--color-muted);
  max-width: 560px;
  line-height: 1.65;
  margin-top: -1.75rem;  /* pull up close to the h2 */
  margin-bottom: 2rem;
}

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

.project-card--supporting {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* no box-shadow on hover — keeps these visually quieter than featured cards */
  transition: border-color 0.15s ease;
}

.project-card--supporting:hover {
  border-color: var(--color-accent);
}

.project-card--supporting .project-name {
  font-size: 0.95rem;
}

.project-card--supporting .project-blurb {
  font-size: 0.85rem;
  flex: 1;
}

.project-card--supporting .tag-group {
  margin-bottom: 0;
}

.project-card--supporting .project-links {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Separator block used on the projects page between featured and additional */
.projects-secondary {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

/* In-progress badge
 * Uses --color-accent-water tones. Text darkened to #5a7f96 for AA contrast
 * on the light tinted background (~4.6:1 on white).
 */
.badge-wip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5a7f96;
  background: rgba(143, 174, 194, 0.12);
  border: 1px solid rgba(143, 174, 194, 0.35);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  margin-top: 0.15rem;
  width: fit-content;
}

.badge-wip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* In-progress card variant
 * Inherits project-card--supporting sizing. Dashed border signals
 * "work in progress" without any extra explanation needed.
 */
.project-card--wip {
  border-style: dashed;
  border-color: rgba(143, 174, 194, 0.45);
}

.project-card--wip:hover {
  border-style: dashed;
  border-color: var(--color-accent-water);
}


/* ==========================================================================
   11. Courses
   ========================================================================== */

.courses-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.course-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  align-items: flex-start;
  transition: border-color 0.2s ease;
}

.course-item:hover {
  border-color: var(--color-accent);
}

.course-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
  min-width: 2rem;
}

.course-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.course-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Upcoming course variant
 * Dashed border signals "not yet taken" — consistent with .project-card--wip.
 * Course codes (e.g. 473) go in the .course-num slot in place of sequence numbers.
 */
.course-item--upcoming {
  border-style: dashed;
}

.course-item--upcoming:hover {
  border-color: var(--color-accent);
}

.course-item--upcoming .course-num {
  color: var(--color-muted);
  font-weight: 500;
  opacity: 0.7;
}

.course-code {
  font-weight: 400;
  color: var(--color-muted);
}


/* Research paper subsection within a course-item
 * Pure typographic hierarchy — no cards or borders so it doesn't
 * compete visually with the course cards themselves.
 */
.course-papers {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.course-papers-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.85rem;
}

.paper-entry + .paper-entry {
  margin-top: 0.875rem;
}

.paper-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 0.1rem;
}

.paper-authors {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}

.paper-takeaway {
  font-size: 0.825rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* Tooltip — CSS only, no JS
 * Used inline within .paper-authors text.
 * Positioned above the trigger word; fades in on hover.
 */
.tooltip {
  position: relative;
  display: inline;
  cursor: default;
  border-bottom: 1px dotted var(--color-muted);
  color: var(--color-accent);
}

.tooltip .tooltip-text {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  /* keep it above other content */
  z-index: 10;
}

/* Small arrow pointing down toward the trigger word */
.tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-text);
}

.tooltip:hover .tooltip-text,
.tooltip:focus-within .tooltip-text {
  opacity: 1;
}

/* On narrow screens, anchor to the left edge instead of centering,
 * so the tooltip can't overflow the viewport. */
@media (max-width: 480px) {
  .tooltip .tooltip-text {
    left: 0;
    transform: none;
  }

  .tooltip .tooltip-text::after {
    left: 1rem;
    transform: none;
  }
}


/* ==========================================================================
   12. Music
   ========================================================================== */

/*
 * Blossom accent is used here specifically — the section label takes the
 * blossom tone, and the content block gets a soft left border in blossom,
 * making this section feel distinct from the technical content above it.
 */
/*
 * The blossom variable (#e7c3cb) is too light for text. #a07078 is a
 * darkened derivation of that hue that clears WCAG AA at this size.
 */
#music .section-label {
  color: #a07078;
}

.music-inner {
  max-width: 640px;
  border-left: 3px solid var(--color-accent-blossom);
  padding-left: 1.5rem;
}

.music-inner p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}


/* ==========================================================================
   13. Page hero (inner pages)
   ========================================================================== */

.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
}

.page-hero .breadcrumb {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.page-hero .breadcrumb a {
  color: var(--color-muted);
}

.page-hero .breadcrumb a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.page-hero .page-intro {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 560px;
  line-height: 1.75;
}

.page-content {
  padding: 4rem 0;
}


/* ==========================================================================
   14. Footer
   ========================================================================== */

footer {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-heading {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.footer-sub {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.footer-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-tint);
  color: var(--color-accent);
  opacity: 1;
}

.footer-credit {
  font-size: 0.78rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}


/* ==========================================================================
   15. Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-portrait {
    order: -1;
    max-width: 220px;
    margin: 0 auto;
  }

  .hero-portrait img {
    aspect-ratio: 1 / 1;
    object-position: center 15%;
  }

  .hero-text {
    text-align: center;
  }

  .hero-intro {
    max-width: 100%;
  }

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

  .nav-links {
    display: none;
  }

  h2.section-title {
    font-size: 1.4rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .supporting-grid {
    grid-template-columns: 1fr;
  }

  .interests-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero {
    padding: 2.5rem 0 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .interests-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding: 0 1.25rem;
  }
}
