/* ==========================================================================
   Trumpore for Watchung Hills BOE
   ========================================================================== */

:root {
  --brown: #502c1e;
  --yellow: #ffd100;
  --white: #fff;
  --black: #000;
  --brown-muted: rgb(80 44 30 / 0.72);
  --brown-rule: rgb(80 44 30 / 0.16);

  /* Brown outline shared by the headshot and the photo collages. */
  --photo-outline: 4px;

  --font-slab: "Roboto Slab", Georgia, "Times New Roman", serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Nav bar height. It doesn't change when the nav docks, so nothing below it shifts. */
  --nav-h: 4.625rem;
}

@media (max-width: 800px) {
  :root {
    --nav-h: 3.75rem;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--brown);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  color: var(--brown);
  font-weight: 600;
  border-radius: 0 0 0.4rem 0.4rem;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

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

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(2.25rem, 4.4vw, 3.7rem) 1rem clamp(1.5rem, 4.4vw, 4.2rem);
  background: var(--brown);
  color: var(--yellow);
  text-align: center;
  overflow: hidden;
}

.hero__title {
  margin: 0;
  font-family: var(--font-slab);
  font-weight: 400;
  line-height: 1;
}

.hero__title > span {
  display: block;
}

.hero__first {
  position: relative;
  width: fit-content;
  margin-inline: auto;
  font-size: clamp(1.3rem, 4.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.hero__reelect {
  position: absolute;
  right: 100%;
  bottom: 98%;
  margin-right: -0.03em;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.8em;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 0.12em 0.3em rgb(0 0 0 / 0.55);
  transform: rotate(-14deg);
  transform-origin: 100% 100%;
}

.hero__last {
  margin-top: -0.035em;
  padding-left: 0.075em; /* balances the trailing letter-spacing so the word centers optically */
  font-size: clamp(2.5rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.075em;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero__office {
  margin-top: -0.065em;
  padding-left: 0.045em;
  font-size: clamp(1.4rem, 7vw, 3.8rem);
  letter-spacing: 0.045em;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Nav: yellow bar under the hero, compact brown header once docked
   -------------------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--yellow);
  color: var(--brown);
  font-family: var(--font-serif);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.site-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4.1vw, 3.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__links a {
  display: block;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  color: inherit;
  font-size: clamp(1rem, 0.13rem + 1.86vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__links a:hover {
  border-bottom-color: currentColor;
}

/* Brand lockup: only shown once the nav is docked. */
.site-nav__brand {
  position: absolute;
  top: 50%;
  left: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  color: var(--yellow);
  font-family: var(--font-slab);
  line-height: 1.2;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%);
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.site-nav__brand-top {
  font-size: clamp(1.1rem, 0.9rem + 0.45vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav__brand-bottom {
  font-size: clamp(0.85rem, 0.75rem + 0.3vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.site-nav__toggle {
  display: none;
}

/* Docked: compact brown header with the brand on the left and links on the right. */

.site-nav.is-stuck {
  background: var(--brown);
  color: var(--yellow);
  box-shadow: 0 0.25rem 1rem rgb(0 0 0 / 0.3);
}

.site-nav.is-stuck .site-nav__inner {
  justify-content: flex-end;
}

.site-nav.is-stuck .site-nav__brand {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease 0.1s, visibility 0s;
}

@media (min-width: 801px) {
  .site-nav.is-stuck .site-nav__links {
    gap: clamp(1rem, 2.4vw, 2.25rem);
  }

  .site-nav.is-stuck .site-nav__links a {
    font-size: clamp(0.9rem, 0.55rem + 0.6vw, 1.15rem);
    letter-spacing: 0.05em;
  }
}

/* Mobile and small tablet: the links live in a hamburger menu. */

@media (max-width: 800px) {
  .site-nav__inner {
    padding-inline: 1rem;
  }

  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
  }

  .site-nav.is-stuck .site-nav__toggle {
    margin-right: -0.5rem;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 1rem 0.75rem;
    background: var(--brown);
    color: var(--yellow);
    box-shadow: 0 0.75rem 1rem rgb(0 0 0 / 0.3);
  }

  .site-nav.is-open .site-nav__links {
    display: flex;
  }

  .site-nav__links a {
    display: flex;
    align-items: center;
    min-height: 3.25rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgb(255 209 0 / 0.22);
    border-bottom: 0;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .site-nav__links li:first-child a {
    border-top: 0;
  }
}

.site-nav__bars,
.site-nav__bars::before,
.site-nav__bars::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, background-color 0.2s ease;
}

.site-nav__bars {
  position: relative;
}

.site-nav__bars::before,
.site-nav__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-nav__bars::before {
  top: -7px;
}

.site-nav__bars::after {
  top: 7px;
}

.site-nav.is-open .site-nav__bars {
  background: transparent;
}

.site-nav.is-open .site-nav__bars::before {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .site-nav__bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Intro: endorsement line, photo, first three paragraphs
   -------------------------------------------------------------------------- */

.endorsement {
  margin: 0;
  padding: clamp(0.9rem, 2.4vw, 1.75rem) 1rem 0;
  color: var(--black);
  font-size: clamp(1rem, 0.7rem + 1.3vw, 1.9rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 20.5rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 6.3vw, 5.7rem);
  width: min(73rem, calc(100% - 2 * clamp(1rem, 4vw, 2rem)));
  margin: clamp(1.75rem, 3.6vw, 2.75rem) auto 0;
}

.intro__photo {
  width: 100%;
  aspect-ratio: 1;
  border: var(--photo-outline) solid var(--brown);
  border-radius: 50%;
  object-fit: cover;
}

.intro__text p {
  margin: 0 0 1em;
  font-size: clamp(1.05rem, 0.85rem + 0.7vw, 1.5rem);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

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

@media (max-width: 800px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1.75rem;
  }

  .intro__photo {
    max-width: min(68vw, 16rem);
  }

  .intro__text {
    justify-self: stretch;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(3.25rem, 7vw, 5rem) 1.25rem 0;
}

.section__inner {
  max-width: 46rem;
  margin-inline: auto;
}

.section__inner--wide {
  max-width: 62rem;
}

.section__title {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  color: var(--brown);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-skip-ink: none;
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.28em;
}

.prose p {
  margin: 0 0 1.25em;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  letter-spacing: 0.01em;
  line-height: 1.75;
}

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

.prose h3 {
  margin: 2.25rem 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  /* text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-skip-ink: none;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.26em; */
}

/* --------------------------------------------------------------------------
   Photo collages
   One framed block: brown outline, rounded outer corners, brown lines between photos.
   -------------------------------------------------------------------------- */

.collage {
  display: grid;
  gap: var(--photo-outline);
  margin: 2.25rem 0;
  border: var(--photo-outline) solid var(--brown);
  border-radius: 1.5rem;
  background: var(--brown);
  overflow: hidden;
}

.collage__item {
  position: relative;
  min-width: 0;
}

.collage__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Layout: one tall photo beside two stacked landscapes (About Me).
   The two right-hand photos set the row height; the tall one stretches to match. */

.collage--feature {
  grid-template-columns: 8fr 9fr;
  grid-template-areas:
    "tall wide"
    "tall crop";
}

.collage--feature .collage__item--tall {
  grid-area: tall;
}

.collage--feature .collage__item--wide {
  grid-area: wide;
  aspect-ratio: 3 / 2;
}

.collage--feature .collage__item--crop {
  grid-area: crop;
  aspect-ratio: 3 / 2;
}

.collage--feature .collage__item--crop img {
  object-position: 50% 5%; /* keep both faces in the landscape crop */
}

/* Layout: two photos side by side over a full-width panorama (WHRHS BOE Experience).
   Each box uses its photo's width / height, and the column weights match those ratios,
   so the top two come out the same height and nothing is cropped. If you swap in
   different photos, update these numbers to their pixel sizes. */

.collage--rows {
  grid-template-columns: 1.115fr 1.483fr;
}

.collage--rows .collage__item--a {
  aspect-ratio: 670 / 601;
}

.collage--rows .collage__item--b {
  aspect-ratio: 1200 / 809;
}

.collage--rows .collage__item--c {
  grid-column: 1 / -1;
  aspect-ratio: 770 / 345;
}

@media (max-width: 520px) {
  .collage {
    border-radius: 1.1rem;
  }

  .collage--feature {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "wide wide"
      "tall crop";
  }

  .collage--feature .collage__item--tall,
  .collage--feature .collage__item--crop {
    aspect-ratio: 2 / 3;
  }

  .collage--feature .collage__item--crop img {
    object-position: 50% 50%;
  }

  .collage--rows {
    grid-template-columns: 1fr;
  }

  .collage--rows .collage__item--c {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  padding: 1rem 2.75rem 1rem 1.25rem;
  border: 2px solid var(--brown-rule);
  border-radius: 0.6rem;
  color: var(--brown);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--yellow);
  background: rgb(255 209 0 / 0.14);
}

.link-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

/* External-link arrow in the corner, drawn with a mask so screen readers don't announce it. */
.link-card::after {
  content: "";
  position: absolute;
  top: 1.2rem;
  right: 1.1rem;
  width: 0.8rem;
  height: 0.8rem;
  background: currentColor;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h8v8M13 3 3 13'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h8v8M13 3 3 13'/%3E%3C/svg%3E") center / contain no-repeat;
}

.link-card:hover::after,
.link-card:focus-visible::after {
  opacity: 1;
  transform: translate(2px, -2px);
}

.link-card__host {
  color: var(--brown-muted);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding: 1.75rem 1rem;
  background: var(--brown);
  color: var(--yellow);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
