:root {
  --bg-color: #0b0b0b;
  --primary-color: #e63946;
  --secondary-color: #ffffff;
  --text-light: #d3d3d3;
  --card-bg: #131313;
  --font-family: "Poppins", sans-serif;

  /* Mobile/tablet default */
  --section-rule: clamp(140px, 38vw, 260px);
  --section-gap: clamp(0.75rem, 6vw, 3rem);
}

/* ===== Custom scrollbar (site-wide) ===== */
/* Chromium / Safari / Edge */
*::-webkit-scrollbar {
  width: 12px; /* overall width of the bar */
}
*::-webkit-scrollbar-track {
  background: #121212; /* track color */
}
*::-webkit-scrollbar-thumb {
  background: var(--primary-color); /* red thumb */
  border-radius: 10px;
  border: 2px solid #121212; /* creates a gap around the thumb */
}
*::-webkit-scrollbar-thumb:hover {
  background: #c52e3a; /* slightly darker on hover */
}
*::-webkit-scrollbar-thumb:active {
  background: #a8242e; /* pressed state */
}

/* Firefox */
html {
  scrollbar-width: thin; /* auto | thin | none */
  scrollbar-color: var(--primary-color) #121212; /* thumb | track */
}

/* Optional: keep layout from shifting when scrollbar appears */
html {
  scrollbar-gutter: stable;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-light);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ###################################### Global Styles ###################################### */
.skills,
.awards {
  max-width: 1400px;
}

/*###################################### Navigation ######################################*/
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(11, 11, 11, 0.9);
  z-index: 1000;
  border-bottom: 1px solid rgba(230, 57, 70, 0.2);
}

/* Left Nav Logo */
.nav-logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 40px;
  width: auto;
  transition: filter 0.3s ease;
}
.nav-logo img:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 8px #e63946);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav .logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 2px;
}

/* Right nav links */
.nav nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav nav a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.3s;
}

/* Red Hover over nav button */
.nav nav a:hover,
.nav nav a.active {
  /*Active nav link*/
  color: var(--primary-color);
}

/* when pressed on nav btn red underline appears */
.nav nav a.active {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-underline-offset: 4px;
}

/* Contact me Nav */
#contact-me {
  outline: none; /* removes default focus outline */
  background-color: transparent;
  color: white;
  border: 1px solid var(--primary-color); /* stroke around the button */
  border-radius: 8px;
  padding: 10px 40px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 0 13px #9e111e; /* soft glow */
  transition: all 0.35s ease, border-color 0.3s ease;
}

#contact-me::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: #9e111e;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  opacity: 1;
}

#contact-me:hover {
  color: var(--red);
  border-color: transparent; /* hide border during hover */
  box-shadow: 0 0 22px #9e111e; /* soft glow */
  border: none; /* your red stroke */
}

#contact-me:hover::before {
  transform: scaleX(1);
}

#contact-me:active {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
}

/*###################################### Hero Section ######################################*/
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  position: relative;
  text-align: center;
}

.hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: none;
  margin: 0 auto;
  width: 100%;
  padding: 0 -20px; /* adds consistent edge breathing room */
  flex-wrap: wrap;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

/* left side */
.hero-left {
  text-align: left;
  padding-left: 40px;
  max-width: none;
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 30px;
  margin-top: 1.8rem;
}

.intro-text {
  font-size: 1.7rem;
  background-color: #1b1b1b;
  color: white;
  padding: 6px 23px;
  border-radius: 4px;
  font-weight: 400;
  margin-bottom: 4px; /* tighten spacing */
  display: inline-block;
}

.intro-wrapper {
  display: flex;
  align-items: center;
}

/* Download CV Button */
a.btn-download-cv,
button.btn-download-cv {
  display: inline-block;
  background: transparent;
  color: white;
  border: none;
  outline: none;
  border-radius: 8px;
  padding: 10px 30px;
  font-size: 2rem;
  font-family: "Poppins", sans-serif;
  font-variation-settings: "wght" 100;
  letter-spacing: 2px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  margin-top: 1.2rem;
  text-align: center;
  z-index: 1;
  cursor: pointer;

  /* ✅ Unified transition */
  transition: font-variation-settings 0.3s ease, transform 0.2s ease,
    letter-spacing 0.2s ease, box-shadow 0.3s ease;
}

