@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');

@media (max-width: 600px) {
  :root {
    /* This effectively shrinks everything that uses relative units 
       or simply scales down your layout proportions */
    zoom: 0.9; /* Works in Chrome/Edge/Safari */
    -moz-transform: scale(0.9); /* Firefox fix */
    -moz-transform-origin: top center;
  }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; 
}

body {
    font-family: 'Space Grotesk';
    background-color: #FAFCFE;
}

html {
    scroll-behavior: smooth;
}

section, 
#portfolio, 
#contact {
    scroll-margin-top: 80px;
}

/* ===========
   Site Header
   =========== */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999 !important;

    width: 100%;
    height: 80px;
    margin: 0 auto;
    
    padding: 0 40px;
    background-color: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease;

}

/* Logo Styling */
.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

/* Navigation Styling */
.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.site-header .nav-links a {
    text-decoration: none;
    color: #F7F7FC;
    font-weight: 700;
    font-size: 18px;
    transition: color 0.3s ease;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);    
}

.site-header.scrolled .nav-links a {
    color: #14142B; 
}

body.project-page .site-header .nav-links a {
    color: #14142B !important;
}

body.project-page .site-header {
    background-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.project-page .site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-links a:hover {
    color: #D8DBF5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .site-header {
        padding: 0 20px;
    }
    .nav-links {
        gap: 20px;
    }
}

/* ============
   Hero Section
   ============ */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 140px 40px 60px 40px; 
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    min-height: 100vh;     
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

/* Scroll Indicator Styling */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    
    opacity: 0.7;
    cursor: default;
}

/* Text & Arrow Styling */
.scroll-indicator .text {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #a0a0b0;
}

.scroll-indicator .arrow {
    font-size: 24px;
    color: #a0a0b0;
}

/* The "Bob" Animation */
.scroll-indicator {
    animation: bob 3s ease-in-out infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes bob {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0); /* Stay still */
    }
    40% {
        transform: translateX(-50%) translateY(-10px); /* Move Up */
    }
    60% {
        transform: translateX(-50%) translateY(-5px); /* Little bounce */
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px;
    }
    
    h1 {
        font-size: 58px;
    }
    
    p {
        font-size: 20px;
    }
}

/* Typography */
h1 {
    color: #191C3D;
    font-size: 90px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
}

p {
    color: #191C3D;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 40px;
}

/* Button Styling */
.btn-primary {
    display: inline-block;
    background-color: #F5440F;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    padding: 16px 32px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #F8734B;
    transform: translateY(-2px);
}

