/* =========================
   VARIABLES & RESET
========================= */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
:root {
  --brand: #0d0711;
  --action: #66b7ce;
  --white: #ffffff;
  --base-light: #a3ccff;
  --mist: #daf4fa;
  --mist-solid: #daf4fa;
}

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

html {
  scroll-behavior: smooth;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  color: var(--brand);
}

h1,
h2,
h3,
h4 {
  font-family: "Fredoka", sans-serif;
}

html, body {
  overflow-x: hidden;
}

/* =========================
   GLOBAL COMPONENTS
========================= */
.header {
  display: flex; /* puts items (logo + nav) next to each other in a row */
  justify-content: space-between; /* pushes them to opposite sides */
  align-items: center; /* vertically centers items on the cross-axis */
  padding: 5px 15px 5px 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.logo {
  width: 100px;
  padding: 20px 15px 15px 10px;
}

.navigation ul {
  /* for the container that the nav links are inside of */
  list-style: none;
  text-align: right;
  margin: 0 20px 0 0;
}

.navigation.open ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
}

.navigation a {
  /* for the links inside the nav */
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s;
}

.menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-btn img {
  width: 50px;
}

.navigation {
  display: none; /* Hide by default */
  position: absolute;
  list-style: none;
  top: 60px;
  left: 0;
  width: 100%;
  background-color: #ffffffd0;
}

.navigation.open {
  display: block;
}

.nav-squiggle {
  display: none;
}


/* footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px 30px;
  background: var(--mist-solid);
}

.footer-socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-socials h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(13, 7, 17, 0.5);
}

.socials-icon {
  width: 38px;
  height: 38px;
  transition: transform 0.2s;
}

.socials-icon:hover {
  transform: translateY(-3px);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(13, 7, 17, 0.35);
  letter-spacing: 0.04em;
}

/* =========================
    HOME SECTION
========================= */
#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, transparent 40%, #92bcc4 80%, #8eb8bf 100%);
  z-index: 2;
}

.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* hero content */
.hero-content {
  /* profile photo + hero container */
  display: flex;
  flex-direction: column; /* stacks photo and writing (child items) vertically on top of each other */
  justify-content: center; /* center vertically */
  align-items: center; /* center horizontally */
  text-align: center; /* center text for mobile */
  padding: 40px 20px 80px;
  gap: 24px; /* space between photo and text (child items) */
}

.profile-photo img {
  width: 50vw; /* (vw = viwerport width) 50% of the width of the browser window */
  max-width: 300px; /* image will never exceed 260px */
  height: auto; /* keeps image proportions same and calculates height as width changes */
}

.hero-text h1 {
  font-size: clamp(
    2.2rem,
    8vw,
    4.5rem
  ); /* 8% of viewport width, but will never go below 2.2rem or above 4.5rem */
  line-height: 1.15;
  margin-bottom: 28px;
}

.bio {
  max-width: 620px;
  font-size: clamp(
    0.9rem,
    2.5vw,
    1rem
  ); /* 2.5% of viewport width, but will never go below 0.9rem or above 1rem */
  line-height: 1.75;
  color: rgba(13, 7, 17, 0.8);
}

.bio p + p {
  /* p that proceed another p (second paragraph) */
  margin-top: 18px;
  font-style: italic;
  font-weight: 500;
}

.scroll-hint {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  visibility: hidden;
}

.scroll-hint svg {
  width: 18px;
  opacity: 0;
}

/* =========================
    MIST SECTIONS
========================= */

/* skills section mist effect*/
.mist-section2 {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    #92bcc4 0%,
    #6b9eaa 45%,
    #82adb8 65%,
    #a8cdd4 80%,
    #c4e2e8 90%,
    #daf4fa 100%,
    #e1f7fb 100%
  );
  }
  
  .mist-section2::before,
  .mist-section2::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    background: rgba(13, 7, 17, 0.15);
    filter: blur(60px);
    pointer-events: none;
    animation: drift 18s ease-in-out infinite alternate;
    z-index: 0;
  }
  
  .mist-section2::before {
    width: 500px;
    height: 300px;
    top: 10%;
    left: -120px;
    animation-delay: 0s;
  }
  
  .mist-section2::after {
    width: 400px;
    height: 250px;
    bottom: 10%;
    right: -100px;
    animation-delay: -6s;
  }