/* Background Gradient */
.btn-download-cv::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 100%;
  background: linear-gradient(120deg, #ffba8b, #dfb0ff, #ff4d07, #fc74a1);
  background-size: 300% 100%;
  background-position: 0% 50%;
  z-index: -1;
  transition: all 0.3s ease;
}

/* Hover Effects */
.btn-download-cv:hover {
  transform: scale(1.03);
  letter-spacing: 1px;
  color: white;
  box-shadow: 0 0 18px #ffabf1;
  border-color: transparent;
  font-weight: 600;
}

/* Gradient Move on Hover */
.btn-download-cv:hover::before {
  background: linear-gradient(270deg, #eb3e78, #f5e09c, #c47cff, #00a2ff);
  background-size: 300% 100%;
  background-position: 0% 50%;
}

/* Click Push Effect */
.btn-download-cv:active {
  transform: scale(0.95);
  box-shadow: 0 0 8px #ffabf1;
}

.socials-section {
  margin-top: 4rem; /* spacing between button and label */
}

.socials-label {
  display: inline-block;
  background-color: #1e1e1e;
  color: white;
  font-size: 1rem;
  padding: 4px 15px;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icons a {
  color: white;
  font-size: 1.4rem;
  background: #1b1b1b;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-icons a:hover {
  background: #f24e5c;
  transform: scale(1.1);
}

/* end left*/

.red-line {
  display: inline-block;
  width: 180px;
  height: 4px;
  background-color: var(--primary-color);
  margin-left: 40px;
  vertical-align: middle;
}
.hero-name {
  font-size: 3.6rem;
  font-weight: 900;
  color: white;
  margin: 6px 0 4px; /* reduced top & bottom margin */
  line-height: 1.1;
}

.hero-right {
  text-align: left;
  padding-left: 11px; /* increase this to move everything right */
  padding-top: 1rem; /* increase this to move everything down */
  margin-right: 30px;
  max-width: none;
  flex: 1.2;
}

.hero-bottom-line {
  width: 100vw;
  height: 8px;
  background-color: #9e111e;
  margin: 0; /* remove -6px if not needed */
  border-radius: 2px; /* rounded corners */
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-logo img.hero-img {
  width: 640px; /* Adjust width as needed for center photo img */
  height: auto;
  max-width: 100%;
  padding-right: 1rem;
}

/* Typing effect */
.hero-typed,
.right-intro,
.typed-text {
  font-size: 2rem;
}

.typed-text,
.right-intro,
.redauto {
  color: #f24e5c;
}

.typed-text {
  font-weight: 400;
  margin-top: 0.3rem; /* tighter */
}

/* Right auto text container for the animation*/
.rightauto-container {
  border-left: 4px solid #f24e5c; /* Red vertical line */
  padding-left: 12px; /* Space between line and text */
  margin-top: 8rem; /* Space above CHANG THIS*/
  display: inline-block; /* So it sizes to content */
}

.right-intro {
  margin-bottom: -0.8rem;
}

.description {
  font-size: 1.3rem;
  font-family: poppins, sans-serif;
  color: var(--text-light);
  margin-top: 0.5rem;
  line-height: 1.4;
  font-weight: 400;
}

.description strong {
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.39);
}

.typed-right {
  font-size: 1.4rem;
  font-weight: 600;
  display: block; /* ensures margin-top works vertically */
}

/* Section Titles */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--section-gap);
  margin: 5rem 0 5rem;
}

.section-title::before,
.section-title::after {
  content: "";
  height: 3px;
  width: var(--section-rule); /* <- uses your var */
  background: var(--primary-color);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.25);
}

.section-title .highlight {
  display: inline-block;
  background: #a1051c;
  color: var(--secondary-color);
  padding: 1rem 3rem;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  font-size: 1.85rem;
}

