:root {
  --primary: #2553b8;
  --secondary: #0b6ea8;
  --azure: #0284c7;
  --blue: #1e3a8a;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --white: #f8fafc;
  --white-secondary: #f1f5f9;
  --bg-dark: #0f172a;
  --gradient-2: linear-gradient(135deg, #0284c7 0%, #2553b8 100%);
  --container-padding: 2rem;
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --measure: 68ch;
}

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

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

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--white);
  overflow-x: hidden;
  font-size: clamp(1.05rem, 0.35vw + 0.98rem, 1.18rem);
  letter-spacing: 0.005em;
}

img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,h4,h5 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
}
h3 {
  color: var(--primary);
}
h4 {
  color: var(--blue);
}
h5 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
}
p {
  font-family: var(--font-body);
  line-height: 1.72;
  max-width: var(--measure);
}
.copyright {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 2rem;
}

.fade-in {
  opacity: 0;
  
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 1000;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid #e5e7eb;
  min-height: 70px;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--container-padding);
  background: var(--white);
}

.navbar .logo-nav {
  position: absolute;
  left: var(--container-padding);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.navbar .logo-nav img {
  height: clamp(36px, 3.5vw, 48px);
  width: auto;
  display: block;
}

.navbar .navbar-collapse {
  width: 100%;
}

.navbar .nav-links {
  display: flex;
  list-style: none;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.navbar .nav-links a {
  color: #4a5568;
  text-decoration: none;
  font-weight: 550;
  font-size: clamp(0.98rem, 1.7vw, 1.12rem);
  transition: color 0.2s ease;
  padding: 0.5rem 0.75rem;
  margin: 0 0.15rem;
  font-family: var(--font-body);
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.navbar .nav-links a:hover {
  color: var(--primary);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  margin-right: 1rem;
  flex-shrink: 0;
}

.language-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.language-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  color: var(--primary);
}

.language-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.navbar .navbar-toggler {
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #4a5568;
  padding: 0.25rem;
  cursor: pointer;
  z-index: 1001;
}

.navbar .navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

@media (min-width: 992px) {
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .navbar .logo-nav {
    position: static;
    transform: none;
    flex: 0 0 auto;
    margin-right: 0.5rem;
  }

  .navbar .navbar-collapse {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  .navbar .nav-links {
    width: auto;
    flex: 0 1 auto;
    justify-content: center;
  }

  .language-switcher {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
  }

  .navbar .navbar-toggler {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .navbar-collapse.show {
    transform: translateX(0);
  }

  .navbar .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0;
  }

  .navbar .logo-nav {
    position: static;
    transform: none;
  }

  .navbar .nav-links a {
    font-size: 1.5rem;
    padding: 1rem;
  }

  .language-switcher {
    position: relative;
    z-index: 1001;
    margin-right: 0.75rem;
  }
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  padding: calc(70px + 4rem) 0 4rem;
  background: linear-gradient(145deg, #0d2248 22%, #0a3a7af1 90%);
 
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.hero-title {
  font-size: clamp(4rem, 10vw, 5rem);
  font-weight: 750;
  color: var(--white);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.hero-title-2 {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  opacity: 0.9;
  max-width: 600px;
  letter-spacing: 0.01em;
  margin-left: auto;
  margin-right: auto;
}

/* About Section */
.about,
.skills,
.projects {
  padding: 5rem var(--container-padding);
  background: var(--white-secondary);
}
.about-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: about-image;
}

.about-grid {

  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: stretch;
  grid-template-areas: "about-content about-image";
    background: linear-gradient(125deg, #fafafa 50%, #003b7ede 100%);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  grid-area: about-content;
}

.about-title {
  font-size: clamp(2.5rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-transform: uppercase;
}
.about-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  max-width: 620px;
}

.about-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-top: 1rem;
}

.about-cta-group .cta-button {
  white-space: nowrap;
}

.about-details {
  list-style: none;
  padding-left: 0;
  margin: 2rem 0;
  color: var(--text-secondary);
  
}
.about-img-wrapper {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: linear-gradient(125deg, #033e7ead 40%, #dbdddf00 50%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0);
  object-fit: cover;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.home-page .about-image img {
  max-width: 220px;
}

@media (max-width: 1024px) {
  .about-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-areas: "about-content";
  }

  .about-image {
    display: none !important;
  }

  .hero {
    padding: calc(70px + 3rem) 0 3rem;
  }

  p {
    font-size: 1.05rem;
  }

  .hero-title {
    font-size: clamp(2.6rem, 7vw, 3.6rem);
  }

  .hero-title-2 {
    font-size: clamp(1.1rem, 3vw, 1.55rem);
  }

  .hero-subtitle {
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  }
  .hero-content {
    padding: 0 2rem;
  }
  .about-title,
  .section-title,
  #proj {
    font-size: 2.3rem !important;
  }

  .cta-button,
  .header-cta-button,
  .btn-more-projects {
    padding: 1rem 2rem;
    font-size: 1rem !important;
  }


  .about,
  .skills,
  .projects {
    padding: 4rem var(--container-padding);
  }
}

@media (max-width: 768px) {
  .nav-container {
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .navbar .logo-nav {
    left: 1rem;
  }

  .navbar-collapse {
    top: 70px;
    height: calc(100vh - 70px);
    align-items: flex-start;
    padding-top: 2rem;
  }

  .navbar .nav-links {
    gap: 1.25rem;
  }

  .navbar .nav-links a {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
  }

  .language-switcher {
    gap: 0.35rem;
    margin-right: 0.5rem;
  }

  .language-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: calc(70px + 2.5rem) 0 2.5rem;
  }

  .hero-content {
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 13vw, 3.4rem);
  }

  .hero-title-2 {
    font-size: clamp(1rem, 4.8vw, 1.25rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3.9vw, 1.15rem);
    margin-bottom: 1.5rem;
  }

  .hero-cta-group,
  .about-cta-group,
  .contact-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .header-cta-button,
  .cta-button,
  .btn-more-projects {
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 6vw, 4rem);
    text-align: center;
  }

  .about-content {
    align-items: stretch;
  }

  .about-image {
    height: auto;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .about-content p {
    text-align: left;
    max-width: none;
  }

  .about-cta-group {
    justify-content: stretch;
  }

  .about-cta-group .cta-button {
    max-width: none;
  }

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

  .card-body .mt-auto.d-flex,
  .card-body > .d-flex:last-child {
    flex-direction: column;
  }

  .card-body .btn {
    width: 100% !important;
  }

  .card,
  .portfolio-card,
  .skill-card,
  .card-element,
  .previous-projects-section {
    border-radius: 14px;
  }

  .card-img-top {
    height: 200px;
  }

  .aikido-card .card-img-overlay-wrapper {
    height: 280px;
  }

  .card-tech-overlay {
    font-size: 0.95rem;
    padding: 1rem;
  }

  .div-one-portfolio {
    background-attachment: scroll;
  }

  .modal-content {
    width: calc(100vw - 1rem) !important;
    margin: 1rem auto;
    padding: 1rem;
  }

  #modal .close {
    width: 2.5rem;
    height: 2.5rem;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.6rem;
  }

  #modal .carousel-control-prev.custom-arrow,
  #modal .carousel-control-next.custom-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }

  #projectCarousel .carousel-item img,
  #modal img,
  #modal .carousel-inner img {
    width: 100%;
    max-width: 100%;
    height: min(48vh, 420px) !important;
    max-height: min(48vh, 420px) !important;
    min-height: 180px;
    border-radius: 10px;
  }

  .previous-projects-section {
    padding: 2rem 1.25rem;
    margin-top: 2rem;
  }

  .contact {
    padding: 5rem 0;
  }

  .contact-content {
    padding: 0 0.5rem;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .about {
    padding: 3rem 0;
  }

  .about-grid {
    gap: clamp(1.5rem, 5vw, 3rem);
  }
}

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

  .about-content p {
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .cta-button {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }
}

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

  .about-image {
    max-width: 240px;
  }
}

/* Skills & Portfolio Grids  */
.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: center;
}
.skill-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.skill-card:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}
.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--blue);
}

