/* 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;
    --border-color: #e4e6f2;
    --section-line: rgba(139, 141, 214, 0.14);

    --name-color: #FFB6C1;
}

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

::selection {
    background-color: var(--accent-purple);
    color: #ffffff;
}

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;
    gap: 16px;
}

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

.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;
    white-space: nowrap;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: nowrap;
}

/* GitHub item is only shown inside the mobile nav drawer */
.nav-github { display: none; }

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 8px 12px;
    transition: color 0.22s ease;
    white-space: nowrap;
}

/* Animated gradient underline — slides in on hover, stays lit on the active page */
nav a::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-mint), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

nav a:hover {
    color: var(--accent-purple);
}

nav a:hover::after,
nav a:focus-visible::after {
    transform: scaleX(1);
}

nav a.active {
    color: var(--accent-purple);
    font-weight: 600;
}

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

.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;
    white-space: nowrap;
    flex-shrink: 0;
}


.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: 0.95rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero .bio-intro {
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 90%;
}

.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: 999px;
    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: 80px 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-color);
    border-top: 1px solid var(--section-line);
}

.news-container-block {
    background: transparent;
    padding: 40px 40px 40px 60px;
    border-radius: 12px;
    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: 0;
}

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

.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 var(--bg-color);
    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 { background-color: var(--bg-alt); border-top: 1px solid var(--section-line); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { background-color: #fff; border: 1px solid var(--border-color); 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; }
.project-card-paper-title { font-size: 0.82rem !important; font-style: italic; color: var(--accent-purple) !important; margin-bottom: 10px !important; line-height: 1.45 !important; }

/* =========================================================
   HAMBURGER TOGGLE BUTTON (hidden on desktop)
   ========================================================= */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 1.5px solid rgba(30, 30, 47, 0.16);
    border-radius: 8px;
    cursor: pointer;
    padding: 9px;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(139, 141, 214, 0.08);
    border-color: var(--accent-purple);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Animate to × when nav is open */
header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 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: 260px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #f0f0f5;
}

.project-image-container img,
.project-image-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    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)
   ========================================================= */

/* Hide the logo subtitle first — frees ~180px before anything else reacts */
@media screen and (max-width: 1100px) {
    .logo-text span { display: none; }
}

@media screen and (max-width: 1024px) {
    .hero-content { max-width: 58%; }
    .hero-image { right: -10%; }
    .hero h1 { font-size: 3.8rem; }
    nav a { font-size: 0.88rem; padding: 6px 9px; }
    .split-hero { gap: 2rem; padding: 2rem 1rem; }
}

/* =========================================================
   MOBILE DESIGN (Phones & Small Tablets: max 768px)
   ========================================================= */
/* =========================================================
   HAMBURGER NAV (≤ 900px) — activates before the header gets cramped
   ========================================================= */
