/* Loads the display typeface used for prominent headings. */
@font-face {
  font-family: "Tilt Warp";
  src: url("https://static.figma.com/font/TiltWarp_XROT_YROT__1") format("woff2");
  font-style: normal;
  font-weight: 400;
}

/* Loads the regular typeface used for body text throughout the site. */
@font-face {
  font-family: "LT Superior";
  src: url("fonts/LTSuperior-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
}

/* Loads the bold weight because synthetic font weights are disabled. */
@font-face {
  font-family: "LT Superior";
  src: url("fonts/LTSuperior-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
}

/* Defines the shared colors, spacing, typography, and transition values. */
:root {
  --color-brand: #4e57ff;
  --color-brand-dark: #2b2e6e;
  --color-dark: #0e0e12;
  --color-white: #fff;
  --color-bg: #fff;
  --color-muted: #000;
  --radius: 4px;
  --section-spacing: 128px;
  --transition-speed: 0.2s;
  --font-body: "LT Superior", Arial, sans-serif;
  --font-display: "Tilt Warp", Arial, sans-serif;
}

/* Applies consistent sizing and default behavior across the page. */
* {
  box-sizing: border-box;
}

/* Sets smooth scrolling and the page-wide background. */
html {
  scroll-behavior: smooth;
  background: var(--color-bg);
}

html.wheel-scrolling {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background-color: #4E57FF;
  color: #ffffff;
}

/* Establishes the default page typography, colors, and spacing. */
body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-synthesis: none;
}

@keyframes page-load-slide-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > .site-header > *,
main > section,
main > footer {
  animation: page-load-slide-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

main > .site-header > :nth-child(2),
main > section:nth-of-type(1) {
  animation-delay: 100ms;
}

main > section:nth-of-type(2) {
  animation-delay: 180ms;
}

main > section:nth-of-type(3) {
  animation-delay: 260ms;
}

main > section:nth-of-type(4) {
  animation-delay: 340ms;
}

main > section:nth-of-type(5) {
  animation-delay: 420ms;
}

main > footer {
  animation-delay: 500ms;
}

@media (prefers-reduced-motion: reduce) {
  main > .site-header > *,
  main > section,
  main > footer {
    animation: none;
  }
}

/* Gives the individual project pages their light lavender background. */
body.project-page {
  min-height: 100vh;
  background-color: #F0F0FF;
}

/* Normalizes links, images, and paragraph spacing. */
a {
  color: inherit;
  font-weight: bold;
  text-decoration: none;  
}

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
}

p {
  margin: 0;
}

h4 {
  margin: 0 0 0px;
  font-size: 16px;
  color: var(--color-brand);
}

/* Centers page content and limits its maximum width. */
.shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

/* Arranges the site header and its navigation elements. */
.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-brand);
}

.home-page .site-header,
.project-page .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  margin-inline: 0;
  padding-inline: max(24px, calc((100% - 1240px) / 2));
  transition: transform 0.3s ease;
}

.home-page .site-header {
  background: var(--color-bg);
}

.project-page .site-header {
  background: #F0F0FF;
}

.home-page.nav-away:not(.nav-revealed) .site-header,
.project-page.nav-away:not(.nav-revealed) .site-header {
  transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .home-page .site-header,
  .project-page .site-header {
    transition: none;
  }
}

.brand,
strong,
.button,
h3,
.item-title,
.kicker {
  font-weight: 700;
}

/* Sets the brand name's header size. */
.brand {
  font-size: 24px;
}

/* Places navigation links and action buttons in horizontal rows. */
nav,
.actions {
  display: flex;
  gap: 16px;
}

video {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 32px 0;
}

/* Defines the shared appearance and interaction states for buttons. */
.button {
  min-height: 44px;
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 20px;
  line-height: 1;
  transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed);
}

.button:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  transform: translateY(-2px);
}

.button-outline {
  background: transparent;
  color: var(--color-brand);
}

.button-outline:hover {
  background: var(--color-brand);
  color: var(--color-white);
  border-color: var(--color-brand);
}

.project_button {
  min-height: 44px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 64px auto;
  justify-content: center;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 20px;
  line-height: 1;
  transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed);
}

.project_button:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  transform: translateY(-2px);
}

/* Lays out the hero section and styles its introductory text. */
.hero {
  min-height: 946px;
  padding-block: var(--section-spacing);
  display: grid;
  grid-template-columns: 523px 1fr;
  gap: 12vw;
  align-items: center;
}

.kicker {
  color: var(--color-brand);
  font-size: 24px;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "XROT" 0, "YROT" 0;
}

h1 {
  width: max-content;
  margin: 0 0 8px;
  font-size: 64px;
  line-height: 1;
  box-shadow: inset 0 -14px var(--color-brand);
}

.lead,
.blue-section p,
.contact p,
.timeline-item p {
  font-size: 20px;
  line-height: 1.25;
}

/* Positions the hero artwork and switches images when project or about buttons are hovered. */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.hero-image {
  position: relative;
  width: min(435px, 100%);
  height: 628px;
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.hero-image .image-default {
  opacity: 1;
}

.hero:has(.project-button:hover) .image-default,
.hero:has(.about-button:hover) .image-default,
.hero:has(.project-button:hover) .image-knipoog,
.hero:has(.about-button:hover) .image-glimlach {
  opacity: 0;
}

.hero:has(.project-button:hover) .image-glimlach,
.hero:has(.about-button:hover) .image-knipoog {
  opacity: 1;
}

/* Styles the portrait used alongside the hero content. */
.face {
  width: min(435px, 100%);
  max-height: 628px;
}

/* Sets the shared background and text colors for the about section. */
.blue-section {
  background: var(--color-brand);
  color: var(--color-white);
  padding-block: var(--section-spacing);
}

/* Arranges the about text and photo in a two-column layout. */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10%;
  align-items: center;
}

