/* ==========================================================================
   Ellison Ashby — one-page portfolio
   Editorial palette taken from the Social Media Portfolio 2026 deck.
   ========================================================================== */

:root {
  --cream: #f3efe8;
  --paper: #f8f7f2;
  --ink: #34322f;
  --ink-soft: #5d5953;
  --muted: #8b857c;
  --line: rgba(52, 50, 47, 0.22);
  --accent: #8a5a3c;      /* tortoiseshell */
  --sage: #9db59a;        /* from "The Wellness Edit" */
  --white: #fffdf9;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

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

/* ───────────── Type helpers ───────────── */
.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--small { min-height: 38px; padding: 0 18px; font-size: 13px; }
.btn[hidden] { display: none; }

/* ───────────── Nav ───────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  height: 68px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(248, 247, 242, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.nav__mono {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--ink); border-radius: 50%;
  font: 400 15px/1 var(--serif); letter-spacing: 0.02em;
}
.nav__name { font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  position: relative;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav__toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 68px 0 auto 0; z-index: 49;
  display: flex; flex-direction: column;
  padding: 8px var(--gutter) 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font: 400 34px/1.1 var(--serif);
  text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ───────────── Hero ───────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100svh;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero__media { margin: 0; position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  transform: scale(1.06);
  animation: heroZoom 2.2s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero__copy {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end;
  text-align: right;
  padding: 120px var(--gutter) 56px;
}
.hero__title {
  margin: 0 0 32px;
  font: 400 clamp(84px, 13vw, 210px)/0.84 var(--serif);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1.2s var(--ease) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { to { transform: none; } }

.hero__lede {
  max-width: 30ch;
  margin: 0 0 32px;
  font: 400 clamp(22px, 2vw, 28px)/1.3 var(--serif);
  color: var(--ink);
}
.hero__lede em { color: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-bottom: 40px; }
.hero__meta {
  list-style: none; margin: 0; padding: 20px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end;
  width: 100%;
  border-top: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft);
}
.hero__meta li { display: flex; align-items: center; gap: 10px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--sage);
  box-shadow: 0 0 0 0 rgba(157, 181, 154, 0.7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(157, 181, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(157, 181, 154, 0); }
}

/* ───────────── Marquee ───────────── */
.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 20px 0;
}
.marquee__track {
  display: flex; align-items: center; gap: 36px;
  width: max-content;
  animation: marquee 48s linear infinite;
  font: 400 clamp(26px, 3vw, 40px)/1 var(--serif);
  white-space: nowrap;
}
.marquee__track i { font-style: normal; font-size: 0.5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────────── Sections ───────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 9vw, 140px) var(--gutter) clamp(48px, 6vw, 88px);
}
.experience { padding-bottom: clamp(80px, 9vw, 140px); }
.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 8px 28px;
  padding-bottom: 28px;
  margin-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--ink);
}
.section__head--sub { margin-top: clamp(96px, 10vw, 150px); }
.section__num {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 0.9em;
  border: 1px solid var(--ink); border-radius: 50%;
  font-size: 13px; font-weight: 500;
}
.section__title {
  margin: 0;
  font: 400 clamp(56px, 9vw, 132px)/0.88 var(--serif);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.section__intro {
  grid-column: 2;
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
}

/* ───────────── About ───────────── */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.about__hello {
  margin: 0 0 28px;
  font: 400 clamp(36px, 4.4vw, 60px)/1.02 var(--serif);
  letter-spacing: -0.01em;
}
.about__hello em { color: var(--accent); }
.about__copy p { margin: 0 0 1.2em; max-width: 62ch; color: var(--ink-soft); font-size: 18px; }
.about__copy p:first-of-type::first-letter {
  float: left;
  font: 400 4.6em/0.8 var(--serif);
  padding: 0.08em 0.1em 0 0;
  color: var(--ink);
}
.about__copy p em { color: var(--ink); font-family: var(--serif); font-size: 1.15em; }

.about__photo { margin: 0; position: relative; }
.about__photo img {
  width: 100%;
  aspect-ratio: 727 / 1064;
  object-fit: cover;
  border: 1px solid var(--ink);
}
.about__photo figcaption {
  margin-top: 14px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(64px, 8vw, 110px) 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 32px 28px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt { font: 400 clamp(34px, 3.6vw, 52px)/1 var(--serif); margin-bottom: 12px; }
.stat dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); max-width: 26ch; }

