/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #241C15;
  --bg-soft: #2C2216;
  --paper: #F4EBD9;
  --paper-shadow: #DDCDA8;
  --ink: #2A2015;
  --cream: #EFE6D6;
  --muted: #B6A98F;
  --rust: #C1602E;
  --gold: #E0A73B;
  --pine: #4A7360;

  --font-display: 'Gloock', serif;
  --font-body: 'Karla', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1100px;
  --section-padding: clamp(4rem, 10vh, 8rem) clamp(1.25rem, 5vw, 3rem);
  --gap: clamp(1rem, 3vw, 2rem);

  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--rust);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background-color: var(--rust);
  color: var(--paper);
}

ul, ol {
  list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--paper);
  line-height: 1.15;
  font-weight: 400;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  max-width: 65ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding: var(--section-padding);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.section--short {
  min-height: auto;
  padding-top: clamp(3rem, 6vh, 5rem);
  padding-bottom: clamp(3rem, 6vh, 5rem);
}

.section__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--alt {
  background-color: var(--bg-soft);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--transition-medium), box-shadow var(--transition-medium);
}

.nav--scrolled {
  background-color: rgba(36, 28, 21, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(239, 230, 214, 0.08);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav__wordmark span {
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--rust);
  transition: width var(--transition-medium);
}

.nav__link:hover,
.nav__link--active {
  color: var(--paper);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav__toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--cream);
  margin: 5px 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav__toggle--open .nav__toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle--open .nav__toggle-line:nth-child(2) {
  opacity: 0;
}

.nav__toggle--open .nav__toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);
    background-color: var(--bg-soft);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  }

  .nav__links--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1rem;
  }

  .nav__overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
    z-index: 99;
  }

  .nav__overlay--visible {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-padding);
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.hero__content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero__text {
  z-index: 2;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--paper);
  line-height: 0.95;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero__name span {
  color: var(--gold);
}

.hero__tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--muted);
  letter-spacing: 0.08em;
  min-height: 1.5em;
}

.hero__tagline-word {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero__tagline-word--entering {
  opacity: 0;
  transform: translateY(8px);
}

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

.hero__portrait-img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(20%) contrast(1.05);
  margin-left: auto;
}

.hero__portrait-frame {
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: 8px;
  left: 8px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  opacity: 0.3;
  pointer-events: none;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  animation: float 2.5s ease-in-out infinite;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 768px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__portrait {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .hero__portrait-img {
    max-width: 250px;
    margin: 0 auto;
  }

  .hero__portrait-frame {
    display: none;
  }
}

/* ===== WELCOME / BIO PREVIEW ===== */
.welcome {
  padding: var(--section-padding);
}

.welcome__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.welcome__quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--paper);
  line-height: 1.5;
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.welcome__bio p {
  font-size: 1.05rem;
  color: var(--cream);
  line-height: 1.8;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--rust);
  margin-top: 1.5rem;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.section-link:hover {
  gap: 0.75rem;
  color: var(--gold);
}

.section-link__arrow {
  transition: transform var(--transition-fast);
}

.section-link:hover .section-link__arrow {
  transform: translateX(3px);
}

/* ===== WRITING PREVIEW ===== */
.writing-preview {
  padding: var(--section-padding);
  background-color: var(--bg-soft);
}

.writing-preview__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.writing-preview__list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.post-card {
  border-left: 2px solid var(--rust);
  padding-left: clamp(1rem, 3vw, 2rem);
  transition: border-color var(--transition-fast);
}

.post-card:hover {
  border-color: var(--gold);
}

.post-card__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.post-card__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  background-color: rgba(74, 115, 96, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--paper);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--gold);
}

.post-card__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.post-card__excerpt {
  color: var(--cream);
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 55ch;
}

/* ===== PORTFOLIO PREVIEW ===== */
.portfolio-preview {
  padding: var(--section-padding);
}

.portfolio-preview__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-preview__tracks {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.track-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid rgba(239, 230, 214, 0.06);
  border-radius: 4px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.track-card:hover {
  border-color: rgba(193, 96, 46, 0.3);
  background-color: rgba(44, 34, 22, 0.5);
}

.track-card__number {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.4;
  line-height: 1;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.track-card__content {
  flex: 1;
}

.track-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--paper);
  margin-bottom: 0.35rem;
}

.track-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 50ch;
}

/* ===== SHELF (READING + LISTENING) ===== */
.shelf {
  padding: var(--section-padding);
  background-color: var(--bg-soft);
}