/* Shared Shape Styles */
.bg-shape {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

/* Orange Shape */
.shape-right {
    top: 0;
    right: 0;
    width: 80%;
    max-width: 1440px;
}

/* Grey Shape */
.shape-left {
    bottom: 0;
    left: 0;
    width: 40%;
    max-width: 1200px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .shape-right {
        width: 70%;
    }
    
    .shape-left {
        width: 60%;
    }
}

/* Mobile Hero Typography Fix */
@media (max-width: 490px) {
    .hero-section h1 {
        font-size: 70px;

        line-height: 1; 
    }
}

/* =================
   Portfolio Section
   ================= */
.portfolio-section {
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.section-title {
    text-align: left;
    font-size: 68px;
    font-weight: 800;
    color: #191C3D;
    
    margin-top: 60px;
    margin-bottom: 0;
}

.project-card {
    background-color: #F0F2F4;
    border-radius: 40px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    border: 4px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #191C3D;
}

.card-image {
    flex-shrink: 0;
    width: 257px;
    height: 201px;
    border-radius: 20px;
    overflow: hidden;
    background-color: #ffffff;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    flex-grow: 1;
}

.card-content h3 {
    color: #191C3D;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.1;
}

.card-content .project-category {
    color: #7D8597;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.project-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 16px;
    border: 2px solid #7D8597;
    border-radius: 12px;
    color: #7D8597;
    font-size: 14px;
    font-weight: 700;
    text-transform: capitalize;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .portfolio-section {
        padding: 40px 20px;
    }

    .section-title {
    text-align: left;
    font-size: 68px;
    font-weight: 800;
    color: #191C3D;
    
    margin-top: 20px;
    margin-bottom: 0;
    }

    .project-card {
        flex-direction: row;
        padding: 20px;
        border-radius: 30px;
    }

    /* Phone */
    @media (max-width: 580px) {
        .project-card {
            flex-direction: column;
            text-align: center;
        }
        
        .card-content {
                display: flex;
                flex-direction: column;
                align-items: center; 
            }

        .card-image {
            width: 100%;
            height: auto;
            aspect-ratio: 1.28/1;
        }

        .card-content h3 {
            font-size: 48px;
            margin-bottom: 12px;
        }

        .project-card .project-category {
            font-size: 32px;
        }

        .project-tag {
            font-size: 18px;
            line-height: 1.6;
            align-self: center; 
            width: auto; /* Ensures it still 'hugs' the text */
        }
        }

}

/* ===============
   Contact Section
   =============== */
.contact-section {
    padding: 80px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-content h2 {
    color: #191C3D;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #7D8597;
    font-size: 18px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid #191C3D;
    padding: 8px 0;
    font-size: 18px;
    color: #7579A0;
    font-family: Space Grotesk;
    outline: none;
    resize: none;
    transition: border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #D8DBF5;
    opacity: 1;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
    color: #D8DBF5;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #F5440F;
}

.contact-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    margin-top: 16px;
    align-self: flex-start;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .contact-content h2 {
        font-size: 40px;
    }
    
    .contact-section {
        padding: 60px 20px;
    }
}

/* ===============================
   Single Project View Page Styles
   =============================== */

.project-view-section {
    padding: 140px 40px 80px; 
    max-width: 800px;
    margin: 0 auto;
}

.carousel-wrapper {
    background-color: #ffffff;
    border-radius: 40px;
    
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); 
    padding: 20px;
    overflow: visible; 
}

.project-carousel {
    overflow: visible !important;
    
    box-shadow: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}

.carousel-wrapper .slick-dots {
    bottom: -35px; 
}

/* Typography */
.project-view-content h1 {
    color: #191C3D;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 100px;
    margin-top: 100px;
    text-align: left;

    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding: 0 20px;
}

.project-carousel .slick-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
}

.slick-dots li button:before {
    font-size: 14px;
    color: #D8DBF5;
    opacity: 1;
}

.slick-dots li.slick-active button:before {
    color: #191C3D;
}

.project-carousel .slick-slide {
    float: left;
    height: auto; 
}


/* Mobile Responsiveness for Project View */
@media (max-width: 768px) {
    .project-view-section {
        padding: 120px 20px 60px;
    }
    
    .project-view-content h1 {
        font-size: 32px;
        margin-bottom: 40px;
        margin-top: 80px;
    }
}

/* Carousel Arrows Styling */
.slick-prev:before, .slick-next:before {
    font-family: "Dongle";
    font-weight: 400;
    font-size: 24px;
    line-height: 1;
    color: #7579A0;
    opacity: 1;
}

.slick-prev, .slick-next {
    position: absolute;
    top: 50%;
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    transform: translate(0, -50%);
    cursor: pointer;
    border: none;
    outline: none;
    background: #F0F2F4;
    border-radius: 50%;
    z-index: 10;
    transition: 0.3s ease;
}

.slick-prev:hover, .slick-next:hover {
    background: #F0F2F4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.slick-prev {
    left: 10px;
}

.slick-next {
    right: 10px;
}

.slick-prev:before {
    content: '\25C4';
}

.slick-next:before {
    content: '\25BA';
}


/* Project Page Specific Styles */
body.project-page .nav-links a {
    color: #191C3D !important;
}

body.project-page .nav-links a:hover {
    color: #F5440F !important;
}