/* == Reduce the “boxed” side gutters == */
/* Wider content area for both sections */
.skills,
.awards {
  /* expand width without going edge-to-edge */
  width: min(1500px, 94vw);
  max-width: none; /* overrides earlier max-width: 1100/800 */
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Projects Section */
.projects {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-top: 1.16rem;
}

.highlight-label {
  color: var(--secondary-color); /* White text */
  background-color: #a1051c; /* Red background */
  padding: 0rem 0.5rem;
  margin-right: 0.3rem; /* Reduced space between label and text */
  display: inline-block;
  position: relative;
}

/* Continuous underline solution */
.project-details h3 {
  position: relative;
  display: inline-block; /* Contain the underline */
  padding-bottom: 2px; /* Space for underline */
  padding-right: 5px;
}

.project-details h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%; /* Extends full width of h3 */
  height: 4px;
  background-color: #a1051c; /* Same red as highlight */
}

/* Project item layout adjustments */
.project-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4rem;
  gap: 2rem;
}

.project-item.reverse {
  flex-direction: row-reverse;
}

/* Landscape image container */
.project-image.landscape img {
  width: 100%;
  max-width: 800px; /* Adjust as needed */
  aspect-ratio: 16/9; /* Standard landscape ratio */
  object-fit: cover; /* Ensures image fills container */
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
  border-radius: 5px;
}

.project-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
}

.project-details {
  flex: 1;
  min-width: 300px;
}

.project-details h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  text-transform: uppercase;
}

.project-details h3 .label {
  color: var(--primary-color);
}

.project-details h4 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  background-color: #212120; /* Red background */
  width: fit-content;
  padding: 0rem 0.5rem;
}

.project-details ul {
  list-style: none;
  padding-left: 1rem;
}

.project-details li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.2rem;
  color: var(--text-light);
  font-size: 1.3rem;
  font-weight: 500;
}

.project-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem; /* Adjusted dots for better vertical alignment */
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.features-label {
  color: #f24e5c; /* Red text */
}

/* Maintain flex layout */
.project-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
/* Slideshow container */
.project-slideshow {
  position: relative;
  width: 100%;
  max-width: 400px; /* Limits maximum width */
  margin: 0 auto; /* Centers the slideshow */
}

/* Slideshow image container */
.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
}

/* Slide images - REVERTED to original behavior */
.slide {
  display: none;
  width: 100%;
}

/* Slide images */
.slide img {
  width: 100%;
  vertical-align: middle;
  border-radius: 12px;
  /* REMOVED object-fit and height properties */
  /* Images will now display at their natural aspect ratio */
}

