html {
    scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(circle at top,
    #0b1c3d,
    #050914 70%);
  color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(14px);
    padding: 20px 36px;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.menu-navbar {
    align-content: center;
    font-size: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.navbar a {
    text-decoration: none;
    color: #0f172a;
    /*font-weight: 500;*/
    transition: 0.3s ease;
    position: relative;
}

.navbar a:hover {
    color: white;
}

nav a {
    color: white;
    text-decoration: none;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: white;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.project-hero {
  padding: 140px 8% 20px;
  text-align: center;
}

.project-hero h1 {
  font-size: 48px;
}

.project-hero p {
  opacity: 0.7;
  max-width: 600px;
  margin: 16px auto 0;
}

.project-section {
  padding: 60px 20px 60px;
}

.project-section .section-header {
  margin-bottom: 40px;
}

.project-section .section-title {
  font-size: 34px;
}

.featured-project {
  padding: 40px 0 100px;
  position: relative;
  z-index: 1;
}

/*.featured-project::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 0;
  width: 100%;
  height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(10,15,25,0.8));
  pointer-events: none;
}*/

.other-projects .section-header {
  margin-bottom: 50px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: stretch;
}

.featured-container {
  max-width: 1200px;
  margin: auto;

  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}

.featured-image {
  border-radius: 24px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,0.08);
  min-height: 100%;
}

.featured-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/10;
  /*max-height: 420px;*/
  max-height: none;
  aspect-ratio: unset;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  transition: 0.6s;
}

.featured-image:hover img {
  transform: scale(1.05);
}

.featured-label {
  color: #51829d;
  font-size: 14px;
  margin-bottom: 10px;
  display: block;
}

.featured-content h2 {
  font-size: 36px;
  /*margin: 10px 0 16px;*/
  margin-bottom: 12px;
}

.featured-desc{
  opacity: .75;
  margin-bottom: 30px;
}

.featured-content p {
  opacity: 0.75;
  line-height: 1.6;
}

.featured-meta {
  display: flex;
  gap: 40px;
  margin: 24px 0;
}

.featured-meta strong {
  display: block;
  font-size: 13px;
  opacity: 0.6;
}

.featured-meta span {
  font-size: 15px;
}

.featured-tools span {
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 8px;
  margin-right: 8px;
  font-size: 13px;
}

.featured-btn {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 22px;

  border-radius: 10px;
  text-decoration: none;

  border: 1px solid #51829d;
  color: white;

  transition: 0.3s;
}

.featured-btn:hover {
  background: #51829d;
}

.project-grid {
  max-width: 1200px;
  margin: auto;

  display: flex;
  flex-wrap: wrap;
  grid-template-columns:
    repeat(auto-fit, minmax(320px,1fr));

  gap: 32px;
  justify-content: center;
}

.project-card {
  width: calc(33.33% - 22px);
  min-width: 300px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: white;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);

  border-radius: 20px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,0.08);

  transition: 0.4s;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(120,160,255,0.5);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.project-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
}

.project-meta small {
  opacity: .6;
  display: block;
}

.tag {
  font-size: 12px;
  opacity: 0.6;
}

.project-content h3 {
  margin: 8px 0;
}

.project-content p {
  font-size: 14px;
  opacity: 0.7;
  padding-bottom: 20px;
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;

  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tech span {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  white-space: nowrap;
  /*margin-right: 6px;*/
}

.case-study-link{
    color:white;
    text-decoration:none;
    position:relative;
    font-weight:500;
}

.case-study-link::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-4px;
    width:0;
    height:1px;
    background:white;
    transition:.3s;
}

.case-study-link:hover::after{
    width:100%;
}

.case-study-wrapper{
  background: #0f172a;
  padding: 0 80px;
}

.case-study-container{
  background: white;
  max-width: 1400px;
  margin: auto;
  padding: 80px 60px;
  color: #444444;
}

.cs-section{
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e5e7eb;
}

