/* --- MOBILE NAV DEFAULT (menu hidden) --- */

:root {
  --bg: #f1efe9;
  --text: #1a1a1a;
  --accent: #FF7E00;
  --nav-link: #000;
}


.dark-mode {
  --bg: #1a1a1a;
  --text: #e6e6e6;
  --accent: #FF9633;
  --nav-link: #fff;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding-left: 4rem;
  color: var(--nav-link);
}

body {
  box-sizing: border-box;
  max-width: 100%;
  background: #f1efe9;
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  letter-spacing: -0.3px;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
}

h2 {
  font-size: 36px;
  text-align: center;
}



h3 {
  font-size: 24px;
  text-align: center;
}

h1 {
  font-size: 48px;
  /* font-weight: bold; */
  color: white;
}

@media (min-width: 768px) {
  h1 {
    font-size: 5rem;
  }
}

p {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.8rem;
}

@media(min-width: 768px) {
  p {
    font-size: 22px;
  }
}

a {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  text-decoration: none;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

header {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  z-index: 2000;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-links {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100vh;
  width: 80%;
  background: #2E6F40;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  transition: right 0.3s ease;
  z-index: 100;
}


.nav-links.active {
  right: 0;
}

.nav-links li a {
  font-size: 1.4rem;
  text-decoration: none;
  color: white;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  /* color: var(--nav-link);
  transition: color .25s; */
}

#mobile-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
  margin-left: auto;
  max-width: 100%;
  transition: opacity 0.3s ease;
  height: 50px;
  width: 50px;
}

/* #menu-icon {
  cursor: pointer;
  transition: transform 0.3s ease;
}

#menu-icon .line {
  transition: all 0.3s ease;
  transform-origin: center;
}

#mobile-btn.open #menu-icon .line1 {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-btn.open #menu-icon .line2 {
  opacity: 0;
}

#mobile-btn.open #menu-icon .line3 {
  transform: rotate(-45deg) translate(5px, -5px);
} */


/* Disable scroll when nav is open */
.no-scroll {
  overflow: hidden;
}

/* --- DESKTOP NAV --- */
@media (min-width: 768px) {
  #mobile-btn {
    display: none;
  }

  .nav-links {
    position: static;
    height: auto;
    width: auto;
    flex-direction: row;
    background: transparent;
    padding: 14px 4rem;
    right: 0;
    transition: none;
    gap: 4rem;
  }
}

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    height: 100vh;
  }
}

.hero-content {
  display: grid;
  gap: 48px;
  z-index: 999;

}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
  background: #0F1A13;
  /* fallback */
}


#hero-canvas canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  z-index: 0;
  pointer-events: none;
}


h1,
.subtitle {
  text-align: center;
}

.subtitle {
  font-size: 36px;
  color: white;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .subtitle {
    font-size: 48px;
  }
}

img {
  max-width: 100%;
}

section {
  padding-inline: 36px;
}

section:not(.hero) {
  margin-top: 80px;
}

@media (min-width: 768px) {
  section:not(.hero) {
    margin-top: 10rem;
  }
}

#about .container {
  display: grid;
  gap: 48px;
  align-items: center;
  justify-items: center;
}

@media (min-width: 768px) {
  #about .container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
    max-width: 1100px;
    margin: 0 auto;
  }
}



/* wrapper gives the organic animated border */
.profile-wrapper {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 8px;
  /* border thickness */
  background: #fab46e;
  position: relative;
  overflow: hidden;
  animation: blob 6s ease-in-out infinite;
}

@media(min-width:768px) {
  .profile-wrapper {
    width: 450px;
    height: 450px;
  }
}

/* actual profile image */
.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  /* animation: imgFloat 6s ease-in-out infinite; */
}


@keyframes blob {
  0% {
    border-radius: 60% 40% 65% 35% / 55% 45% 60% 40%;
  }

  33% {
    border-radius: 55% 45% 40% 60% / 50% 60% 45% 55%;
  }

  66% {
    border-radius: 45% 55% 60% 40% / 60% 50% 55% 45%;
  }

  100% {
    border-radius: 60% 40% 65% 35% / 55% 45% 60% 40%;
  }
}

/* @keyframes imgFloat {
  0% {
    transform: scale(1) rotate(0deg);
  }

  33% {
    transform: scale(1.03) rotate(1deg);
  }

  66% {
    transform: scale(0.98) rotate(-1deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
} */


/* --- SKILL FLIP CARDS --- */

.skills h2 {
  margin-bottom: 48px;
  text-align: center;
}

@media (min-width: 768px) {
  .skills h2 {
    margin-bottom: 60px;
  }
}

#software {
  margin-top: 80px;
}

@media (min-width: 768px) {
  #software {
    margin-top: 80px;
  }
}


