* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: white;
  overflow-y: scroll;
}

.page {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* HOMEPAGE */

.hero {
  background: #050505;
  display: flex;
  position: relative;
  overflow: hidden;
}

.hero-photo {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-photo img {
  height: 135%;
  max-width: none;
  object-fit: contain;

  /* only lowers image */
  transform: translate(-55px, 200px);

  filter: grayscale(100%);
}

.hero-content {
  width: calc(50% - 50px);
  height: calc(100vh - 100px);

  margin-top: 105px;
  margin-right: 50px;

  border: 1px solid rgba(255,255,255,.45);

  display: flex;
  flex-direction: column;

  padding: 30px 30px;
  position: relative;
}

.top-title,
.portfolio-title {
  font-size: 1.3rem;
  letter-spacing: 8px;
  font-weight: 300;
}

.top-title {
  margin-bottom: 18px;
}

.portfolio-title {
  margin-top: 18px;
}

.hero-content h1 {
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: .9;
  font-weight: 900;
  letter-spacing: -5px;

  /* tiny adjustment left */
  transform: translateX(-4px);
}

.scroll-link {
  position: absolute;

  /* lower in the box */
  bottom: 45px;

  left: 30px;

  color: white;
  text-decoration: none;

  font-size: 1.3rem;
  letter-spacing: 5px;

  transition: .3s ease;
}

.scroll-link:hover {
  opacity: .55;
}

/* ABOUT PAGE */

.about-section {
  background: white;
  color: black;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
  position: relative;
  overflow: hidden;
}

.about-container {
  width: 52%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-box {
  width: 100%;
  min-height: 750px;

  border: 1px solid rgba(0,0,0,.45);

  padding: 50px 30px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-box h2 {
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -5px;
  margin-bottom: 35px;
}

.about-box p {
  font-size: 1rem;
  letter-spacing: 2px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 9000px;
}

.about-photo {
  width: 45%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.about-photo img {
  height: 155%;
  max-width: none;
  object-fit: contain;
  filter: grayscale(100%);
  transform: translate(15px, 55px);
}

.about-nav {
  color: black;
  text-decoration: none;

  font-size: 1.3rem;
  letter-spacing: 5px;
  font-weight: 300;

  transition: .3s ease;
}

.about-nav:hover {
  opacity: .55;
}

.about-container .about-nav:first-child {
  margin-bottom: 12px;
  margin-left: -800px;
}

.about-container .about-nav:last-child {
  margin-top: 12px;
  margin-left: -800px; 
}

/* ADD 32 - SKILLS */

.skills-title {
  margin-top: 50px;
  margin-bottom: 20px;

  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -3px;

  line-height: 0.9;
}

.skills-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 15px;
}

.skill-card {
  border: 1px solid rgba(0,0,0,.45);

  height: 90px;

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

  text-align: center;

  font-size: 0.95rem;
  letter-spacing: 3px;
  font-weight: 700;

  transition: 0.3s ease;
}

.skill-card:hover {
  background: black;
  color: white;
}

/* PORTFOLIO PAGE */

.portfolio-section {
  background: #050505;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 8%;

  position: relative;
}

.portfolio-content {
  width: 100%;
}

.portfolio-section h2 {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -5px;
  margin-bottom: 40px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.portfolio-card {
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: white;
  text-decoration: none;
  font-size: 2rem;
  font-weight: bold;
  display: flex;
  align-items: flex-end;
  padding: 25px;
  transition: 0.3s ease;
}

.portfolio-card:hover {
  background: white;
  color: black;
}

/* ANIMATIONS */

.animate {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

.animate.up {
  transform: translateY(-45px);
}

/* MOBILE */

@media screen and (max-width: 800px) {
  .hero {
    flex-direction: column;
  }

  .hero-photo {
    width: 100%;
    height: 45%;
  }

  .hero-photo img {
    height: 110%;
    transform: translate(-20px, 20px);
  }

  .hero-content {
    width: calc(100% - 40px);
    height: calc(55% - 30px);
    margin: 0 20px 30px 20px;
    padding: 35px 22px;
  }

  .hero-content h1 {
    font-size: 4rem;
    letter-spacing: -2px;
  }

  .hero-content p {
    font-size: 0.85rem;
    letter-spacing: 5px;
  }

  .scroll-link {
    bottom: 45px;
    left: 22px;
    font-size: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    min-height: 140px;
    font-size: 1.4rem;
  }
  .about-section {
  flex-direction: column;
  padding: 30px 20px;
}

.about-box {
  width: 100%;
  min-height: auto;
  padding: 35px 22px;
}

.about-box h2 {
  font-size: 4rem;
  letter-spacing: -2px;
}

.about-box p {
  font-size: 0.85rem;
  letter-spacing: 3px;
}

.about-photo {
  width: 100%;
  height: 40%;
}

.about-photo img {
  height: 110%;
  transform: translateX(10px);
}

.about-container {
  width: 100%;
}

.about-nav {
  font-size: 1rem;
}

.skills-grid {
  grid-template-columns: repeat(2, 1fr);
}

.skill-card {
  height: 70px;

  font-size: 0.75rem;
  letter-spacing: 2px;
}

.skills-title {
  font-size: 3rem;
}
  
}

.back-to-top {
  position: absolute;

  bottom: -90px;
  left: 50%;

  transform: translateX(-50%);

  color: white;
  text-decoration: none;

  font-size: 1.3rem;
  letter-spacing: 5px;

  transition: 0.3s ease;
}

.back-to-top:hover {
  opacity: 0.55;
}

/* ADD 33 - IMAGE PROTECTION */

img {
  -webkit-user-drag: none;
  user-select: none;
}

body {
  -webkit-touch-callout: none;
}

/* ADD 34 - MOBILE HOMEPAGE FIX */

@media screen and (max-width: 600px) {

  .hero {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    overflow: visible;
    padding-top: 40px;
  }

  .hero-photo {
    width: 100%;
    height: 42vh;
    align-items: flex-end;
    justify-content: center;
  }

  .hero-photo img {
    height: 100%;
    max-width: 100%;
    transform: translate(0, 0);
    object-fit: contain;
  }

  .hero-content {
    width: calc(100% - 40px);
    height: auto;
    min-height: 48vh;

    margin: 0 20px 30px 20px;
    padding: 35px 22px;

    border: 1px solid rgba(255,255,255,.45);
  }

  .top-title,
  .portfolio-title {
    font-size: 0.85rem;
    letter-spacing: 5px;
  }

  .hero-content h1 {
    font-size: clamp(3.8rem, 18vw, 5.2rem);
    letter-spacing: -3px;
    line-height: 0.9;
  }

  .scroll-link {
    position: static;
    margin-top: 80px;

    font-size: 0.95rem;
    letter-spacing: 5px;
  }
}

/* ADD 35 - MOBILE ABOUT ME FIX */

@media screen and (max-width: 600px) {

  .about-section {
    min-height: 100vh;
    height: auto;

    padding: 35px 20px;

    display: flex;
    flex-direction: column;

    overflow: visible;
  }

  .about-photo {
    display: none;
  }

  .about-container {
    width: 100%;
  }

  .about-box {
    width: 100%;
    min-height: auto;

    padding: 35px 22px;
  }

  .about-box h2 {
    font-size: clamp(3.5rem, 16vw, 4.8rem);
    letter-spacing: -3px;
    margin-bottom: 25px;
  }

  .about-box p {
    font-size: 0.9rem;
    letter-spacing: 3px;
    line-height: 1.7;
  }

  .skills-title {
    font-size: clamp(3rem, 14vw, 4rem);
    letter-spacing: -2px;

    margin-top: 45px;
    margin-bottom: 20px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    height: 75px;

    font-size: 0.72rem;
    letter-spacing: 2px;
  }

}

@media screen and (max-width: 600px) {

  .hero-photo,
  .hero-image {
    display: none;
  }

}

/* ADD 37 - MOBILE PORTFOLIO BACK TO TOP FIX */

@media screen and (max-width: 600px) {

  .portfolio-section {
    min-height: 100vh;
    height: auto;

    padding-bottom: 120px;

    overflow: visible;
  }

  .back-to-top {
    position: static;

    display: block;
    width: fit-content;

    margin: 50px auto 0;

    transform: none;

    white-space: nowrap;

    font-size: 0.95rem;
    letter-spacing: 4px;
  }

}


/* ADD 48 — TARGETED RESPONSIVENESS (ORIGINAL DESKTOP UNCHANGED) */
@media (max-width: 1100px) {
  /* A narrow desktop needs room for the About content. */
  .about-section { height: auto; min-height: 100vh; overflow: hidden; }
  .about-box { min-height: 0; }
  .about-container .about-nav:first-child,
  .about-container .about-nav:last-child { margin-left: 0; align-self: flex-start; }
  .about-box h2 { font-size: clamp(3rem, 7vw, 7rem); }
  .about-box p { letter-spacing: 1px; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card { min-width: 0; padding: 8px; font-size: .8rem; letter-spacing: 1px; }
  .hero-content h1 { font-size: clamp(2.4rem, 7vw, 6rem); letter-spacing: -2px; }
  .top-title, .portfolio-title { font-size: clamp(.8rem, 1.5vw, 1.3rem); letter-spacing: clamp(2px, .5vw, 8px); }
}
@media (max-width: 800px) {
  html { scroll-snap-type: y proximity; }
  .page { height: auto; min-height: 100vh; }
  .hero { min-height: 100vh; height: auto; overflow: visible; }
  .hero-photo { height: 35vh; min-height: 180px; overflow: hidden; }
  .hero-photo img { max-width: 100%; height: 100%; transform: none; }
  .hero-content { height: auto; min-height: 45vh; margin: 0 20px 30px; padding: 30px 22px; }
  .hero-content h1 { font-size: clamp(2.6rem, 10vw, 4.5rem); overflow-wrap: anywhere; }
  .scroll-link { position: static; display: inline-block; margin-top: auto; padding-top: 45px; }
  .about-section { height: auto; min-height: 100vh; overflow: visible; }
  .about-box { min-height: 0; }
  .about-container .about-nav:first-child,
  .about-container .about-nav:last-child { margin-left: 0; }
  .about-photo { height: auto; max-height: 45vh; overflow: hidden; }
  .about-photo img { max-width: 100%; max-height: 45vh; height: auto; transform: none; }
  .portfolio-section { height: auto; min-height: 100vh; padding-bottom: 100px; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-card { min-width: 0; overflow-wrap: anywhere; }
  .back-to-top { position: static; display: block; width: fit-content; max-width: 100%; margin: 45px auto 0; transform: none; text-align: center; }
}
@media (max-width: 600px) {
  .hero-content { min-height: calc(100svh - 70px); margin: 0 16px 30px; width: calc(100% - 32px); }
  .hero-content h1 { font-size: clamp(2.5rem, 13vw, 4.8rem); letter-spacing: -2px; }
  .top-title, .portfolio-title { font-size: clamp(.7rem, 3vw, .85rem); letter-spacing: clamp(1px, .8vw, 5px); }
  .scroll-link { margin-top: auto; padding-top: 40px; letter-spacing: 3px; }
  .about-box h2 { font-size: clamp(2.7rem, 12vw, 4.8rem); }
  .about-box p { letter-spacing: 1px; overflow-wrap: break-word; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card { height: auto; min-height: 75px; font-size: clamp(.65rem, 2.4vw, .75rem); letter-spacing: .5px; }
  .portfolio-section h2 { font-size: clamp(2.8rem, 12vw, 5rem); letter-spacing: -2px; }
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); }
  .back-to-top { white-space: normal; }
}
@media (max-width: 380px) {
  .hero-content { padding: 25px 16px; }
  .hero-content h1 { font-size: clamp(2.15rem, 12vw, 3rem); }
  .about-box { padding: 25px 16px; }
  .about-box p { letter-spacing: .5px; }
}
@media (max-height: 650px) and (min-width: 801px) {
  html { scroll-snap-type: y proximity; }
  .page { height: auto; min-height: 100vh; }
  .hero-content { height: auto; min-height: calc(100vh - 120px); }
  .about-section, .portfolio-section { height: auto; min-height: 100vh; }
}