@media screen and (max-width: 900px) {

    header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 16px 0;
        position: relative;
    }

    /* Show hamburger */
    .nav-toggle { display: flex; }

    /* Move GitHub into the nav drawer instead */
    .btn-github { display: none; }
    .nav-github { display: block; }

    /* Nav hidden by default; opens as an OVERLAY dropdown over the page
       (absolute-positioned so it doesn't push the page content down) */
    nav {
        display: none;
        position: absolute;
        top: calc(100% - 2px);
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #ececf6;
        border-radius: 14px;
        box-shadow: 0 18px 40px rgba(30, 30, 47, 0.16);
        padding: 8px 14px 12px;
        z-index: 60;
    }

    header.nav-open nav { display: block; }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 4px 0;
        margin-top: 0;
    }

    nav ul li { width: 100%; }

    nav a {
        display: block;
        padding: 11px 10px 11px 14px;
        font-size: 1rem;
        border-radius: 6px;
    }

    /* In the vertical drawer, swap the underline for a left accent bar */
    nav a::after {
        left: 0;
        right: auto;
        top: 8px;
        bottom: 8px;
        width: 3px;
        height: auto;
        border-radius: 3px;
        background: linear-gradient(180deg, var(--accent-mint), var(--accent-purple));
        transform: scaleY(0);
        transform-origin: center top;
        transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    }

    nav a:hover::after,
    nav a.active::after {
        transform: scaleY(1);
    }

    nav a.active {
        background: rgba(139, 141, 214, 0.07);
    }

    .nav-github {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(0,0,0,0.07);
    }

    .nav-github a {
        color: var(--accent-purple);
        font-weight: 600;
    }

    /* ── Hero: stack vertically at this breakpoint so the Spline viewer
       stops overlapping the text before the 768px mobile layout kicks in ── */
    .hero-viewport { min-height: auto; }

    .hero {
        flex-direction: column;
        padding: 48px 0 36px;
        align-items: center;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        position: relative;
        z-index: 2;
        pointer-events: auto;
        text-align: center;
    }

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

    .tags-container,
    .tag-row {
        align-items: center;
        justify-content: center;
    }

    .hero-image {
        position: relative;
        width: 100%;
        height: 45vh;
        right: 0;
        top: 0;
        margin-top: 32px;
    }

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

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

/* =========================================================
   MOBILE (≤ 768px) — hero, grids, content layout
   ========================================================= */
@media screen and (max-width: 768px) {

    /* 2. Homepage Hero Fixes */
    .hero-viewport { min-height: auto; }

    /* .hero also carries the .container class, so use a 2-class selector
       to beat the .container padding override at the 480px breakpoint */
    .hero.container {
        flex-direction: column;
        padding: 150px 18px 40px;
        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;
    }
}

/* =========================================
   Animated Text Links 
   (Targets links inside paragraphs so it 
   doesn't break your buttons or nav menu)
   ========================================= */

p a {
    color: #8b8dd6; 
    text-decoration: none;
    position: relative;
    font-weight: 600;
    transition: color 0.3s ease;
}

p a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #8b8dd6;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

p a:hover {
    color: #6a6cb5; /* Slightly darker on hover */
}

p a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
/* =========================================
   ABOUT SECTION
   ========================================= */

.about-wrapper {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--section-line);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.about-text p strong {
    color: var(--text-dark);
    font-weight: 600;
}

.about-text p em {
    color: var(--accent-purple);
    font-style: normal;
    font-weight: 600;
}

.about-advisors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.advisor-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.advisor-pill {
    background: rgba(139, 141, 214, 0.12);
    border: 1px solid rgba(139, 141, 214, 0.35);
    color: var(--accent-purple);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.advisor-pill:hover {
    background: rgba(139, 141, 214, 0.25);
}

/* About Sidebar */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.sidebar-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    background: rgba(139, 141, 214, 0.1);
    border-radius: 9px;
}

.sidebar-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-mint);
    margin-bottom: 3px;
}

