@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Custom Properties */
:root {
    --video-focus: 35% center;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #050505;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    width: 100%;
}

/* Midnight Sky Background (From Uiverse.io by kiranmayee-abbireddy) */
.uiverse-midnight-sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050505;
    pointer-events: none;
}

.uiverse-midnight-sky .sky-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: #050505;
}

.uiverse-midnight-sky .stars {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
    will-change: opacity;
}

.uiverse-midnight-sky .stars-1 {
    background-image: radial-gradient(1px 1px at 10% 10%, #fff, transparent),
        radial-gradient(1px 1px at 30% 20%, #fff, transparent),
        radial-gradient(1px 1px at 50% 50%, #fff, transparent),
        radial-gradient(1px 1px at 70% 30%, #fff, transparent),
        radial-gradient(1px 1px at 90% 10%, #fff, transparent);
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
}

.uiverse-midnight-sky .stars-2 {
    background-image: radial-gradient(1.5px 1.5px at 20% 40%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 60% 85%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 65%, #fff, transparent);
    background-size: 300px 300px;
    animation: twinkle 5s ease-in-out infinite 1s;
}

.uiverse-midnight-sky .stars-3 {
    background-image: radial-gradient(2px 2px at 40% 70%, #fff, transparent),
        radial-gradient(2px 2px at 10% 80%, #fff, transparent),
        radial-gradient(2px 2px at 80% 40%, #fff, transparent);
    background-size: 400px 400px;
    animation: twinkle 7s ease-in-out infinite 2s;
}

.uiverse-midnight-sky .meteor {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
    opacity: 0;
    pointer-events: none;
    will-change: transform;
}

.uiverse-midnight-sky .meteor::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

.uiverse-midnight-sky .m1 { top: 10%; left: 110%; animation: shoot 8s linear infinite; }
.uiverse-midnight-sky .m2 { top: 30%; left: 110%; animation: shoot 12s linear infinite 4s; }
.uiverse-midnight-sky .m3 { top: 50%; left: 110%; animation: shoot 10s linear infinite 2s; }

.uiverse-midnight-sky .moon {
    position: absolute;
    top: 8%;
    right: 5%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 12px 12px 0 0 #fdfbd3;
    filter: drop-shadow(0 0 15px rgba(253, 251, 211, 0.4));
    z-index: 10;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.2; }
}

@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 0; }
    5% { opacity: 1; }
    15% { transform: translateX(-1500px) translateY(1000px) rotate(-35deg); opacity: 0; }
    100% { transform: translateX(-1500px) translateY(1000px) rotate(-35deg); opacity: 0; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #000000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #C9A227;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: #80aaff;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: #C9A227;
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    gap: 0.35rem;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
    order: 2;
}

.nav-toggle-line {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    display: block;
}

.nav-toggle.active .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.active .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Entrance Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Slide In Animations */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-120px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(120px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes timelineDrawDown {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

/* Hero Section with Profile Carousel and Typing Animation */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1000px;
    margin-top: 80px;
}

.profile-carousel {
    position: relative;
    width: 350px;
    height: 350px;
    flex-shrink: 0;
}

.hero-text-content {
    flex: 1;
    text-align: left;
}

.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #80aaff;
    opacity: 0;
    transition: opacity 0.5s ease;
    visibility: hidden;
    pointer-events: none;
}

.profile-img.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.profile-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: var(--video-focus);
    border: 4px solid #80aaff;
    opacity: 0;
    transition: opacity 0.5s ease;
    visibility: hidden;
    pointer-events: none;
}

.profile-video.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    margin-top: 0;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 0ms;
}

.subtitle {
    font-size: 1.5rem;
    color: #80aaff;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 120ms;
}


.hero-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 240ms;
}

.hero-text-secondary {
    font-size: 1rem;
    color: #b3d9ff;
    margin-bottom: 1.5rem;
}

.hero-proof {
    font-size: 0.9rem;
    color: #a9c2dd;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 360ms;
}

.proof-accent {
    color: #C9A227;
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 480ms;
    align-items: center;
}

.hero-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 600ms;
    justify-content: flex-start;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #C9A227;
    color: #0F2A43;
}

.btn-primary:hover {
    background-color: #dbb84a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #a9c2dd;
    border: 1px solid #a9c2dd;
}

.btn-secondary:hover {
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Scroll Reveal Utility - handled by scrollAnimation.js for bidirectional control */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.visible {
  /* Opacity and transform controlled by scroll animation */
  opacity: 1;
  transform: translateY(0);
}

/* Sections */
.section {
    padding: 5rem 0;
}

/* Scroll Animation Styles */
.reveal,
.portfolio-item,
.timeline-entry,
h2,
h3,
p:not(.hero-text):not(.hero-proof):not(.subtitle),
.portfolio-tag,
.tech-chip,
.portfolio-btn {
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
    position: relative;
    display: inline-block;
    width: 100%;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #C9A227;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 2.4s ease-out 0.3s;
}

h2.reveal.visible::after {
    opacity: 1;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

/* Projects Section */
.projects {
    background-color: transparent;
    color: #ffffff;
}

.projects h2 {
    color: #ffffff;
}

.projects h2::after {
    opacity: 1;
}

.portfolio-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.portfolio-item {
    display: flex;
    align-items: center;
    gap: 4rem;
    background-color: transparent;
    color: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    min-height: auto;
    overflow: visible;
    padding: 4rem 2rem;
    border-top: 1px solid #333333;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.portfolio-item:first-child {
    border-top: none;
    padding-top: 0;
}

.portfolio-item:nth-child(even) {
    flex-direction: row-reverse;
}

.portfolio-item:hover {
    transform: none;
    box-shadow: none;
    background-color: transparent;
}

.portfolio-image {
    flex: 0 0 45%;
    overflow: visible;
    background: transparent;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    align-content: flex-start;
    opacity: 0;
    transform: translateX(-120px);
    transition: none;
}

.portfolio-item:nth-child(even) .portfolio-image {
    transform: translateX(120px);
}

.portfolio-item.visible .portfolio-image {
    animation: slideInFromLeft 2.4s ease-out forwards;
}

.portfolio-item:nth-child(even).visible .portfolio-image {
    animation: slideInFromRight 2.4s ease-out forwards;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: none;
}

.portfolio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    gap: 1.5rem;
    opacity: 0;
}

.portfolio-item.visible .portfolio-content {
    animation: fadeUp 2.4s ease-out forwards;
}

.portfolio-item.visible .portfolio-tag {
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 100ms;
}

.portfolio-item.visible .portfolio-content h3 {
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 200ms;
}

.portfolio-item.visible .portfolio-content p {
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 300ms;
}

.portfolio-item.visible .portfolio-tech {
    animation: fadeUp 2.4s ease-out forwards;
    animation-delay: 400ms;
}

.portfolio-tag {
    font-size: 0.85rem;
    color: #C9A227;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.portfolio-content h3 {
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    color: #ffffff;
}

.project-number {
    color: #C9A227;
    font-weight: 600;
}

.portfolio-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #cccccc;
    margin: 0 0 1.25rem 0;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #C9A227;
    color: #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: fit-content;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.portfolio-btn:hover {
    background-color: #dbb84a;
    transform: translateX(4px);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #999999;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.projects .section-subtitle {
    color: #999999;
}


.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-chip {
    background-color: rgba(201, 162, 39, 0.1);
    color: #C9A227;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    border: 1px solid #C9A227;
    white-space: nowrap;
}

.card-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn-card-primary {
    background-color: #C9A227;
    color: #0F2A43;
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-card-primary:hover {
    background-color: #dbb84a;
    transform: translateY(-2px);
}

.btn-card-secondary {
    background-color: transparent;
    color: #0055aa;
    padding: 0.65rem 1.2rem;
    border: 1px solid #0055aa;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    display: inline-block;
}

.btn-card-secondary:hover {
    color: #ffffff;
    background-color: #0055aa;
    border-color: #0055aa;
    transform: translateY(-2px);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: #0055aa;
    color: #ffffff;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 3001;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-align: left;
    position: relative;
}

.modal-content h2::after {
    display: none;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 1.3rem;
    color: #C9A227;
    margin-bottom: 0.75rem;
}

.modal-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.modal-section ul {
    list-style-position: inside;
    color: #ffffff;
    line-height: 1.8;
}

.modal-section ul li {
    margin-bottom: 0.5rem;
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-images img {
    width: 100%;
    border-radius: 8px;
    max-height: 300px;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: transparent;
    border: none;
    color: #80aaff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #C9A227;
}

.modal-close:focus {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

/* Footer */
.footer {
    background-color: transparent;
    color: #ffffff;
    padding: 4rem 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto 3rem;
    gap: 2rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.footer-email,
.footer-phone {
    color: #C9A227;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-email:hover,
.footer-phone:hover {
    color: #dbb84a;
}

.footer-phone {
    text-decoration: underline;
}

.footer-center {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-center h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #ffffff;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
    align-items: flex-start;
}

.social-link {
    color: #ffffff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: #C9A227;
}

.footer-divider {
    height: 1px;
    background-color: #333333;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.footer-divider-top {
    margin-top: 0;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #888888;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-size: 0.85rem;
    color: #C9A227;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #dbb84a;
}

/* Responsive Design */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }

    html {
        overflow-x: hidden;
    }

    .navbar {
        padding: 0.12rem;
        justify-content: space-between;
    }

    .nav-toggle {
        display: flex !important;
        order: 2;
    }

    .portfolio-image,
    .carousel-image {
        opacity: 1 !important;
        transform: translateX(0) !important;
        animation: none !important;
    }

    .portfolio-content {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .nav-list {
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        background-color: #000000;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        display: none;
        padding: 0.6rem 0;
        border-top: 1px solid #333333;
        z-index: -1;
    }

    .nav-list.active {
        display: flex;
        z-index: 999;
    }

    .nav-list li {
        padding: 0.5rem 1.5rem;
        border-bottom: 1px solid #1a1a1a;
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list .nav-link::after {
        display: none;
    }

    .nav-list .nav-link:hover {
        color: #80aaff;
    }

    .hero {
        padding-top: 100px;
    }

    section[id] {
        scroll-margin-top: 70px;
    }

    section[id] h2 {
        scroll-margin-top: 70px;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        padding-top: 0;
        margin-top: 60px;
        align-items: center;
    }

    .hero-text-content {
        text-align: center;
        width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.3rem;
        justify-content: center;
    }

    .typing-text {
        min-width: 150px;
        font-size: 1.4rem;
    }

    .profile-carousel {
        width: 200px;
        height: 200px;
        margin: 1rem auto 0;
    }

    .profile-video,
    .profile-img {
        object-fit: cover;
        object-position: var(--video-focus);
    }

    .hero-cta {
        flex-direction: row;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        text-align: center;
        min-height: 44px;
    }

    .hero-social {
        margin-top: 1rem;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .container {
        padding: 0 1.5rem;
    }

    .portfolio-item {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 1.5rem;
        border-radius: 0;
        width: 100%;
        margin-left: 0;
        min-height: auto;
        max-width: 100%;
        box-sizing: border-box;
        position: relative;
        z-index: auto;
        overflow: hidden;
    }

    .portfolio-item:nth-child(3) {
        gap: 150px;
    }

    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5) {
        gap: 100px;
    }

    .portfolio-item:nth-child(3) .portfolio-content p,
    .portfolio-item:nth-child(4) .portfolio-content p,
    .portfolio-item:nth-child(5) .portfolio-content p {
        margin-bottom: 1.5rem;
    }

    .portfolio-item:nth-child(3) .portfolio-tech,
    .portfolio-item:nth-child(4) .portfolio-tech,
    .portfolio-item:nth-child(5) .portfolio-tech {
        margin-bottom: 1.5rem;
    }

    .portfolio-item:nth-child(4) .portfolio-content,
    .portfolio-item:nth-child(5) .portfolio-content {
        line-height: 1.8;
    }

    .portfolio-item:nth-child(even) {
        flex-direction: column;
    }

    .portfolio-item:first-child {
        padding-top: 0;
    }

    .portfolio-image {
        flex: 0 0 auto;
        width: 100%;
        display: block;
        margin-bottom: 0;
        position: relative;
        z-index: 1;
        opacity: 1 !important;
        transform: none !important;
    }

    .portfolio-image img {
        width: 100%;
        height: auto;
        max-height: 300px;
        display: block;
    }

    .portfolio-item.visible .portfolio-image {
        animation: none !important;
    }

    .portfolio-content {
        padding: 0;
        flex: 1 0 100% !important;
        width: 100% !important;
        position: static !important;
        z-index: 2;
        display: block;
    }

    .portfolio-tag {
        display: block;
        margin-bottom: 0.25rem;
    }

    .portfolio-content h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .portfolio-content p {
        margin-bottom: 0.75rem;
    }

    .portfolio-tech {
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }

    .tech-chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .portfolio-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        max-width: 90vw;
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-section h3 {
        font-size: 1.1rem;
    }

    .vula-carousel {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
        padding: 0;
        width: 100% !important;
        margin-left: 0 !important;
        align-items: stretch;
    }

    .vula-carousel .carousel-wrapper {
        width: 100%;
        height: auto;
        order: 1;
        flex: 0 0 auto;
        max-width: 100%;
        margin: 0;
    }

    .vula-carousel .portfolio-content {
        order: 2;
        width: 100%;
        flex: 0 0 auto;
        padding: 0;
        gap: 1rem;
    }

    .vula-carousel .portfolio-content h3,
    .vula-carousel .portfolio-content p {
        width: 100%;
    }

    .vula-tech {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .carousel-controls-inline {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 0;
        order: 3;
        width: 100%;
        flex: 0 0 auto;
    }

    .carousel-nav {
        gap: 1rem;
        width: auto;
        justify-content: center;
        padding: 0 1rem;
        overflow-x: visible;
    }

    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .carousel-dots {
        gap: 0.3rem;
    }

    .carousel-dot {
        width: 4px;
        height: 4px;
    }

    .carousel-dot.active {
        width: 12px;
    }

    .vula-carousel .portfolio-content {
        width: 100%;
        padding: 0;
        gap: 1.5rem;
        grid-column: auto;
        grid-row: auto;
    }

    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5) {
        min-height: auto;
    }

    .footer {
        padding: 2rem 1.5rem;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-divider {
        width: 100%;
        margin-left: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        padding: 1.5rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        max-width: 100%;
        margin-top: 60px;
        align-items: center;
    }

    .hero-text-content {
        text-align: center;
        width: 100%;
    }

    .profile-carousel {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .profile-video,
    .profile-img {
        object-fit: cover;
        object-position: var(--video-focus);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-proof {
        font-size: 0.85rem;
    }

    .hero-cta {
        flex-direction: row;
        gap: 0.75rem;
        justify-content: center;
    }

    .hero-cta .btn {
        min-height: 44px;
        padding: 0.65rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-social {
        justify-content: center;
    }

    .container {
        padding: 0 1.5rem;
    }

    .portfolio-item {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .portfolio-content h3 {
        font-size: 1.5rem;
    }

    .vula-carousel {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
        padding: 0;
        width: 100% !important;
        margin-left: 0 !important;
        align-items: stretch;
    }

    .vula-carousel .carousel-wrapper {
        width: 100%;
        height: auto;
        order: 1;
        flex: 0 0 auto;
        max-width: 100%;
        margin: 0;
    }

    .vula-carousel .portfolio-content {
        order: 2;
        width: 100%;
        flex: 0 0 auto;
        padding: 0;
        gap: 1rem;
    }

    .footer-top {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .footer-contact {
        flex: none;
    }

    .footer-center {
        order: 2;
    }

    .footer-social {
        flex: none;
    }
}

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

    .nav-list {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .container {
        padding: 0 1rem;
    }

    .projects {
        padding: 3rem 0;
    }

    .section {
        padding: 3rem 0;
    }

    .portfolio-items {
        gap: 1rem;
    }

    .portfolio-item {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .portfolio-item:nth-child(3) .portfolio-content p,
    .portfolio-item:nth-child(4) .portfolio-content p,
    .portfolio-item:nth-child(5) .portfolio-content p {
        margin-bottom: 1.5rem;
    }

    .portfolio-item:nth-child(3) .portfolio-tech,
    .portfolio-item:nth-child(4) .portfolio-tech,
    .portfolio-item:nth-child(5) .portfolio-tech {
        margin-bottom: 1.5rem;
    }

    .portfolio-item:nth-child(4) .portfolio-content,
    .portfolio-item:nth-child(5) .portfolio-content {
        line-height: 1.8;
    }

    .portfolio-image {
        flex: 0 0 auto;
        width: 100%;
        display: block;
        margin-bottom: 0;
        position: relative;
        z-index: 1;
        opacity: 1 !important;
        transform: none !important;
    }

    .portfolio-image img {
        width: 100%;
        height: auto;
        display: block;
        max-height: 250px;
    }

    .portfolio-item.visible .portfolio-image {
        animation: none !important;
    }

    .portfolio-content {
        flex: 1 0 100% !important;
        width: 100% !important;
        display: block !important;
        position: static !important;
        z-index: 2;
        margin-top: 0;
        opacity: 1 !important;
    }

    .portfolio-content h3 {
        font-size: 1.25rem;
    }

    .portfolio-content p {
        font-size: 0.95rem;
    }

    .portfolio-tag {
        font-size: 0.75rem;
    }

    .tech-chip {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .portfolio-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.65rem 1.2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .hero-proof {
        font-size: 0.85rem;
    }

    .hero-cta {
        flex-direction: row;
        gap: 0.5rem;
    }

    .hero-cta .btn {
        flex: 1;
        min-width: 0;
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .hero-social {
        margin-top: 0.75rem;
        gap: 1rem;
        justify-content: center;
    }

    h2 {
        font-size: 2rem;
    }

    .portfolio-item {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
        position: relative;
        z-index: auto;
        overflow: hidden;
    }

    .portfolio-image {
        max-height: 200px;
    }

    .portfolio-content h3 {
        font-size: 1.3rem;
    }

    .portfolio-content p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .portfolio-tag {
        display: block;
        margin-bottom: 0.25rem;
    }

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

    .portfolio-tech {
        margin-bottom: 1rem;
    }

    .vula-carousel {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
        padding: 1rem;
        width: 100% !important;
        margin-left: 0 !important;
        align-items: stretch;
    }

    .vula-carousel .carousel-wrapper {
        width: 100%;
        margin: 0;
        order: 1;
        flex: 0 0 auto;
        max-width: 100%;
    }

    .vula-carousel .portfolio-content {
        order: 2;
        width: 100%;
        flex: 0 0 auto;
        padding: 0;
        gap: 0.75rem;
    }

    .carousel-image {
        max-height: 220px;
    }

    .carousel-controls-inline {
        display: flex;
        padding: 0.75rem 0;
        justify-content: center;
        align-items: center;
        order: 3;
        width: 100%;
        flex: 0 0 auto;
    }

    .carousel-nav {
        gap: 0.8rem;
        width: auto;
        padding: 0 1rem;
        overflow-x: visible;
    }

    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .carousel-dots {
        gap: 0.2rem;
    }

    .carousel-dot {
        width: 4px;
        height: 4px;
    }

    .carousel-dot.active {
        width: 10px;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-contact {
        font-size: 0.9rem;
    }

    .footer-center h3 {
        font-size: 2rem;
    }

    .footer-divider {
        margin: 1rem 0;
    }

    .section {
        padding: 2rem 0;
    }

    h2 {
        font-size: 1.8rem;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 1rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.5rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-contact {
        order: 1;
        align-items: center;
    }

    .footer-center {
        order: 3;
        margin: 1.5rem 0;
    }

    .footer-center h3 {
        font-size: 2rem;
    }

    .footer-social {
        order: 2;
        justify-content: center;
        margin-top: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Vula Carousel */
.vula-carousel {
    display: grid;
    grid-template-columns: 1fr 45%;
    grid-template-rows: auto auto;
    gap: 4rem;
    align-items: start;
    padding: 4rem 2rem;
}

.portfolio-item:nth-child(4),
.portfolio-item:nth-child(5) {
    min-height: 100vh;
}

.vula-carousel .carousel-wrapper {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: translateX(-120px);
    transition: opacity 0.5s ease-out;
    max-height: 500px;
}

.portfolio-item.visible .carousel-image {
    animation: slideInFromLeft 2.4s ease-out forwards;
}

.portfolio-item:nth-child(even).visible .carousel-image {
    animation: slideInFromRight 2.4s ease-out forwards;
}

.carousel-image.active {
    opacity: 1;
}

.vula-carousel .portfolio-content {
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
}

.vula-carousel .portfolio-content h3,
.vula-carousel .portfolio-content p {
    margin: 0;
}

.vula-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}


.carousel-controls-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    grid-column: 2;
    grid-row: 2;
}

.carousel-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.carousel-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(201, 162, 39, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #C9A227;
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

.carousel-dot:hover {
    background-color: rgba(201, 162, 39, 0.6);
}

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.carousel-prev,
.carousel-next {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #C9A227;
    background-color: transparent;
    color: #C9A227;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: #C9A227;
    color: #000000;
}

.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95);
}


/* Hero Social Icon Links */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

.social-icon--instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #ffffff;
}

.social-icon--linkedin {
    background-color: #0A66C2;
    color: #ffffff;
}

.social-icon--whatsapp {
    background-color: #25D366;
    color: #ffffff;
}

/* Social Icon Item Wrapper - icon + label */
.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    width: 70px;
    min-height: 80px;
}

/* Social Label Text */
.social-label {
    font-size: 0.72rem;
    color: #a9c2dd;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.social-item:hover .social-label {
    color: #ffffff;
}

.social-item:focus-within .social-label {
    color: #ffffff;
}


/* Journey Timeline Section */
.journey {
    background-color: transparent;
    color: #ffffff;
    position: relative;
}

.journey-track-heading {
    font-size: 1.3rem;
    color: #a9c2dd;
    font-weight: 500;
    margin-top: 4rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.journey-track-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.journey h2 {
    color: #ffffff;
}

.journey h2::after {
    opacity: 1;
}

.journey-subheader {
    text-align: center;
    font-size: 1rem;
    color: #a9c2dd;
    font-style: italic;
    margin-bottom: 3rem;
    display: block;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-rail {
    position: absolute;
    left: 30%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(169, 194, 221, 0.3);
    transform-origin: top;
    transform: scaleY(0);
}

.timeline-entries {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-entry {
    position: relative;
    display: flex;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 2.4s ease-out forwards;
}

.timeline-entry:nth-child(1) { animation-delay: 0ms; }
.timeline-entry:nth-child(2) { animation-delay: 120ms; }
.timeline-entry:nth-child(3) { animation-delay: 240ms; }
.timeline-entry:nth-child(4) { animation-delay: 360ms; }
.timeline-entry:nth-child(5) { animation-delay: 480ms; }

.timeline-node {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #C9A227;
    margin-top: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    z-index: 10;
    animation: nodePopIn 0.3s ease-out 100ms backwards;
}

.timeline-node--completed {
    background-color: #C9A227;
    color: #C9A227;
}

.timeline-node--ongoing {
    background-color: transparent;
    border: 2px solid #C9A227;
    width: 16px;
    height: 16px;
    margin-top: 6px;
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.4);
}

@keyframes nodePopIn {
    from {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

.timeline-content,
.timeline-card {
    margin-left: calc(30% + 2rem);
    flex: 1;
}

.timeline-year {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #C9A227;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.timeline-org {
    display: block;
    font-size: 0.9rem;
    color: #a9c2dd;
    margin-bottom: 0.75rem;
}

.timeline-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #cccccc;
    margin: 0;
}

/* Responsive: Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .journey-subheader {
        margin-bottom: 2.5rem;
    }

    .timeline-entry {
        margin-bottom: 2.5rem;
    }

    .timeline-node {
        left: 28%;
    }

    .timeline-rail {
        left: 28%;
    }

    .timeline-content,
    .timeline-card {
        margin-left: calc(28% + 1.5rem);
    }

    .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-description {
        font-size: 0.95rem;
    }
}

/* Responsive: Mobile (≤768px) */
@media (max-width: 768px) {
    .journey-subheader {
        margin-bottom: 2rem;
    }

    .timeline-entry {
        margin-bottom: 2rem;
        flex-direction: column;
    }

    .timeline-rail {
        left: 24px;
    }

    .timeline-node {
        left: 24px;
        margin-top: 0;
    }

    .timeline-content,
    .timeline-card {
        margin-left: 60px;
        margin-top: 0;
    }

    .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-description {
        font-size: 0.95rem;
    }

    .footer-top {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .footer-contact {
        flex: none;
    }

    .footer-center {
        order: 2;
    }

    .footer-social {
        flex: none;
    }
}

/* Responsive: Small mobile (≤480px) */
@media (max-width: 480px) {
    .journey-subheader {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .timeline-entry {
        margin-bottom: 1.5rem;
    }

    .timeline-rail {
        left: 20px;
    }

    .timeline-node {
        left: 20px;
        width: 10px;
        height: 10px;
        margin-top: 4px;
    }

    .timeline-node--ongoing {
        width: 14px;
        height: 14px;
        margin-top: 2px;
    }

    .timeline-content,
    .timeline-card {
        margin-left: 50px;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-org {
        font-size: 0.85rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }
}


/* Accessibility: Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Midnight sky: static stars, no meteors */
    .uiverse-midnight-sky .stars {
        opacity: 0.5;
    }

    .uiverse-midnight-sky .meteor {
        display: none;
    }

    /* Keep moon visible */
    .uiverse-midnight-sky .moon {
        opacity: 1;
    }
}



