/* Custom Fonts */
@font-face {
  font-family: "CardinalAlternate";
  src: url("Font/Cardinal-Alternate.ttf");
  font-display: swap;
}
@font-face {
  font-family: "Firlest";
  src: url("Font/Firlest-Regular.otf");
  font-display: swap;
}

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

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

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

#profile,
#techstack,
#projects,
#contact,
#webinars {
  scroll-margin-top: 80px;
}

/* ===== NAVBAR ===== */
.parallax-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease;
}

.parallax-header.scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.navbar .nav-link,
.navbar .navbar-brand {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-family: "CardinalAlternate";
}

.navbar .nav-link:focus-visible,
.btn-action:focus-visible,
.hire-btn button:focus-visible,
.contact-card:focus-visible,
.fun-card:focus-visible {
  outline: 2px solid #d1b8bb;
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(30, 15, 5, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0.5rem;
    margin-top: 0.5rem;
    border-radius: 0 0 12px 12px;
  }
  .navbar .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 1.05rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ===== SECTION 1 — HERO ===== */
.section1 {
  position: relative;
  height: 100svh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  background-color: #673400;
}

.section1 img,
.section1 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section1 img {
  z-index: 5;
}

#nbg {
  z-index: 12;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: screen;
  opacity: 1;
  pointer-events: none;
}

.section1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  z-index: 18;
  pointer-events: none;
}

.hero-content {
  position: absolute;
  top: 45%;
  left: 65%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: clamp(260px, 40vw, 640px);
  max-width: 90vw;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}

