/*
 * Savindu Nethmika — Portfolio Styles
 * Organized by page component. Responsive overrides stay near the components
 * they affect to preserve the original cascade and behavior.
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========================================================
   RESET & GLOBAL
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background: #0b1120;
  color: white;
  overflow-x: hidden;
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: blur(10px);
}

.navbar {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: white;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
}

.logo span {
  color: #38bdf8;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #38bdf8;
  text-shadow: 0 0 10px #2ba0ff;
}

.menu-btn {
  display: none;
  font-size: 22px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 100vh;
  max-width: 1200px;
  margin: auto;
  padding: 140px 20px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 70px;
}

.hero > * {
  min-width: 0;
}

.hello {
  margin-bottom: 10px;
  color: #38bdf8;
  font-size: 16px;
}

.hero h1 {
  font-size: 60px;
  line-height: 1.2;
}

.hero h1 span {
  color: #38bdf8;
}

.hero h2 {
  margin-top: 15px;
  color: #94a3b8;
  font-size: 25px;
}

.hero-description {
  max-width: 550px;
  margin-top: 20px;
  color: #94a3b8;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* =========================================================
   PROFILE PHOTO
   ========================================================= */

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.profile-photo {
  width: 220px;
  height: 220px;
  padding: 4px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.25);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn,
.btn2 {
  display: inline-block;
  border: none;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: 0.3s;
}

.btn {
  padding: 12px 25px;
}

.btn2 {
  padding: 5px;
}

.primary-btn {
  background: #38bdf8;
  color: #06101a;
  font-weight: 600;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

.secondary-btn {
  border: 1px solid #334155;
  color: white;
}

.secondary-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* =========================================================
   SOCIAL LINKS
   ========================================================= */

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 35px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.social-links a:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-4px);
}

/* =========================================================
   CODE / TERMINAL WINDOW
   ========================================================= */

.code-window {
  width: 100%;
  max-width: 500px;
  position: relative;
  border-radius: 12px;
  background: #111827;
  border: 1px solid #1e293b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  isolation: isolate;
}

/* Traveling cyan light */
.code-window::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;

  background: conic-gradient(
    from var(--deg),
    transparent 0deg,
    transparent 60deg,
    #38bdf8 90deg,
    transparent 180deg,
    transparent 240deg,
    #38bdf8 270deg,
    transparent 360deg
  );

  z-index: -1;
  filter: blur(6px);
  animation: rotateLight 3s linear infinite;
}

/* Hide the gradient itself behind the window */
.code-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #111827;
  z-index: -1;
}

@property --deg {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =========================================
   CODE WINDOW HEADER
   ========================================= */

.window-header {
  position: relative;
  z-index: 2;
  min-height: 48px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #1e293b;
  border-radius: 12px 12px 0 0;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.window-controls span:nth-child(1) {
  background: #ffffff;
}

.window-controls span:nth-child(2) {
  background: #6a86ff;
}

.window-controls span:nth-child(3) {
  background: #002fff;
}

/* Photo toggle button */

.photo-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #38bdf8;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.photo-toggle:hover {
  background: #164e63;
  border-color: #38bdf8;
  color: #ffffff;
}

.photo-toggle:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

/* =========================================
   3D FLIP CONTAINER
   ========================================= */

.flip-scene {
  width: 100%;
  height: 500px;
  perspective: 1200px;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #111827;
  overflow: hidden;
}

.flip-front {
  transform: rotateY(0deg);
}

.flip-back {
  transform: rotateY(180deg);
}

/* =========================================
   ASCII FACE
   ========================================= */

.flip-front .terminal-content {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flip-front #terminalOutput {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #38bdf8;
  font-family: "Courier New", monospace;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* =========================================
   REAL PHOTO FACE
   ========================================= */

.photo-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at center,
      #172b42 0%,
      #111827 70%
    );
}

.real-profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.5s ease 0.2s;
}

/* Reveal the photo when its face is active */

.flip-card.is-flipped .real-profile-photo {
  opacity: 1;
  transform: scale(1);
}

.photo-overlay {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #334155;
  border-radius: 7px;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(8px);
}

