:root {
  --bg: #fdf7fa;
  --panel: rgba(255, 255, 255, 0.8);
  --text: #111f35;
  --muted: #8a244b;
  --line: rgba(17, 31, 53, 0.15);
  --accent: #d02752;
  --accent-soft: rgba(208, 39, 82, 0.14);
  --shadow: 0 16px 40px rgba(17, 31, 53, 0.1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 18%, rgba(246, 48, 73, 0.18) 0%, transparent 44%),
    radial-gradient(circle at 88% 6%, rgba(208, 39, 82, 0.2) 0%, transparent 46%), var(--bg);
  background-size: 140% 140%, 140% 140%, auto;
  animation: gradient-breathe 26s ease-in-out infinite alternate;
  color: var(--text);
  font-family: "Quicksand", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.55;
  position: relative;
}

body.writing-page {
  font-size: 1.1rem;
}

body.writing-page h2 {
  font-size: 2.46rem;
}

#work > .panel-header > h2,
#writing > .panel-header > h2 {
  font-size: 1.9rem;
}

body.writing-page h3 {
  font-size: 2.06rem;
}

body.writing-page #writing .item h3 {
  font-size: 1.25rem;
}

body.writing-page #writing .warren-subtitle {
  max-width: 64ch;
  margin: 7px auto 0;
  padding: 0 16px;
}

strong {
  font-weight: 700;
}

.floating-squares {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  filter: saturate(110%);
  will-change: transform, opacity;
}

.page,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-title {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 18px;
}

.site-title-logo {
  display: block;
  width: auto;
  max-width: min(100%, 788px);
  height: clamp(82.5px, 14.0625vw, 160px);
  aspect-ratio: 1408 / 768;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.site-title:hover .site-title-logo {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

.site-title:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

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

.candy-red {
  background: radial-gradient(
    circle at 30% 30%,
    #ff6666 0%,
    #b30000 70%,
    #660000 100%
  );
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1.08rem;
  transition: color 0.2s ease;
}

.site-nav .nav-disabled {
  color: var(--muted);
  font-size: 1.08rem;
  opacity: 0.55;
  cursor: default;
}

.site-nav a:hover {
  color: var(--accent);
}

.page {
  width: min(940px, 92vw);
  margin: 20px auto 44px;
  display: grid;
  gap: 20px;
}

body.home .page > .hero {
  grid-column: 1 / -1;
}

body.home #work .panel-header,
body.home #writing .panel-header {
  align-items: flex-start;
  text-align: left;
}

body.home #work .item-title-row,
body.home #writing .item-title-row {
  justify-content: flex-start;
  text-align: left;
}

body.home #work h3,
body.home #writing h3 {
  text-align: left;
}

body.home #work .item p,
body.home #writing .item p {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

body.home #work .subtitle-list,
body.home #writing .subtitle-list,
body.home #work .subtitle-list li,
body.home #writing .subtitle-list li {
  text-align: left;
}

.top-hero {
  position: sticky;
  top: 12px;
  z-index: 20;
}

.top-hero.candy-red {
  background: radial-gradient(
    circle at 30% 30%,
    #ff6666 0%,
    #b30000 70%,
    #660000 100%
  );
  border-color: rgba(255, 255, 255, 0.18);
}

.top-hero.candy-red .site-nav a {
  color: #ffe3e3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.top-hero.candy-red .site-nav .nav-disabled {
  color: #ffe3e3;
  opacity: 0.65;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.top-hero.candy-red .site-nav a:hover {
  color: #ffffff;
}

.top-hero.candy-red .social-icon {
  color: #ffe9e9;
}

.top-hero.candy-red .social-icon:hover {
  color: #ffffff;
}

.top-hero.candy-red .social-icon:focus-visible {
  outline-color: #ffffff;
}

.hero.top-hero {
  padding: 31px 27px;
}

.top-hero-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  grid-template-areas: "nav logo social";
  justify-content: stretch;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  width: 100%;
}

.top-hero-row > * {
  min-width: 0;
}

.top-hero-row .site-nav {
  grid-area: nav;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.top-hero-row .site-title {
  grid-area: logo;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.top-hero-row .header-social {
  grid-area: social;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero {
  padding: 34px 30px;
}

.kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  font-family: "Quicksand", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  text-align: center;
}

.lead {
  margin: 14px 0 0;
  font-size: clamp(1.03rem, 2.2vw, 1.17rem);
  color: var(--muted);
  max-width: 760px;
  text-align: center;
}

.social-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-social {
  margin-top: 0;
  flex-direction: column;
  gap: 12px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-icon:hover {
  transform: translateY(-1px);
  color: var(--accent);
}

.social-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 6px;
}

.panel {
  padding: 24px 24px 14px;
}

.panel-narrow {
  width: min(560px, 100%);
  justify-self: center;
}

.media-caption {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.panel-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: 1.23rem;
  font-family: "Quicksand", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  text-align: center;
}

.panel-header a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.92rem;
}

.panel-header + p {
  text-align: center;
}

.item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

#work .item,
#writing .item {
  padding: 20px 0;
}

.item-title-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
}

h3 {
  margin: 0;
  font-size: 1.03rem;
  text-align: center;
}

.item-title-row a {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 39, 82, 0.28);
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.item-title-row a:hover {
  background: rgba(208, 39, 82, 0.22);
  border-color: rgba(208, 39, 82, 0.45);
  transform: translateY(-1px);
}

.item-title-row a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.item p {
  margin: 7px 0 0;
  color: var(--muted);
  text-align: center;
}

#work .item p,
#writing .item p {
  margin-top: 12px;
  width: fit-content;
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

#work .item .subtitle-list,
#writing .item .subtitle-list {
  margin: 4px 0 0;
  padding-left: 0;
  list-style-position: inside;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

#work .item .subtitle-list li,
#writing .item .subtitle-list li {
  margin: 3px 0;
  text-align: center;
}

.item-title-row p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
}

.site-footer {
  width: min(940px, 92vw);
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 0.88rem;
}

.reveal {
  animation: fade-up 0.65s ease both;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 200ms;
}

.delay-3 {
  animation-delay: 280ms;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradient-breathe {
  0% {
    background-position: 0% 0%, 100% 0%, 0 0;
  }
  100% {
    background-position: 14% 12%, 86% 10%, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 820px) {
  body.home .page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body.home #work {
    grid-column: 1;
  }

  body.home #writing {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .top-hero {
    top: 8px;
    padding: 14px 14px;
  }

  .site-title {
    width: auto;
  }

  .site-title-logo {
    max-width: min(100%, 563px);
    height: clamp(70px, 18.75vw, 120px);
    border-radius: 12px;
  }

  .hero {
    padding: 24px 20px;
  }

  .hero.top-hero {
    padding: 22px 18px;
  }

  .panel {
    padding: 18px 16px 10px;
  }
}

@media (max-width: 900px) {
  .top-hero-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "nav"
      "social";
    gap: 10px;
  }

  .top-hero-row .site-title,
  .top-hero-row .site-nav,
  .top-hero-row .header-social {
    grid-column: 1;
  }

  .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .header-social {
    flex-direction: row;
    gap: 16px;
  }
}
