/* ==========================================================================
   Jubilee — Portfolio homepage
   assets/css/style.css
   Editorial minimalism · warm off-white · near-black ink · one accent
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour */
  --bg:          #faf7f2;
  --bg-deep:     #f2ede5;
  --ink:         #171412;
  --ink-soft:    #3d3733;
  --muted:       #6f6862;
  --accent:      #9c4425;
  --line:        #ded7cc;
  --line-strong: #c8bfb2;

  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino,
                "Book Antiqua", Georgia, serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3. Skip link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.85rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-110%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   4. Layout helper
   -------------------------------------------------------------------------- */
.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(1rem, 2vw, 1.35rem);
}

.logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}

.logo__dot {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

/* Mobile menu button — hidden on desktop and until JS reveals it */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 1.35rem;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease);
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease);
}

.nav-toggle__icon::before {
  top: -6px;
}

.nav-toggle__icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.hero__intro {
  max-width: 42rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__lede {
  max-width: 36ch;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

/* --------------------------------------------------------------------------
   7. Buttons & underline links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.35rem;
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--light {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
}

.btn--light:hover {
  background: transparent;
  border-color: var(--bg);
  color: var(--bg);
}

.link-underline {
  display: inline-block;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.link-underline:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   8. Hero portrait
   -------------------------------------------------------------------------- */
.hero__figure {
  width: 100%;
  max-width: 420px;
  margin: 0;
  justify-self: end;
}

.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border: 1px solid var(--line);
  background: var(--bg-deep);
}

.hero__caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-align: right;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. Generic section structure
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 2.2vw + 1rem, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-num {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-head__link {
  flex-shrink: 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.section-head__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   10. Selected work
   -------------------------------------------------------------------------- */
.work-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.work-list > li {
  border-bottom: 1px solid var(--line);
}

.work-item {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 0.25rem 2.25rem;
  align-items: start;
  padding-block: clamp(1.5rem, 3vw, 2.35rem);
  color: inherit;
  text-decoration: none;
}

.work-item__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.25rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-item__num {
  color: var(--accent);
  font-weight: 800;
}

.work-item__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  transition: color 0.2s var(--ease);
}

.work-item__desc {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.work-item__arrow {
  align-self: center;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  transition:
    transform 0.2s var(--ease),
    color 0.2s var(--ease);
}

.work-item:hover .work-item__title,
.work-item:focus-visible .work-item__title {
  color: var(--accent);
}

.work-item:hover .work-item__arrow,
.work-item:focus-visible .work-item__arrow {
  color: var(--accent);
  transform: translateX(0.35rem);
}

.work-item:hover .work-item__desc,
.work-item:focus-visible .work-item__desc {
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   11. About preview
   -------------------------------------------------------------------------- */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about__body {
  max-width: 62ch;
}

.about__lede {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 1.8vw + 0.6rem, 1.9rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.about__text {
  margin: 0 0 1.75rem;
  color: var(--muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   12. Contact band
   -------------------------------------------------------------------------- */
.contact-band {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--ink);
  color: var(--bg);
}

.contact-band__inner {
  max-width: 48rem;
}

.eyebrow--light {
  color: rgba(250, 247, 242, 0.65);
}

.eyebrow--light::before {
  background: var(--accent);
}

.contact-band__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw + 1rem, 4.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.contact-band__text {
  max-width: 55ch;
  margin: 0 0 2rem;
  color: rgba(250, 247, 242, 0.76);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer__name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__nav a {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}

.footer__nav a:hover {
  color: var(--accent);
}

.footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   14. Tablet & mobile
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 7vw, 4rem);
  }

  .hero__intro {
    max-width: 46rem;
  }

  .hero__figure {
    justify-self: start;
    max-width: 360px;
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about__body {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-header.is-nav-open .site-nav,
  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li {
    border-top: 1px solid var(--line);
  }

  .site-nav li:first-child {
    border-top: 0;
  }

  .site-nav a {
    display: block;
    padding-block: 0.95rem;
    font-size: 0.78rem;
  }

  .site-nav a::after {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .work-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 1.25rem;
  }

  .work-item__meta {
    flex-direction: row;
    gap: 0.65rem;
    padding-top: 0;
  }

  .work-item__title,
  .work-item__desc {
    grid-column: 1;
  }

  .work-item__arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero__caption {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .hero__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .link-underline {
    align-self: flex-start;
  }

  .hero__figure {
    max-width: 100%;
  }

  .section-title {
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
  }

  .footer__nav ul {
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   15. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}