/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --color-bg:         #F3F4EF;
  --color-text:       #1C2920;
  --color-green:      #020252;
  --color-coral:      #F26B6B;
  --color-sage:       #6B8070;
  --color-divider:    #D6CFC6;

  --font-display:     'Spectral', Georgia, serif;
  --font-sans:        'Inter', system-ui, sans-serif;

  --max-width:        720px;
  --section-pad:      5.75rem 1.5rem;
  --nav-height:       3.5rem;

  --ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background-color: var(--color-coral);
  color: #fff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-coral);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-green);
  text-wrap: balance;
  letter-spacing: 0;
}

p {
  max-width: 65ch;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-green);
  border-bottom: 3px solid var(--color-coral);
  height: var(--nav-height);
  padding: 0 1.5rem;
}

/* Home page nav: no name, so right-align the links */
.nav-index .nav-inner {
  justify-content: flex-end;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-name:hover {
  color: var(--color-coral);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-coral);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #fff;
  cursor: pointer;
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--color-green);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .nav-links.is-open {
    display: flex;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(180deg, #010140 0%, #020252 55%, #03035e 100%);
  padding: 2.25rem 1.5rem 2.75rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-photo {
  flex-shrink: 0;
  order: 2;
}

.hero-graphic {
  flex-shrink: 0;
  order: 2;
  width: 210px;
  height: 210px;
  overflow: hidden;
  border-radius: 3px;
  opacity: 0.9;
  /* no entrance animation — appears immediately */
}

.hero-graphic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-photo img {
  width: 130px;
  height: 130px;
  border-radius: 4px;
  object-fit: cover;
  opacity: 0.92;
}

.photo-placeholder {
  display: none;
  width: 130px;
  height: 130px;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  align-items: center;
  justify-content: center;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  max-width: 52ch;
  margin-bottom: 0.85rem;
  line-height: 1.6;
  letter-spacing: 0;
}

.hero-status {
  font-size: 0.875rem;
  color: var(--color-coral);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-social a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-green);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.hero-social a:hover {
  color: var(--color-coral);
  border-color: var(--color-coral);
  text-decoration: none;
}

@media (max-width: 600px) {
  .hero-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-photo {
    order: 0;
  }

  .hero-graphic {
    display: none;
  }
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section {
  border-bottom: 1px solid var(--color-coral);
  padding: var(--section-pad);
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

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

.section-label {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--color-green);
  margin-bottom: 1.25rem;
  letter-spacing: 0;
}

.section-label::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 2px;
  background-color: var(--color-coral);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* JS adds .reveal-js-ready to hide before observer fires */
.reveal-js-ready {
  opacity: 0;
}

.reveal-js-ready.is-visible {
  animation: revealUp 0.65s var(--ease-out-expo) forwards;
}

.section-content p {
  font-size: 0.95rem;
}

.section-content p + p {
  margin-top: 1rem;
}

/* ============================================================
   CURRENT WORK
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-green);
  margin-bottom: 0.25rem;
}

.work-org {
  font-size: 0.85rem;
  color: var(--color-sage);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.work-item p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .work-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================================
   WRITING & PROJECTS
   ============================================================ */
.writing-item {
  padding: 2rem 0;
  border-top: 1px solid var(--color-divider);
}

.writing-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.writing-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.writing-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-green);
}

.writing-title::after {
  content: '';
  display: block;
  width: 1.75rem;
  height: 2px;
  background-color: var(--color-coral);
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

.writing-meta {
  font-size: 0.8rem;
  color: var(--color-sage);
  font-weight: 400;
}

.writing-item p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* Substack side-by-side */
.substack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 0;
}

.substack-card {
  background-color: var(--color-divider);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}

.substack-card:hover {
  box-shadow: 0 3px 14px rgba(242, 107, 107, 0.13);
}

.substack-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-green);
  margin-bottom: 0.4rem;
}

.substack-card p {
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  max-width: none;
}

.card-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.substack-card .btn {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
}

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

/* Books */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 0;
}

.book {
  padding-left: 1rem;
  border-left: 2px solid var(--color-coral);
}

.book-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-green);
}

.book-desc {
  font-size: 0.95rem;
  color: var(--color-text);
  max-width: 55ch;
  margin-bottom: 0.75rem;
}

.book-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   RESOURCES
   ============================================================ */
.resource-list {
  display: flex;
  flex-direction: column;
}

.resource-item {
  padding: 2rem 0;
  border-top: 1px solid var(--color-divider);
}

.resource-item:first-child {
  border-top: none;
  padding-top: 0;
}

.resource-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.resource-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-green);
}

.resource-meta {
  font-size: 0.8rem;
  color: var(--color-sage);
  font-weight: 400;
  white-space: nowrap;
}

.resource-item p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-coral);
  color: #fff;
  border: 1.5px solid var(--color-coral);
}

.btn-primary:hover {
  background-color: #d45757;
  border-color: #d45757;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(242, 107, 107, 0.25);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-coral);
  border: 1.5px solid var(--color-coral);
}

.btn-outline:hover {
  background-color: var(--color-coral);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 600px) {
  .btn {
    display: block;
    text-align: center;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2rem 1.5rem;
}

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

.footer span {
  font-size: 0.8rem;
  color: var(--color-sage);
}