/* project section mist effect */
.mist-section3 {
  background:#daf4fa;
  position: relative;
  z-index: 1;
}

.mist-section3::before,
.mist-section3::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: rgba(13,7,17,0.08);
  filter: blur(60px);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
  z-index: 0;
}

.mist-section3::before {
  width: 500px;
  height: 300px;
  top: 10%;
  left: -120px;
  animation-delay: 0s;
}

.mist-section3::after {
  width: 400px;
  height: 250px;
  bottom: 10%;
  right: -100px;
  animation-delay: -6s;
}

/* contact section mist effects */
.mist-section1 {
  background: var(--mist-solid);
  position: relative;
  z-index: 1;
}

.mist-section1::before,
.mist-section1::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: #d2f3fa;
  filter: blur(60px);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
  z-index: 0;
}

.mist-section1::before {
  width: 500px;
  height: 300px;
  top: 10%;
  left: -120px;
  animation-delay: 0s;
}

.mist-section1::after {
  width: 400px;
  height: 250px;
  bottom: 10%;
  right: -100px;
  animation-delay: -6s;
}

@keyframes drift {
  from {
    transform: translateX(0) translateY(0);
  }
  to {
    transform: translateX(60px) translateY(-30px);
  }
}

/* =========================
    SKILLS SECTION
========================= */

#skills {
  display: flex;
  flex-direction: column;
}

.section-title {
  order: -1;
  margin-bottom: 30px;
}

.constellation {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  width: 130vw;
  margin-left: -25vw;
  max-width: none;
  height: auto;
  position: relative;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(13,7,17,0.08) 40%, transparent 70%);
  border-radius: 50%;
}

.constellation.visible {
  opacity: 1;
  transform: translateY(0);
}

.line {
  stroke: #66b7ce;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0 5px;
  opacity: 0.6;
}

/* labels for stars */
.label,
.label-sm {
  fill: #fff9d6;
  font-weight: 300;
  opacity: 0.8;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.9))
  drop-shadow(0 0 8px rgba(255, 221, 0, 0.457));
}

.label {
  font-size: 18px;
}

.label-sm {
  font-size: 16px;
}

.star {
  cursor: pointer;  
  transform-origin: center;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.9))
  drop-shadow(0 0 6px rgba(255, 221, 0, 0.457));
}

/* =========================
    PROJECTS SECTION
========================= */
#projects {
  padding: 40px 40px;
  overflow: hidden;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  position: relative;
  z-index: 1;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;

  text-decoration: none;

  position: relative;

  transform: translateY(40px);
  opacity: 0;

  transition:
    transform 0.45s ease,
    opacity 0.7s ease;
}