.portfolio-image {
  height: 200px;
  background: var(--gradient-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
}
.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.portfolio-content {
  padding: 1.5rem;
}

/* CTA Buttons */
.cta-button,
.header-cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  transition:
    background 0.2s ease,
    color 0.3s ease,
    box-shadow 0.2s ease;
}

   .contact-btn{
    background: var(--secondary) !important;
    margin-left: 0;
    
  }
  .contact-btn:hover {
    background: var(--blue) !important;
  }

  .download-btn {
    background: var(--secondary) !important;
  }

  .download-btn:hover {
    background: var(--blue) !important;
  }



.header-cta-button:hover, .cta-button:hover {
  background-color: var(--blue);
}

.contact {
  padding: 8rem 0;
  background: var(--bg-dark);
  color: white;
  position: relative;
  z-index: 2;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--white), #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border: 1.2px solid var(--white-secondary);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--blue);
  border-color: var(--blue);
}

/* Section Title - Reusable */
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Portfolio Section  */
.portfolio-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.portfolio-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.btn-more-projects {
  display: inline-block;
  padding: 1rem 2rem;
  color: var(--white);

  font-weight: 700;
  text-decoration: none;
  background-color: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.projects-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  text-align: center;
}

.btn-more-projects:hover {
  background-color: var(--blue);
}