p.FULL {
  font-family: "Firlest";
  color: white;
  font-size: clamp(20px, 5.5vw, 90px);
  line-height: 0.9;
  margin-bottom: 25px;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.hire-btn button {
  font-family: "Firlest";
  padding: 0.8em 2.5em;
  font-size: clamp(13px, 1.8vw, 18px);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
  min-height: 44px;
}

.hire-btn button:hover {
  background: white;
  color: #8d8686;
  transform: scale(1.1);
}

/* ===== SECTION 2 ===== */
.section2 {
  position: relative;
  min-height: 200vh;
  width: 100%;
  margin-top: -1px;
  background-color: #46311e;
  background-image: url("Images/Arren%20long%20(1).png");
  background-attachment: scroll;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 150px 20px 80px;
  overflow: hidden;
}

.section2-light-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

.section2 > *:not(.section2-light-overlay) {
  position: relative;
  z-index: 2;
}

@supports not (backdrop-filter: blur(10px)) {
  .about-container,
  .aff-card,
  .tech-card,
  .webinar-card,
  .cert-card,
  .fun-back,
  .contact-card {
    background: rgba(30, 20, 15, 0.85);
  }
}

/* ===== ABOUT ===== */
.about-container {
  max-width: 1200px;
  width: 100%;
  padding: 3rem;
  margin-top: 20vh;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 100;
  text-align: center;
  transition:
    transform 0.6s ease-out,
    opacity 0.6s ease-out;
}

.about-title {
  font-family: "CardinalAlternate";
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.about-text {
  font-family: sans-serif;
  font-size: clamp(0.88rem, 1.4vw, 1.1rem);
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
  opacity: 0.9;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.about-text strong {
  color: #8f6b6f;
}

/* ===== AFFILIATIONS ===== */
.affiliations-container {
  width: 90%;
  max-width: 1100px;
  margin-top: 8vh;
  text-align: center;
}

.affiliations-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.aff-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 300px;
  max-width: 500px;
  text-align: left;
  transition: 0.3s ease;
}

.aff-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #d1b8bb;
  transform: translateY(-5px);
}

.aff-icon {
  font-size: 2.5rem;
  color: #d1b8bb;
  background: rgba(0, 0, 0, 0.3);
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.aff-role {
  font-family: sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #d1b8bb;
  display: block;
  margin-bottom: 5px;
}

.aff-org {
  font-family: "CardinalAlternate", sans-serif;
  color: white;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 8px;
}

.aff-info p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.4;
}

/* ===== TECH STACK ===== */
.tech-stack-section {
  width: 90%;
  max-width: 1200px;
  margin-top: 10vh;
  text-align: center;
  color: white;
}

.tech-title {
  font-family: "CardinalAlternate";
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
  color: #f1f1f1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tech-grid h3 {
  font-family: "CardinalAlternate";
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tech-subtitle {
  font-family: sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  opacity: 0.7;
  margin-bottom: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tech-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  flex: 1 1 260px;
  max-width: 450px;
  transition: 0.3s ease;
}

.tech-card h3 {
  font-family: "CardinalAlternate";
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tech-items span {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  color: white;
}

/* ===== REVEAL ===== */
.reveal,
.reveal-card {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.45s ease-out,
    transform 0.45s ease-out;
}

.reveal.active,
.reveal-card.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PROJECTS ===== */
.projects-section {
  width: 100%;
  margin-top: 10vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-title {
  color: white;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 40px;
  font-family: "CardinalAlternate", sans-serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.project-window {
  width: 100%;
  overflow: hidden;
  padding: 50px 0;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}

.project-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: trainLoop 45s linear infinite;
  padding: 10px 0;
}

.project-track:hover {
  animation-play-state: paused;
}

@keyframes trainLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.project-card-horizontal {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  width: min(800px, calc(100vw - 48px));
  padding: 25px;
  flex-shrink: 0;
}

.project-img-box {
  flex-shrink: 0;
  max-width: 320px;
  width: 100%;
  margin: 20px;
}

.project-img-box img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-info h3 {
  font-family: "CardinalAlternate", sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.project-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  min-height: 36px;
  transition:
    background 0.2s,
    border-color 0.2s;
  text-decoration: none;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  color: white;
  text-decoration: none;
}

/* ===== WEBINARS ===== */
.webinars-section {
  width: 90%;
  max-width: 1000px;
  margin: 10vh auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.webinar-container {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 40px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.webinar-card {
  position: relative;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px 25px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.webinar-img-box {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 500px;
}

.webinar-img-box img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.webinar-img-box img:hover {
  transform: scale(1.03);
}

.webinar-card::before {
  content: "";
  position: absolute;
  left: -51px;
  top: 25px;
  width: 20px;
  height: 20px;
  background: #46311e;
  border: 3px solid #fff;
  border-radius: 50%;
  z-index: 1;
}

.webinar-card:hover {
  transform: translateX(10px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
}

.webinar-date {
  font-family: "Firlest", sans-serif;
  color: #d1b8bb;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.webinar-content h3 {
  font-family: "CardinalAlternate", sans-serif;
  color: white;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 10px;
}

.webinar-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* ===== CERTIFICATIONS ===== */
.certifications-section {
  width: 90%;
  max-width: 1200px;
  margin: 10vh auto;
  text-align: center;
}

.certs-title {
  font-family: "CardinalAlternate", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: white;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 30px;
  margin-top: 30px;
}

.cert-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  overflow: hidden;
  text-align: left;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.5);
}

.cert-img-box {
  width: 100%;
  height: 250px;
  margin-top: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.cert-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cert-info {
  padding: 25px;
}

.cert-info h3 {
  font-family: "CardinalAlternate", sans-serif;
  color: #fff;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 12px;
}

.cert-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ===== MODAL ===== */
.cert-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  margin: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: min(80vw, 95%);
  max-height: 75vh;
  object-fit: contain;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 28px;
  color: #f1f1f1;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: bold;
  cursor: pointer;
  transition:
    color 0.3s,
    transform 0.3s;
  line-height: 1;
  z-index: 10001;
  user-select: none;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #d1b8bb;
  transform: rotate(90deg);
}

/* ===== FUN GALLERY ===== */
.fun-gallery-section {
  width: 90%;
  max-width: 1200px;
  margin: 10vh auto;
  text-align: center;
  color: white;
}

.fun-title {
  font-family: "CardinalAlternate";
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
  color: #f1f1f1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.fun-subtitle {
  font-family: sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  opacity: 0.7;
  margin-bottom: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.fun-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* ── The card container ── */
.fun-card {
  width: min(260px, 100%);
  aspect-ratio: 13 / 17;
  perspective: 1000px;
  cursor: pointer;
}

.fun-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.75s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 12px;
}

@media (hover: hover) {
  .fun-card:hover .fun-inner {
    transform: rotateY(180deg);
  }
}

.fun-card.flipped .fun-inner {
  transform: rotateY(180deg);
}

.fun-front,
.fun-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.fun-front {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.fun-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.fun-back {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  gap: 10px;
}

.fun-back h3 {
  font-family: "CardinalAlternate", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.fun-back p {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: #d1b8bb;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

/* ===== CONTACT ===== */
.contact-section {
  width: 90%;
  max-width: 1100px;
  margin: 15vh auto 5vh;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px 20px;
  text-decoration: none;
  color: white;
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.contact-card i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #fff;
}

.contact-card span {
  font-family: "Firlest", sans-serif;
  letter-spacing: 2px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.contact-card p {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
  word-break: break-word;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  color: white;
  text-decoration: none;
}

.footer-text {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* ===== ANIMATIONS ===== */
.cursor {
  animation: blink 0.7s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== INTERACTIVE EFFECTS ===== */
.navbar .nav-link,
.btn-action,
.hire-btn button,
.contact-card,
.aff-card,
.tech-card,
.project-card-horizontal,
.webinar-card,
.cert-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.navbar .nav-link:hover {
  transform: scale(1.05);
}

.btn-action:hover,
.contact-card:hover,
.aff-card:hover,
.tech-card:hover,
.project-card-horizontal:hover,
.cert-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.navbar .nav-link:active,
.btn-action:active,
.hire-btn button:active,
.contact-card:active {
  transform: scale(0.97);
}

.projects-title,
.tech-title,
.about-title,
.certs-title,
.fun-title {
  display: inline-block;
  transition:
    transform 0.3s ease,
    text-shadow 0.3s ease;
}

.projects-title:hover,
.tech-title:hover,
.about-title:hover,
.certs-title:hover,
.fun-title:hover {
  transform: scale(1.02);
  text-shadow: 3px 3px 8px rgba(255, 255, 255, 0.6);
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
===================================================== */

/* Large tablets ≤ 1024px */
@media (max-width: 1024px) {
  .hero-content {
    left: 50%;
    width: 80%;
  }
  .project-card-horizontal {
    width: 680px;
  }
  .project-img-box {
    max-width: 260px;
  }
  .about-container {
    padding: 2rem;
  }
  .tech-card {
    flex: 1 1 260px;
  }
}

/* Tablets ≤ 768px */
@media (max-width: 768px) {
  .hero-content {
    left: 50%;
    top: 50%;
    width: 88%;
  }

  p.FULL {
    font-size: clamp(18px, 7vw, 48px);
    white-space: normal;
    word-break: break-word;
    text-align: center;
  }

  .about-container {
    padding: 1.5rem;
    margin-top: 10vh;
  }
  .section2 {
    padding: 100px 15px 60px;
  }

  .projects-section {
    width: 100%;
    overflow: hidden;
  }

  .project-window {
    width: 100%;
    overflow: hidden !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    padding: 20px 0 !important;
  }

  .project-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .project-img-box {
    margin: 0 0 15px 0 !important;
    max-width: 100% !important;
  }

  .project-info {
    text-align: center !important;
  }

  .project-tags,
  .project-links {
    justify-content: center !important;
  }

  .certs-grid {
    grid-template-columns: 1fr;
  }
  .webinar-card:hover {
    transform: none;
  }

  .fun-card {
    width: min(230px, calc(50vw - 24px));
  }
}

/* Mobile ≤ 600px */
@media (max-width: 600px) {
  .hero-content {
    top: 48%;
    width: 92%;
  }
  p.FULL {
    font-size: clamp(16px, 8vw, 34px);
  }
  .hire-btn button {
    padding: 0.6em 2em;
    font-size: 0.88rem;
  }
  .section2 {
    padding: 80px 12px 50px;
  }
  .about-title {
    font-size: 1.8rem;
  }
  .about-text {
    font-size: 0.92rem;
  }
  .tech-card {
    padding: 1.5rem;
    flex: 1 1 100%;
  }

  .project-img-box img {
    height: 140px;
  }
  .cert-img-box {
    height: 200px;
  }

  .aff-card {
    flex-direction: column;
    text-align: center;
    flex: 1 1 100%;
  }
  .aff-icon {
    margin: 0 auto;
  }
  .aff-info {
    text-align: center;
  }

  .contact-card {
    padding: 22px 15px;
  }
  .webinar-container {
    padding-left: 32px;
  }
  .webinar-card::before {
    left: -43px;
  }
  .modal-content {
    max-width: 95%;
    max-height: 70vh;
  }
  .close-modal {
    right: 14px;
    top: 10px;
    font-size: 36px;
  }

  .fun-card {
    width: min(200px, calc(50vw - 20px));
  }
}

/* Small phones ≤ 400px */
@media (max-width: 400px) {
  p.FULL {
    font-size: clamp(14px, 9vw, 28px);
  }
  .hire-btn button {
    padding: 0.5em 1.5em;
    font-size: 0.8rem;
  }
  .project-info h3,
  .cert-info h3 {
    font-size: 1.2rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .webinar-container {
    padding-left: 28px;
  }
  .webinar-card::before {
    left: -39px;
    width: 16px;
    height: 16px;
  }
  .fun-card {
    width: min(160px, calc(50vw - 18px));
  }
}

@media (hover: none) and (pointer: coarse) {
  .hire-btn button:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }
  .cert-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.2);
  }
  .contact-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
  }
  .aff-card:hover,
  .webinar-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .project-track:hover {
    animation-play-state: running;
  }
  .fun-card:hover .fun-inner {
    transform: none;
  }
  .fun-card.flipped .fun-inner {
    transform: rotateY(180deg);
  }
  .fun-card:focus-visible {
    outline: 2px solid #d1b8bb;
    outline-offset: 4px;
    border-radius: 12px;
  }

  @supports not (backdrop-filter: blur(10px)) {
    .about-container,
    .aff-card,
    .tech-card,
    .webinar-card,
    .cert-card,
    .fun-back,
    .contact-card,
    .parallax-header.scrolled {
      background: rgba(30, 20, 15, 0.95);
    }
  }
  .parallax-header.scrolled,
  .about-container,
  .aff-card,
  .tech-card,
  .webinar-card,
  .cert-card,
  .fun-back,
  .contact-card,
  .cert-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .project-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 20px;
  }
  .reveal,
  .reveal-card {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .hero-content {
    transition: none;
  }
  .fun-inner {
    transition: none;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .section1 {
    height: 100vw;
    min-height: 320px;
  }
  .hero-content {
    left: 60%;
    width: 50%;
  }
  p.FULL {
    font-size: clamp(1rem, 4vw, 2rem);
    margin-bottom: 12px;
  }
}