.project-card img {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto;

  box-shadow:
    0 20px 55px rgba(13,7,17,0.12);

  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

.project-info {
  padding-top: 18px;
  opacity: 1;
}

.project-info h3 {
  font-size: 1.3rem;
  color: var(--brand);
  margin-bottom: 8px;
}

.project-info p {
  color: rgba(13,7,17,0.68);
  line-height: 1.6;
  font-size: 0.95rem;
  padding: 0 0 50px 0;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.animation{
  height:400px;
  position: relative;
  overflow: hidden;
}

.paper-plane {
  position: absolute;
  top: 120px;
  left: -120px;
  width: 200px;
  z-index: 1;
  pointer-events: none;
}

/* =========================
    CONTACT SECTION
========================= */
/* ── floating mist clouds (scroll-triggered) ── */
.mist-cloud {
  position: absolute;
  border-radius: 50%;
  background: #daf4fa;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.4s ease;
  z-index: 0;
}

.mist-cloud.appear {
  opacity: 1;
}

#contact {
  padding: 40px 40px 80px;
  background: linear-gradient(to bottom, #daf4fa 0%, white 150px);
  position: relative;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.contact-inner {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact-inner h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-inner h2.visible {
  opacity: 1;
  transform: translateY(0);
}

/* contact form */
.form {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.form.visible {
  opacity: 1;
  transform: translateY(0);
}

.form label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: rgba(13, 7, 17, 0.6);
}

.form input[type="text"],
.form textarea {
  padding: 10px 14px;
  border: 1.5px solid rgba(13, 7, 17, 0.18);
  margin-bottom: 8px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
  background: rgba(255, 255, 255, 0.7);
  width: 100%;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.form input[type="text"]:focus,
.form textarea:focus {
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(102, 183, 206, 0.2);
}

.form input[type="submit"] {
  display: block;
  margin-left: auto;
  padding: 12px;
  border: none;
  background: var(--action);
  color: white;
  font-size: 0.9rem;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 6px;
}

.form input[type="submit"]:hover {
  background: var(--brand);
  transform: translateY(-1px);
}

/* =========================
   PROJECT DETAIL PAGES
========================= */

#project-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px;
  position: relative;
  z-index: 2;
}

.project-header {
  text-align: center;
  margin-bottom: 50px;
}

.project-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 12px; 
}

.project-subtitle {
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
  color: rgba(13, 7, 17, 0.7);
}

/* top four facts row (under heading) */

.project-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 60px;
}

.project-facts,
.project-highlights,
.tech-stack {
  grid-template-columns: 1fr;
}

.fact {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 22px;
  text-align: center;

  box-shadow:
    0 10px 30px rgba(13, 7, 17, 0.05);
}

.fact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(13, 7, 17, 0.45);
  margin-bottom: 8px;
}

.fact-value {
  display: block;
  font-weight: 600;
  font-size: 1rem;
}

/* banner */

.project-banner {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.project-banner img{
  width: 100%;
}

.project-banner2 {
  margin-bottom: 70px;
  display: flex;
  justify-content: center;
}

.project-banner2 img {
width: 100%;
}

.project-banner3 img {
  width: 100%;
  padding: 0 0 20px 0;
}

/* page layouts */

.side-by-side {
  display: flex;
  flex-direction: column;
}

.kanban img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.jtlogin,
.groupphoto,
.colouranalysis1,
.colouranalysis2,
.colourtones {
  display: flex;
  justify-content: center;
}

.jtlogin img,
.groupphoto img,
.colouranalysis1 img, 
.colouranalysis2 img,
.colourtones img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.jtscreenshot {
  margin-top: 40px;
}

.jtscreenshot img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.groupphoto img {
  max-width: 100%;
}

.colouranalysis1 img {
  width: 100%;
  max-width: 100%;
}

.colouranalysis2 img {
  width: 100%;
  max-width: 100%;
}

.colouranalysis3 img{
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* remaining sections for all projects */

.project-section {
  margin-bottom: 60px;
}

.project-section h2 {
  font-size: 1.7rem;
  margin-bottom: 18px;
}

.project-section h3 {
  margin-bottom: 10px;
}

.project-section p {
  line-height: 1.8;
  color: rgba(13, 7, 17, 0.8);
  margin-bottom: 16px;
}

.project-section ul {
  padding-left: 20px;
}

.project-section li {
  margin-bottom: 12px;
  line-height: 1.7;
  color: rgba(13, 7, 17, 0.8);
}

/* Tech Stack */

.tech-stack > div {
  padding: 10px;
  border-radius: 18px;
}

.tech-stack h3 {
  margin-bottom: 14px;
}

/* Button */

.project-links {
  text-align: center;
  margin-top: 80px;
}

.project-btn {
  display: inline-block;
  background: var(--action);
  color: white;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.project-btn:hover {
  background: var(--brand);
  transform: translateY(-2px);
}









/* =========================
   DESKTOP LAYOUT - RESPONSIVE DESIGN
========================= */

@media (min-width: 768px) {
  .logo {
    width: 150px;
  }

  .menu-btn {
    display: none;
  }

  .navigation {
    display: flex; 
    position: static;
    width: auto;
    background-color: transparent;
  }

  .navigation ul {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }
  
  .navigation a {
    /* for the links inside the nav */
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    position: relative;
    transition: color 0.2s;
  }

  .navigation a:hover {
    color: var(--action);
  }
  
  .nav-squiggle {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -5px;
    width: 50px;
    height: 6px;
    overflow: visible;
    pointer-events: none;
  }
  
  .nav-squiggle path {
    fill: none;
    stroke: var(--action);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
  }

  #home {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, transparent 60%, #92bcc4 100%);
    z-index: 2;
  }

  .hero-content {
    flex-direction: row;
    text-align: left;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 100px 80px 100px;
  }

  .profile-photo img {
    width: 280px;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .bio {
    font-size: 1rem;
  }


.scroll-hint {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(13, 7, 17, 0.45);
  animation: bounce 2.2s ease-in-out infinite;
}

.scroll-hint svg {
  width: 18px;
  opacity: 0.8;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

.mist-section2 {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    #92bcc4 0%,
    #6b9eaa 45%,
    #82adb8 65%,
    #a8cdd4 80%,
    #c4e2e8 90%,
    #daf4fa 100%
  );
  }

  #skills {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 100px 40px 160px 40px;
  }

  /* labels for stars */
.label,
.label-sm {
  fill: #fff9d6;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.label {
  font-size: 16px;
}

.label-sm {
  font-size: 14px;
}

.star {
  cursor: pointer;
  transition: all 0.3s ease;
  transform-origin: center;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.9))
  drop-shadow(0 0 6px rgba(255, 221, 0, 0.457));
}

.star:hover + .label,
.star:hover + .label-sm {
  opacity: 1;
  filter:
  drop-shadow(0 0 10px rgba(255,255,255,1))
  drop-shadow(0 0 20px rgba(255,221,0,0.9))
  drop-shadow(0 0 40px rgba(255,221,0,0.7));
}

.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(255, 251, 201);
  opacity: 0;
  animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.5); }
}