.portfolio-content h3 {
  margin-bottom: 1rem;
}

.portfolio-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.portfolio-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.portfolio-link:hover {
  background: var(--blue);
}

@media (max-width: 768px) {
  .mobile-menu {
    display: block;
  }
  .nav-links {
    display: none;
  }
  .nav-links.show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95) !important;
    flex-direction: column;
    padding: 1rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .navbar .nav-links {
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
  }
}

.portfolio-page {
  font-family: var(--font-body);
}


.div-one-portfolio {
  position: relative;
  background:
    linear-gradient(
      135deg,
      rgb(253, 253, 253) 0%,
      rgb(241, 245, 249) 55%,
      rgba(0, 0, 2, 0.325) 100%
    ),
    url(../pics/mountains.webp) fixed;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 6rem;
  overflow: hidden;
}

#proj {
  color: var(--blue) ;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 650;
  background: var(--blue);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 3rem 0 3rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
#proj::after {
  content: "";
  position: absolute;
  left: 50%;
  
  width: 80px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}
.aikido-card .card-img-overlay-wrapper{
  height: 460px;
  position: relative;
}
.aikido-card img{
  height: 100%;
  object-fit: cover;
}
.card .card-img-overlay-wrapper{
  position: relative;
  object-fit: cover;
}

.card {
  border: none;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(27, 38, 79, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}
.card:hover {

  box-shadow: 0 12px 32px rgba(27, 38, 79, 0.15);
}
.card-img-top {
  height: 220px;
  object-fit: cover;
}
.card-title {
  font-family: var(--font-heading);
  color: var(--blue);
  font-weight: 600;
}

.card-img-overlay-wrapper {
  position: relative;
}


.btn {
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0.035em;
  border-radius: 8px;
  padding: 1rem 2rem;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

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

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-primary {
  background: var(--blue);
  border: none;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--primary);
}

.btn-github {
  background: #111827d8;
  border: none;
  color: white;
  gap: 0.5rem;
}

.btn-github:hover {
  background: #24292f;
  color: white;
}

@media (max-width: 991px) {
  .card-img-top {
    height: 180px;
  }
}
@media (max-width: 767px) {
  .card {
    margin-bottom: 2rem;
  }
  .card-img-top {
    height: 140px;
  }
}

.modal h3,
.modal p {
  padding: 0 1.5rem 1rem 1.5rem;
}
.modal-content h3 {
  color: var(--primary);
  margin-top: 20px;
  font-weight: bold;
}

.modal-content p {
  margin-top: 10px;
}

#modal .carousel-control-prev.custom-arrow,
#modal .carousel-control-next.custom-arrow {
  width: 3rem;
  height: 3rem;
  top: 50%;
  background: var(--blue);
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}
#modal .carousel-control-prev.custom-arrow:hover,
#modal .carousel-control-next.custom-arrow:hover {
  background: var(--primary);
  opacity: 1;
}
#modal .carousel-control-prev-icon,
#modal .carousel-control-next-icon {
  background: none;
  width: 2rem;
  height: 2rem;
  filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.18s,
    text-shadow 0.18s;
}
#modal .carousel-control-prev-icon:after {
  content: "\2039";
  font-size: 2.2rem;
  color: var(--white);
  font-weight: bold;
}
#modal .carousel-control-next-icon:after {
  content: "\203A";
  font-size: 2.2rem;
  color: var(--white);
  font-weight: bold;
}
#modal .close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 2rem;
  color: var(--white);
  background: var(--blue);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 2;
  font-weight: bold;
}

