html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  padding-top: 0;
}

.page {
  height: 100vh;
  overflow: hidden;
}

.home-scroll {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
}

.home-panel {
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;

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

  position: relative;
  padding: calc(var(--site-header-height, 56px) + 1rem) 1.2rem 5.5rem;
  box-sizing: border-box;
}

.home-panel-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;

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

  padding-top: 14vh;
}

.home-title {
  text-align: center;
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1.45rem;
}

.intro-card {
  width: min(100%, 1120px);
  box-sizing: border-box;

  text-align: left;
  padding: 1.35rem 2.2rem;
  line-height: 1.65;

  font-family: inherit;
  font-style: normal;
  font-size: 1.08rem;
  color: var(--ink);

  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.055);
  background: #ffffff;
}

.intro-card p,
.intro-card em,
.intro-card i {
  margin: .65rem 0;
  font-family: inherit;
  font-style: normal;
}

.boids-card {
  width: min(100%, 820px);
  margin: 0 auto;
}

.boids-card p {
  margin: .45rem 0;
}

/* buttons */
.read-more-btn,
.projects-more-link {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ff8fa3;
  color: #000000;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  font-style: normal;
  text-decoration: none;

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

  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  margin-top: 1.15rem;
}

.read-more-btn:hover,
.projects-more-link:hover {
  transform: translateY(-1px);
  background: #ff758f;
  color: #000000;
  text-decoration: none;
}

/* arrows */
.slide-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  width: 56px;
  height: 56px;
  border-radius: 999px;

  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #ffb6c1;
  color: #000000;

  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;

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

  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.09);
  z-index: 80;

  animation:
    arrow-bounce-strong 1.25s ease-in-out infinite,
    arrow-pulse-soft 2.4s ease-out infinite;
}

.slide-arrow:hover {
  animation-play-state: paused;
  transform: translateX(-50%) scale(1.08);
  background: #ff9dad;
  color: #000000;
}

.slide-arrow-up {
  top: calc(var(--site-header-height, 56px) + 1.3rem);
}

.slide-arrow-down {
  bottom: 4.4rem;
}

@keyframes arrow-bounce-strong {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes arrow-pulse-soft {
  0% {
    box-shadow:
      0 5px 14px rgba(0, 0, 0, 0.09),
      0 0 0 0 rgba(0, 0, 0, 0.08);
  }

  70% {
    box-shadow:
      0 5px 14px rgba(0, 0, 0, 0.09),
      0 0 0 9px rgba(0, 0, 0, 0);
  }

  100% {
    box-shadow:
      0 5px 14px rgba(0, 0, 0, 0.09),
      0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* projects */
#home-projects {
  padding-bottom: 7rem;
}

#home-projects .home-panel-inner {
  transform: translateY(1vh);
}

#project-list {
  width: min(100%, 820px);
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

#project-list li {
  margin-bottom: .5rem;
}

#project-list .card {
  display: block;
  padding: 1.05rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  background: #ffffff;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-name {
  font-size: 1.22rem;
  font-weight: 700;
  font-style: normal;
}

.project-meta,
.project-meta em,
.project-meta i {
  color: var(--muted);
  margin-top: .45rem;
  font-size: 1.05rem;
  font-style: normal;
}

.project-area {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.project-pill {
  font-size: .95rem;
  padding: .18rem .48rem;
  font-style: normal;
}

.home-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  width: 100%;
  z-index: 30;

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

.home-footer footer,
.home-footer .site-footer {
  width: 100%;
}

/* boids only visible when JS adds .boids-active */
#boids-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}

#boids-bg.boids-active {
  opacity: 1;
}

.page,
.home-scroll,
.home-panel {
  position: relative;
  z-index: 1;
}

#site-header {
  z-index: 1000;
}

/* laptop / smaller desktop */
@media (max-width: 1100px) {
  .home-panel-inner {
    max-width: 920px;
  }

  .intro-card {
    width: min(100%, 920px);
  }

  .home-title {
    font-size: clamp(2.45rem, 5vw, 3.4rem);
  }
}