/* Large Screen Adjustment for Project View */
@media (min-width: 1200px) {
    .project-view-section {
        max-width: 1400px;
    }

    .project-carousel .slick-slide img {
        max-height: 80vh;
        object-fit: contain;
        margin: 0 auto;
    }
}

/* Project Description Text */
.project-description {
    margin-top: 60px;
    margin-bottom: 60px;
    
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding: 0 20px;
}


.project-description h2 {
    color: #191C3D;
    font-size: 24px;
    margin-bottom: 16px;
    margin-top: 32px;
}

.project-description p {
    color: #7579A0;
    font-size: 18px;
    line-height: 1.8;
}

.project-navigation {
    text-align: center;
    margin-top: 100px;
    margin-bottom: 10px;
}

/* Mobile Adjustments for Button */
@media (max-width: 800px) {
    .project-navigation {
    margin-top: 40px;
    }

    .project-description {
        margin-top: 0px;
    }
}


/* =====================
   404 Error Page Styles
   ===================== */

.error-title {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 80px;
    line-height: 1;
    margin-bottom: 32px;
}

.error-subtitle {
    font-size: 32px;
    font-weight: 700;
    color: #191C3D;
    line-height: 1.2;
    margin-bottom: 48px;
}

/* Mobile Adjustments for 404 */
@media (max-width: 768px) {
    .error-title {
        font-size: 56px;
    }
    
    .error-subtitle {
        font-size: 24px;
    }
}

/* =============
   Footer Styles
   ============= */
.site-footer {
    background-color: #191C3D;
    color: #F0F2F4;
    padding: 25px 40px 25px 40px;
    margin-top: 60px;
}

footer {
  background-color: #191C3D;
  /* Adds extra padding specifically for the iOS Home Indicator bar */
  padding-bottom: env(safe-area-inset-bottom);
}

.footer-content {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: #F7F7FC;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.copyright {
    color: #F7F7FC;
    opacity: .5;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 0;
}

/* Hover Effect */
.footer-links a:hover {
    color: #F5440F;
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .site-footer {
        padding: 20px 20px;
    }

    .footer-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }
}