/* For landscape images */
.project-image.landscape .slideshow-container {
  aspect-ratio: 16/9; /* Wider format for landscape */
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a darker background */

.dots-container {
  text-align: center;
  padding: 15px 0;
}

.dot {
  cursor: pointer;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.active-dot,
.dot:hover {
  background-color: var(--primary-color);
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1s;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* For landscape images */
.project-image.landscape .slideshow-container {
  max-width: 800px;
}

.project-image.landscape .slide img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* =========================
   Skills Section (FULL)
   ========================= */

:root {
  /* card height you can tweak */
  --skill-card-min: clamp(220px, 24vw, 300px);
}

.skills {
  margin: 0 auto;
  padding: 0 1rem;
  width: min(1500px, 94vw); /* optional: gives you more horizontal room */
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* base: 3 columns */
  gap: 1.6rem;
  justify-items: stretch;
  align-items: stretch;
}

.skill-box {
  position: relative;
  background-color: var(--card-bg);
  padding-top: 3.2rem;
  padding-left: 3rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.2);

  /* equal heights (your var) */
  min-height: var(--skill-card-min);

  /* tidy internals */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  /* needed for the pseudo-element masking */
  overflow: hidden;
  isolation: isolate; /* keeps glow from bleeding */
}

/* Animated gradient layer (hidden until hover) */
.skill-box::before {
  content: "";
  position: absolute;
  inset: -1px; /* tiny spill for a soft outer glow */
  border-radius: inherit;
  background: linear-gradient(120deg, #ffba8b, #dfb0ff, #ff4d07, #fc74a1);
  background-size: 300% 100%;
  z-index: 0;
  opacity: 0; /* only visible on hover */
  transition: opacity 0.25s ease, filter 0.25s ease;
  filter: blur(0px);
}

/* Mask to keep the inside dark while the gradient shows as a border/glow */
.skill-box::after {
  content: "";
  position: absolute;
  inset: 2px; /* thickness of the animated “border” */
  border-radius: calc(12px - 2px);
  background: var(--card-bg); /* retains dark interior */
  z-index: 1;
}

/* Keep content above the masks */
.skill-box > * {
  position: relative;
  z-index: 2;
}

/* Hover state: show gradient + animate + glow */
.skill-box:hover::before {
  opacity: 1;
  animation: gradient-pan 6s linear infinite;
  box-shadow: 0 0 14px rgba(255, 171, 241, 0.35),
    0 0 28px rgba(230, 57, 70, 0.25);
}

/* Optional: subtle lift */
.skill-box:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.skill-box h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  min-height: 1.8em; /* avoids tiny wrap height jump */
}

.skill-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-box li {
  position: relative;
  font-size: 1.2rem;
  font-weight: 550;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.skill-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

/* Gradient animation keyframes (same vibe as your button) */
@keyframes gradient-pan {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .skill-box:hover::before {
    animation: none;
  }
}

/* Awards Section */
.awards {
  min-height: 100vh;
  margin: 0 auto 4rem;
  padding: 0 1rem;
  text-align: center;
}

.award-list {
  list-style: none;
  margin-top: 3.5rem;
}

.award-list li {
  margin-bottom: 2rem; /* Increased spacing between list */
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-light);
}

.award-list li strong {
  color: var(--primary-color);
}
/* =========================
   Organizations (CLEAN)
   ========================= */

.organizations {
  margin: 0 auto;
  padding: 0 1rem;
  padding-bottom: 4rem; /* ⬅ add this */
  width: min(1500px, 94vw);
}

/* tighten gaps */
.org-grid {
  display: grid;
  gap: 1.2rem;
  row-gap: 1.6rem;
}

/* Card (image container) — gradient border via background-clip */
.org-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;

  /* SIZE (tweak these to change box size in future) */
  width: clamp(300px, 32vw, 500px); /* <- change this for wider/narrower */
  max-width: 100%;
  aspect-ratio: 500 / 480; /* <- change this for taller/shorter */
  place-self: center;

  border: 3px solid transparent;
  background:
    /* inner fill */ linear-gradient(
        var(--card-bg),
        var(--card-bg)
      )
      padding-box,
    /* gradient ring */
      linear-gradient(120deg, #ffba8b, #dfb0ff, #ff4d07, #fc74a1) border-box;
  background-size: 100% 100%, 300% 100%;
  background-position: 0 0, 0% 50%;
  background-repeat: no-repeat;

  box-shadow: 0 0 15px rgba(230, 57, 70, 0.2);
  transition: background-position 0.5s linear, box-shadow 0.25s ease,
    transform 0.25s ease;
}

/* Image fits card */
.org-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(95%);
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* Hover */
.org-card:hover {
  background-position: 0 0, 100% 50%;
  box-shadow: 0 0 14px rgba(255, 171, 241, 0.35),
    0 0 28px rgba(230, 57, 70, 0.25);
  transform: translateY(-1px);
}
.org-card:hover img {
  transform: scale(1.03);
  filter: saturate(110%);
}

/* Footer */
.footer {
  background-color: #131313;
  padding: 2rem 1rem 1rem;
  color: var(--text-light);
  margin-top: 2rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.footer-nav a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #999; /* gray background */
  color: #000; /* black icon color */
  font-size: 1.2rem;
  margin-right: 0.8rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background-color: #666; /* darker gray */
  color: #fff; /* white icon on hover */
}

.contact-info i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #d3d3d3; /* icon color */
  background: #2a2a2a; /* subtle dark circle */
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25) inset;
}

.contact-info a {
  color: var(--text-light);
  text-decoration: none;
}
.contact-info a:hover {
  color: var(--primary-color);
}