.sidebar-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.sidebar-venues {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.venue-chip {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-purple);
    background: rgba(139, 141, 214, 0.1);
    border: 1px solid rgba(139, 141, 214, 0.22);
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.btn-contact-cta {
    display: block;
    text-align: center;
    background-color: var(--accent-purple);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-top: 4px;
}

.btn-contact-cta:hover {
    background-color: #7274bf;
    transform: translateY(-2px);
}

.about-headshot-row {
    margin-bottom: 28px;
}

.about-headshot {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(139, 141, 214, 0.35);
    display: block;
}

.about-headshot-placeholder {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 2px dashed rgba(139, 141, 214, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.72rem;
    text-align: center;
    padding: 8px;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .about-advisors {
        justify-content: center;
    }
    .advisor-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Proprietary / Patent Pending label on project cards */
.proprietary-label {
    color: var(--text-gray);
    cursor: not-allowed;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

/* =========================================================
   PROJECTS PAGE — INTRO, THEMES, FILTERS, FEATURED, BADGES
   ========================================================= */

/* Intro paragraph */
.projects-intro {
    max-width: 880px;
    margin: 0 0 28px 0;
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.75;
}

.projects-intro strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Research themes */
.research-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 56px 0;
}

.theme-pill {
    background: rgba(43, 176, 149, 0.08);
    border: 1px solid rgba(43, 176, 149, 0.25);
    color: #1f8a73;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-pill .pill-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-mint);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Featured Project Banner */
.featured-project {
    background: linear-gradient(135deg, #ffffff 0%, #f5f6ff 100%);
    border: 1px solid rgba(139, 141, 214, 0.18);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 18px 48px rgba(139, 141, 214, 0.10);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.featured-project:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(139, 141, 214, 0.18);
}

.featured-content {
    padding: 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-purple);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.featured-content h2 {
    font-size: 2.05rem;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.featured-content > p {
    font-size: 1.02rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 26px;
}

.featured-content .project-tags { margin-bottom: 18px; }

.featured-content .action-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.featured-content .action-btn-group a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.featured-content .btn-primary {
    background-color: var(--accent-purple);
    color: #fff;
    border: 2px solid var(--accent-purple);
}

.featured-content .btn-primary:hover {
    background-color: #7274bf;
    border-color: #7274bf;
    transform: translateY(-2px);
}

.featured-content .btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid #d8d9e8;
}

.featured-content .btn-outline:hover {
    border-color: var(--text-dark);
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding-top: 22px;
    margin-top: 26px;
    border-top: 1px solid #ececf6;
}

.featured-meta .meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-mint);
    font-weight: 700;
    margin-bottom: 3px;
}

.featured-meta .meta-value {
    font-size: 0.92rem;
    color: var(--text-dark);
    font-weight: 600;
}

.featured-image {
    overflow: hidden;
    background: #f0f0f8;
    min-height: 380px;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-project:hover .featured-image img {
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .featured-project { grid-template-columns: 1fr; }
    .featured-content { padding: 36px 28px; }
    .featured-image { min-height: 240px; order: -1; }
    .featured-content h2 { font-size: 1.55rem; }
}

/* Filter Bar */
.filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 36px;
    padding: 6px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid #ececf6;
}

.filter-chip {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    color: var(--text-dark);
    background: rgba(139, 141, 214, 0.08);
}

/* On narrow layouts (where the nav also collapses), make the filter bar a
   clean full-width centered wrapping bar instead of a left-aligned pill that
   sprawls awkwardly when its chips wrap. */
@media (max-width: 900px) {
    .filter-bar {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
    }
}

.filter-chip.active {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 141, 214, 0.35);
}

/* Section eyebrow + title above grid */
.grid-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-mint);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.grid-heading h2 {
    font-size: 1.7rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.project-count {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.status-published   { background: rgba(43, 176, 149, 0.12); color: #1f8a73; border: 1px solid rgba(43, 176, 149, 0.30); }
.status-active      { background: rgba(255, 152, 0, 0.10);  color: #d97706; border: 1px solid rgba(255, 152, 0, 0.30); }
.status-patent      { background: rgba(139, 141, 214, 0.12); color: #6a6cb5; border: 1px solid rgba(139, 141, 214, 0.30); }
.status-proprietary { background: rgba(74, 74, 90, 0.08);   color: var(--text-gray); border: 1px solid rgba(74, 74, 90, 0.22); }

.status-active .dot { animation: pulse-dot 1.8s ease-in-out infinite; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(1.5); }
}

/* Placeholder graphic for cards without final imagery */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d4a 50%, #3a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(139, 141, 214, 0.45), transparent 45%),
        radial-gradient(circle at 78% 72%, rgba(43, 176, 149, 0.30), transparent 45%);
}

.image-placeholder svg {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.92);
}

.placeholder-label {
    position: absolute;
    bottom: 12px;
    right: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 2;
}

/* Card layout consistency for the new grid */
.project-card.has-image {
    display: flex;
    flex-direction: column;
}

.project-card.has-image .project-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card.has-image .project-card-content .project-link,
.project-card.has-image .project-card-content .card-footer {
    margin-top: auto;
}

.project-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
}

/* Filter-hide */
.is-hidden { display: none !important; }

/* Whole-card click target */
.project-card[data-href] { cursor: pointer; }

/* Tag size tweak so status badge + tags read consistently */
.project-tags .tag { font-size: 0.7rem; padding: 5px 12px; }

/* Mobile tweaks */
@media (max-width: 600px) {
    .filter-chip { padding: 8px 14px; font-size: 0.82rem; }
    .featured-content { padding: 28px 22px; }
    .featured-meta { gap: 18px; }
    .projects-intro { font-size: 1rem; }
}
        /* Local placeholder hero visual for the EchoVision page */
        .echo-hero-visual {
            width: 100%;
            aspect-ratio: 4 / 3;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0,0,0,0.10);
            position: relative;
            background: linear-gradient(135deg, #1e1e2f 0%, #2d2d4a 50%, #3a3a5c 100%);
        }
        .echo-hero-visual::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 22% 28%, rgba(139, 141, 214, 0.45), transparent 45%),
                radial-gradient(circle at 78% 72%, rgba(43, 176, 149, 0.30), transparent 45%);
        }
        .echo-hero-visual svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: rgba(255, 255, 255, 0.92);
        }
        .echo-hero-visual .placeholder-label {
            position: absolute;
            bottom: 16px;
            right: 18px;
            color: rgba(255,255,255,0.55);
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 1.2px;
            text-transform: uppercase;
        }

        /* Stats row */
        .echo-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 18px;
            margin: 40px auto 60px;
            max-width: 800px;
        }
        .echo-stat {
            background: #fff;
            border-radius: 14px;
            padding: 22px 24px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.04);
            border: 1px solid #ececf6;
        }
        .echo-stat .stat-value {
            font-size: 1.85rem;
            font-weight: 700;
            color: var(--accent-purple);
            line-height: 1.1;
        }
        .echo-stat .stat-label {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-gray);
            margin-top: 6px;
            letter-spacing: 0.5px;
        }

        /* Pipeline diagram */
        .pipeline-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin: 30px 0 20px;
        }
        .pipeline-step {
            background: #fff;
            border: 1px solid #ececf6;
            border-radius: 14px;
            padding: 20px 22px;
            position: relative;
        }
        .pipeline-step .step-num {
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 1.2px;
            color: var(--accent-mint);
            text-transform: uppercase;
            margin-bottom: 8px;
        }
        .pipeline-step h4 {
            font-size: 1.05rem;
            color: var(--text-dark);
            margin-bottom: 6px;
        }
        .pipeline-step p {
            font-size: 0.92rem !important;
            color: var(--text-gray);
            line-height: 1.55 !important;
            margin-bottom: 0 !important;
        }

        /* =============================================
   STRONG VIDEO CENTERING FIXES
   ============================================= */

