/* GLOBAL VARIABLES & RESET */
:root {
    --bg-light: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #121212;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --accent: #2563eb; 
    --accent-hover: #1d4ed8;
    --accent-green: #059669; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.center-text { text-align: center; }
.mb-40 { margin-bottom: 40px; }

/* SECTIONS */
section { padding: 80px 0; }
.section-light { background-color: var(--bg-light); color: var(--text-dark); }
.section-dark { background-color: var(--bg-dark); color: var(--text-light); }
.section-title { font-size: 2.2rem; margin-bottom: 40px; text-align: center; color: inherit; }
.subsection-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--accent); }

/* TECHIE BACKGROUNDS */
.techie-bg {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}
.nav-brand { font-size: 1.5rem; font-weight: bold; color: var(--text-dark); }

/* Hide menu toggle on desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.nav-links { list-style: none; display: flex; gap: 25px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent); }

/* HOME SECTION */
#home { padding-top: 150px; text-align: center; background-color: var(--bg-alt); }
.hero-name { font-size: 3.5rem; font-weight: 800; margin-bottom: 10px; }
.hero-title { font-size: 1.5rem; color: rgb(107, 175, 192); margin-bottom: 40px; font-weight: 500; }

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(150, 149, 149, 0.2);
    padding: 40px;
    margin: 0 auto 40px;
    max-width: 900px;
    gap: 30px;
    text-align: left;
}
.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(100, 168, 185, 0.836);
}
.about-text p { font-size: 1.1rem; }
.transition-line { font-size: 1.2rem; font-style: italic; color: #666; margin-top: 20px; }

/* GRID CARDS */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s;
}
.section-light .card { background: var(--bg-light); border: 1px solid #eee; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.card:hover { transform: translateY(-5px); }
.section-dark .card h3 { margin-bottom: 15px; color: var(--accent); }
.section-light .card h3 { margin-bottom: 15px; color: var(--text-dark); }

/* EXPERIENCE SECTION */
.experience-block {
    margin-bottom: 50px;
}
.exp-header {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 25px;
}
.flex-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px;
}
.exp-header h3 { font-size: 1.8rem; }
.exp-header .role { font-weight: bold; color: #555; font-size: 1.1rem; }

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding-left: 24px;
}
.task-box {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}
.task-box:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.task-box h4 { color: var(--text-dark); margin-bottom: 10px; font-size: 1.1rem; }
.special-task { border-left: 3px solid var(--accent); }

/* PROJECTS CAROUSEL */
.project-carousel {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255,255,255,0.1);
}
.project-carousel::-webkit-scrollbar { height: 8px; }
.project-carousel::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.project-carousel::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.project-card {
    min-width: 100%; 
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    scroll-snap-align: center;
}
@media (min-width: 900px) {
    .project-card { min-width: 85%; } 
}

.project-card h3 { font-size: 1.8rem; margin-bottom: 10px; }
.project-card .pitch { font-size: 1.1rem; margin-bottom: 20px; color: #ccc; }

.challenges-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}
.results-box {
    background: rgba(5, 150, 105, 0.1);
    border-left: 4px solid var(--accent-green);
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
}

/* Responsive Media Container */
.tall-media { 
    margin-bottom: 25px; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    background: #000;
    width: 100%;
    aspect-ratio: 16 / 9; /* Ensures videos scale perfectly */
    max-height: 400px;
}
.tall-media video, .tall-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RESEARCH SECTION */
.research-section { margin-top: 40px; }
.research-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 30px;
    border-radius: 8px;
    gap: 20px;
}
.research-content h4 { font-size: 1.2rem; margin-bottom: 5px; }
.research-content p { color: #aaa; font-size: 0.95rem; }

/* CERTIFICATIONS CAROUSEL */
.cert-category { margin-bottom: 40px; }
.cert-category h3 { font-size: 1.5rem; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }

.cert-carousel {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(0,0,0,0.05);
}
.cert-carousel::-webkit-scrollbar { height: 8px; }
.cert-carousel::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 4px; }
.cert-carousel::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.cert-card {
    min-width: calc(50% - 12.5px); 
    flex: 0 0 auto;
    background: var(--bg-alt);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.cert-card img {
    width: 100%;
    height: auto; 
    max-height: 280px; 
    object-fit: contain; 
    border-radius: 2px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.cert-card h4 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 5px; margin-top: auto; }
.cert-card p { font-size: 0.9rem; color: #666; }

/* GALLERY CAROUSEL */
.gallery-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}
.carousel-item {
    min-width: 300px;
    height: 200px;
    background: #eee;
    border-radius: 8px;
    scroll-snap-align: start;
    overflow: hidden;
}
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }

/* BUTTONS */
.btn {
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.primary-btn { background: var(--accent); color: white; border: 2px solid var(--accent); }
.primary-btn:hover { background: var(--accent-hover); }
.secondary-btn { background: transparent; color: var(--text-light); border: 2px solid var(--text-light); }
.secondary-btn:hover { background: white; color: var(--text-dark); }
.btn-group { display: flex; gap: 15px; }

/* RESUME SPLIT LAYOUT */
.resume-split-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 0 auto 40px;
    text-align: left;
    max-width: 900px;
}
.resume-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}
.resume-box h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
}
.resume-box p {
    color: #ccc;
    margin-bottom: 25px;
    flex-grow: 1; 
}
.resume-box .resume-btn {
    justify-content: center;
    font-size: 1.1rem;
    padding: 12px 20px;
}

/* CONNECT & FOOTER */
.social-links { display: flex; justify-content: center; gap: 30px; font-size: 2rem; }
.social-links a { color: var(--text-light); transition: color 0.3s; }
.social-links a:hover { color: var(--accent); }

footer {
    background: #0a0a0a;
    color: #888;
    text-align: center;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.back-to-top { color: #888; text-decoration: none; }
.back-to-top:hover { color: white; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .navbar { 
        padding: 15px 25px; 
    }
    
    .menu-toggle {
        display: block;
    }

    .nav-links { 
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        clip-path: circle(0% at top right);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: circle(150% at top right);
    }

    .about-container { flex-direction: column; text-align: center; padding: 25px; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn-group .btn { width: 100%; justify-content: center; }
    .research-box { flex-direction: column; text-align: center; }
    .cert-card { min-width: 100%; } 
    .flex-header { flex-direction: column; align-items: flex-start; }
    footer { flex-direction: column; gap: 15px; }
}