.btn-primary, button[type="submit"] {
    border: 3px solid transparent;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.btn-primary:hover, button[type="submit"]:hover {
    border-color: #191C3D;
}

/* ==================
   BACK TO TOP BUTTON
   ================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    
    padding: 12px 28px;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    
    background-color: #191C3D;
    color: #F7F7FC;
    font-family: Space Grotesk;
    font-size: 16px;
    font-weight: 700;
    
    cursor: pointer;
    
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); 
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: #7579A0;
    border-color: #191C3D;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

#back-to-top.lift {
    bottom: 110px;
}

/* ==================
   NEW GALLERY SLIDER
   ================== */
:root {
  --bg-color: #FAFCFE;
  --card-bg: #EFF3F5;
  --text-color: #191C3D;
  --accent-brand: #F5440F; 
}

.gallery-section { 
  padding: 60px 0; 
  overflow: hidden; 
}

.header-container { 
  text-align: center; 
  margin-bottom: 40px; 
}

.gallery-wrapper { 
  position: relative; 
  width: 100%; 
}

.gallery-scroll {
  display: flex; 
  flex-direction: row; 
  gap: 20px;
  overflow-x: auto; 
  scroll-snap-type: x mandatory;
  /* Adjust padding so the first/last cards can reach the center */
  padding: 0 calc(50% - 400px); 
  align-items: stretch;
  position: relative; 
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar */
.gallery-scroll::-webkit-scrollbar { 
  display: none; 
}

.gallery-card {
  width: 800px; /* Or whatever width you want the cards to stay at */
  max-width: 85vw;
  height: auto; /* The card now grows based on content */
  background: var(--card-bg);
  border-radius: 28px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column; /* Stack text over image */
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-card:not(.active) { 
  opacity: 0.4; 
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%; 
  padding: 0;
}

.caption-wrapper {
  padding: 40px 40px 10px 40px; 
  /* No flex-grow here so it only takes the space it needs for text */
}

.caption span {
  color: var(--accent-brand);
  font-weight: 600;
}

.image-wrapper {
  display: block; /* Remove flex here so the image defines the height */
  padding: 10px 40px 40px 40px; 
  width: 100%;
  margin-top: auto;
}

.image-wrapper img {
  display: block;
  width: 100%; /* Image fills the 800px width (minus padding) */
  height: auto; /* Height is calculated naturally based on the image file */
  object-fit: contain; 
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
  transition: transform 0.3s ease;
}

.gallery-card.active .image-wrapper img {
  transform: scale(1.02);
}

/* Media Query for smaller screens (Laptops/Tablets) */
@media (max-width: 900px) {
  .gallery-scroll {
    padding: 0 calc(50% - 45vw);
  }

    .gallery-section { 
    padding: 20px 0; 
    }

    .gallery-card {
    width: 800px; 
    max-width: 85vw; /* Keeps the card centered with a peek of the next one */
    height: auto;    
    background: var(--card-bg);
    border-radius: 28px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column; 
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 17.5px;
    }
    
    .gallery-card .card-content .caption {
    font-size: 24px;
    }

  .header-container h2 {
    font-size: 24px;
  }

    .image-wrapper {
    width: 100%;
    padding: 10px 25px 25px 25px; 
    display: block;
    }

    .image-wrapper img {
  display: block;
  width: 100%;
  height: auto; 
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
    }
}

/* Target Desktop screens only */
@media (min-width: 1921px) {
  
    .gallery-card .card-content .caption {
    font-size: 32px; /* Scaled up from 48px */
    margin-bottom: 0px;
  }

  .gallery-card {
  width: 1100px; /* Or whatever width you want the cards to stay at */
  max-width: 85vw;
  height: auto;
  }

  .gallery-scroll {
    /* Updated centering math for the 1100px width */
    /* Formula: calc(50% - (CardWidth / 2)) */
    padding: 0 calc(50% - 550px); 
    gap: 40px; /* More breathing room between larger cards */
  }

  .caption {
    font-size: 24px; /* Larger text for the larger card */
  }

  .caption-wrapper {
    padding: 50px 60px 20px 60px; /* More luxurious padding */
  }

  .image-wrapper {
    padding: 20px 60px 60px 60px;
  }
}

/* Navigation Pill Styles */
.nav-pill-container { 
  display: flex; 
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 50px; 
}

.nav-pill {
  background: #EFF3F5;
  padding: 25px 50px; /* Increased from 10px 20px */
  border-radius: 40px; /* Increased to keep the pill shape */
  display: flex;
  align-items: center;
}

.dotnav { 
  display: flex; 
  gap: 20px; 
}

.dot {
  width: 8px; /* Increased from 8px */
  height: 8px; /* Increased from 8px */
  background: #7579A0;
  border: none; 
  border-radius: 50%; 
  cursor: pointer; 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother expansion */
}

.dot.active { 
  background: #7579A0; 
  width: 32px; /* Increased from 20px */
  border-radius: 6px; 
}

.play-pause { 
  background: #EFF3F5; 
  border: none; 
  cursor: pointer; 
  fill: #7579A0; 
  width: 60px; 
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  padding: 0;
}

.play-pause:hover {
  background: #E0E5E9;
  transform: scale(1.05);
}

.play-pause svg {
  width: 30px;
  height: 30px;
  fill: #7579A0; /* Matches your --text-color */
}

/* 4. Remove the divider from HTML or hide it here */
.divider {
  display: none;
}

@media (max-width: 600px) {
  .nav-pill {
    padding: 25px 50px; /* Slightly smaller on mobile but still larger than your original */
  }

  .nav-pill-container {
    margin-top: 20px;
  }
  
  .dot {
    width: 8px;
    height: 8px;
  }
  
  .dot.active {
    width: 28px;
  }
}