.constellation {
  max-width: 800px;
  margin-left: 0vw;
}

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

.project-info {
  padding-top: 18px;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.project-info h3 {
  font-size: 1.3rem;
  color: var(--brand);

  margin-bottom: 8px;
}

.project-info p {
  color: rgba(13,7,17,0.68);

  line-height: 1.6;
  font-size: 0.95rem;
}

.project-card:hover img {
  transform: translateY(-10px);
}

.project-card:hover .project-info {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
}

.project-card:hover .project-info {
  transition-delay: 0.08s;
}

#project-detail {
  padding: 30px 30px;
}

.project-banner img{
  width: 50%;
}

.project-banner2 img {
width: 100%;
}

.project-banner3 img {
  width: 50%
}

.project-section h2 {
  font-size: 2rem;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.side-by-side {
  flex-direction: row;
  align-items: center;
  gap: 50px;
}

.side-by-side > * {
  flex: 1;
}

.kanban img {
  width: 100%;
  max-width: 500px;
  height: auto;
}

.jtlogin img,
.groupphoto img,
.colouranalysis1 img, 
.colouranalysis2 img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
}

.jtscreenshot img {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.groupphoto img {
  max-width: 400px;
}

.colouranalysis1 img {
  width: 100%;
  max-width: 500px;
}

.colouranalysis2 img {
  width: 100%;
  max-width: 500px;
}

.colouranalysis3 img{
  max-width: 500px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}


/* =========================
   LARGE DESKTOP SCREEN LAYOUT - RESPONSIVE DESIGN
========================= */

@media (min-width: 1600px) {

  .hero-content {
    flex-direction: row;
    text-align: left;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 180px 80px 100px;
  }

  #home {
    background: linear-gradient(to bottom, transparent 40%, #92bcc4 80%, #8FBAC2 100%);
  }

}