.shelf__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.shelf__grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
}

.shelf__column h3 {
  font-family: var(--font-display);
  margin-bottom: 1.25rem;
}

/* ===== GOODREADS WIDGET OVERRIDES =====
   The Goodreads custom widget injects its own markup with hardcoded white
   background, black text, and a fixed 300px width. These rules pull it back
   into the site palette.

   Selectors match on class PREFIX rather than the full class name, because
   Goodreads appends a per-widget numeric ID (gr_custom_container_1784999268).
   Regenerating the widget changes that ID; matching the prefix survives it.
   Keep it that way. */

[class^="gr_custom_container_"] {
  background-color: transparent !important;
  color: var(--cream) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  font-family: var(--font-body);
}

/* The widget prints its own "Acquah's bookshelf: read" heading, which
   duplicates the "Reading" heading already on the page. */
[class^="gr_custom_header_"] {
  display: none !important;
}

[class^="gr_custom_each_container_"] {
  width: 100% !important;
  clear: both;
  overflow: auto;
  margin-bottom: 0 !important;
  padding: 0.75rem 0 !important;
  border-bottom: 1px solid rgba(239, 230, 214, 0.06) !important;
}

[class^="gr_custom_each_container_"]:last-of-type {
  border-bottom: none !important;
}

[class^="gr_custom_book_container_"] {
  float: left;
  width: 44px !important;
  height: auto !important;
  overflow: visible !important;
  margin-right: 0.85rem !important;
}

/* Goodreads serves inconsistent thumbnail crops (_SY75_, _SX50_), so covers
   arrive at different aspect ratios. Force a uniform book shape so the
   column lines up. */
[class^="gr_custom_book_container_"] img {
  width: 100%;
  height: 66px;
  object-fit: cover;
  object-position: top center;
  border-radius: 2px;
  background-color: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[class^="gr_custom_title_"] {
  font-size: 0.9rem;
  line-height: 1.4;
  padding-top: 0.15rem;
}

[class^="gr_custom_title_"] a {
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

[class^="gr_custom_title_"] a:hover {
  color: var(--gold);
}

[class^="gr_custom_author_"] {
  font-family: var(--font-mono);
  font-size: 0.72rem !important;
  color: var(--muted);
  margin-top: 0.15rem;
}

[class^="gr_custom_author_"] a {
  color: var(--muted);
}

[class^="gr_custom_author_"] a:hover {
  color: var(--cream);
}

[class^="gr_custom_tags_"] {
  font-family: var(--font-mono);
  font-size: 0.68rem !important;
  color: var(--muted) !important;
}

[class^="gr_custom_rating_"] {
  float: right;
  margin-left: 0.5rem;
}

/* Goodreads ships red star PNGs. Warm them slightly toward the gold accent
   and dim the unfilled ones so they recede on the dark background. */
[class^="gr_custom_rating_"] img {
  width: 12px;
  height: 12px;
  opacity: 0.85;
}

/* The Goodreads wordmark the widget appends at the bottom. */
[id^="gr_custom_widget_"] center img {
  opacity: 0.35;
  transition: opacity var(--transition-fast);
}

[id^="gr_custom_widget_"] center img:hover {
  opacity: 0.6;
}

[id^="gr_custom_widget_"] noscript {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Spotify embed container */
.spotify-container {
  border-radius: 12px;
  overflow: hidden;
}

.spotify-container iframe {
  width: 100%;
  border: none;
}

@media (max-width: 768px) {
  .shelf__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SUBSCRIBE SECTION ===== */
.subscribe {
  padding: var(--section-padding);
  text-align: center;
}

.subscribe__inner {
  max-width: 500px;
  margin: 0 auto;
}

.subscribe__form {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.subscribe__input {
  flex: 1;
  padding: 0.85rem 1rem;
  background-color: var(--bg-soft);
  border: 1px solid rgba(239, 230, 214, 0.12);
  border-radius: 4px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.subscribe__input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.subscribe__input:focus {
  border-color: var(--rust);
  outline: none;
}

.subscribe__btn {
  padding: 0.85rem 1.75rem;
  background-color: var(--rust);
  color: var(--paper);
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.subscribe__btn:hover {
  background-color: #D4713A;
  transform: translateY(-1px);
}

.subscribe__note {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .subscribe__form {
    flex-direction: column;
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid rgba(239, 230, 214, 0.06);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__left {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer__socials {
  display: flex;
  gap: 1.5rem;
}

.footer__social-link {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__social-link:hover {
  color: var(--paper);
}

.footer__colophon {
  width: 100%;
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(239, 230, 214, 0.04);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.6;
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== ABOUT PAGE ===== */
.page-header {
  padding: clamp(6rem, 15vh, 10rem) clamp(1.25rem, 5vw, 3rem) clamp(2rem, 5vh, 4rem);
}

.page-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header__title {
  margin-bottom: 0.75rem;
}

.page-header__subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 50ch;
}

/* Bio section */
.bio {
  padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 5vw, 3rem);
}

.bio__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.bio__text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.bio__photo {
  position: sticky;
  top: 6rem;
}

.bio__photo img {
  width: 100%;
  border-radius: 4px;
  filter: grayscale(20%) contrast(1.05);
}

@media (max-width: 768px) {
  .bio__inner {
    grid-template-columns: 1fr;
  }

  .bio__photo {
    position: static;
    order: -1;
    max-width: 300px;
    margin: 0 auto 2rem;
  }
}

/* What I believe */
.beliefs {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
  background-color: var(--bg-soft);
}

.beliefs__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.beliefs__quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--paper);
  line-height: 1.6;
  max-width: 55ch;
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
}

/* Places horizontal scroll */
.places {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
}

.places__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.places__scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-soft) transparent;
}

.places__scroll::-webkit-scrollbar {
  height: 4px;
}

.places__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.places__scroll::-webkit-scrollbar-thumb {
  background: var(--bg-soft);
  border-radius: 2px;
}

.place-card {
  flex: 0 0 auto;
  min-width: 160px;
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-soft);
  border-radius: 4px;
  border: 1px solid rgba(239, 230, 214, 0.06);
  scroll-snap-align: start;
  transition: border-color var(--transition-fast);
}

.place-card:hover {
  border-color: rgba(224, 167, 59, 0.2);
}

.place-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--paper);
}

.place-card__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Career timeline */
.career {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
  background-color: var(--bg-soft);
}

.career__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.career__timeline {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.career__timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--rust), var(--gold), var(--pine));
  opacity: 0.3;
}

.career-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  position: relative;
}