.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  /* bigger cards */
  gap: 20px;
  justify-items: center;
  /* center the whole grid on the page */
  max-width: 300px;
  /* 140px + 140px + 20px gap = 300px, giving slight padding */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .skills-grid {
    max-width: none;
    grid-template-columns: repeat(4, 180px);
    justify-content: center;
  }
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  justify-items: center;
  /* center the whole grid on the page */
  max-width: 300px;
  /* 140px + 140px + 20px gap = 300px, giving slight padding */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .software-grid {
    max-width: none;
    grid-template-columns: repeat(4, 180px);
    justify-content: center;
    /* centers the rows */
    gap: 24px;
  }
}

.skill-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  cursor: pointer;
}

.skill-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.skill-card.flipped .skill-card-inner {
  transform: rotateY(180deg);
}

/* shared style for front + back */
.skill-card-front,
.skill-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  background: #2E6F40;
  /* ← green background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.software .skill-card-front {
  color: #FF7E00;
}

/* front icon */
.skill-card-front img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

/* back text */
.skill-card-back {
  transform: rotateY(180deg);
  color: white;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  line-height: 1.2;
}


.projects h2 {
  margin-bottom: 48px;
}

.project-content,
.project-content p {
  margin-top: 24px;
}

.project-content p {
  margin-bottom: 24px;
}

/* ============================
   PROJECTS SECTION
============================ */

.projects {
  margin-top: 80px;
  text-align: center;
}

.projects h2 {
  margin-bottom: 40px;
}

/* Center the whole carousel */
.glide {
  max-width: 900px;
  margin: 0 auto;
}

@media(min-width:768px) {
  .glide {
    max-width: 1200px;
  }
}

/* .glide__slide {
  width: 100% !important;
} */

/* Remove white box around slide */
.project-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

/* image container */
.project-img-wrapper {
  position: relative;
}

.project-img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.project-details {
  padding: 18px 8px;
  text-align: center;
}

.project-details h3 {
  margin-top: 20px;
  margin-bottom: 12px;
}

.project-details p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.4;
}

.project-btn {
  display: inline-block;
  padding: 12px 26px;
  background: #FF7E00;
  color: white;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  transition: 0.2s ease;
  background: var(--accent);
}

.project-btn:hover {
  background: #fab46e;
}


/* Desktop layout for each project slide */
@media (min-width: 768px) {
  .project-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 90px;
    padding: 40px 20px;
    text-align: left;
    /* stop centering text */
  }

  .project-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 40%;
    padding: 20px;
    text-align: left;
  }

  .project-details h3 {
    font-size: 30px;
    text-align: left;
  }

  .project-img-wrapper {
    flex: 0 0 60%;
    height: 450px;
    overflow: hidden;
  }

  .project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;

  }


  .project-details p {
    max-width: 70%;
    text-align: left;
    font-size: 20px;
  }

  .project-btn {
    padding: 16px;
    text-align: center;
    max-width: 150px;
  }

}



/* ============================
   ARROWS ON IMAGE
============================ */
.glide__arrow {
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  background: #2E6F40;
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 5;
  border-radius: 8px;
  opacity: 0.95;
  transition: 0.2s ease;
}

.glide__arrow:hover {
  background: #245a33;
}

.glide__arrow--left {
  left: 12px;
}

.glide__arrow--right {
  right: 12px;
}

@media(min-width: 786px) {
  .glide__arrow {
    font-size: 30px;
    top: 50%;
    padding: 20px 30px;
    line-height: 1;
  }

  .glide__arrow--left {
    left: -60px;
  }

  .glide__arrow--right {
    right: -60px;
  }
}


.glide__bullets {
  position: static !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 8px;
  padding: 0;
  transform: translate(0);
}

.glide__bullet {
  width: 12px;
  height: 12px;
  background: #FF7E00;
  border-radius: 50%;
  opacity: 0.3;
  border: none;
  transition: 0.2s;
}

.glide__bullet:hover {
  opacity: 0.6;
}

.glide__bullet--active {
  opacity: 1;
}


/* Contact */

.contact {
  padding-inline: 48px;
}

.contact h2 {
  margin-bottom: 40px;
}

.contact p {
  margin-bottom: 80px;
  max-width: 500px;
}

.contact-icons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 40px;
}


.contact-icons svg {
  height: 64px;
  width: 64px;
}

.contact-icons a {
  color: #FF7E00;
  transition: color 0.25s ease;
}

.contact-icons a:hover {
  color: #FF9633;
  /* lighter orange */
}



@media (min-width: 768px) {

  .contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 10rem auto;
  }

  .contact-icons {
    justify-content: center;
    gap: 40px;
  }

  .contact-icons svg {
    height: 150px;
    width: 150px;
  }
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 24px;
}