:root {
  --primary: #18479f;
  --primary-dark: #0f2d6b;
  --primary-darker: #0a1f4d;
  --accent: #3a86ff;
  --text: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --bg: #0a0a0a;
  --bg-light: #121212;
  --bg-lighter: #1e1e1e;
  --card-bg: rgba(30, 30, 40, 0.6);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --section-padding: clamp(6rem, 15vh, 10rem);
  --border-radius: 12px;
  --glass-bg: rgba(10, 10, 10, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@font-face {
  font-family: "Clash Display";
  src: url("https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&display=swap");
}

@font-face {
  font-family: "Satoshi";
  src: url("https://fonts.googleapis.com/css2?family=Satoshi:wght@400;500;700&display=swap");
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin-bottom: 1.5rem;
  color: var(--primary);
  background: linear-gradient(90deg, #18479f, #3a86ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 3rem;
  position: relative;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p {
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Layout */
.container {
  width: 92%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.4); /* semi-transparent dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo-img {
  width: clamp(60px, 8vw, 120px);
  height: clamp(60px, 8vw, 120px);
  object-fit: contain;
  transition: var(--transition);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-secondary);
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  background: transparent;
  border: none;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  position: absolute;
  transition: var(--transition);
  transform-origin: center;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu Popup - Updated Style */
.mobile-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-links {
  list-style: none;
  text-align: center;
  width: 100%;
}

.mobile-menu-links li {
  margin: 1.5rem 0;
  width: 100%;
}

.mobile-menu-links a {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
  display: block;
  padding: 0.8rem;
  border-radius: 8px;
}

.mobile-menu-links a:hover {
  background: rgba(24, 71, 159, 0.2);
  color: var(--primary);
}

.close-menu {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  color: white;
  font-size: 1.2rem;
}

.close-menu:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Hero Section */
#hero {
  height: 100vh;
  min-height: 900px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.8)),
    url("https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D")
      no-repeat center center/cover;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero-description {
  max-width: 600px;
  margin-bottom: 2rem;

  font-size: clamp(0.5rem, 3vw, 1.2rem);
  text-align: left;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  font-weight: 400;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, #18479f, #3a86ff);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(24, 71, 159, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: linear-gradient(90deg, #18479f, #3a86ff);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(24, 71, 159, 0.3);
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.scroll-icon {
  width: 36px;
  height: 54px;
  border: 2px solid var(--text-secondary);
  border-radius: 25px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-icon::before {
  content: "";
  width: 5px;
  height: 8px;
  background: var(--text);
  border-radius: 3px;
  animation: scroll 2s infinite;
}

/* About Section */
#about {
  background-color: var(--bg-light);
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
}

.skills {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.skill-item {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  width: 100%;
}

.skill-name {
  font-weight: 600;
  color: var(--text);
}

.skill-percent {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.skill-progress {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 1rem 0;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
}

.progress-ring__circle-bg {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 6;
  fill: none;
}

.progress-ring__circle {
  stroke: url(#gradient);
  stroke-width: 6;
  stroke-linecap: round;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 326.56;
  stroke-dashoffset: 326.56;
  transition: stroke-dashoffset 1.5s ease-out;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.about-image {
  height: 90%;
  position: relative;
  border-radius: 100%;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1/1;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  opacity: 1;
}

.about-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Tools Section */
#tools {
  position: relative;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.tool-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.tool-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.tool-name {
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

.tool-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Portfolio Section */
#portfolio {
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #ffffffb3;
  max-width: 500px;
  line-height: 1.6;
}

.portfolio-filter {
  display: flex;
  gap: 1rem;
}

.filter-btn {
  /* keep base styles */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 0.5rem 1.5rem;
  border-radius: 999px; /* keep pill shape */
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center;
  min-width: 120px;
  max-width: 100%;
  white-space: nowrap;
  
}
.filter-btn {
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s ease,
              box-shadow 0.4s ease,
              transform 0.3s ease;
  will-change: transform, box-shadow, background;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(90deg, #18479f, #3a86ff);
  color: white;
  border-color: transparent;
  background-clip: padding-box;
    transform: translateY(-2px);
  box-shadow: 0 2px 10px rgba(24, 71, 159, 0.3);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  transition: var(--transition);
  transform-origin: center;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgb(10, 10, 10) 0%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: var(--transition);
  transition-delay: 0.1s;
  color: white;
  text-shadow: 0 5px 10px rgba(0, 0, 0);
}

.portfolio-category {
  color: var(--primary);
  transform: translateY(20px);
  transition: var(--transition);
  transition-delay: 0.2s;
    color: rgba(255, 255, 255, 0.581);
        text-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.portfolio-item:hover .portfolio-title,
.portfolio-item:hover .portfolio-category {
  transform: translateY(0);
}

/* Video Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  backdrop-filter: blur(20px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  width: 80%;
  max-width: 1200px;
  position: relative;
}

.lightbox-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: black;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.lightbox-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-lightbox {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  color: white;
  font-size: 1.2rem;
}

.close-lightbox:hover {
  background: linear-gradient(90deg, #18479f, #3a86ff);
  transform: rotate(90deg);
}

/* Contact Section */
#contact {
  background-color: var(--bg-light);
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 2rem;
  max-width: 400px;
}

.contact-details {
  margin-bottom: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(24, 71, 159, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.2rem;
  color: var(--primary);
}

.contact-text {
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: linear-gradient(90deg, #18479f, #3a86ff);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(24, 71, 159, 0.3);
}

.social-link i {
  font-size: 1.2rem;
  color: white;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(24, 71, 159, 0.1);
  box-shadow: 0 0 0 3px rgba(24, 71, 159, 0.2);
}

.contact-form textarea {
  height: 150px;
  resize: none;
}

.form-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.form-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(24, 71, 159, 0.4);
}

/* Footer */
footer {
  padding: 3rem 0;
  text-align: center;
  background-color: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

/* SVG Gradient */
svg {
  position: absolute;
  width: 0;
  height: 0;
}

/* Animations */
@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .container {
    width: 95%;
  }
}

@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  section {
    padding: 5rem 0;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .btn-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }

  .lightbox-content {
    width: 95%;
  }
}

@media (max-width: 576px) {
  .container {
    width: 100%;
    padding: 0 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .logo-img {
    width: 100px;
    height: 100px;
  }

  .mobile-menu {
    width: 90%;
    padding: 2rem 1.5rem;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.progress-ring__circle {
  stroke: url(#gradient); /* uses the JS-injected gradient */
  stroke-linecap: round;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 326.56;
  stroke-dashoffset: 326.56;
  transition: stroke-dashoffset 1.5s ease-out;
}

.hi {
  text-align: left;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  font-size: clamp(1.5rem, 6vw, 3.3rem);
  margin-bottom: -1rem;
}

.scroll-texts {
  text-align: left;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  font-size: clamp(1.5rem, 6vw, 3.3rem);
  gap: 0.5ch;
}

/* Scrolling words container */
.scrolling-words {
  display: inline-block;
  height: 3.6rem; /* Height of one line */
  overflow: hidden;
  vertical-align: top;
}

.scrolling-words-list {
  display: flex;
  flex-direction: column;
  animation: scrollWords 6s infinite;
}

.scrolling-word-wrapper {
  position: relative;
  display: inline-block;
}

.scrolling-word {
  height: 3.6rem;
  line-height: 3.6rem;
  padding: 0 0.2ch;
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 3.3rem);
  background: linear-gradient(90deg, #18479f, #3a86ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.scrolling-word.shadow {
  position: absolute;
  top: 2px;
  left: 1px;
  z-index: 0;
  background: none;

  -webkit-text-fill-color: rgba(255, 255, 255, 1);
  background-clip: border-box;
}

/* Smooth scroll animation */
@keyframes scrollWords {
  0%,
  10% {
    transform: translateY(0);
  }
  20%,
  30% {
    transform: translateY(-3.6rem); /* Move up one word */
  }
  40%,
  50% {
    transform: translateY(-7.2rem); /* Move up two words */
  }
  60%,
  70% {
    transform: translateY(-10.8rem); /* Move up three words */
  }
  80%,
  90% {
    transform: translateY(0); /* Reset to first word */
  }
  100% {
    transform: translateY(0);
  }
}

.section-title {
  font-weight: 700;
  color: #18479f;
font-size: clamp(2rem, 6vw, 4.5rem);
text-shadow: clamp(0.8px, 0.2vw, 1.5px) clamp(0.8px, 0.2vw, 1.5px) 0 #fff;


}
.name {
  background: linear-gradient(-45deg, #18479f, #3a86ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: bold;
}

@media (max-width: 576px) {
  .portfolio-filter {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 0.75rem); /* 2 per row with gap */
    min-width: 140px; /* optional to prevent too small buttons */
    text-align: center;
  }
}
.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 2px solid var(--primary);
  background-color: transparent;
  color: var(--primary);
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.load-more-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, #18479f, #3a86ff);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.load-more-btn:hover::before,
.load-more-btn:active::before {
  opacity: 1;
}

.load-more-btn:hover,
.load-more-btn:active {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 71, 159, 0.25);
}


.load-more-btn i {
  font-size: 1rem;
}

.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* .tools-grid::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 3rem;
  height: 100%;
  background: linear-gradient(to left, var(--bg), transparent);
  pointer-events: none;
} */

.tools-grid {
  position: relative;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}


@media (max-width: 576px) {
  .tools-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  .tool-item {
    flex: 0 0 80%; /* shows one full card + a peek of next */
    scroll-snap-align: start;
    box-sizing: border-box;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
  }

  .tools-grid::-webkit-scrollbar {
    height: 6px;
  }

  .tools-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 576px) {
  .btn-group {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .btn {
    flex: 0 0 auto;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    min-width: auto;
    max-width: none;
  }

  .btn-primary {
    background: linear-gradient(90deg, #18479f, #3a86ff);
    color: white;
    border: none;
  }

  .btn-outline {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
  }
}
.lightbox.loading .lightbox-content::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  --c: no-repeat linear-gradient(#18479f 0 0); /* Your brand color */
  background: var(--c), var(--c), var(--c);
  animation: 
    l18-1 1s infinite ease-in-out,
    l18-2 1s infinite ease-in-out;
  z-index: 10;
}

/* Background size pulse */
@keyframes l18-1 {
  0%, 100% { background-size: 20% 100%; }
  33%, 66% { background-size: 20% 20%; }
}

/* Background position shifting */
@keyframes l18-2 {
  0%, 33%   { background-position: 0 0, 50% 50%, 100% 100%; }
  66%, 100% { background-position: 100% 0, 50% 50%, 0 100%; }
}

.lightbox.loading .lightbox-video {
  opacity: 0.3;
  filter: blur(2px);
}

.lightbox.loading .close-lightbox {
  display: none;
}
