/* =========================================
   VARIABLES & DESIGN SYSTEM
========================================= */
:root {
    /* Colors */
    --bg-main: #0b1120; /* Deep Navy / Slate */
    --bg-secondary: #1e293b; /* Slate 800 */
    --accent-primary: #38bdf8; /* Sky Blue */
    --accent-secondary: #818cf8; /* Indigo */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    
    /* Transitions & Shadows */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 30px rgba(56, 189, 248, 0.15);
}

/* =========================================
   BASE STYLES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: none;
    position: relative;
    z-index: 1;
    animation: fadeInSection 0.6s ease-out forwards;
}

section.active-section {
    display: block;
}

#hero.active-section {
    display: flex;
}

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

.dark-alt {
    background-color: rgba(11, 17, 32, 0.4); /* Deep Navy with opacity */
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.text-center {
    text-align: center;
}
.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.highlight {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   BUTTONS
========================================= */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-small:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* =========================================
   HEADER / HOME PAGE
========================================= */
#header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    position: relative;
    z-index: 1000;
    transition: all 0.5s ease;
}

#header h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -1px;
}

#header h1 a {
    color: transparent;
    background: linear-gradient(to right, var(--text-primary) 20%, var(--accent-primary) 50%, var(--text-primary) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 5s linear infinite;
    display: inline-block;
}

@keyframes shine {
    to { background-position: 200% center; }
}

#header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin: 2rem 0;
}

#header h2 span {
    color: var(--accent-primary);
    font-weight: 600;
}

#header h2 span.highlight-white {
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
    z-index: 1;
}

#header h2 span.highlight-white::after {
    content: '';
    position: absolute;
    width: 102%;
    height: 30%;
    bottom: 4px;
    left: -1%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.7;
    z-index: -1;
    transform: skewX(-15deg);
    border-radius: 2px;
}

#header #navbar {
    margin-bottom: 2rem;
    width: 100%;
}

#header .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: nowrap;
    overflow-x: auto;
}

#header .nav-links::-webkit-scrollbar {
    display: none;
}

#header .nav-links li a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
}

#header .nav-links li a:hover,
#header .nav-links li a.active {
    color: var(--text-primary);
}

#header .nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width var(--transition-smooth);
}
#header .nav-links li a:hover::after,
#header .nav-links li a.active::after {
    width: 100%;
}

#header .social-links {
    display: flex;
    gap: 1rem;
}

#header .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

#header .social-links a:hover {
    background: var(--accent-primary);
    color: var(--bg-main);
    transform: translateY(-3px);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Header Top State */
#header.header-top {
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(11, 17, 32, 0.85); /* Matches Deep Navy */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
}

#header.header-top .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

#header.header-top h1 {
    font-size: 1.5rem;
    white-space: nowrap;
    margin-right: 2rem;
}

#header.header-top h1 a {
    color: var(--text-primary);
    text-decoration: none;
}

#header.header-top h2,
#header.header-top .social-links {
    display: none;
}

#header.header-top #navbar {
    margin: 0;
    width: auto;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

#header.header-top .nav-links {
    margin: 0;
    gap: 1.5rem;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.hero-content, .scroll-indicator {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

/* =========================================
   ABOUT, SKILLS & ACHIEVEMENTS SECTIONS
========================================= */
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.skill-category {
    padding: 1.5rem;
}

.skill-category h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h4 i {
    color: var(--accent-primary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.coding-profiles h3, .honors-awards h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.profile-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.profile-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all var(--transition-fast);
}

.profile-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.profile-card i, .profile-card img {
    color: var(--accent-primary);
    width: 40px;
    text-align: center;
}

.styled-list {
    list-style: none;
}

.styled-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.styled-list i, .styled-list img {
    color: var(--accent-secondary);
    width: 40px;
    text-align: center;
}

/* =========================================
   CERTIFICATIONS GALLERY
========================================= */
.certifications-gallery {
    margin-top: 4rem;
    width: 100%;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cert-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cert-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-fast);
}

.cert-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.cert-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* =========================================
   IMAGE MODAL (LIGHTBOX)
========================================= */
.image-modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 5vh; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(11, 17, 32, 0.95); 
    backdrop-filter: blur(5px);
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}

@keyframes zoomIn {
    from {transform:scale(0.8); opacity:0}
    to {transform:scale(1); opacity:1}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--text-secondary);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-primary);
    text-decoration: none;
    cursor: pointer;
}

/* Utilities */
.d-block { display: block; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.text-sm { font-size: 0.9rem; color: var(--text-secondary); }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: all var(--transition-fast);
}

.skill-tags span:hover {
    background: var(--accent-primary);
    color: var(--bg-main);
}

/* =========================================
   EXPERIENCE SECTION (TIMELINE)
========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(56, 189, 248, 0.3);
}

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

.timeline-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.timeline-header .company {
    display: block;
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.timeline-header .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-list {
    list-style-type: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.timeline-list li {
    margin-bottom: 0.5rem;
}

.timeline-list li strong {
    color: var(--text-primary);
}

/* =========================================
   PROJECTS SECTION
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.github-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.github-link:hover {
    color: var(--accent-primary);
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    flex-grow: 1;
}


.contact-stacked-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form-container {
    padding: 2.5rem;
}

.contact-form-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.w-100 {
    width: 100%;
}



.contact-detail-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.detail-text h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.detail-text p {
    margin: 0;
    color: var(--text-secondary);
}

.contact-socials {
    padding: 2rem;
    text-align: center;
}

.contact-socials h4 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.social-icons-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icons-row a {
    color: var(--text-secondary);
    font-size: 2rem;
    transition: color 0.3s, transform 0.3s;
}

.social-icons-row a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}



/* =========================================
   ANIMATIONS (Section Level)
========================================= */
.visible {
    opacity: 1;
    transform: translate(0) !important;
}

.delay-1 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; animation-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; animation-delay: 0.4s; }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem 0;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.nav-active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-dot {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
    }
}