.contact-info p {
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Thin divider above credits */
.credits {
  position: relative;
  margin-top: 1rem;
  padding-top: 0.8rem; /* room for the line */
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  opacity: 0.85;
}

.credits::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 85%); /* adjust line length here */
  height: 1px;
  background: rgba(255, 255, 255, 0.18); /* thin grey line */
}

/* Preloader base styles (animations moved to animations.css) */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0b0b0b;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10000;
}

.loader {
  text-align: center;
}

.loader .logo {
  width: 70px;
}

.underline {
  position: relative;
  width: 120px;
  height: 2px;
  background-color: #222;
  margin: 20px auto 0;
  overflow: hidden;
  border-radius: 1px;
}

.underline .bar {
  position: absolute;
  width: 40px;
  height: 100%;
  background-color: #e63946;
  border-radius: 2px;
  opacity: 0.9;
  box-shadow: 0 0 8px #e63946, 0 0 16px #e63946;
}

#projects {
  scroll-margin-top: 80px; /* Adjust based on your nav height */
}

/* ===== Contact Modal - the pop-up ===== */
.mz-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10050;
}
.mz-modal.open {
  display: block;
}

.mz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mz-modal.open .mz-backdrop {
  opacity: 1;
}

.mz-dialog {
  position: relative;
  width: min(560px, 92vw);
  margin: min(10vh, 8rem) auto 0;
  background: #0e0e0e;
  border: 1px solid #e63946;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(230, 57, 70, 0.25);
  padding: 20px 22px;
  color: #eaeaea;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mz-modal.open .mz-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.mz-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 24px;
  line-height: 24px;
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
}
.mz-close:hover {
  color: #fff;
}

.mz-form label {
  display: block;
  font-size: 0.9rem;
  color: #cfcfcf;
  margin: 12px 0 6px;
}
.mz-form input,
.mz-form textarea {
  width: 100%;
  background: #141414;
  color: #f1f1f1;
  border: 1px solid #2b2b2b;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.mz-form input:focus,
.mz-form textarea:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25);
}

.mz-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 14px;
}
.mz-btn {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.mz-btn-primary {
  background: #e63946;
  color: #fff;
  border: 1px solid #e63946;
}
.mz-btn-primary:hover {
  filter: brightness(1.05);
}
.mz-btn-ghost {
  background: transparent;
  color: #eaeaea;
  border: 1px solid #555;
}
.mz-btn-ghost:hover {
  border-color: #777;
}

/* lock scroll when modal open */
body.mz-no-scroll {
  overflow: hidden;
}

/* Contact modal textarea: fixed size + internal red scrollbar */
.mz-form textarea {
  /* stop dragging the corner */
  resize: none;

  /* keep your default size but cap growth */
  min-height: 120px; /* adjust if you want a smaller default */
  max-height: 148px; /* cap */
  overflow-y: auto; /* scroll inside when content is long */
  overflow-x: hidden;

  /* avoid layout shift when scrollbar appears */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #e63946 #111; /* Firefox */

  /* optional smoothness */
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}

/* WebKit scrollbars (Chrome/Edge/Safari) */
.mz-form textarea::-webkit-scrollbar {
  width: 8px;
}
.mz-form textarea::-webkit-scrollbar-track {
  background: #111;
  border-radius: 8px;
}
.mz-form textarea::-webkit-scrollbar-thumb {
  background: #e63946;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(230, 57, 70, 0.35);
}
.mz-form textarea::-webkit-scrollbar-thumb:hover {
  background: #ff4d5a; /* subtle hover */
}

/* WebKit scrollbar arrow buttons: keep arrows, remove background */
.mz-form textarea::-webkit-scrollbar-button {
  background: transparent; /* no box behind the arrow */
  border: none;
  outline: none;
  width: 8px; /* keep a small hit area */
  height: 10px;
}

.mz-form textarea::-webkit-scrollbar-button:single-button:vertical:decrement,
.mz-form textarea::-webkit-scrollbar-button:single-button:vertical:increment {
  background: transparent; /* ensure top/bottom buttons stay transparent */
}

.mz-form textarea::-webkit-scrollbar-button:hover {
  background: transparent; /* no hover plate either */
}
