/* ============================================================
   Amanda Wilkson — Portfolio
   Edit the variables below to change the whole site's look.
   ============================================================ */
:root {
  --bg: #f6f4ee;          /* ivory background */
  --ink: #17150f;         /* near-black text */
  --muted: #6b675c;       /* secondary text */
  --accent: #c0392b;      /* editorial red — try #1d5c46 (green) or #1f4e79 (blue) */
  --line: #dedacd;        /* hairline borders */
  --card: #fffdf8;        /* card background */
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --ease-out: cubic-bezier(0.2, 0.65, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

em { font-style: italic; color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

/* Film-grain overlay for editorial texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2"/></filter><rect width="300" height="300" filter="url(%23n)" opacity="0.7"/></svg>');
}

/* Scroll progress bar */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 300;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s var(--ease-out);
}
.site-header.nav-hidden { transform: translateY(-100%); }

.wordmark { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.25; }
.wordmark-name { font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; }
.wordmark-tag { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:not(.btn) {
  position: relative;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: var(--bg) !important; }
.btn-solid:hover { background: var(--accent); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink) !important; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 12vh, 8rem) var(--pad) clamp(5rem, 12vh, 8rem);
  max-width: 82rem;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

/* Word-by-word hero reveal (spans injected by JS) */
.hero h1 .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.js .hero h1 .wi {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s var(--ease-out);
}
.js .hero.loaded h1 .wi { transform: none; }

.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 2.5rem;
}

.hero-sub {
  max-width: 44ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-side { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  display: block;
  width: 44px;
  height: 1.5px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scrollcue 2.2s var(--ease-out) infinite;
}
@keyframes scrollcue {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- Marquee tickers ---------- */
.marquee { overflow: hidden; white-space: nowrap; }

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2.6rem;
  padding: 0.95rem 0;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track > * { flex-shrink: 0; }
.marquee-reverse { animation-direction: reverse; }
.marquee-slow { animation-duration: 60s; }
@keyframes marquee { to { transform: translateX(-50%); } }

.mq {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.mq-dot { color: var(--accent); font-size: 0.85rem; }

.marquee-dark {
  background: var(--ink);
  color: var(--bg);
  transform: rotate(-1.1deg) scale(1.02);
  margin-block: 1rem 2rem;
}
.marquee-light {
  border-block: 1px solid var(--line);
  color: var(--ink);
  margin-top: 2rem;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3.5rem, 9vh, 7rem) var(--pad);
  max-width: 90rem;
  margin: 0 auto;
}

.section-head { margin-bottom: 2.5rem; max-width: 46rem; }
.section-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.4rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}
.section-note { margin-top: 0.9rem; color: var(--muted); max-width: 52ch; }

/* ---------- Work: alternating editorial rows ---------- */
.project {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(2.2rem, 6vh, 4.5rem);
  border-top: 1px solid var(--line);
}
.project:nth-of-type(even) .project-media { order: 2; }

.project-media {
  border-radius: 16px;
  overflow: hidden;
  will-change: transform;
}
.project-media .media {
  transition: transform 0.7s var(--ease-out);
}
.project:hover .project-media .media { transform: scale(1.045); }

/* Placeholder media blocks — replace with real <img> tags */
.media {
  aspect-ratio: 16 / 11;
  display: grid;
  place-items: center;
  color: rgba(255, 253, 248, 0.92);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.media-a { background: linear-gradient(135deg, #c0392b, #7c1f14); }
.media-b { background: linear-gradient(135deg, #17150f, #4a4436); }
.media-c { background: linear-gradient(135deg, #b98a2f, #6e4f12); }
.media-portrait { aspect-ratio: 4 / 5; border-radius: 16px; background: linear-gradient(160deg, #4a4436, #17150f); }

.project-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.work-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.project-info h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.7rem;
}
.project-info p { color: var(--muted); font-size: 1rem; max-width: 46ch; }
.work-tags {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}
.project-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.project-link:hover::after { transform: scaleX(1); transform-origin: left; }
.project-link .arrow { transition: transform 0.3s var(--ease-out); color: var(--accent); }
.project-link:hover .arrow { transform: translateX(5px); }

/* ---------- Logo grid ---------- */
.logo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.logo-grid li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 1rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease, font-style 0.25s ease;
  cursor: default;
}
.logo-grid li:hover { color: var(--bg); background: var(--ink); font-style: italic; }

/* ---------- Experience: sticky header layout ---------- */
.exp-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.exp-head { position: sticky; top: 7rem; }

.timeline { list-style: none; }
.timeline li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.timeline li:first-child { padding-top: 0.5rem; }
.timeline li:last-child { border-bottom: none; }
.tl-when {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  padding-top: 0.35rem;
}
.tl-body h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.tl-org { color: var(--muted); font-weight: 400; font-style: italic; }
.tl-body p { color: var(--muted); margin-top: 0.4rem; font-size: 0.97rem; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-photo { will-change: transform; }
.about-text p { max-width: 52ch; margin-bottom: 1.1rem; font-size: 1.02rem; }

.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.25;
  max-width: 24ch !important;
  margin-bottom: 1.5rem !important;
}

.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}
.skills li {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.skills li:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .eyebrow { margin-bottom: 1rem; }
.contact-big {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1.05;
}
.contact .section-note { margin: 1.4rem auto 0; }
.contact-ctas { justify-content: center; margin-top: 2.2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }

.footer-name .marquee-track { padding: 1.5rem 0; gap: 3.5rem; }
.footer-name span:not(.mq-dot) {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  transition: color 0.4s ease;
}
.footer-name:hover span:not(.mq-dot) { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.footer-name .mq-dot { font-size: 1.6rem; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.4rem var(--pad) 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Scroll reveal (only active when JS adds .js to <html>) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero h1 .wi { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .scroll-line::after, .status-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.4rem var(--pad) 1.8rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }

  .project { grid-template-columns: 1fr; gap: 1.4rem; }
  .project:nth-of-type(even) .project-media { order: 0; }
  .project-num { font-size: 2.6rem; margin-bottom: 0.6rem; }

  .exp-layout { grid-template-columns: 1fr; }
  .exp-head { position: static; }

  .timeline li { grid-template-columns: 1fr; gap: 0.35rem; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 20rem; }
  .scroll-cue { display: none; }
}
