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

body {
    font-family: 'Arial', sans-serif;
    background: #1a1919;
    /*background: linear-gradient(-45deg, #1a1a31, #151439, #0f1325, #1d2d54);*/
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Unified Navbar Styles!!! */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: #1a19199a;
    backdrop-filter: blur(5px);
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: none;
    box-sizing: border-box;
    line-height: normal;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Global link reset - applies to content links only */
a:not(.logo):not(.nav-links a):not(.section-nav a):not(.cta-button) {
    color: rgb(213, 221, 234) !important;
    text-decoration: underline !important;
}

a:not(.logo):not(.nav-links a):not(.section-nav a):not(.cta-button):link, 
a:not(.logo):not(.nav-links a):not(.section-nav a):not(.cta-button):visited, 
a:not(.logo):not(.nav-links a):not(.section-nav a):not(.cta-button):active {
    color: rgb(200, 205, 218)!important;
    text-decoration: underline !important;
}

a:not(.logo):not(.nav-links a):not(.section-nav a):not(.cta-button):hover{
    color: rgb(147, 163, 204)!important;
    text-decoration: underline !important;
} 

/* UNIFIED STYLING - applies to logo, nav links, and CTA buttons ONLY (excluding section nav) */
.logo, .nav-links a, .cta-button {
    color: white !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    line-height: 1.2;
}

/* Make logo slightly larger but keep same color */
.logo {
    font-size: 1.2rem;
    font-weight: bold;
}

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

/* UNIFIED HOVER EFFECTS for navbar only (excluding section nav) */
.logo:hover, .nav-links a:hover {
    transform: translateY(-2px);
    color: rgb(161, 164, 166) !important;
}

/* CTA button has its own hover styling */
.cta-button:hover {
    background: rgb(55, 56, 57);
    color: #b1b2ba !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* UNIFIED UNDERLINE ANIMATION for navbar only (exclude section nav and CTA button) */
.logo::after, .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.logo:hover::after, .nav-links a:hover::after {
    width: 100%;
}

/* Override the global link state styles for nav items and CTA buttons */
.logo:link, .logo:visited, .logo:active,
.nav-links a:link, .nav-links a:visited, .nav-links a:active,
.cta-button:link, .cta-button:visited, .cta-button:active {
    color: white !important;
    text-decoration: none !important;
}

.logo:hover, .nav-links a:hover {
    color: rgb(161, 164, 166) !important;
}

.cta-button:hover {
    color: #b1b2ba !important;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(29, 29, 31, 0.2);
    border: 1px solid white;
    color: rgb(219, 229, 235) !important; 
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
    cursor: pointer;
    margin: 0.5rem;
}

/* SEPARATE SECTION NAV STYLING */
.section-nav {
    position: fixed; 
    width: 200px;
    right: 0;
    padding-left: 2rem;
    top: 40%;
    z-index: 1000;
}

#section-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#section-nav-list li {
    margin: 0;
}

/* Section nav links with their own unique styling and hover effects */
#section-nav-list a {
    backdrop-filter: blur(0.8px); 
    display: block;
    padding: 10px 14px;
    background-color: #404c8572;
    color: #f3fafa !important;
    text-decoration: none !important;
    border: 1px solid #e8fefe94;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    min-width: 110px;
    transition: all 0.3s ease;
    position: relative; /* for potential future effects */
}

/* Section nav specific hover effects */
#section-nav-list a:hover {
    background-color: #356eaa52;
    border-color: #bed9f6;
    color: #b2d4f9 !important;
    transform: translateX(5px); /* unique slide effect instead of translateY */
    text-decoration: none !important;
}

#section-nav-list a:active,
#section-nav-list a.active {
    background-color: #3b73af87;
    color: white !important;
    border-color: #c1d5e9;
    text-decoration: none !important;
}

/* Ensure section nav links don't get navbar underline animation */
#section-nav-list a::after {
    display: none !important;
}

/* Force override all link states for section nav */
#section-nav-list a:link,
#section-nav-list a:visited,
#section-nav-list a:hover,
#section-nav-list a:active {
    text-decoration: none !important;
}

video {
    width: 100%;
    height: auto;
}