#modal .close:hover {
  background: var(--primary);
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 5vh auto;
  padding: 2rem;
  border: 1px solid #888;
  width: min(960px, calc(100vw - 2rem)) !important;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

#projectCarousel .carousel-item img,
#modal img,
#modal .carousel-inner img {
  width: 100%;
  max-width: 100%;
  height: min(72vh, 720px) !important;
  max-height: min(72vh, 720px) !important;
  min-height: 220px;
  object-fit: contain !important;
  background: #142850;
  margin-left: 0;
  margin-right: 0;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(20, 40, 80, 0.15);
}

@media (max-width: 900px) {
  #modal img,
  #modal .carousel-inner img {
    height: min(48vh, 360px) !important;
    max-height: min(48vh, 360px) !important;
    min-height: 160px;
  }
}

@media (max-width: 1200px) {
  #projectCarousel .carousel-item img,
  #modal img,
  #modal .carousel-inner img {
    max-width: 100vw;
  }
}
@media (max-width: 992px) {
  #projectCarousel .carousel-item img,
  #modal img,
  #modal .carousel-inner img {
    height: min(56vh, 520px) !important;
    max-height: min(56vh, 520px) !important;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  #projectCarousel .carousel-item img,
  #modal img,
  #modal .carousel-inner img {
    max-width: 100%;
  }
}
.card-tech-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(19, 27, 56, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
  text-align: center;
}

.card:hover .card-tech-overlay {
  opacity: 1;
  transform: scale(1.02);
}

.card-tech-overlay span {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--azure);
}

.previous-projects-section {
  background: var(--white);
  border-radius: 32px;
  padding: 3rem 2rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.previous-projects-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--blue);
}
.previous-projects-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 650;
  background: var(--primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  text-align: center;
}

.previous-projects-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;

  margin-bottom: 3rem;
}
.previous-projects-section .card {
  position: relative;
  border: 1px solid #e3e6f0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 1px 8px 0 rgba(27, 38, 79, 0.04);
  transition:
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.previous-projects-section .card:hover {
  box-shadow: 0 4px 24px 0 rgba(27, 38, 79, 0.13);
  border-color: #bcd0ee;

}
.previous-projects-section .card-img-top {
  border-radius: 10px 10px 0 0;
  object-fit: cover;
  height: 180px;
  background: #e3e6f0;
}
.previous-projects-section .card-tech-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 38, 79, 0.85);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 2;
  pointer-events: none;
  text-align: center;
 
  padding: 1.2rem 0.7rem;
  border-radius: 0.5rem;
}
.previous-projects-section .card-tech-overlay span {
  font-weight: 700;
  margin-bottom: 0.5em;
  display: block;
  letter-spacing: 0.5px;
}
.card:hover .card-tech-overlay,
.card:focus-within .card-tech-overlay {
  opacity: 1;
  transform: scale(1.03);
}

.card-img-overlay-wrapper {
  position: relative;
}
.card-img-overlay-wrapper .card-tech-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 38, 79, 0.85);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  font-size: 1.05em;
  padding: 1.2rem 0.7rem;
  border-radius: 0.5rem;
}
.card-img-overlay-wrapper .card-tech-overlay span {
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 0.5em;
  display: block;
  letter-spacing: 0.5px;
}
.card:hover .card-img-overlay-wrapper .card-tech-overlay,
.card:focus-within .card-img-overlay-wrapper .card-tech-overlay {
  opacity: 1;
  transform: scale(1.03);
}

/* Reusable Card Components */
.card-section {
  padding: 5rem var(--container-padding);
}

.card-section--primary {
  background: var(--white);
}

.card-section--secondary {
  background: var(--white-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: center;
}

.card-element {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid #e5e7eb;
}

.card-element:hover {
 
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.card-element .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--blue);
}

.card-element h3 {
  margin-bottom: 0.75rem;
}

.card-element p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.card-element .card-highlight {
  font-weight: 500;
  color: var(--secondary) !important;
}

.card-element .card-meta {
  font-style: italic;
  font-size: 0.95rem !important;
}

@media (max-width: 1024px) {
  .card-section {
    padding: 4rem 2rem;
  }
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}