.photo-overlay span:first-child {
  color: #38bdf8;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
}

.photo-overlay span:last-child {
  color: #cbd5e1;
  font-size: 12px;
}

.face-caption {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.65);
}

/* =========================================
   RESPONSIVE & ACCESSIBILITY
   ========================================= */

@media (max-width: 600px) {
  .flip-scene {
    height: 400px;
  }

  .flip-front .terminal-content {
    padding: 16px 10px;
  }

  .flip-front #terminalOutput {
    font-size: clamp(9px, 2.5vw, 13px);
    line-height: 1.5;
  }

  .photo-frame {
    padding: 14px;
  }

  .photo-overlay {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .photo-toggle {
    padding: 7px 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card,
  .real-profile-photo {
    transition: none;
  }
}

.cursor::after {
  content: "_";
  animation: blink 0.8s infinite;
}

/* =========================================================
   ASCII PHOTO
   ========================================================= */

.ascii-photo {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(5px, 1.6vw, 8px) !important;
  line-height: 1 !important;
  text-align: left;
  white-space: pre;
  animation: photoReveal 1.5s ease forwards;
  transform-origin: left center;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  padding: 100px 20px;
}

.dark-section {
  background: #0f172a;
}

.section-title {
  margin-bottom: 60px;
  text-align: center;
}

.section-title p {
  color: #38bdf8;
  font-size: 13px;
  letter-spacing: 2px;
}

.section-title h2 {
  margin-top: 10px;
  font-size: 36px;
}

/* =========================================================
   ABOUT
   ========================================================= */

.about-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.about-text h3 {
  margin-bottom: 20px;
  font-size: 30px;
}

.about-text p {
  margin-bottom: 15px;
  color: #94a3b8;
  line-height: 1.8;
}

.about-text .btn {
  margin-top: 20px;
}

.about-info {
  display: grid;
  gap: 20px;
}

.info-card {
  padding: 30px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  transition: 0.3s;
}

.info-card:hover {
  transform: translateX(-8px);
  border-color: #38bdf8;
}

.info-card i {
  color: #38bdf8;
  font-size: 30px;
}

.info-card h3 {
  margin: 15px 0 10px;
}

.info-card p {
  color: #94a3b8;
  line-height: 1.6;
}

/* =========================================================
   SKILLS
   ========================================================= */

.skills-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.skill-card {
  padding: 35px 25px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  text-align: center;
  transition: 0.3s;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: #38bdf8;
}

.skill-card i {
  color: #38bdf8;
  font-size: 40px;
}

.skill-card h3 {
  margin: 20px 0 10px;
}

.skill-card p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

/* =========================================================
   CERTIFICATES
   ========================================================= */

.certificate-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.certificate-card {
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #111827;
  transition: 0.3s;
}

.certificate-card:hover {
  transform: translateY(-8px);
  border-color: #38bdf8;
}

.certificate-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.certificate-image-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}

.certificate-image-fallback i {
  color: #38bdf8;
  font-size: 70px;
}

.certificate-content {
  padding: 15px 15px 15px 25px;
}

.certificate-content2 {
  margin: 5px 15px 15px;
  padding: 5px 25px 25px 20px;
  border-left: 5px solid #37a2ff;
  border-radius: 10px;
  background-color: #08101d;
  box-shadow: 0 0 10px #0b1120;
}

.certificate-content2 p {
  margin: 15px 0;
  color: #94a3b8;
  line-height: 1.6;
}

.certificate-issue h4 {
  color: #357de2;
  font-weight: bold;
}

.certificate-issue p {
  margin: 5px 0;
  color: #94a3b8;
  font-size: small;
  line-height: 1.6;
}

.certificate-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.certificate-tech span {
  padding: 6px 10px;
  border-radius: 5px;
  background: #1e293b;
  color: #38bdf8;
  font-size: 12px;
}

.certificate-view-button {
  margin: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   PROJECTS
   ========================================================= */

.projects-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.project-card {
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #111827;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: #38bdf8;
}

.project-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.project-image-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}

.project-image-fallback i {
  color: #38bdf8;
  font-size: 70px;
}

.project-content {
  padding: 25px;
}

