/* =========================================================
   Emma Stock — portfolio
   Design tokens first; everything else references them.
   ========================================================= */

:root {
  --orange:      #ec5b25;
  --peach:       #f5a98b;
  --peach-tint:  #fcebe1;   /* about card fill */
  --white:       #ffffff;
  --ink:         #1a1a1a;

  --font:        "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container:   1340px;
  --gutter:      24px;   /* side padding at narrow widths */
  --header-h:    80px;
  --grid-gap:    24px;
  --radius:      6px;

  /* how strongly the line-art reads against the peach */
  --hero-art-opacity: 0.38;
}

/* ---------- reset ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--header-h);   /* clears the fixed header */
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, p { margin: 0; }

button { font: inherit; }

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

/* ---------- shared ---------- */

.container {
  width: min(var(--container), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  padding: 10px 18px;
  background: var(--white); color: var(--orange);
  font-size: 15px; border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  padding-top: 14px;
  background: var(--orange);
  color: var(--white);
}

/* The hairline sits inside the container, so it lines up
   with the footer rule and brackets the page. */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
}

.logo img { height: 44px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav__link:hover,
.nav__link.is-active { border-bottom-color: currentColor; }

.nav__social {
  display: inline-flex;
  margin-left: 28px;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.nav__social:hover { opacity: 0.75; }

/* hamburger — hidden until the inline nav runs out of room */
.nav-toggle {
  display: none;
  width: 40px; height: 32px;
  padding: 6px 4px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle__bar {
  display: block; height: 2px; width: 100%;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;              /* keeps the blend inside the hero */
  min-height: 540px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--peach);
  color: var(--white);
  text-align: center;
  padding: 48px var(--gutter);
}

/* The source PNG is black line-art on white. Multiplying it over the
   peach drops the white out and softens the lines to brown — so one
   flat asset produces the finished look and the peach stays a token. */
.hero__art {
  position: absolute; inset: 0;
  background: url("../images/work/1_PortfolioBG-2000.jpg") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: var(--hero-art-opacity);
  pointer-events: none;
}

.hero__content { position: relative; z-index: 1; }

.hero__title {
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.hero__subtitle {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 300;
}

.hero__scroll {
  display: inline-block;
  margin-top: 26px;
  color: var(--white);
  transition: transform 0.25s ease;
}
.hero__scroll:hover { transform: translateY(4px); }

/* =========================================================
   Work grid
   ========================================================= */

.work { padding: 40px 0 110px; }

.work__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--grid-gap);
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f1f1f1;
}

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

/* Placeholder hover — a slow zoom under a faint warm wash.
   Swap for a title overlay once the project pages exist. */
.card::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover img,
.card:focus-visible img { transform: scale(1.04); }
.card:hover::after,
.card:focus-visible::after { opacity: 0.12; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding-top: 8px;
  background: var(--orange);
  color: var(--white);
}

.footer__inner {
  padding: 52px 0 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  text-align: center;
}

.footer__logo img {
  height: 52px; width: auto;
  margin: 0 auto;
}

.footer__email { margin-top: 30px; font-size: 17px; font-weight: 300; }
.footer__email a { border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.footer__email a:hover { border-bottom-color: currentColor; }

.footer__resume { margin-top: 26px; font-size: 17px; }
.footer__resume a { border-bottom: 1px solid currentColor; }

/* =========================================================
   Page title — the orange panel that hangs off the header.
   Shared by About / Contact / Resume.
   ========================================================= */

.page-title__panel {
  width: min(1010px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
  min-height: 138px;
  padding: 24px var(--gutter);
  display: grid;
  place-items: center;
  background: var(--orange);
  border-radius: 0 0 44px 44px;
  color: var(--white);
  text-align: center;
}

.page-title__text {
  font-size: clamp(38px, 4.4vw, 60px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* =========================================================
   About
   ========================================================= */

.about { padding: 76px 0 96px; }

/* Sits in a slightly wider frame than the header rule — matching
   the reference, where the card and photo reach further out. */
.about__inner {
  width: min(1400px, 100% - 60px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.78fr 1fr;
  gap: 60px;
  align-items: stretch;
}

.about__card {
  padding: 44px 40px;
  background: var(--peach-tint);
  border-radius: 20px;
  color: var(--orange);
}

.about__heading {
  margin-bottom: 28px;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
}

.about__card p {
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}
.about__card p + p { margin-top: 22px; }

.about__photo {
  border-radius: 20px;
  overflow: hidden;
  background: #e9e9e9;
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   Project detail — placeholder only, pending the real design
   ========================================================= */

.project { padding: 76px 0 96px; }

.project__cover {
  width: 100%;
  max-width: 800px;      /* the cover is only rendered at 800px */
  margin: 0 auto;
  border-radius: 20px;
}

.project__note {
  margin-top: 28px;
  text-align: center;
  font-size: 16px;
  color: #8a8a8a;
}

/* =========================================================
   Contact
   ========================================================= */

.contact { padding: 76px 0 96px; }

.contact__card {
  width: min(760px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
  padding: 52px 40px;
  background: var(--peach-tint);
  border-radius: 20px;
  color: var(--orange);
  text-align: center;
}

.contact__intro {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

.contact__list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.contact__link {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact__link:hover,
.contact__link:focus-visible { border-bottom-color: currentColor; }

/* =========================================================
   Resume — a rendered page image plus the PDF behind it
   ========================================================= */

.resume { padding: 60px 0 96px; }

.resume__inner {
  width: min(940px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
  text-align: center;
}

.resume__intro {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 300;
}

.resume__download {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--orange);
  color: var(--white);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.resume__download:hover { background: #d24d1b; }
.resume__download:active { transform: translateY(1px); }

/* The sheet is white on a white page, so the peach frame is what gives it
   an edge — the same card fill About and Contact use. */
.resume__paper {
  margin: 44px 0 0;
  padding: 20px;
  background: var(--peach-tint);
  border-radius: 20px;
}

.resume__sheet { display: block; }

.resume__sheet img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 18px rgba(26, 26, 26, 0.14);
}

/* Grey rather than the brand orange: at 14px on the peach fill, orange
   only reaches 3:1 against the background. */
.resume__caption {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 300;
  color: #5c5c5c;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  .work__grid { grid-template-columns: repeat(4, 1fr); }
}

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

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

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 var(--gutter);
    background: var(--orange);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.is-open { max-height: 340px; }

  .nav__link,
  .nav__social {
    width: 100%;
    margin-left: 0;
    padding: 16px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }
  .nav__link.is-active { border-bottom-color: rgba(255, 255, 255, 0.25); font-weight: 500; }
  .nav__social { border-bottom: 0; }

  .hero { min-height: 420px; }
  .work { padding: 32px 0 72px; }
  .work__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .footer__inner { padding: 40px 0 48px; }
}

/* ---------- About / page title ---------- */

@media (max-width: 1000px) {
  .about { padding: 56px 0 72px; }
  .about__inner {
    width: min(1400px, 100% - (var(--gutter) * 2));
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about__heading { font-size: 38px; margin-bottom: 20px; }
}

@media (max-width: 760px) {
  .page-title__panel {
    min-height: 104px;
    border-radius: 0 0 28px 28px;
  }
  .about__card { padding: 32px 26px; }
}

/* ---------- Contact ---------- */

@media (max-width: 760px) {
  .contact { padding: 48px 0 72px; }
  .contact__card { padding: 36px 26px; }
  .contact__intro { font-size: 16px; }
}

/* ---------- Resume ---------- */

@media (max-width: 760px) {
  .resume { padding: 44px 0 72px; }
  .resume__intro { font-size: 16px; }
  .resume__download { font-size: 16px; padding: 13px 24px; }
  .resume__paper { margin-top: 32px; padding: 12px; border-radius: 14px; }
}