.hero-content video {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-slideshow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.profile-slideshow {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    background: #f0f0f0;
}

.profile-slideshow:hover {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


@media (max-width: 480px) {
    .text-content h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2rem;
        padding: 10px;
    }

    .image-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

.hero {
    margin-top: 1rem;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    z-index: 2;
}

.hero h1 {
    color: transparent;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
    opacity: 0.9;
    font-size: 2rem;
    font-weight: 600;
    padding: 20px;
    font-size: 4rem;
    margin-bottom: 1rem;
    /*opacity: 0;*/
    /*animation: fadeInUp 1s ease 0.5s forwards;*/
}

.gradient-text {
    background: linear-gradient(270deg, #6daffb, #9164fb, #00eeff, #ed4cff);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text; /* Chrome, Safari, Opera */
    color: transparent; /* make the actual text transparent */
    animation: gradientFlow 9s ease infinite;
}

@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.hero p {
    color: #ced9e0;
    font-size: 1.2rem;
   /*  animation: fadeInUp 1s ease 0.7s forwards;*/
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(29, 29, 31, 0.2);
    border: 1px solid white;
    color: rgb(219, 229, 235) !important; 
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
    cursor: pointer;
    margin: 0.5rem;
}



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

/*.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}
*/

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

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



.section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.section.visible h2 {
    opacity: 1;
    transform: translateY(0);
}



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

.skill-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-level {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(45deg, #f4b24f, #ff883e, #f13040);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    border-radius: 3px;
    width: 0;
    transition: width 2s ease;
}

.project-labels-in {
    display: flex;
    flex-wrap: wrap; /* ✅ allows wrapping */
    gap: 0.5rem;
    justify-content: flex-start;
}

.label-in {
    background: #3e414344;
    color: #dee0e9;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.575);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: normal; /* ✅ ensures wrapping */
    max-width: 100%;     /* ✅ prevents overflow on mobile */
}


/* projects card */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 2.5vw, 4rem);
    margin-top: 2rem;
    max-width: 1600px;
    margin-left: 50%; /* left edge to center */
    transform: translateX(-50%); 
    padding: 0 5rem; 
    box-sizing: border-box;
}
.project-card {
    position: relative; /* allow pseudo-element positioning */
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 1;
    min-height: 100%;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* animated gradient glow layer */
.project-card::before {
    content: "";
    position: absolute;
    inset: -8px; /* slightly larger than card */
    border-radius: inherit;
    background: linear-gradient(270deg, #4d1a8460, #0a368385, #0c486656);
    background-size: 400% 400%;
    filter: blur(25px);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    animation: gradientFlow 8s ease infinite;
}

/* hover state triggers glow */
.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    border-color: rgba(236, 239, 242, 0.468);
}

.project-card:hover::before {
    opacity: 1;
}

/* keyframes for flowy gradient movement */
@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.project-image {
    width: 100%;
    height: 460px; /* larger image area */
    min-height: 350px;
    max-height: 460px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem; /* larger icon/text size */
    color: white;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    overflow: wrap;
    object-fit: cover;
    object-position: center;
}

.project-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-wrap: break-word; /* ✅ fixes text wrapping */
    word-break: break-word;    /* ✅ ensures long labels break */
}

.project-content h3 {
    font-size: 2rem;
    margin-bottom: 1.15rem;
    line-height: 1.2;
    flex-shrink: 0;
    font-weight: 600;
}

.project-content h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #acdafb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.project-content h4-2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #a2c7fc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.project-content h4-3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #b6a2ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}


.project-content p {
    font-size: 1.2rem; /* Larger text */
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
    
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}




/* Large desktop - extra wide screens */
@media (min-width: 1600px) {
    .projects-grid {
        width: 100vw;
        gap: clamp(2rem, 3vw, 5rem);
        padding: 0 3rem;
    }
    
    .project-card {
        min-height: 700px;
        max-height: 800px;
    }
    
    .project-image {
        height: 450px;
        min-height: 400px;
        max-height: 500px;
        font-size: 6rem;
    }
    
    .project-content {
        padding: 3rem;
        min-height: 220px;
        max-height: 320px;
    }
    
    .project-content h3 {
        font-size: 2.2rem;
    }
    
    .project-content p {
        font-size: 1.3rem;
    }
}
 
/* desktop - standard wide screens */
@media (max-width: 1599px) and (min-width: 1200px) {
    .projects-grid {
        width: 100vw;
        gap: clamp(1.5rem, 2.5vw, 3.5rem);
        padding: 0 2rem;
    }
    
    .project-card {
        min-height: 600px;
        max-height: 720px;
    }
    
    .project-image {
        height: 390px;
        min-height: 340px;
        max-height: 420px;
        font-size: 4.5rem;
    }
}

/* Tablet landscape */
@media (max-width: 1199px) and (min-width: 900px) {
    .projects-grid {
        width: 100vw;
        gap: clamp(1.5rem, 2.5vw, 2.5rem);
        padding: 0 1.5rem;
    }
    
    .project-card {
        min-height: 550px;
        max-height: 650px;
    }
    
    .project-image {
        height: 320px;
        min-height: 280px;
        max-height: 380px;
        font-size: 4rem;
    }
    
    .project-content {
        padding: 2rem;
        min-height: 180px;
        max-height: 260px;
    }
    
    .project-content h3 {
        font-size: 1.8rem;
    }
    
    .project-content p {
        font-size: 1.1rem;
    }
}

/* Tablet portrait */
@media (max-width: 899px) and (min-width: 600px) {
    .projects-grid {
        width: 100vw;
        gap: clamp(1.5rem, 3vw, 2rem);
        padding: 0 1rem;
    }
    
    .project-card {
        min-height: 500px;
        max-height: 600px;
    }
    
    .project-image {
        height: 280px;
        min-height: 250px;
        max-height: 320px;
        font-size: 3.5rem;
    }
    
    .project-content {
        padding: 1.8rem;
        min-height: 160px;
        max-height: 240px;
    }
    
    .project-content h3 {
        font-size: 1.6rem;
    }
    
    .project-content p {
        font-size: 1.05rem;
    }
}

/* Mobile - single column */
@media (max-width: 599px) {
    .projects-grid {
        grid-template-columns: 1fr;
        width: 100vw;
        gap: clamp(1.5rem, 4vw, 2.5rem);
        padding: 0 1rem;
    }
    
    .project-card {
        min-height: 450px;
        max-height: 550px;
        width: 100%;
        margin: 0 auto;
    }
    
    .project-image {
        height: 250px;
        min-height: 220px;
        max-height: 280px;
        font-size: 3rem;
    }
    
    .project-content {
        padding: 1.5rem;
        min-height: 150px;
        max-height: 220px;
    }
    
    .project-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .project-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Very small mobile devices */
@media (max-width: 400px) {
    .projects-grid {
        width: 100vw;
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    .project-card {
        min-height: 400px;
        max-height: 500px;
    }
    
    .project-image {
        height: 220px;
        min-height: 200px;
        max-height: 250px;
        font-size: 2.5rem;
    }
    
    .project-content {
        padding: 1.25rem;
        min-height: 130px;
        max-height: 200px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .project-content p {
        font-size: 0.95rem;
    }
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

