/* === BASE & RESET === */
:root {
  --color-primary: #005c59;
  --color-off-white: #f7f3ee;
  --color-pale-pink: #f1d4d9;
  --color-yellow: #e4e874;
  --color-text: #363636;
  --nav-height: 3.25rem;
  --transition-base: 0.25s ease;
  --font-heading: 'Playfair Display', Georgia, "Times New Roman", serif;
}

/* playfair-display-600 - latin */
@font-face {
  font-display: swap;
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/playfair-display-v40-latin-600.woff2') format('woff2');
}

/* playfair-display-800 - latin */
@font-face {
  font-display: swap;
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/playfair-display-v40-latin-800.woff2') format('woff2');
}

/* source-sans-3-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/source-sans-3-v19-latin-regular.woff2') format('woff2');
}

/* source-sans-3-600 - latin */
@font-face {
  font-display: swap;
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/source-sans-3-v19-latin-600.woff2') format('woff2');
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  padding-top: var(--nav-height); /* offset for fixed navbar */
  color: var(--color-text);
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.title {
  font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
}

/* === NAVBAR === */
.navbar {
  background: var(--color-off-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-logo {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  color: var(--color-primary) !important;
}

.site-logo:hover {
  background-color: #fff !important;
  color: var(--color-primary) !important;
}

.nav-link {
  font-weight: 400;
  color: var(--color-primary) !important;
  position: relative;
}

.nav-link:hover {
  background-color: #fff !important;
  color: var(--color-primary) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0.4rem;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  border-radius: 2px;
}

.nav-link.is-active {
  background-color: transparent !important;
  color: var(--color-primary) !important;
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.navbar-burger {
  color: var(--color-primary);
}

.navbar-burger:hover {
  background-color: #fff !important;
  color: var(--color-primary) !important;
}

.navbar-burger span {
  height: 2px;
}

/* === HERO === */
.hero-bg {
  background: var(--color-primary);
}

.hero-bg .hero-body {
  padding: 0;
  align-items: stretch;
}

.hero-panels {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.hero-photo-panel {
  flex: 1;
  padding-top: 2rem;
  min-height: 250px;
  overflow: hidden;
}

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

.hero-text-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 2.5rem;
  min-height: 50vh;
  flex: 1;
}

@media (min-width: 769px) {
  .hero-panels {
    flex-direction: row;
  }

  .hero-photo-panel {
    order: 2;
    padding: 4rem 5rem 4rem 2rem;
  }

  .hero-text-panel {
    order: 1;
    min-height: unset;
    padding: 4rem 5rem;
  }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  opacity: 0.9;
}

.cta-btn {
  display: inline-block;
  background: var(--color-off-white);
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.65em 1.5em;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta-btn:hover {
  background: #e8e3dd;
  color: var(--color-primary);
}

.text-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness var(--transition-base);
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.scroll-arrow {
  font-size: 1.5rem;
  opacity: 0.6;
  display: inline-block;
  animation: bounce 1.8s ease-in-out infinite;
  text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* === SECTIONS — COMMON === */
.section {
  padding: 4rem 1.5rem;
}

@media (min-width: 769px) {
  .section {
    padding: 5rem 1.5rem;
  }
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--color-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  background: var(--color-yellow);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

.box {
  border-radius: 0.75rem;
}

/* === ABOUT === */
#bio {
  background: var(--color-off-white);
}

#bio .subtitle,
#content .subtitle {
  color: var(--color-primary);
}

.about-img-wrap {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.about-img {
  object-fit: cover;
  object-position: center 15%;
  border-radius: 1rem;
}

/* === CONTENT SPECIALIST === */
#content {
  background: var(--color-pale-pink);
}

#content a {
  color: var(--color-primary);
  text-decoration: none;
}

#content a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skill-box {
  background-color: var(--color-off-white);
  border-radius: 0.75rem;
  height: 100%;
  transition: box-shadow var(--transition-base);
}

.skill-box:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* === FILM === */
#film {
  background: var(--color-primary);
}

#film .section-title {
  color: var(--color-off-white);
}

#film .container > .subtitle,
#film .container > .content {
  color: var(--color-off-white);
}

#film .box {
  background-color: var(--color-off-white);
}

#film .project-card {
  max-width: 80%;
  margin: 0 auto;
}

.project-card {
  border-radius: 0.75rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.project-card .card-content {
  flex: 1;
  background-color: var(--color-off-white);
}

.project-card .card-content .subtitle {
  margin-top: 0.25rem;
}

.project-card .card-image img {
  object-fit: contain;
}

.project-card .card-footer-item {
  font-weight: 400;
  color: var(--color-primary);
  background-color: var(--color-off-white);
  transition: background var(--transition-base);
}

.project-card .card-footer-item:hover {
  background: #fff;
}

/* === BOOK === */
#book {
  background: var(--color-off-white);
}

#book .subtitle {
  color: var(--color-primary);
}

.book-banner-wrap {
  overflow: hidden;
  margin-bottom: 0;
  max-height: 360px;
}

.book-banner-img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 769px) {
  .book-banner-wrap {
    max-height: none;
  }

  .book-banner-img {
    height: auto;
    max-height: none;
    object-fit: unset;
  }
}

.book-cover-wrap {
  max-width: 280px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.book-spread-wrap {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.book-spread-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.press-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.press-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.press-list li:last-child {
  border-bottom: none;
}

.press-list a {
  color: var(--color-primary);
  font-weight: 400;
  text-decoration: none;
}

.press-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* === CONTACT === */
#contact {
  background: var(--color-pale-pink);
}

div.email {
  font-size: 1.2rem;
  margin: 0.75rem 0;
}

div.email > span {
  display: none;
}

#contact .subtitle {
  color: var(--color-primary);
}

.screenplay-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.screenplay-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.6rem 0;
}

.screenplay-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.contact-box {
  background-color: var(--color-off-white);
  border-radius: 0.75rem;
  padding: 2rem;
}

.contact-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: var(--color-text);
}

.contact-link:hover {
  background: #fff;
  color: var(--color-primary);
}

.contact-icon {
  width: 3em;
  height: 3em;
}

/* === FOOTER === */
.site-footer {
  background: var(--color-primary);
  color: var(--color-off-white);
  padding: 2rem 1.5rem;
}

/* === SCROLL TO TOP === */
#toTop {
  height: 50px;
  width: 50px;

  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;

  background: var(--color-pale-pink);
  border-radius: 50%;
  box-shadow: 0 5px 20px rgba(14, 25, 80, 0.3);

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

#toTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#toTop:hover {
  background-color: var(--color-off-white);
}

/* === UTILITY — FOCUS VISIBLE === */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* === SCROLL REVEAL === */
.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-ready.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* === DARK MODE ROBUSTNESS === */

.skill-box .title,
.contact-box .title,
.project-card .card-content .title,
#book .title:not(.section-title) {
  color: var(--color-text);
}

.screenplay-list,
.screenplay-list strong {
  color: var(--color-text);
}

.project-card .card-image {
  background-color: var(--color-off-white);
}

.navbar-menu {
  background-color: var(--color-off-white);
}

/* === MOBILE OVERRIDES === */
@media (max-width: 768px) {
  .tag {
    white-space: normal;
    height: auto;
    line-height: 1.4;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-arrow { animation: none; }
  .project-card,
  .skill-box,
  .nav-link::after { transition: none; }
}
