/* Fonts */
@font-face {
  font-family: Roobert;
  src: url(roobert-regular.otf) format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Roobert;
  src: url(roobert-bold.otf) format("opentype");
  font-weight: 700;
  font-display: swap;
}

/* Base styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: white;
  color: black;
  font-family: Roobert, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 6px;
}

/* Full-screen sections */
#scroll-container {
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

section {
  min-height: 100svh;
  scroll-snap-align: start;
  position: relative;
}

h1, h2, h3, p {
  margin: 0;
}

/* Hero and navigation */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.top-nav {
  position: absolute;
  top: 16px;
  right: 32px;
  display: flex;
  gap: 16px;
  font-size: 16px;
}

.top-nav a:hover, .socials a:hover {
  opacity: .6;
}

.intro {
  text-align: center;
  margin-bottom: 16px;
  padding: 0 32px;
}

.intro h1 {
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hand animation anchors */
.wave {
  font-size: 60px;
  display: inline-block;
  transform-origin: 70% 80%;
}

.hook-em {
  display: inline-block;
  transform-origin: 50% 85%;
}

.intro p {
  font-size: 20px;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Social links */
.socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.socials svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Skyline illustration */
.skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom: 2px solid black;
  display: flex;
  justify-content: center;
  z-index: -1;
  pointer-events: none;
}

.skyline img {
  display: block;
  width: 75vw;
  height: auto;
}

/* Shared section layout */
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px max(32px, calc((100vw - 1024px) / 2));
}

.content h2 {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 48px;
}

/* About me */
.about-layout {
  display: flex;
  align-items: center;
  gap: 64px;
}

.portrait {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.bio {
  font-size: 20px;
  line-height: 1.4;
}

.bio h3 {
  font-size: 30px;
  margin-bottom: 24px;
}

.bio p+p {
  margin-top: 16px;
}

.bio a {
  color: #3b82f6;
}

/* Keep the contact address on its own unbroken line. */
.bio .email {
  display: block;
  white-space: nowrap;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
}

.project-image {
  height: 192px;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-image:hover img {
  opacity: .7;
}

.project-grid h3 {
  font-size: 20px;
  margin-top: 8px;
  font-weight: 400;
}

.project-grid p {
  font-size: 15px;
  line-height: 1.4;
  margin-top: 8px;
}

.project-grid small {
  display: block;
  margin-top: 8px;
  color: #555;
}

/* Tutoring call to action */
.tutoring {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.tutoring p {
  font-size: 24px;
}

.tutoring-link {
  display: inline-flex;
  gap: 16px;
  align-items: center;
}

.arrow {
  width: 40px;
  height: 24px;
  overflow: visible;
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.arrow path {
  vector-effect: non-scaling-stroke;
}

.tutoring-link:hover .arrow, .tutoring-link:focus-visible .arrow {
  transform: translateX(16px) scaleX(1.12);
  transition-timing-function: cubic-bezier(.34, 1.56, .64, 1);
}

/* Section navigation dots */
.dots {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dots a {
  width: 12px;
  height: 12px;
  border: 2px solid black;
  border-radius: 50%;
  position: relative;
}

.dots a:before {
  content: "";
  position: absolute;
  inset: -5px;
}

.dots a[aria-current] {
  background: #000;
}

/* Keyboard navigation */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  z-index: 10;
  background: white;
  padding: 8px;
}

.skip-link:focus {
  transform: none;
}

/* Responsive layouts */
@media (min-width: 768px) {
  .project-image {
    height: 256px;
  }

}

@media (max-width: 1100px) {
  .content {
    padding: 64px;
  }

  .portrait {
    width: 250px;
    height: 250px;
  }

  .bio {
    font-size: 18px;
  }

  .intro h1 {
    font-size: 72px;
  }

}

@media (max-width: 767px) {
  .intro h1 {
    font-size: 48px;
    gap: 10px;
  }

  .wave {
    font-size: 36px;
  }

  .content {
    padding: 56px 40px 56px 32px;
  }

  .about-layout {
    gap: 24px;
  }

  .portrait {
    width: 150px;
    height: 150px;
  }

  .bio {
    font-size: 14px;
  }

  .content h2 {
    margin-bottom: 32px;
  }

  .dots {
    right: 16px;
  }

  .top-nav {
    right: 24px;
  }

  .project-image {
    height: 160px;
  }

}

@media (max-width: 639px) {
  .intro {
    padding: 0 24px;
  }

  .intro h1 {
    font-size: 32px;
    gap: 8px;
  }

  .intro p {
    font-size: 16px;
  }

  .wave {
    font-size: 32px;
  }

  .portrait {
    display: none;
  }

  .bio {
    font-size: 16px;
  }

  .content h2 {
    font-size: 48px;
  }

  .project-grid {
    gap: 24px 16px;
  }

  .project-grid h3 {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .project-grid p {
    font-size: 13px;
  }

  .project-image {
    height: 144px;
    padding: 8px;
  }

  .project-grid small {
    font-size: 11px;
  }

  .tutoring p {
    font-size: 20px;
  }

}