/* ───────────── Work ───────────── */
.work { background: var(--paper); }
.grid { display: grid; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.card__media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 900 / 1076;
  padding: 0; border: 0; margin: 0;
  background: var(--cream);
  cursor: zoom-in;
  text-decoration: none;
}
a.card__media { cursor: pointer; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.045); }
.card__badge {
  position: absolute; right: 14px; top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.card:hover .card__badge, .card__media:focus-visible .card__badge { opacity: 1; transform: none; }

.card__body { padding: 22px 22px 28px; }
.card__kicker {
  display: block; margin-bottom: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.card__title { margin: 0 0 8px; font: 400 28px/1.1 var(--serif); }
.card__body p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ───────────── Skills ───────────── */
.skills { border-top: 1px solid var(--line); }
.skills__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.skills__photo { margin: 0; position: sticky; top: 100px; }
.skills__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 60% 50%; border: 1px solid var(--ink); }

.skills__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; }
.skill-group h3 {
  margin: 0 0 8px; padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  font: 400 40px/1 var(--serif);
}
.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.skill-group li span { font-weight: 500; font-size: 16px; }
.skill-group li small { font-size: 14px; color: var(--muted); }
.skill-group--wide { grid-column: 1 / -1; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.pills span {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  transition: background 0.3s, border-color 0.3s;
}
.pills span:hover { background: var(--cream); border-color: var(--ink); }

/* ───────────── Experience ───────────── */
.experience { border-top: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; }
.role {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 2fr);
  gap: 16px 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease);
}
.role:first-child { padding-top: 0; }
.role__when { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.role h3 { margin: 0 0 4px; font: 400 clamp(30px, 3vw, 42px)/1.05 var(--serif); }
.role__where { margin: 0 0 12px !important; font-size: 14px; letter-spacing: 0.04em; color: var(--accent) !important; }
.role p { margin: 0; max-width: 68ch; color: var(--ink-soft); }

/* ───────────── Contact ───────────── */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(96px, 12vw, 180px) var(--gutter);
  text-align: center;
}
.contact__inner { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.contact__avatar {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; object-position: 50% 25%;
  margin-bottom: 32px;
  border: 1px solid rgba(248, 247, 242, 0.4);
  padding: 4px;
}
.contact .eyebrow { color: rgba(248, 247, 242, 0.7); }
.contact__title { margin: 0 0 24px; font: 400 clamp(48px, 7.4vw, 104px)/0.95 var(--serif); letter-spacing: -0.02em; }
.contact__title em { color: #d8b89c; }
.contact__lede { max-width: 52ch; margin: 0 0 40px; color: rgba(248, 247, 242, 0.74); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact .btn:hover { background: transparent; color: var(--paper); }
.contact .btn--ghost { background: transparent; color: var(--paper); border-color: rgba(248, 247, 242, 0.5); }
.contact .btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ───────────── Footer ───────────── */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 24px var(--gutter);
  background: var(--ink);
  color: rgba(248, 247, 242, 0.6);
  border-top: 1px solid rgba(248, 247, 242, 0.14);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }

/* ───────────── Lightbox ───────────── */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 4vh 4vw; border: 0;
  background: rgba(30, 29, 27, 0.92);
  place-items: center;
}
.lightbox[open] { display: grid; animation: fade 0.35s var(--ease); }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.lightbox__close {
  position: fixed; top: 18px; right: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(248, 247, 242, 0.4); background: transparent; color: var(--paper);
  font: 300 28px/1 var(--sans); cursor: pointer;
}
@keyframes fade { from { opacity: 0; } }

/* ───────────── Reveal on scroll ───────────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .skills__lists { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__links, .nav > .btn { display: none; }
  .nav__toggle { display: flex; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__media { border-right: 0; border-bottom: 1px solid var(--line); height: 58svh; min-height: 360px; }
  .hero__media img { object-position: 50% 22%; }
  .hero__copy { padding: 48px var(--gutter) 40px; align-items: flex-start; text-align: left; }
  .hero__cta, .hero__meta { justify-content: flex-start; }
  .hero__title { font-size: clamp(76px, 22vw, 150px); }

  .section__head { grid-template-columns: 1fr; }
  .section__num { margin-bottom: 8px; }
  .section__intro { grid-column: 1; }

  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 460px; }

  .grid--3 { grid-template-columns: 1fr 1fr; }
  .skills__grid { grid-template-columns: 1fr; }
  .skills__photo { position: static; max-width: 460px; }

  .role { grid-template-columns: 1fr; gap: 6px; }
  .role__when { padding-top: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat:first-child, .stat:nth-child(3) { border-left: 0; padding: 24px 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .about__copy p { font-size: 16.5px; }
  .card__badge { opacity: 1; transform: none; }
  .btn { width: 100%; }
  .hero__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
