/* =====================================================
   JACK WORRILL
   ABOUT PAGE STYLES
===================================================== */

/* =====================================================
   ROOT VARIABLES
===================================================== */

:root {
  --cream: #eadcc5;
  --dark: #111;
  --black: #080808;
  --gold: #c6a15c;

  --text: #171513;
  --muted-text: #554e45;
  --light-text: #aaa;

  --serif: "Cormorant Garamond", serif;
  --display: "Playfair Display", serif;
  --sans: "Inter", sans-serif;
}

/* =====================================================
   RESET
===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--text);

  font-family: var(--sans);

  line-height: 1.5;

  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

/* =====================================================
   ACCESSIBILITY
===================================================== */

a:focus-visible,
button:focus-visible,
img:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

::selection {
  background: var(--gold);
  color: var(--black);
}

/* =====================================================
   NAVIGATION
===================================================== */

.site-nav {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 85px;

  padding: 0 7%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(0, 0, 0, 0.55);

  color: white;

  z-index: 1000;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    height 0.3s ease;
}

/* Navigation after scrolling */

.site-nav.scrolled {
  height: 72px;

  background: rgba(8, 8, 8, 0.94);

  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.brand {
  font-family: var(--display);

  font-size: 1rem;

  font-weight: 600;

  letter-spacing: 4px;

  white-space: nowrap;
}

nav {
  display: flex;

  align-items: center;

  gap: 35px;
}

nav a {
  position: relative;

  font-family: var(--serif);

  font-size: 1.1rem;

  transition: color 0.25s ease;
}

nav a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -6px;

  width: 0;
  height: 1px;

  background: var(--gold);

  transition: width 0.25s ease;
}

nav a:hover {
  color: var(--gold);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a.active {
  color: var(--gold);
}

/* =====================================================
   MOBILE MENU BUTTON
===================================================== */

.menu-toggle {
  display: none;

  width: 42px;
  height: 42px;

  padding: 6px;

  border: 0;

  background: transparent;

  cursor: pointer;

  z-index: 1001;
}

.menu-toggle span {
  display: block;

  width: 27px;
  height: 1px;

  background: white;

  margin: 6px auto;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* =====================================================
   ABOUT HERO
===================================================== */

.about-hero {
  position: relative;

  min-height: 75vh;

  display: flex;

  align-items: flex-end;

  padding: 100px 8%;

  color: white;

  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.85)),
    url("../assets/author.jpg") center center / cover no-repeat;
}

.about-hero > div {
  position: relative;

  z-index: 2;

  max-width: 1000px;
}

.about-hero p {
  color: var(--gold);

  letter-spacing: 5px;

  font-size: 0.7rem;

  font-weight: 500;

  margin-bottom: 20px;
}

.about-hero h1 {
  font-family: var(--serif);

  font-size: clamp(5rem, 12vw, 10rem);

  font-weight: 300;

  line-height: 0.75;

  letter-spacing: -2px;
}

.about-hero em {
  display: block;

  color: var(--cream);

  font-style: italic;
}

/* =====================================================
   BIOGRAPHY
===================================================== */

.biography {
  max-width: 1200px;

  margin: auto;

  padding: 140px 7%;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 100px;

  align-items: center;
}

.author-photo {
  overflow: hidden;
}

.author-photo img {
  width: 100%;

  max-height: 650px;

  object-fit: cover;

  transition: transform 0.8s ease;
}

.author-photo:hover img {
  transform: scale(1.02);
}

.bio-content {
  min-width: 0;
}

.bio-content > span,
.philosophy span {
  display: inline-block;

  color: #92733f;

  letter-spacing: 4px;

  font-size: 0.7rem;

  font-weight: 500;
}

.bio-content h2 {
  font-family: var(--serif);

  font-size: clamp(3rem, 6vw, 5rem);

  line-height: 0.9;

  font-weight: 400;

  margin: 25px 0;
}

.line {
  width: 60px;

  height: 1px;

  background: var(--gold);

  margin: 30px 0;
}