.project-content p {
  margin: 15px 0;
  color: #94a3b8;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  padding: 6px 10px;
  border-radius: 5px;
  background: #1e293b;
  color: #38bdf8;
  font-size: 12px;
}

.project-view-button {
  margin: 25px;
  display: grid;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   CARD HOVER EFFECTS
   ========================================================= */

.skill-card.scroll-reveal.show:hover,
.certificate-card.scroll-reveal.show:hover,
.project-card.scroll-reveal.show:hover {
  transform: translateY(-8px);
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-container {
  max-width: 1000px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-text h3 {
  font-size: 30px;
}

.contact-text p {
  margin: 20px 0;
  color: #94a3b8;
  line-height: 1.7;
}

.contact-item-container {
  padding: 10px 10px 10px 20px;
  border-left: 5px solid #badbf7;
  border-radius: 10px;
  background-color: #08101d;
  box-shadow: 0 0 10px #0b1120;
  transition: 0.3s;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #cbd5e1;
}

.contact-item:first-child {
  margin-bottom: 5px;
}

.contact-item i {
  color: #38bdf8;
}

/* =========================================================
   CONTACT FORM
   ========================================================= */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #334155;
  border-radius: 7px;
  background: #111827;
  color: white;
  font-family: inherit;
}

.contact-form textarea {
  height: 150px;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #38bdf8;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding: 30px;
  background: #08101d;
  text-align: center;
}

footer h3 {
  font-size: 22px;
}

footer span {
  color: #38bdf8;
}

footer p {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
}

/* =========================================================
   INTRO SCREEN
   ========================================================= */

.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1120;
  text-align: center;
  transform: translateY(0);
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.intro-screen.hide {
  transform: translateY(-100%);
  pointer-events: none;
}

.intro-content {
  padding: 30px;
  animation: introAnimation 1.5s ease;
}

.intro-welcome {
  margin-bottom: 20px;
  color: #38bdf8;
  font-size: 14px;
  letter-spacing: 4px;
}

.intro-content h1 {
  margin-bottom: 15px;
  font-size: 55px;
}

.intro-content h1 span {
  color: #38bdf8;
}

.intro-content h2 {
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 24px;
  font-weight: 400;
}

.intro-description {
  margin-bottom: 35px;
  color: #64748b;
  font-size: 16px;
}

.intro-btn {
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  background: #38bdf8;
  color: #06101a;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.intro-btn i {
  margin-left: 8px;
}

.intro-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 100%;
  background: transparent;
  color: white;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

#back-to-top:hover {
  border-color: #38bdf8;
  background: rgb(35, 32, 49);
  color: #38bdf8;
}

/* =========================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================= */

.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.scroll-reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal-left.show {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal-right.show {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes rotateLight {
  from {
    --deg: 0deg;
  }

  to {
    --deg: 360deg;
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes photoReveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes introAnimation {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-buttons,
  .social-links {
    justify-content: center;
  }

  .hero h1 {
    font-size: 45px;
  }

  .about-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: absolute;
    top: -300px;
    left: 0;
    width: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid #1e293b;
    background: #0b1120;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition:
      top 0.4s ease,
      opacity 0.4s ease;
  }

  .nav-links.active {
    top: 70px;
    opacity: 1;
    visibility: visible;
  }

  .menu-btn {
    display: block;
    z-index: 1001;
    cursor: pointer;
    transition: 0.3s;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 600px) {
  .intro-content h1 {
    font-size: 36px;
  }

  .intro-content h2 {
    font-size: 19px;
  }

  .intro-welcome {
    font-size: 11px;
    letter-spacing: 2px;
  }
}

@media (max-width: 500px) {
  .hero h1 {
    font-size: 38px;
  }

  .hero h2 {
    font-size: 20px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .ascii-photo {
    max-width: 100%;
    overflow: hidden;
    font-size: 4px !important;
    text-align: center;
    white-space: pre;
  }

  .terminal-content {
    height: 300px;
    padding: 15px;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* =========================================================
   MOBILE CARD CAROUSELS
   ========================================================= */

@media (max-width: 600px) {

  /* -------------------------------------------------------
     CAROUSEL CONTAINERS
     ------------------------------------------------------- */

  .skills-container,
  .certificate-container,
  .projects-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    /*
      IMPORTANT:
      Allow both vertical page scrolling and
      horizontal card swiping.
    */
    touch-action: pan-y pan-x;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .skills-container::-webkit-scrollbar,
  .certificate-container::-webkit-scrollbar,
  .projects-container::-webkit-scrollbar {
    display: none;
  }

  /* -------------------------------------------------------
     MOBILE CARDS
     ------------------------------------------------------- */

  .skills-container .skill-card,
  .certificate-container .certificate-card,
  .projects-container .project-card {

    flex-shrink: 0;
    min-width: 0;
    scroll-snap-align: start;

    /*
      Disable vertical scroll-reveal movement inside
      horizontal carousels.

      Otherwise a card can appear slightly lower
      when you swipe to it.
    */
    opacity: 1;
    transform: none !important;
  }

  /* Card widths */

  .skills-container .skill-card {
    flex-basis: calc(100% - 45px);
  }

  .certificate-container .certificate-card,
  .projects-container .project-card {
    flex-basis: calc(100% - 35px);
  }

  /* -------------------------------------------------------
     MOBILE HOVER
     ------------------------------------------------------- */

  /*
    Mobile devices don't really have hover.
    More importantly, this prevents the card from
    moving outside the carousel and being clipped.
  */

  .skills-container .skill-card:hover,
  .certificate-container .certificate-card:hover,
  .projects-container .project-card:hover {
    transform: none !important;
  }

  /* -------------------------------------------------------
     PAGINATION DOTS
     ------------------------------------------------------- */

  .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
  }

  .carousel-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    transition:
      width 0.3s ease,
      background 0.3s ease,
      box-shadow 0.3s ease;
  }

  .carousel-dot.active {
    width: 22px;
    border-radius: 10px;
    background: #38bdf8;
    box-shadow:
      0 0 10px rgba(56, 189, 248, 0.45);
  }
}

/* ---------------------------------------------------------
   HIDE PAGINATION DOTS ON DESKTOP
   --------------------------------------------------------- */

@media (min-width: 601px) {

  .carousel-dots {
    display: none;
  }

}

/* =========================================
   EDUCATION TIMELINE
   ========================================= */

.education-timeline {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 10px 0;
}

/* Vertical timeline line */

.education-timeline::before {
  content: "";
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 23px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    #38bdf8,
    #1e293b
  );
}

.education-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.education-item:last-child {
  margin-bottom: 0;
}

/* Timeline icon */

.education-marker {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #38bdf8;
  border-radius: 50%;
  background: #0b1120;
  color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

/* Education card */

.education-card {
  min-width: 0;
  padding: 23px 25px;
  border: 1px solid #26364c;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    #111c2e,
    #0f172a
  );
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.education-card:hover {
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.education-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.education-label {
  color: #38bdf8;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.education-status {
  padding: 4px 9px;
  border: 1px solid #334155;
  border-radius: 20px;
  color: #94a3b8;
  font-size: 11px;
}

.education-card h3 {
  margin: 0 0 7px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.5;
}

.education-qualification {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
}

.education-result {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.education-result span {
  padding: 8px 12px;
  border: 1px solid #26364c;
  border-radius: 7px;
  background: rgba(11, 17, 32, 0.7);
  color: #cbd5e1;
  font-size: 12px;
}

.education-result strong {
  color: #38bdf8;
  font-size: 15px;
}

.education-note {
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}

/* Mobile layout */

@media (max-width: 600px) {
  .education-timeline::before {
    left: 17px;
  }

  .education-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }

  .education-marker {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .education-card {
    padding: 17px;
  }

  .education-card h3 {
    font-size: 16px;
  }

  .education-result {
    gap: 7px;
  }

  .education-result span {
    padding: 7px 9px;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  .education-card {
    transition: none;
  }
}

/* =========================================================
   FORM STATUS & GLOBAL BUTTON STATES
   ========================================================= */

#formStatus {
    margin-top: 12px;
    font-size: 0.95rem;
}

#formStatus.success {
    color: #22c55e;
}

#formStatus.error {
    color: #ef4444;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
