/* CSS Reset & Variables */
:root {
    --bg-color: #eff0f9;
    --bg-alt: #ffffff;
    --text-dark: #1e1e2f;
    --text-gray: #4a4a5a;
    --accent-mint: #2bb095;
    --accent-purple: #8b8dd6;
    --btn-mint: #93dfc9;
    --pill-blue-bg: #dce7f9;
    --pill-blue-border: #c2d6f2;
    --pill-yellow-bg: #fbedbc;
    --pill-yellow-border: #f4de9e;
    
    --name-color: #FFB6C1; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden; 
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* --- HERO VIEWPORT --- */
.hero-viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 3px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--accent-purple); 
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M19.7 9.3l-5-5-1.4 1.4 3.6 3.6-7.8 7.8c-.8.8-2 .8-2.8 0s-.8-2 0-2.8l7.8-7.8 3.6 3.6 1.4-1.4zM5 19h4v2H5v-2z"/></svg>') no-repeat center;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M12 2L2 22h20L12 2zm0 4.5l6.5 13.5h-13L12 6.5z"/></svg>') no-repeat center; 
    border-radius: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.logo-text span {
    font-size: 0.65rem;
    color: #888;
    font-weight: 500;
    margin-top: 3px;
    text-transform: capitalize;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
}

.btn-github {
    background-color: var(--btn-mint);
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
    z-index: 10;
}

.btn-github:hover {
    transform: translateY(-2px);
}

/* Hero Content */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    position: relative;
}

.hero-content {
    max-width: 55%;
    z-index: 2;
    pointer-events: none;
}

.hero-content > * {
    pointer-events: auto; 
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero h1 .highlight {
    color: var(--name-color); 
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

.hero .role {
    color: var(--accent-mint);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.hero .bio-intro {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.hero p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 35px;
    max-width: 90%;
}

/* Tags Area */
.tags-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tag.blue { background-color: var(--pill-blue-bg); border: 1px solid var(--pill-blue-border); color: #3b5a7a; }
.tag.yellow { background-color: var(--pill-yellow-bg); border: 1px solid var(--pill-yellow-border); color: #6b5c2a; }

.hero-image {
    width: 55%;
    height: 100vh; 
    position: absolute;
    right: -5%;
    top: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1;
}

spline-viewer {
    width: 100%;
    height: 100%;
}

.section-padding { padding: 100px 0; }
.section-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 40px; position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 50px; height: 4px; background-color: var(--accent-mint); border-radius: 2px; }

.news-wrapper { 
    background-color: var(--bg-alt); 
}

.news-container-block {
    background: #fff; 
    padding: 40px 40px 40px 60px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: relative; 
}

.news-container-block::before {
    content: '';
    position: absolute;
    top: 45px;
    bottom: 50px;
    left: 30px; 
    width: 2px;
    background-color: var(--pill-blue-border);
    z-index: 1; 
}

.news-item {
    position: relative;
    padding-bottom: 35px;
}

.news-item:last-child {
    padding-bottom: 0;
}

.news-item::before {
    content: '';
    position: absolute;
    left: -39px; 
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent-mint);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--btn-mint); 
    z-index: 2; 
}

.news-item .news-date { 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--accent-mint); 
    margin-bottom: 8px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    line-height: 1.2; 
}

.news-item p { 
    font-size: 1.05rem; 
    color: var(--text-gray); 
    line-height: 1.6; 
}
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { background-color: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }
.project-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--text-dark); }
.project-card p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.project-link { color: var(--accent-mint); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.project-link:hover { text-decoration: underline; }

/* Responsive Design */


/* --- INTERNAL PAGE STYLES (Projects, Awards, etc.) --- */
.page-wrapper {
    min-height: 80vh;
}

.page-header-text {
    margin-bottom: 50px;
    max-width: 700px;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* --- Project Card Styles for Pages with Images --- */
.project-card.has-image {
    padding: 0; 
    overflow: hidden; 
}

.project-image-container {
    width: 100%;
    height: 200px; 
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #f0f0f5; 
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease; 
}

.project-card:hover .project-image-container img {
    transform: scale(1.05);
}

.project-card-content {
    padding: 30px; 
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.hero-visual video {
    width: 80%; 
    max-width: 450px; 
    display: block;
    margin: 0 auto; 
}

.schematic-item img,
.schematic-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    margin-bottom: 15px;
}

/* =========================================================
   RESPONSIVE DESIGN (Tablets & Smaller Laptops: max 1024px)
   ========================================================= */
@media screen and (max-width: 1024px) {
    .hero-content { max-width: 60%; }
    .hero-image { right: -10%; }
    
    .split-hero {
        gap: 2rem;
        padding: 2rem 1rem;
    }
}

/* =========================================================
   MOBILE DESIGN (Phones & Small Tablets: max 768px)
   ========================================================= */
@media screen and (max-width: 768px) {
    
    /* 1. Fix Header & Navigation */
    header { 
        display: flex !important; 
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    nav {
        display: block !important;
        width: 100%;
    }
    
    nav ul {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0;
        gap: 1rem;
    }

    /* 2. Homepage Hero Fixes */
    .hero-viewport { min-height: auto; }
    
    .hero { 
        flex-direction: column; 
        padding: 40px 0; 
        align-items: center !important; 
        text-align: center !important; 
    }
    
    .hero-content { 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; 
        max-width: 100%; 
        position: relative; 
        z-index: 2; 
        pointer-events: auto; 
        text-align: center !important; 
    }

    .hero-content p, .hero-content h1, .bio-intro, .role {
        text-align: center !important;
    }

    .tags-container, .tag-row {
        align-items: center;
        justify-content: center;
    }
    
    .hero-image { 
        position: relative; 
        width: 100%; 
        height: 50vh; 
        right: 0; 
        top: 0; 
        margin-top: 40px; 
    }

    /* 3. Split Hero (Internal Project Pages) */
    .split-hero {
        flex-direction: column !important;
        text-align: center !important;
    }

    .split-hero .hero-content, 
    .hero-visual {
        flex: 1 1 100% !important; 
        width: 100% !important;
        max-width: 100%;
    }

    .action-btn-group {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .action-btn-group a {
        width: 100%;
        justify-content: center;
    }

    .project-tags {
        display: flex;
        justify-content: center !important; 
        flex-wrap: wrap;
        width: 100%;
        margin-bottom: 1rem;
    }

    .showcase-abstract {
        text-align: center !important;
    }

    /* 4. Deep Dive & Grids */
    .deep-dive {
        flex-direction: column;
        gap: 2rem;
    }

    .text-block { width: 100%; }

    .grid-wrapper {
        grid-template-columns: 1fr; 
        gap: 2rem;
    }

    .schematics-grid h3 { text-align: center; }

    /* 5. Project & Award Cards */
    .project-card.has-image {
        flex-direction: column;  
    }

    .project-image-container, 
    .project-card-content {
        width: 100%;
    }
    
    .award-card {
        margin-bottom: 1.5rem;
    }
}