.bio-content p {
  font-family: var(--serif);

  font-size: 1.25rem;

  line-height: 1.8;

  color: var(--muted-text);

  margin-bottom: 20px;

  max-width: 650px;
}

/* =====================================================
   WRITING PHILOSOPHY
===================================================== */

.philosophy {
  padding: 150px 7%;

  text-align: center;

  background: #151311;

  color: white;
}

.philosophy > div {
  max-width: 850px;

  margin: auto;
}

.philosophy span {
  color: var(--gold);
}

.philosophy h2 {
  font-family: var(--serif);

  font-size: clamp(3rem, 7vw, 6rem);

  font-weight: 300;

  line-height: 0.95;

  margin: 30px 0;

  letter-spacing: -1px;
}

.philosophy p {
  color: var(--light-text);

  font-family: var(--serif);

  font-size: 1.25rem;

  line-height: 1.8;

  max-width: 700px;

  margin: auto;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  background: var(--black);

  color: white;

  text-align: center;

  padding: 70px 20px;
}

.footer-brand {
  font-family: var(--display);

  font-size: 1rem;

  font-weight: 600;

  letter-spacing: 5px;
}

footer p {
  color: #888;

  margin-top: 15px;
}

.footer-links {
  display: flex;

  justify-content: center;

  align-items: center;

  flex-wrap: wrap;

  gap: 25px;

  margin-top: 30px;
}

.footer-links a {
  color: #aaa;

  font-family: var(--serif);

  font-size: 1rem;

  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.copyright {
  font-size: 0.7rem;

  margin-top: 40px;
}

/* =====================================================
   SCROLL REVEAL
===================================================== */

.scroll-reveal {
  opacity: 0;

  transform: translateY(30px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;

  transform: translateY(0);
}

/* =====================================================
   MOBILE NAVIGATION
===================================================== */

@media (max-width: 900px) {
  .site-nav {
    height: 75px;

    padding: 0 6%;
  }

  .site-nav.scrolled {
    height: 68px;
  }

  nav {
    position: fixed;

    top: 0;
    right: -100%;

    width: min(80%, 400px);

    height: 100vh;

    padding: 100px 30px;

    background: var(--black);

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 30px;

    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);

    transition: right 0.4s ease;
  }

  nav.open {
    right: 0;
  }

  nav a {
    font-size: 1.4rem;
  }

  .menu-toggle {
    display: block;
  }

  /* Animate hamburger into X */

  nav.open ~ .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  nav.open ~ .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  nav.open ~ .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .biography {
    grid-template-columns: 1fr;

    gap: 60px;

    padding: 110px 7%;
  }

  .author-photo img {
    max-height: 700px;
  }

  .philosophy {
    padding: 120px 7%;
  }
}

/* =====================================================
   TABLET
===================================================== */

@media (max-width: 700px) {
  .about-hero {
    min-height: 70vh;

    padding: 100px 7% 80px;
  }

  .about-hero h1 {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .biography {
    padding: 90px 7%;
  }

  .bio-content h2 {
    font-size: clamp(3rem, 12vw, 4.5rem);
  }

  .philosophy {
    padding: 100px 7%;
  }

  .philosophy h2 {
    font-size: clamp(3rem, 12vw, 5rem);
  }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {
  .site-nav {
    padding: 0 5%;
  }

  .brand {
    font-size: 0.85rem;

    letter-spacing: 3px;
  }

  nav {
    width: 100%;
  }

  .about-hero {
    min-height: 65vh;

    padding: 100px 6% 70px;
  }

  .about-hero p {
    font-size: 0.62rem;

    letter-spacing: 3px;
  }

  .about-hero h1 {
    font-size: clamp(3.8rem, 19vw, 6rem);

    letter-spacing: -1px;
  }

  .biography {
    padding: 75px 6%;
  }

  .bio-content p {
    font-size: 1.15rem;

    line-height: 1.7;
  }

  .philosophy {
    padding: 85px 6%;
  }

  .philosophy h2 {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  .philosophy p {
    font-size: 1.15rem;
  }

  .footer-links {
    gap: 15px;
  }
}

/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;
  }

  .scroll-reveal {
    opacity: 1;

    transform: none;
  }
}