.hero-visual,
.full-video-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.video-wrapper {
    max-width: 900px;
    width: 100% !important;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Force centering on all videos */
video {
    display: block;
    margin: 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Extra safety for hero */
.split-hero .hero-visual {
    display: flex;
    justify-content: center;
    margin: 30px 0 10px;
}

/* Make sure container doesn't fight the centering */
.container-large,
.container-mid {
    display: block;
    width: 100%;
}


/* =============================================
   FORCE CENTER NON-HERO VIDEOS
   ============================================= */

.full-video-section {
    width: 100% !important;
    max-width: 100% !important;
}

.full-video-section > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.full-video-section .video-wrapper,
.full-video-section > div > div {
    max-width: 900px !important;
    width: 100% !important;
    margin: 0 auto !important;
}


/* Make entire project card clickable + equal-height stretch */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.project-card-link > .project-card {
    flex: 1;
}

.project-card-link:hover .project-card {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* Prevent nested link interference */
.project-card .project-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
   HERO CTAs (Download CV + View My Work)
   ========================================================= */
.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.btn-download-cv {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-purple);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-download-cv:hover {
    background: #7274bf;
    transform: translateY(-2px);
}

.btn-view-work {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #d8d9e8;
    transition: border-color 0.2s ease;
}

.btn-view-work:hover {
    border-color: var(--text-dark);
}

/* =========================================================
   RESEARCH VISION SECTION
   ========================================================= */
.vision-wrapper {
    background: linear-gradient(160deg, #ecedfa 0%, #e6e8f6 100%);
    border-top: 1px solid rgba(139, 141, 214, 0.18);
    border-bottom: 1px solid rgba(139, 141, 214, 0.18);
}

/* Research Vision: text + image side by side above the 3 cards */
.vision-top-row {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: stretch;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .vision-top-row {
        grid-template-columns: 1fr 320px;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .vision-top-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.vision-hero-img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10);
    object-fit: cover;
    display: block;
}

.vision-hero-full {
    height: auto;
    max-height: 380px;
    margin-bottom: 40px;
    object-fit: cover;
}

.vision-text-block {
    max-width: 720px;
    margin-bottom: 0;
}

.vision-text-block p {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.vision-text-block p strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* 3-column horizontal card row */
.vision-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .vision-cards-row {
        grid-template-columns: 1fr;
    }
}

.vision-inner {
    max-width: 860px;
}

.vision-inner p {
    font-size: 1.08rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.vision-inner p strong {
    color: var(--text-dark);
    font-weight: 600;
}

.vision-inner p em {
    color: var(--accent-purple);
    font-style: normal;
    font-weight: 600;
}

.vision-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.vision-pillar {
    background: #fff;
    border-radius: 14px;
    padding: 26px;
    border: 1px solid rgba(139, 141, 214, 0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.vision-pillar .pillar-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.vision-pillar h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.vision-pillar p {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .vision-pillars { grid-template-columns: 1fr; }
}

/* =========================================================
   CONTACT PAGE — BUTTONS + CV BLOCK
   ========================================================= */
.contact-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 36px 0;
    justify-content: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #dde0f0;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.contact-btn svg {
    color: var(--accent-purple);
    flex-shrink: 0;
}

.contact-btn:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 141, 214, 0.06);
    transform: translateY(-2px);
}

.contact-cv-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: #f5f6fb;
    border: 1px solid #e2e3f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 12px;
}

.contact-cv-block h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.contact-cv-block p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

.btn-cv-white {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: var(--text-dark);
    border: 1.5px solid #d8d9e8;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.btn-cv-white:hover {
    border-color: var(--accent-purple);
    transform: translateY(-1px);
}

/* =========================================================
   SITE FOOTER — minimal
   ========================================================= */
.site-footer {
    background-color: var(--text-dark);
    border-top: none;
    padding: 22px 0;
    margin-top: 80px;
}

.site-footer .footer-site-name {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer .footer-copy {
    color: rgba(255, 255, 255, 0.35);
}

.site-footer .footer-logo-icon {
    background-color: rgba(255, 255, 255, 0.5);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer-logo-icon {
    width: 20px;
    height: 20px;
    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="M12 2L2 22h20L12 2zm0 4.5l6.5 13.5h-13L12 6.5z"/></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;
    flex-shrink: 0;
}

.footer-site-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dark);
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-gray);
}

@media (max-width: 480px) {
    .footer-inner { justify-content: center; }
    .site-footer { margin-top: 48px; }
}

.project-card .project-link:hover {
    text-decoration: underline;
}

/* =========================================================
   MOBILE-FIRST RESPONSIVE IMPROVEMENTS
   Keeps desktop/laptop layout identical; only activates
   on screens ≤ 768px (phones) and ≤ 480px (small phones).
   ========================================================= */

@media (max-width: 768px) {

    /* --- Layout: tighter container padding --- */
    .container {
        padding: 0 18px;
    }

    /* --- Reduce heavy section vertical spacing --- */
    .section-padding {
        padding: 60px 0;
    }

    /* --- Scale down main section titles --- */
    .section-title {
        font-size: 1.75rem;
    }

    /* --- Hero: shrink the large heading --- */
    .hero h1 {
        font-size: 2.8rem;
    }

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

    .hero .bio-intro {
        font-size: 0.98rem;
        max-width: 100%;
    }

    /* --- Hero CTAs: full-width stacked buttons --- */
    .hero-ctas {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .btn-download-cv,
    .btn-view-work {
        justify-content: center;
        text-align: center;
    }

    /* --- Header: center the GitHub button when stacked --- */
    .btn-github {
        align-self: center;
    }

    /* --- Reduce spline viewer height on mobile --- */
    .hero-image {
        height: 40vh;
    }

    /* --- News timeline: tighten left padding --- */
    .news-container-block {
        padding: 28px 16px 28px 44px;
    }

    .news-container-block::before {
        left: 18px;
    }

    .news-item::before {
        left: -30px;
    }

    /* --- Inner page titles --- */
    .page-title {
        font-size: 2.6rem;
    }

    /* --- Project page showcase headings --- */
    .showcase-title {
        font-size: 2.3rem !important;
    }

    .showcase-subtitle {
        font-size: 1.15rem !important;
    }

    .showcase-abstract {
        font-size: 1rem;
    }

    /* --- Contact CV block: stack on mobile --- */
    .contact-cv-block {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 22px;
    }

    .btn-cv-white {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* --- Footer margin --- */
    .site-footer {
        margin-top: 60px;
    }
}

/* Very small phones (≤ 480px): extra downsizing */

/* =========================================================
   WHERE I'M HEADED
   ========================================================= */
.headed-wrapper {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--section-line);
}

.headed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.headed-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.headed-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(139, 141, 214, 0.1);
    border: 1px solid rgba(139, 141, 214, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.headed-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.headed-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-gray);
    margin: 0;
}

@media (max-width: 768px) {
    .headed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .container {
        padding: 0 14px;
    }

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

    .section-title {
        font-size: 1.55rem;
    }

    .page-title {
        font-size: 2rem;
    }

    /* Hide the heavy 3D Spline viewer on very small screens —
       the hero text stands alone and it saves resources */
    .hero-image {
        display: none;
    }

    /* Give the hero a proper bottom gap when viewer is hidden */
    .hero {
        padding-bottom: 50px;
    }
}

/* =========================================================
   MOBILE POLISH — touch targets, overflow guards, pub links
   ========================================================= */

/* Ensure awards grid never forces horizontal scroll on narrow phones */
@media (max-width: 500px) {
    .awards-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    /* Publication link buttons: allow full-width stacking */
    .pub-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .pub-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Minimum touch target size for all interactive elements */
@media (max-width: 768px) {
    nav a,
    .filter-chip,
    .pub-btn,
    .btn-download-cv,
    .btn-view-work,
    .btn-github,
    .advisor-pill,
    .contact-btn {
        min-height: 44px;
    }
}


@media screen and (max-width: 768px) {
    .hero { padding-bottom: 50px; }
}

/* =========================================================
   SCROLL-REVEAL ANIMATIONS (added via reveal.js)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: opacity, transform;
    }

    .reveal.in-view {
        opacity: 1;
        transform: none;
    }

    /* Gentle stagger so grouped cards cascade in rather than snapping */
    .vision-cards-row > *:nth-child(2),
    .projects-grid > *:nth-child(2) { transition-delay: 0.08s; }

    .vision-cards-row > *:nth-child(3),
    .projects-grid > *:nth-child(3) { transition-delay: 0.16s; }

    .news-item:nth-child(2) { transition-delay: 0.06s; }
    .news-item:nth-child(3) { transition-delay: 0.12s; }
    .news-item:nth-child(4) { transition-delay: 0.18s; }
    .news-item:nth-child(5) { transition-delay: 0.24s; }
}