h2 {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1;
}

.about-grid p {
  margin-bottom: 20px;
}

/* Styles the about section's secondary button and photo. */
.blue-section .button-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}

.blue-section .button-outline:hover {
  background: var(--color-white);
  color: var(--color-brand);
}

.about-photo-wrap {
  position: relative;
}

.about-photo-greeting {
  position: absolute;
  top: -5px;
  right: 30px;
  z-index: 0;
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 24px;
  opacity: 0;
  transform: translate(-5px, 30px);
  transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.about-photo-wrap:hover .about-photo-greeting {
  opacity: 1;
  transform: translate(24px, -32px);
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 404px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Adds spacing and a two-column layout to the resume section. */
.resume {
  padding-block: var(--section-spacing);
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Styles resume headings, lists, timeline entries, and skill rows. */
h3 {
  margin: 0 0 32px;
  color: var(--color-brand);
  font-size: 24px;
  line-height: 1;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item,
.skill {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}

.logo-box {
  width: 81px;
  height: 84px;
  flex: 0 0 81px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.eyebrow {
  font-size: 16px !important;
  color: var(--color-muted);
}

.item-title {
  color: var(--color-brand);
}

.skill strong {
  color: var(--color-brand);
  font-size: 24px;
}

.skills .logo-box {
  padding: 8px;
}

/* Separates education details from the other resume columns. */
.education {
  margin-top: 64px;
  width: calc(50% - 12px);
}

/* Creates the dark project showcase and its responsive project tiles. */
.projects {
  padding-block: var(--section-spacing);
  background: var(--color-dark);
  color: var(--color-white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project {
  height: 248px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed);
}

.project img {
  display: block;
  max-width: 88%;
  max-height: 75%;
  object-fit: contain;
}

.edukans {
  background: #f39200;
}

.edukans:hover img {
  height: 39%;
  transition: height 0.3s ease;
}

.edukans img {
  height: 33%;
  object-fit: cover;
}

.sights {
  background: var(--color-white);
}

.sights img {
  height: 30%;
  object-fit: cover;
}

.sights:hover img {
  height: 35%;
  transition: height 0.3s ease;
}

.silverside {
  background: #002043;
}

.silverside img {
  height: 25%;
  object-fit: cover;
}

.silverside:hover img {
  height: 29%;
  transition: height 0.3s ease;
}

.everdark {
  background: #1B0619;
  border: 2px solid #fff;
}

.everdark img {
  height: 35%;
  object-fit: cover;
}

.everdark:hover img {
  height: 45%;
  transition: height 0.3s ease;
}

.placeholder {
  background: #d9d9d9;
}

/* Adds spacing and typography to the contact section. */
.contact {
  padding-block: var(--section-spacing);
}

.contact h2 {
  color: var(--color-brand);
  margin-bottom: 32px;
}

.contact p + p {
  margin-top: 12px;
}

.contact .actions {
  margin-top: 16px;
}

.project-sights-image {
  margin: 32px auto 0;
}

.project-edukans-image {
  margin: 32px auto 0;
}

.project-everdark-image {
  margin: 32px auto 0;
}

/* Styles the footer layout and link hover state. */
footer {
  background: var(--color-brand);
  color: var(--color-white);
}

.footer-inner {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.footer-inner a {
  padding: 12px 8px;
  transition: opacity var(--transition-speed);
}

.footer-inner .button-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}

.footer-inner .button-outline:hover {
  background: var(--color-white);
  color: var(--color-brand);
  opacity: 1;
}

.footer-inner a:hover {
  opacity: 0.7;
}

/* Adjusts the page layout and component sizing for tablet and smaller screens. */
@media (max-width: 800px) {
  .shell {
    width: min(100% - 32px, 640px);
  }

  .site-header {
    height: auto;
    padding-block: 20px;
    padding-inline: 16px;
    align-items: flex-start;
    gap: 20px;
  }

  .home-page .site-header,
  .project-page .site-header {
    padding-inline: 16px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  nav .button {
    padding: 8px 12px;
    min-height: 38px;
    font-size: 15px;
  }

  .brand {
    font-size: 20px;
    white-space: nowrap;
  }

  .hero {
    min-height: 0;
    padding-block: 80px;
    grid-template-columns: 1fr;
    gap: 56px;
  }

  /* Layers project imagery within its responsive display area. */
  .project-images {
  position: relative;
  width: 400px;
  aspect-ratio: 4 / 3;
}

.project-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

  .face {
    grid-row: 1;
    width: min(72vw, 350px);
    justify-self: center;
    max-height: 480px;
    position: relative;
  }

  .kicker {
    font-size: 18px;
  }

  h1 {
    width: auto;
    font-size: clamp(38px, 11vw, 58px);
    box-shadow: inset 0 -9px var(--color-brand);
  }

  .about-grid,
  .resume-grid {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .about-photo {
    height: auto;
    aspect-ratio: 5 / 4;
  }

  .education {
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project {
    height: 220px;
  }

  .blue-section,
  .resume,
  .projects,
  .contact {
    padding-block: 80px;
  }
}

/* Tightens navigation, buttons, and content spacing on small phones. */
@media (max-width: 520px) {
  .site-header {
    display: block;
  }

  nav {
    margin-top: 16px;
    justify-content: flex-start;
    gap: 8px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .timeline-item,
  .skill {
    gap: 16px;
  }

  .logo-box {
    width: 64px;
    height: 68px;
    flex-basis: 64px;
  }

  .lead,
  .blue-section p,
  .contact p,
  .timeline-item p {
    font-size: 18px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}