.career-item__logo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background-color: var(--bg);
  border: 1px solid rgba(239, 230, 214, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  z-index: 1;
}

.career-item__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.career-item__logo-placeholder {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--muted);
}

.career-item__content {
  flex: 1;
  padding-top: 0.15rem;
}

.career-item__years {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.career-item__role {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper);
  font-weight: 600;
  margin: 0.15rem 0;
}

.career-item__org {
  font-size: 0.9rem;
  color: var(--cream);
  opacity: 0.8;
}

.career-item__type {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.career-item__type--education {
  color: var(--gold);
  background-color: rgba(224, 167, 59, 0.12);
}

.career-item__type--work {
  color: var(--rust);
  background-color: rgba(193, 96, 46, 0.12);
}

.career-item__type--research {
  color: var(--pine);
  background-color: rgba(74, 115, 96, 0.15);
}

.career-item__type--teaching {
  color: var(--cream);
  background-color: rgba(239, 230, 214, 0.08);
}

.career-item__type--fellowship {
  color: var(--gold);
  background-color: rgba(224, 167, 59, 0.12);
}

/* Right now */
.right-now {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
}

.right-now__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== WRITING PAGE ===== */
.writing-feed {
  padding: clamp(2rem, 4vh, 3rem) clamp(1.25rem, 5vw, 3rem);
}

.writing-feed__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.writing-feed__list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.article-card {
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(239, 230, 214, 0.06);
}

.article-card:last-child {
  border-bottom: none;
}

.article-card__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.article-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--paper);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card__title a {
  color: inherit;
}

.article-card__title a:hover {
  color: var(--gold);
}

.article-card__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.article-card__excerpt {
  font-size: 1rem;
  color: var(--cream);
  line-height: 1.7;
  max-width: 60ch;
  opacity: 0.85;
}

.article-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--rust);
  margin-top: 1rem;
}

/* ===== PORTFOLIO PAGE ===== */
.portfolio-track {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
}

.portfolio-track:nth-child(even) {
  background-color: var(--bg-soft);
}

.portfolio-track__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-track__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.portfolio-track__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
}

.portfolio-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(239, 230, 214, 0.04);
}

.portfolio-item:last-child {
  border-bottom: none;
}

.portfolio-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.portfolio-item__title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--paper);
  font-weight: 600;
}

.portfolio-item__title a {
  color: inherit;
}