/* tablet/mobile base */
@media (max-width: 700px) {
  :root {
    --site-header-height: 64px;
  }

  html,
  body {
    overflow: hidden;
  }

  .home-panel {
    min-height: 100vh;
    height: 100vh;
    padding: calc(var(--site-header-height, 64px) + 1.2rem) 0.9rem 4.8rem;
    align-items: center;
  }

  .home-panel-inner {
    transform: none;
    justify-content: center;
    max-width: 100%;
  }

  .home-title {
    font-size: clamp(2rem, 9.2vw, 2.65rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    max-width: 95vw;
  }

  .intro-card {
    width: 100%;
    max-height: 54vh;
    overflow-y: auto;
    padding: 1rem 1.05rem;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .intro-card p {
    margin: 0.55rem 0;
  }

  .boids-card {
    max-height: none;
    overflow: visible;
    text-align: left;
  }

  .read-more-btn,
  .projects-more-link {
    white-space: normal;
    text-align: center;
    font-size: 0.98rem;
    padding: 0.8rem 1.05rem;
    max-width: 92vw;
    color: #000000;
  }

  .slide-arrow {
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }

  .slide-arrow-up {
    top: calc(var(--site-header-height, 64px) + 0.65rem);
  }

  .slide-arrow-down {
    bottom: 3.4rem;
  }

  #home-projects {
    padding-bottom: 6.7rem;
  }

  #home-projects .home-panel-inner {
    transform: none;
  }

  #project-list {
    width: 100%;
  }

  #project-list .card {
    padding: 0.9rem 1rem;
  }

  .project-top {
    align-items: flex-start;
  }

  .project-name {
    font-size: 1.05rem;
  }

  .project-meta,
  .project-meta em,
  .project-meta i {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .project-pill {
    font-size: 0.82rem;
  }

  #boids-bg.boids-active {
    opacity: 0.75;
  }
}

/* very short screens */
@media (max-height: 720px) and (min-width: 701px) {
  .home-panel-inner {
    transform: translateY(0);
  }

  .home-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem;
  }

  .intro-card {
    padding: 1rem 1.5rem;
  }

  .intro-card p {
    margin: 0.45rem 0;
  }

  .slide-arrow-down {
    bottom: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-arrow {
    animation: none;
  }

  .home-scroll {
    scroll-behavior: auto;
  }
}

/* ===== MOBILE HOME FIX ===== */
@media (max-width: 700px) {
  html,
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-boids="true"] #boids-bg,
  #boids-bg,
  #boids-bg.boids-active {
    display: none !important;
    opacity: 0 !important;
  }

  .page {
    height: auto;
    overflow: visible;
  }

  .home-scroll {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .home-panel {
    height: auto;
    min-height: auto;
    scroll-snap-align: none;
    display: block;
    padding: 2.2rem 1rem;
  }

  .home-panel:first-child {
    padding-top: calc(var(--site-header-height, 104px) + 2rem);
  }

  .home-panel-inner {
    transform: none;
    padding-top: 0;
    max-width: 100%;
  }

  .slide-arrow {
    display: none !important;
  }

  .home-title {
    font-size: clamp(2rem, 9vw, 2.6rem);
    line-height: 1.05;
    margin-bottom: 1rem;
  }

  .intro-card {
    max-height: none;
    overflow: visible;
    width: 100%;
    padding: 1rem 1.05rem;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .intro-card p {
    margin: 0.55rem 0;
  }

  .read-more-btn,
  .projects-more-link {
    white-space: normal;
    text-align: center;
    width: fit-content;
    max-width: 100%;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    color: #000000;
  }

  #home-projects {
    padding-bottom: 3rem;
  }

  #project-list {
    width: 100%;
  }

  #project-list .card {
    padding: 0.95rem 1rem;
  }

  .project-top {
    align-items: flex-start;
    gap: 0.7rem;
  }

  .project-name {
    font-size: 1.05rem;
  }

  .project-meta,
  .project-meta em,
  .project-meta i {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .project-pill {
    font-size: 0.82rem;
    padding: 0.16rem 0.42rem;
  }

  .home-footer {
    position: static;
    margin-top: 2rem;
  }
}