.cs-hero h1 {
  color: #0b1c3d;
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cs-section h2{
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
}

.cs-section p {
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
  max-width: 1200px;
}

.cs-section img{
  width: 100%;
  margin-top: 32px;
  border-radius: 8px;
}

.cs-subtitle{
  font-size: 16px;
  color: #4b5563;
  max-width: 1200px;
  margin-top: 16px;
  margin-bottom: 48px;
}

.cs-project-info {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-item svg {
  width: 22px;
  height: 22px;
  color: #1e3a8a;
  margin-top: 2px;
}

.info-item span {
  font-size: 13px;
  color: #6b7280;
}

.info-item p {
  font-size: 16px;
  font-weight: 500;
  margin-top: 4px;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2px;
}

.tool {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool img {
  width: 20px;
  height: 20px;
}

.tool P {
  font-size: 14px;
  margin: 0;
}

.cs-project-info span {
  font-size: 13px;
  color: #6b7280;
}

.cs-project-info p {
  font-size: 16px;
  font-weight: 500;
}

.cs-hero-image img{
  width: 100%;
  border-radius: 12px;
}

.cs-grid-2{
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 32px;
}

.cs-highlight{
  background: #f1f5f9;
  padding: 24px;
  border-left: 4px solid #1e3a8a;
}

.cs-result-list{
  padding-left: 20px;
}

.flowchart-img {
  max-width: 1000px;
  width: 100%;
  display: block;
  margin: 4px auto;
}

.final-design-gallery {
  background: #0f172a;
  padding: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 32px;
  justify-items: center;
  margin-top: 40px;
}

.gallery-img {
  height: 480px;
  width: auto;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.gallery-web {
  background: #0f172a;
  padding: 60px;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 24px;
  margin-top: 40px;
}

.gallery-item {
  height: 340px;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1b34;
  /*box-shadow: 0 10px 30px rgba(0,0,0,0.35);*/
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top;
  cursor: pointer;
}

.gallery-img:hover {
  transform: scale(1.05);
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.gallery-overlay.active {
  display: flex;
}

.overlay-image {
  max-height: 90vh;
  max-width: 90vw;
}

.close-overlay {
  position: absolute;
  top: 40px;
  right: 60px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.9);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999;
}

.overlay img{
  max-width:90%;
  max-height:90%;
  object-fit:contain;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px 20px;
}

.prev {
  left: 40px;
}

.next {
  right: 40px;
}

.figma-link{
  margin-top:24px;
  font-size:15px;
  color:#cbd5e1;
}

.figma-link a{
  color:#38bdf8;
  text-decoration:none;
  font-weight:500;
  margin-left:6px;
}

.figma-link a:hover{
  text-decoration:underline;
}

.design-scroll-gallery img {
  height: 420px;
  flex-shrink: 0;
}

.section-header {
    margin-bottom: 20px;
    text-align: center;
}

.section-header.left {
  text-align: left;
}

.section-title {
    font-size: 40px;
    font-weight: 600;
    color: #f8fafc;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(125,211,252,0.15);
    /*margin-bottom: 8px;*/
}

.section-devider {
    width: 160px;
    height: 0px;
    margin: 0 auto;
    background: radial-gradient(ellipse at center, rgba(81,130,157,0.25), transparent 70%);
    filter: blur(40px);
}

.section-subtitle {
    /*margin-top: 20px;*/
    font-size: 16px;
    color: white;
    opacity: 0.7;
    justify-content: center;
}

.other-projects {
  position: relative;
  padding: 60px 20px 140px;
  margin-top: 0px;
}

.other-projects::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(ellipse at top, rgba(81,130,157,0.18), transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

/*.other-projects::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 10px;
  background: radial-gradient(ellipse at top, rgba(81,130,157,0.4), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}*/

.back-to-top-wrapper {
  display: flex;
  justify-content: center;

  margin-top: 60px;
  margin-bottom: 60px;
}

.back-to-top {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);

  padding: 12px 26px;
  border-radius: 999px;

  font-size: 14px;
  letter-spacing: .5px;
  cursor: pointer;

  transition: all .35s ease;
}

.back-to-top-cs {
  background: transparent;
  color: #51829d;
  border: 1px solid #51829d;

  padding: 12px 26px;
  border-radius: 999px;

  font-size: 14px;
  letter-spacing: .5px;
  cursor: pointer;

  transition: all .35s ease;
}

/* hover effect */
.back-to-top:hover {
  border-color: #51829d;
  background: rgba(81,130,157,0.15);
  transform: translateY(-3px);
}

.back-to-top-cs:hover {
  color: white;
  border-color: #51829d;
  background: #51829d;
  transform: translateY(-3px);
}

.back-projects{
  display:inline-block;
  margin-bottom:20px;
  font-size:14px;
  color:#1e293b;
  text-decoration:none;
  font-weight:500;
  transition:opacity .2s ease;
}

.back-projects:hover{
  opacity:.6;
}

.footer {
  width: 100%;
  background: #0f172a;
  padding: 20px 0;
  text-align: center;
}

.footer p {
    color: white;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin: 0;
    
}

@media(max-width:900px){

.featured-container{
  grid-template-columns:1fr;
}

}

@media (max-width: 480px) {
    nav {
        width: calc(100vw - 40px);
        padding: 12px 20px;
        top: 15px;
    }
    nav ul {
        gap: 16px;
        justify-content: center;
    }
    nav a {
        font-size: 11px;
    }
    .case-study-wrapper {
        padding: 0 16px; /* was 0 80px — way too much for mobile */
    }

    .case-study-container {
        padding: 30px 16px; /* was 80px 60px */
    }

    .cs-hero h1 {
        font-size: 24px; /* was 42px — too large for mobile */
    }

    .cs-project-info {
        grid-template-columns: repeat(2, 1fr); /* was 4 columns */
        gap: 20px;
    }

    .cs-grid-2 {
        grid-template-columns: 1fr; /* stack on mobile */
    }

    .final-design-gallery {
        padding: 20px;
        grid-template-columns: 1fr; /* stack images */
    }

    .gallery-web {
        grid-template-columns: 1fr; /* stack web gallery */
        padding: 20px;
    }

    .gallery-img {
        height: auto;
        width: 100%;
    }

    .flowchart-img {
        width: 100%;
        overflow-x: auto;
    }

}

@media (max-width: 768px) {
    .case-study-wrapper {
        padding: 0 20px;
    }

    .case-study-container {
        padding: 40px 20px;
    }

    .cs-project-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .cs-grid-2 {
        grid-template-columns: 1fr;
    }

    .final-design-gallery {
        padding: 30px;
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-web {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

@media (max-width: 768px) {
  nav, .navbar-about {
        width: calc(100vw - 40px);
        padding: 14px 20px;
    }
    nav ul, .navbar-about ul {
        gap: 16px;
        justify-content: center;
    }
    nav a, .navbar-about a {
        font-size: 13px;
    }  
  .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .contact-card {
        width: 180px;
    }
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .featured-content h2 {
        font-size: 26px;
    }
}