.portfolio-item__title a:hover {
  color: var(--gold);
}

.portfolio-item__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.portfolio-item__year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.portfolio-item__status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.portfolio-item__status--active {
  color: var(--pine);
  background-color: rgba(74, 115, 96, 0.15);
}

.portfolio-item__status--inactive {
  color: var(--muted);
  background-color: rgba(182, 169, 143, 0.1);
}

.portfolio-item__status--concept {
  color: var(--gold);
  background-color: rgba(224, 167, 59, 0.1);
}

.portfolio-item__desc {
  font-size: 0.9rem;
  color: var(--cream);
  opacity: 0.8;
  margin-top: 0.5rem;
  max-width: 55ch;
}

.portfolio-item__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Expandable section */
.expandable {
  margin-top: 1rem;
}

.expandable__trigger {
  background: none;
  border: 1px solid rgba(239, 230, 214, 0.1);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.expandable__trigger:hover {
  border-color: var(--rust);
  color: var(--paper);
}

.expandable__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.expandable--open .expandable__content {
  max-height: 2000px;
}

/* Awards list */
.awards {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
}

.awards__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.awards__list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.award-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
}

.award-item__year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
  width: 3rem;
}

.award-item__name {
  font-size: 0.95rem;
  color: var(--cream);
}

/* Extracurriculars */
.extras {
  padding: clamp(3rem, 6vh, 5rem) clamp(1.25rem, 5vw, 3rem);
  background-color: var(--bg-soft);
}

.extras__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.extras__list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.extra-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.extra-item__year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 5rem;
  padding-top: 0.15rem;
}

.extra-item__content {
  flex: 1;
}

.extra-item__name {
  font-size: 0.95rem;
  color: var(--paper);
  font-weight: 600;
}

.extra-item__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ===== CONTACT PAGE ===== */
.contact-grid {
  padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 5vw, 3rem);
}

.contact-grid__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.contact-grid__note p {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 45ch;
}

.contact-grid__links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--gold);
}

.contact-link__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-soft);
  border: 1px solid rgba(239, 230, 214, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-link__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.1rem;
}

@media (max-width: 768px) {
  .contact-grid__inner {
    grid-template-columns: 1fr;
  }
}

/* ===== 404 PAGE ===== */
.four-oh-four {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.four-oh-four__inner {
  max-width: 500px;
}

.four-oh-four__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  color: var(--paper);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 1rem;
}

.four-oh-four__message {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--paper);
  margin-bottom: 1rem;
}

.four-oh-four__note {
  color: var(--muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background-color: var(--rust);
  color: var(--paper);
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  background-color: #D4713A;
  color: var(--paper);
  transform: translateY(-1px);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__scroll-hint {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ===== PAGE TRANSITIONS ===== */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fade-out 0.2s ease forwards;
}

::view-transition-new(root) {
  animation: fade-in 0.3s ease forwards;
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* ===== LOADING STATE ===== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, rgba(239, 230, 214, 0.05) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-muted { color: var(--muted); }
.text-rust { color: var(--rust); }
.text-gold { color: var(--gold); }
.text-pine { color: var(--pine); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ===== TOUCH TARGETS =====
   Anything tappable needs roughly 44px of height to be comfortable with a
   thumb. Several links were 23-27px. These rules add height via padding
   rather than font-size, so nothing looks bigger, it just catches taps.
   Applied on coarse pointers and narrow screens, not on desktop where a
   mouse is precise and the extra spacing would loosen the layout. */

@media (hover: none), (max-width: 768px) {
  .nav__toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav__link {
    display: block;
    padding: 0.6rem 0;
  }

  /* Inline "More about me →" style links */
  .section-link {
    padding: 0.65rem 0;
  }

  .footer__social-link {
    display: inline-block;
    padding: 0.8rem 0.4rem;
  }

  .footer__socials {
    gap: 1rem;
  }

  .nav__wordmark {
    display: inline-block;
    padding: 0.5rem 0;
  }

  /* Book title and author links inside the Goodreads widget */
  [class^="gr_custom_title_"] a,
  [class^="gr_custom_author_"] a {
    display: inline-block;
    padding: 0.7rem 0;
  }

  /* Portfolio and writing links sit inside headings, so pad the anchor */
  .portfolio-item__title a,
  .post-card__title a,
  .article-card__title a {
    display: inline-block;
    padding: 0.2rem 0;
  }

  .article-card__read-more {
    padding: 0.5rem 0;
  }
}
