/* Local homepage enhancements. The downloaded styles retain the original design. */
html, body { height: 100%; overflow: hidden; }
#main { scroll-behavior: smooth; scroll-padding-top: 96px; }
#main > section:first-child { min-height: calc(100svh - 4rem); }
h1 { padding-bottom: .1em; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid #a5c7ff; outline-offset: 5px; }
.mobile-navigation {
  position: fixed;
  inset: 76px 16px auto;
  z-index: 60;
  padding: 8px;
  border-radius: 20px;
  color: #171717;
  background: rgb(255 255 255 / .92);
}
.mobile-navigation a { display: block; padding: 12px 16px; border-radius: 12px; }
.mobile-navigation a:hover, .mobile-navigation a:focus-visible { background: rgb(0 0 0 / .06); }
button[aria-controls="mobile-navigation"][aria-expanded="true"] svg { transform: rotate(90deg); }
button[aria-controls="mobile-navigation"] svg { transition: transform 180ms ease; }
[data-slot="accordion-content"] { padding-bottom: 0; }
[data-slot="accordion-trigger"] svg { transition: transform 180ms ease; }
[data-slot="accordion-trigger"][aria-expanded="true"] svg { transform: rotate(45deg); }
.text-reveal-word { transition: none; }
@media (max-width: 380px) {
  .text-reveal-viewport > span { font-size: 1.5rem; }
}
[data-slot="accordion-item"] [role="region"] { overflow: hidden; }
#experience .bg-white { transform-origin: top; }
@media (min-width: 768px) { .mobile-navigation { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  #main { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .text-reveal { height: auto; padding-block: 80px; }
  .text-reveal-viewport { position: static; height: auto; }
  .text-reveal-word { opacity: 1 !important; }
}

/* Shared crop keeps all three clips and both bookends aligned. */
.home-scene { background: #112b43; pointer-events: none; }
.scene-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.scene-night-bookend, .scene-video { opacity: 0; }
.scene-video { transition: opacity 240ms ease; }
.scene-video.is-visible { opacity: 1; }
.scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(8 20 32 / .36), rgb(8 20 32 / .54) 45%, rgb(8 20 32 / .38));
}

/* Personal projects and writing use the existing type, glass, and spacing. */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-link { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 28px; font-size: 14px; }
.writing-list { border-top: 1px solid rgb(255 255 255 / .2); }
.writing-item { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 24px; padding: 28px 0; border-bottom: 1px solid rgb(255 255 255 / .2); }
.writing-item > svg { margin-top: 8px; }
.writing-item h3 { font-family: var(--font-editorial-old), serif; font-size: 26px; line-height: 1.25; }
.writing-item p { margin-top: 10px; max-width: 60ch; font-size: 16px; line-height: 1.6; }
.writing-item:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
#recommendations-heading { padding-bottom: .1em; }
.recommendations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 32px; }
.recommendations figure { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.recommendations blockquote { flex: 1; font-family: var(--font-editorial-old), serif; font-size: 22px; line-height: 1.5; text-wrap: pretty; }
.recommendations figcaption { display: grid; gap: 2px; font-size: 14px; line-height: 1.6; }
.recommendations-link { margin-top: 36px; font-size: 14px; line-height: 1.6; }
.recommendations-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.recommendations-link svg { flex-shrink: 0; }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .project-grid, .recommendations { grid-template-columns: 1fr; }
  .recommendations { gap: 36px; }
  .recommendations figure { gap: 16px; }
  .writing-item { gap: 12px; }
  .writing-item h3 { font-size: 24px; }
}
