/* === VARIABLES === */
:root {
  --bg: #FAFAF8;
  --text: #1A1A1A;
  --muted: #6B6560;
  --accent: #8B4A3C;
  --stone: #E8E4DF;
  --rule: #C4B8AE;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --page-pad: clamp(1.5rem, 5vw, 4rem);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* === BASE === */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === CONTAINER === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* === NAV === */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem var(--page-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-variant: small-caps;
  letter-spacing: 0.15em;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

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

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* === ETCHING RULE === */
.etching-rule {
  width: 100%;
  height: 12px;
  margin: 4rem 0;
}

.etching-rule svg {
  width: 100%;
  height: 100%;
  stroke: var(--rule);
}

/* === PAGE HEADER (portfolio, timeline) === */
.page-header {
  padding-bottom: 3rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* === HERO (index.html) === */
.hero {
  display: flow-root;
  padding: 0 var(--page-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-image {
  float: right;
  width: 44%;
  margin-left: 3.5rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-name span {
  display: block;
}

.hero-descriptor {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.icon-link {
  color: var(--muted);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.icon-link:hover {
  color: var(--accent);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
}

.headshot {
  width: 100%;
  height: auto;
  display: block;
}

/* === CURRENTLY SECTION (index.html) === */
.currently {
  padding-bottom: 6rem;
}

.currently-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.currently-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.65;
  max-width: 700px;
  color: var(--text);
}

/* === PORTFOLIO PAGE === */
.section-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.art-grid {
  columns: 2;
  column-gap: 2.5rem;
  margin-bottom: 2rem;
}

.art-card {
  break-inside: avoid;
  margin-bottom: 2rem;
  cursor: pointer;
}

.art-card-image {
  overflow: hidden;
  background: var(--stone);
  margin-bottom: 0.75rem;
  position: relative;
}

.art-card--portrait .art-card-image {
  aspect-ratio: 3 / 4;
}

.art-card--landscape .art-card-image {
  aspect-ratio: 4 / 3;
}

.art-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.art-card:hover .art-card-image img {
  transform: scale(1.03);
}

.art-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.art-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.art-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
}

.writing-list {
  display: flex;
  flex-direction: column;
}

.writing-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--stone);
}

.writing-entry:first-child {
  border-top: 1px solid var(--stone);
}

.writing-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.writing-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
}

.writing-download {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  padding-top: 0.25rem;
}

.writing-download:hover {
  color: var(--accent);
}

.section-padded-bottom {
  padding-bottom: 6rem;
}

/* === TIMELINE PAGE === */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.timeline-cols-legend {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 0 2rem;
  margin-bottom: 3rem;
}

.timeline-col-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-col-label--left {
  text-align: right;
}

.timeline-col-label--right {
  text-align: left;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--stone);
  transform: translateX(-50%);
}

.timeline-entry {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 0 2rem;
  margin-bottom: 3.5rem;
  align-items: start;
}

.timeline-date {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--muted);
  text-align: right;
  padding-top: 0.15rem;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  margin: 0 auto;
  margin-top: 0.3rem;
  position: relative;
  z-index: 1;
}

.timeline-body {
  padding-bottom: 0.5rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline-institution {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.timeline-desc {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-entry--education .timeline-date {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
}

.timeline-entry--education .timeline-dot {
  grid-column: 2;
  grid-row: 1;
}

.timeline-entry--education .timeline-body {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

/* === FOOTER === */
.site-footer {
  position: relative;
  padding: 2.5rem var(--page-pad);
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--stone);
}

.footer-name {
  font-family: var(--font-display);
  font-variant: small-caps;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.footer-icons {
  display: flex;
  gap: 1.5rem;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
}

/* === LIGHTBOX === */
.lightbox-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-inner {
  max-width: 800px;
  width: 100%;
  position: relative;
}

.lightbox-img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
}

.lightbox-title-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: rgba(250, 250, 248, 0.92);
  margin-bottom: 0.4rem;
}

.lightbox-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(250, 250, 248, 0.65);
  line-height: 1.6;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(250, 250, 248, 0.65);
  font-size: 1.4rem;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: white;
}

/* === RESPONSIVE (≤ 768px) === */
@media (max-width: 768px) {
  .site-nav {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .hero-image {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 2rem;
  }

  .headshot {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .art-grid {
    columns: 1;
  }

  .timeline::before {
    left: 11px;
    transform: none;
  }

  .timeline-entry {
    grid-template-columns: 24px 1fr;
    gap: 0 1rem;
  }

  .timeline-date {
    grid-column: 2;
    text-align: left;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
  }

  .timeline-dot {
    grid-column: 1;
    grid-row: 1 / 3;
    margin: 0.2rem auto 0;
  }

  .timeline-body {
    grid-column: 2;
  }

  .timeline-entry--education .timeline-date {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
  }

  .timeline-entry--education .timeline-dot {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .timeline-entry--education .timeline-body {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
  }

  .timeline-cols-legend {
    display: none;
  }

  .writing-entry {
    grid-template-columns: 1fr;
  }

  .writing-download {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
