/* ============================================================
   Shannon Milar — Portfolio
   ============================================================ */

:root {
  color-scheme: light;
  --bg:          #ffffff;
  --text:        #111111;
  --muted:       #4a4948;
  --border:      #e0dbd4;
  --placeholder: #ebebeb;
  --nav-bg:      #ffffff;
  --overlay-bg:  rgba(20, 18, 15, 0.92);

  --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h:     60px;
  --max-w:     1280px;
  --gap:       clamp(1rem, 2.5vw, 2rem);
  --section-v: clamp(3rem, 8vw, 6rem);
}

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

/* ── Focus visible ──────────────────────────────────────────── */
:focus { outline: none; }

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

.hero-page :focus-visible,
.lightbox :focus-visible {
  outline-color: #fff;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gap);
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  z-index: 999;
  transition: top 0.15s;
}

.skip-link:focus-visible {
  top: var(--gap);
  outline-color: var(--bg);
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: normal;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.125rem; }

p { max-width: 65ch; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
}

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

.site-nav.scrolled {
  border-color: var(--border);
}

/* Transparent over black landing hero */
.hero-page .site-nav {
  background: transparent;
  color: #fff;
  border-color: transparent;
}

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

/* No logo on landing — keep links pinned right */
.hero-page .nav-inner {
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .hero-page .nav-inner { justify-content: space-between; }
  .hero-page .site-nav:not(.scrolled) .nav-links {
    background: #000;
  }
}

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

.nav-logo {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

.hero-page .site-nav:not(.scrolled) .nav-toggle span { background: #ffffff; }

.hero-page .nav-toggle { color: #ffffff; }

.hero-page .nav-links a { color: rgba(255, 255, 255, 0.7); }
.hero-page .nav-links a:hover,
.hero-page .nav-links a.active { color: #ffffff; }

.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); }

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
  }

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

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.15em;
    opacity: 0.9;
  }
}

/* ── Nav: Instagram icon ────────────────────────────────────── */
.nav-icon-link {
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s;
}
.nav-icon-link:hover {
  transform: scale(1.12);
}
.nav-icon-link svg { display: block; }

/* ── Landing hero ───────────────────────────────────────────── */
.hero-landing {
  height: 100dvh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) var(--gap) 0;
  background: #000;
  color: #fff;
  position: relative;
}

/* Semantic link wrapping the hero content */
.hero-landing-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 2rem;
  transition: opacity 0.25s;
}

.hero-landing-link:hover {
  opacity: 0.7;
}

.hero-landing-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 1.5rem;
  border-radius: 2px;
}

.landing-name {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.landing-role {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(1rem, 3vw, 2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.landing-location {
  margin-top: 0.5rem;
  font-size: clamp(0.9rem, 1.5vw, 1.125rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.landing-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.35;
  animation: nudge 2s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

/* ── Home: Work Preview ─────────────────────────────────────── */
.section {
  padding-block: var(--section-v);
}

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

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--gap);
}

.work-preview-card {
  display: block;
  group: true;
}

.work-preview-card .card-img {
  aspect-ratio: 4 / 3;
  background: var(--placeholder);
  overflow: hidden;
  /* Replace with your preview image:
     background-image: url('images/work/assemblages/preview.jpg');
     background-size: cover; background-position: center; */
}

.work-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.work-preview-card:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

.card-info {
  margin-top: 1rem;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 1.125rem;
}

.card-meta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: letter-spacing 0.2s, border-bottom-width 0.2s;
}

.card-link:hover { letter-spacing: 0.16em; border-bottom-width: 2px; }

/* ── Series Statement ───────────────────────────────────────── */
.series-statement {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.series-statement p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

.series-statement p:last-child { margin-bottom: 0; }

/* ── Page Header (interior pages) ──────────────────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  text-align: center;
}

.page-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: normal;
}

.page-subtitle {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ── Gallery Grid ───────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.gallery-item {
  cursor: pointer;
  position: relative;
  background: var(--placeholder);
  overflow: hidden;
}

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

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.82;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(to top, rgba(15,12,9,0.82), rgba(15,12,9,0.1) 80%, transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.figcap-title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}

.figcap-status {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}


.lb-status {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay-bg);
  align-items: center;
  justify-content: center;
  padding: var(--gap);
}

.lightbox.active { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 960px);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80dvh;
  object-fit: contain;
  display: block;
  background: var(--placeholder);
}

.lightbox-caption {
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.lightbox-caption .lb-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: #fff;
}

.lightbox-caption .lb-meta {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: 0.2rem;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.2s;
  line-height: 1;
}

.lightbox-prev { left: clamp(0.5rem, 2vw, 2rem); }
.lightbox-next { right: clamp(0.5rem, 2vw, 2rem); }

.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

/* ── Bio ────────────────────────────────────────────────────── */
.bio-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 700px) {
  .bio-layout { grid-template-columns: 1fr; }
}

.bio-portrait {
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  overflow: hidden;
  /* Add portrait image:
     Replace the <img> src in bio.html with: images/bio/portrait.jpg */
}

.bio-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-text h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: normal;
  margin-bottom: 1.5rem;
}

.bio-text p {
  margin-bottom: 1.25rem;
  color: var(--text);
  line-height: 1.75;
}

.bio-text p:last-child { margin-bottom: 0; }

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 700px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-info h2 {
  font-family: var(--font-sans);
  font-weight: normal;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.contact-info p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}

.contact-info a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.contact-info a:hover { border-color: var(--text); }

.contact-info .email {
  display: block;
  margin-top: 1.5rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  transition: border-color 0.2s;
}

.contact-info .email:hover { border-color: var(--text); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 560px; margin-inline: auto; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text);
}

.form-group textarea { min-height: 120px; }

.btn-submit {
  align-self: flex-start;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  padding: 0.75rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-submit:hover { background: transparent; color: var(--text); border: 1px solid var(--text); }
.btn-submit:disabled { opacity: 0.5; cursor: default; }

.form-error {
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #b00020;
}

.contact-success {
  max-width: 560px;
  margin-inline: auto;
  padding-block: 1rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  margin-top: var(--section-v);
}

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

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

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

.footer-links .nav-icon-link { line-height: 0; }

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

/* ── Newsletter Popup ───────────────────────────────────────── */
.newsletter-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--text);
  color: var(--bg);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0, 0, 1);
}

.newsletter-popup.visible {
  transform: translateY(0);
}

.newsletter-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1.25rem var(--gap);
}

.newsletter-copy {
  flex-shrink: 0;
}

.newsletter-copy strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.newsletter-copy span {
  font-size: 0.8125rem;
  opacity: 0.7;
}

.newsletter-form {
  display: flex;
  align-items: stretch;
  gap: 0.625rem;
  flex: 1;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.35rem 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.9);
}

.newsletter-form .btn-newsletter {
  flex-shrink: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--bg);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.newsletter-form .btn-newsletter:hover { background: transparent; color: var(--bg); }
.newsletter-form .btn-newsletter:disabled { opacity: 0.5; cursor: default; }

.newsletter-msg {
  font-size: 0.875rem;
  opacity: 0.85;
  display: none;
}

.newsletter-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.2s;
}

.newsletter-close:hover { color: #fff; }

@media (max-width: 700px) {
  .newsletter-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .newsletter-copy span { display: none; }

  .newsletter-form { width: 100%; }

  .newsletter-close {
    position: absolute;
    top: 0.875rem;
    right: var(--gap);
    margin-left: 0;
  }

  .newsletter-popup { position: fixed; }
  .newsletter-inner { position: relative; padding-right: 2.5rem; }
}

/* ── Utility ────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
