/* =========================================================
   styles.css — Abigail Vân Neely
   ========================================================= */

/* ── Reset ──────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

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

a        { color: var(--accent); text-decoration: none; }
ul       { list-style: none; }
button   { font-family: inherit; }

/* ── Tokens ─────────────────────────────────────────────── */

:root {
  --bg:           #f5f0e8;
  --bg-alt:       #ede7da;
  --accent:       #3d5229;
  --accent-hover: #2e3d1e;
  --text:         #1a1a1a;
  --muted:        #5e5850;
  --border:       #c8bfb4;
  --black:        #0f0f0f;
  --white:        #ffffff;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  --nav-h:  52px;
  --max-w:  1040px;
  --gut:    1.75rem;
  --pad:    3.5rem;
}

/* ── Base ───────────────────────────────────────────────── */

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Layout ─────────────────────────────────────────────── */

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

/* ── Nav ────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Hero page: nav starts transparent over the image */
body.hero-page .nav {
  background: transparent;
  border-bottom-color: transparent;
}

body.hero-page .nav.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
}

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

.nav-logo {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  transition: color 0.35s;
}

body.hero-page .nav-logo                  { color: rgba(255,255,255,0.92); }
body.hero-page .nav.scrolled .nav-logo    { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

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

body.hero-page .nav-links a                       { color: rgba(255,255,255,0.75); }
body.hero-page .nav-links a:hover,
body.hero-page .nav-links a.active                { color: var(--white); }
body.hero-page .nav.scrolled .nav-links a         { color: var(--muted); }
body.hero-page .nav.scrolled .nav-links a:hover,
body.hero-page .nav.scrolled .nav-links a.active  { color: var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.25s, background 0.35s;
  transform-origin: center;
}

body.hero-page .nav-toggle span               { background: rgba(255,255,255,0.9); }
body.hero-page .nav.scrolled .nav-toggle span { background: var(--text); }

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: #1e1912;            /* warm dark fallback if image absent */
  background-image: url('../photos/hero.jpg');
  background-size: cover;
  background-position: center 80%;
  display: flex;
  align-items: flex-end;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 8, 3, 0.88) 0%,
    rgba(10, 8, 3, 0.35) 55%,
    rgba(10, 8, 3, 0.10) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--max-w) + (var(--gut) * 2));
  margin: 0 auto;
  padding: 0 var(--gut) 5rem;
}

.hero-block {
  max-width: 580px;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-bio {
  font-family: var(--sans);
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  line-height: 1.75;
  color: rgba(255,255,255,0.80);
  max-width: 500px;
}

/* ── Column label (shared) ──────────────────────────────── */

.col-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Portfolio section ──────────────────────────────────── */

.section--portfolio {
  padding: var(--pad) 0;
  scroll-margin-top: var(--nav-h);
}

.work-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

/* Story list — shared border frame */
.story-list {
  border-top: 1px solid var(--border);
}

/* Standard story item (RSS column) */
.story-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.story-headline {
  font-family: var(--serif);
  font-size: 0.9875rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
}

.story-headline a {
  color: var(--text);
}

.story-headline a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.story-meta {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Selected work item — with thumbnail */
.story-item--thumb {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.story-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 52px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border);
  background-size: cover;
  background-position: center;
}

.story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* RSS loading / error states */
.feed-loading,
.feed-error {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.75rem 0;
  font-style: italic;
}

.feed-error a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Selected Work accordion ────────────────────────────── */

.work-accordion {
  border-top: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 0.75rem;
}

.accordion-trigger::-webkit-details-marker { display: none; }

.accordion-trigger-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.accordion-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 52px;
  border-radius: 2px;
  background-color: var(--border);
  background-size: cover;
  background-position: center;
}

.accordion-category {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}

.accordion-trigger::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
}

details[open] > .accordion-trigger::after {
  content: '\2212';
}

.accordion-body {
  max-height: 280px;
  overflow-y: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.accordion-body::-webkit-scrollbar {
  width: 4px;
}

.accordion-body::-webkit-scrollbar-track {
  background: transparent;
}

.accordion-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.accordion-story-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.accordion-story-list li:last-child {
  border-bottom: none;
}

.accordion-story-list a {
  color: var(--text);
}

.accordion-story-list a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Awards ─────────────────────────────────────────────── */

.section--awards {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.award-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
}

.award-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--border);
  background-size: cover;
  background-position: center;
  /* swap in: background-image: url('../images/award-logo-sfpc.png'); */
}

.award-org {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.award-desc {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  background: var(--black);
  padding: 1.75rem 0;
}

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

.footer-copy {
  font-family: var(--sans);
  font-size: 0.775rem;
  color: rgba(255,255,255,0.3);
}

.footer-photos-link {
  font-family: var(--sans);
  font-size: 0.775rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.15s;
}

.footer-photos-link:hover {
  color: rgba(255,255,255,0.8);
}

/* =========================================================
   Photos page
   ========================================================= */

.photos-page {
  padding-top: calc(var(--nav-h) + 2.75rem);
  padding-bottom: 4rem;
  min-height: 100vh;
}

.photos-heading {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-card {
  display: flex;
  flex-direction: column;
}

.photo-frame {
  overflow: hidden;
  background: #ccc8c0;
  border-radius: 2px;
  aspect-ratio: 1 / 1;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}

.photo-card:hover .photo-frame img {
  opacity: 0.86;
}

.photo-caption {
  padding: 0.55rem 0 0;
}

.photo-caption-title {
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.photo-caption-story {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* =========================================================
   Contact section (inline on index.html)
   ========================================================= */

.section--contact {
  padding: var(--pad) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--nav-h);
}

.section--contact .contact-inner {
  max-width: none;
}

.section--contact .contact-details {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.25rem 4rem;
}

.section--contact .col-label {
  width: 100%;
  margin-bottom: 0.75rem;
}

.section--contact .contact-row {
  margin-bottom: 0;
}

/* =========================================================
   Contact page (standalone contact.html)
   ========================================================= */

.contact-page {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 6rem;
  min-height: 100vh;
}

.contact-inner {
  max-width: 620px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-headshot img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #ccc8c0;
  border-radius: 50%;
}

.contact-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--black);
  margin-bottom: 2rem;
}

.contact-row {
  margin-bottom: 1.5rem;
}

.contact-row-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.contact-row-value {
  font-family: var(--sans);
  font-size: 0.9875rem;
  color: var(--text);
}

.contact-row-value a {
  color: var(--accent);
}

.contact-row-value a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.contact-signal {
}

.contact-resume-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--muted);
  font-style: italic;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 800px) {
  :root { --pad: 2.5rem; }

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

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .awards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-headshot img {
    max-width: 160px;
  }
}

@media (max-width: 560px) {
  :root { --pad: 1.75rem; }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.7rem var(--gut);
  }

  /* The dropdown has a solid bg — override hero-page white text */
  body.hero-page .nav-links a { color: var(--muted); }
  body.hero-page .nav-links a:hover,
  body.hero-page .nav-links a.active { color: var(--accent); }

  .hero-content {
    padding-bottom: 3.5rem;
  }

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

  .awards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .contact-page {
    padding-top: calc(var(--nav-h) + 2.5rem);
    padding-bottom: 3rem;
  }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
  .nav, .footer { display: none !important; }
  body { background: white; }
}
