:root {
    --primary-color: #000000;
    /* Black */
    --secondary-color: #1a1a1a;
    /* Very Dark Gray */
    --accent-color: #404040;
    /* Dark Gray */
    --highlight-color: #808080;
    /* Gray */
    --text-light: #ffffff;
    /* White */
    --text-dark: #000000;
    /* Black */
    --white: #ffffff;
    --teal: #000000;
    /* Replaced Teal with Black for buttons/accents (high contrast) */
    /* Wait, usually we want some contrast against black. Let's make 'teal' logic -> 'white' in dark bg and 'black' in light bg? */
    /* Actually simple B&W often uses Black for primary text/elements and White for background. */
    /* Let's redefine: */
    --primary-color: #000000;
    --secondary-color: #111111;
    --accent-color: #666666;
    --teal: #497516;
    --navbar-text-color: #ffffff;
    --greeting-text-color: #acadab;
    /* Use Black as the 'brand' color on light backgrounds */
    /* For dark backgrounds (Hero), we need white text/accents. */
    /* The Hero CSS uses 'color: var(--white)'. That works. */
    /* The particle system uses white now. */
    /* Buttons: Primary was teal text white. Now Black text white. */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}


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

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Scroll Fade-in Animation */
.section {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
    scroll-margin-top: 90px;
}

.section.no-fade {
    opacity: 1;
    transform: none;
    transition: none;
}

.section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 5%;
    z-index: 1000;
    box-shadow: 0 1px 100px rgba(77, 165, 228, 0.6);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navbar-text-color);
}
.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 500;
    color: var(--navbar-text-color);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #00ccff;
    transition: width 0.3s;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
    /* Navbar offset */
    /* background: linear-gradient(135deg, #000000 0%, #061403 100%); */
    background: linear-gradient(135deg, #011425 0%, #00050b 100%);


    /* Black to Dark Gray */
    color: var(--white);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero::before {
    display: none;
}

/* Scroll indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    font-weight: 500;
    padding: 0.2rem 0 1rem;
    color: #000000;
    font-size: 0.85rem;
    letter-spacing: 0.01rem;
    text-transform: none;
}

.scroll-indicator-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid #080808;
    border-bottom: 2px solid #0a0a0a;
    transform: rotate(45deg);
    animation: arrow-fade 2.4s ease-in-out infinite;
    margin-top: -0.2rem;
}

@keyframes arrow-fade {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 1;
    }
}

/* Hero Content Layout */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Individual Elements */
.greeting {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--greeting-text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: block;
}

.name {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    font-weight: 700;
}

.role-text {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    color: #46dcfe;
    min-height: 1.6em;
}

.hero-description {
    font-size: 1rem;
    color: #dee5e9;
    margin-bottom: 2.5rem;
    line-height: 1.4;
    text-align: left;
    font-weight: 100;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Profile Image - Rectangular */
.profile-img-container {
    width: 350px;
    height: 450px;
    /* Rectangular Portrait */
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 0;
    transition: transform 0.3s ease;
}

.profile-img-container:hover {
    transform: translateY(-5px);
}

.hero-affiliations {
    margin-top: 0.5rem;
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
}

.hero-affiliations img {
    max-height: 100px;
    opacity: 1;
    
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--white);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    margin: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn.primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn.secondary {
    border: 1px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgb(78, 193, 246);
}

/* Sections */
.section {
    padding: 5rem 10%;
}

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

.section-title {
    /* non bold font */
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 5%;
    transform: translateX(-50%);
}

.section-subtitle {
    text-align: center;
    color: var(--accent-color);
    font-size: 1rem;
    margin: -0.5rem auto 1.5rem;
    max-width: 600px;
}



.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #0060c0;
    margin: 5px 0 0;
    border-radius: 2px;
}

.dark-bg {
    background-color: #ffffff;
}

#publications {
    box-shadow: 0 -6px 12px -6px rgba(12, 31, 68, 0.2);
}

/* Recent Highlights */
.recent-highlights {
    background: #ffffff;
    padding-top: 1rem;
    margin-top: -3rem;
}

.recent-highlights .section-title {
    text-align: left;
    left: auto;
    transform: none;
    display: block;
    margin-left: 0;
}

.recent-highlights .container {
    max-width: 1100px;
    margin: 0 auto;
}

.highlight-list {
    display: grid;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}


.highlight-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: 2rem;
    align-items: center;
    padding: 0.9rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.highlight-figure {
    margin: 0;
    aspect-ratio: 16 / 9;
    height: 100%;
    border-radius: 2px;
    overflow: hidden;
    background: #ffffff;
}

.highlight-figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.highlight-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.live-flash {
    color: #d90429;
    font-weight: 700;
    animation: live-flash 3s ease-in-out infinite;
}

@keyframes live-flash {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

.highlight-text p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.highlight-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.7rem;
}

.highlight-links-single {
    justify-content: flex-start;
}

.highlight-links-right {
    justify-content: flex-end;
}

.highlight-link {
    color: #1f5fbf;
    font-weight: 500;
    text-decoration: none;
}

.highlight-link:hover {
    text-decoration: underline;
}

.highlight-linkedin {
    color: #0a66c2;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.highlight-linkedin:hover {
    text-decoration: underline;
}

/* LinkedIn modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 999;
    padding: 1.5rem;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content iframe {
    width: 100%;
    border: 0;
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: #0a66c2;
    font-weight: 500;
    text-decoration: none;
}

.modal-link:hover {
    text-decoration: underline;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #111111;
}

/* About Section */
.about-section {
    padding: 1rem 10%;
    background-color: #ffffff;
    box-shadow: 0 -6px 12px -6px rgba(12, 31, 68, 0.2);
    margin-top: -2rem;
    margin-bottom:-3rem;
    
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto ;
    margin-bottom: 1rem;
    
}

.about-text {
    flex: 1;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.about-text .section-title {
    margin-top: -1rem;;
    text-align: left;
    display: block;
    transform: none;
    left: auto;
    margin-bottom: 1 rem;
}

/* Override for About section only */
.about-text .section-title::after {
    margin: 1px 0 0 0;
    /* Left-aligned for About Me */
}

.about-text p {
    font-size: 1rem;
    color: rgb(85, 84, 84);
    line-height: 1.5;
    text-align: left;
}

.key-areas {
    margin-top: 2rem;
    margin-bottom: -2rem;
}

.key-areas h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
}

.key-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    
}

.key-area-tag {
    background: rgba(207, 207, 207, 0.021);
    border: 1px solid rgb(112, 112, 112);
    color: #4e4e4e;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.key-area-tag:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    color: #0b5cd4;
}

.about-wide-tags {
    margin-top: 1.5rem;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -3rem;
}

.about-image img {
    width: 110%;
    max-width: 900px;
    height: auto;
    border-radius: 10px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); */
}

/* Skills (New Location) */
.skills-subsection {
    margin-top: 1rem;
    padding-left: 10px;
}

.software-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.software-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f8f8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.software-item i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

#resume .skills-subsection h4 {
    color: var(--white);
}

#resume .software-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
}

#resume .software-item i {
    color: var(--white);
}

#resume .course-tag {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.software-item:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: var(--primary-color);
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.course-tag {
    font-size: 0.85rem;
    padding: 0.2rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: var(--accent-color);
}


/* Resume Section (Split Layout) */
.resume-section {
    position: relative;
    background: linear-gradient(180deg, #011425 0%, #000000 100%);
    color: var(--white);
    padding: 4rem 0;
    overflow: hidden;
}

.resume-section canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.resume-section .container {
    position: relative;
    z-index: 1;
}

.resume-heading {
    color: var(--white);
    display: block;
    text-align: center;
    left: auto;
    transform: none;
    margin: 0 auto 3rem;
}

.resume-download {
    text-align: center;
    margin-bottom: 2rem;
}

.resume-btn {
    margin-top: 2rem;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.resume-btn:hover {
    border-color: rgba(0, 167, 255, 0.8);
    box-shadow: 0 10px 18px rgba(0, 167, 255, 0.2);
}

.resume-heading::after {
    background: rgba(255, 255, 255, 0.6);
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact-section {
    background: #000000;
    color: #ffffff;
    padding-top: 3rem;
}

.contact-section .section-title {
    text-align: left;
    left: auto;
    transform: none;
    display: block;
    margin-left: 0;
}

.contact-section .section-title::after {
    background: #ffffff;
}

.contact-section .section-subtitle {
    text-align: left;
    margin-left: 0;
    color: #ffffff;
}

.form-embed {
    margin-top: 1.5rem;
}

.form-embed iframe {
    width: 100%;
    max-width: none;
    height: 300px;
    border: 0;
    display: block;
    filter: invert(1) hue-rotate(180deg);
}

.resume-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.resume-column {
    background: rgba(0, 6, 10, 0.329);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.column-title {
    font-size: 1.35rem;
    margin-bottom: 1.2rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.resume-list {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    /* Vertical Line */
}

.resume-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 25px;
}

.resume-marker {
    position: absolute;
    left: -26px;
    /* Align with border-left of list */
    top: 5px;
    width: 12px;
    height: 12px;
    background: rgba(1, 20, 37, 0.8);
    /* Hollow effect center */
    border: 2px solid rgba(255, 255, 255, 0.8);
    /* Use 'teal' var which is black in B&W theme */
    border-radius: 50%;
    z-index: 1;
}

/* Specific B&W overrides just to be safe if var changed */
.resume-marker {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(1, 20, 37, 0.8);
}

.resume-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.resume-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
}

.resume-subtitle {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.8rem;
}

.resume-details,
.resume-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    line-height: 1.5;
}

.resume-details li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    /* Indent bullets */
    position: relative;
}

.resume-details li::before {
    content: '•';
    color: rgba(255, 255, 255, 0.7);
    position: absolute;
    left: 0;
}

/* Collapsible Experience */
.experience-hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.experience-hidden.expanded {
    max-height: 1000px;
    opacity: 1;
}

.btn-expand {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 0;
    margin-left: 25px;
    /* Align with text */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.btn-expand:hover {
    color: #7dc3ff;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-subtitle {
    font-size: 0.95rem;
    color: var(--teal);
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

.project-period {
    font-size: 0.85rem;
    color: #999;
    font-family: var(--font-mono);
}

/* Publications */
#publications {
    padding: 0rem 10% 1rem;
        /* top right/left bottom — reduce the top value */
    background-color: #ffffff;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 140px;
    position: relative;
    overflow: hidden;
    
}

#publications::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -50px;
    width: 260px;
    height: 260px;
    background: url('../assets/gifs/typing_gif.gif') no-repeat center/cover;
    opacity: 0.9;
    z-index: 0;
}

#publications .container {
    position: relative;
    z-index: 1;
}

.related-publications#patents {
    position: relative;
    overflow: hidden;
}

#patents::before {
    content: '';
    position: absolute;
    bottom: -55px;
    left: -40px;
    width: 250px;
    height: 250px;
    background: url('../assets/gifs/satellite_gif_4.gif') no-repeat center/cover;
    opacity: 0.9;
    z-index: 0;
}

#patents .container {
    position: relative;
    z-index: 1;
}

.related-publications {
    padding: 2rem 10% 2rem;
}

#conference-proceedings {
    position: relative;
    z-index: 2;
}

.related-publications + .related-publications {
    padding-top: 1rem;
    margin-top: -5rem;
}

.related-publications .section-title {
    text-align: left;
    left: auto;
    transform: none;
    margin-left: 0;
}

.related-list {
    margin-top: 1.5rem;
}

.related-card {
    background: white;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #ececec;
    margin-bottom: 1rem;
    cursor: pointer;
}

.related-card .pub-header {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.related-card .pub-header {
    margin: 0;
}

.related-card .pub-meta {
    margin-bottom: 0.8rem;
}

.related-card .pub-icon {
    transition: transform 0.3s ease;
}

.related-card.active .pub-icon {
    transform: rotate(180deg);
}

.related-description {
    margin: 0;
    color: #505a6b;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.related-card.active .related-description {
    margin-top: 0.5rem;
    max-height: 500px;
}

.publication-item {
    background: white;
    padding: 1rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}


.publication-item:hover {
    background: #f1f3f5;
}

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pub-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--secondary-color);
    flex: 1;
}


.pub-icon {
    font-size: 1.2rem;
    color: var(--teal);
    margin-left: 1rem;
    transition: transform 0.3s;
}

.pub-meta {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.5rem;
}

.pub-meta strong {
    color: #000000;
    font-weight: 700;
}

.pub-abstract {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-top: 0;
    color: #555;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    text-align: justify;
}

.pub-abstract strong {
    color: #000000;
    font-weight: 700;
}

.publication-item.active .pub-abstract {
    max-height: 500px;
    /* Arbitrary large height */
    margin-top: 1rem;
    padding-top: 1rem;
}

.publication-item.active .pub-icon {
    transform: rotate(180deg);
}

/* Publication Buttons */
.pub-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.pdf-btn {
    background-color: #f44336;
    color: white;
}

.pdf-btn:hover {
    background-color: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.doi-btn {
    background-color: #2196F3;
    color: white;
}

.doi-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.1rem;
    justify-content: flex-start;
}

.publication-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.publication-btn i {
    font-size: 1.1rem;
}

.publication-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.scholar-btn {
    background-color: #4285f4;
}

.orcid-btn {
    background-color: #a6ce39;
    color: #0c3c1c;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    margin-bottom: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 1rem;
    color: var(--white);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 1;
    color: var(--teal);
}

/* Responsive */
@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
        margin-left: 0;
        text-align: right;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 40px;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: auto;
        right: -10px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -10px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        border-left: 4px solid var(--teal);
        border-right: none;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        border-right: 4px solid var(--teal);
        border-left: none;
    }

    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex !important;
    }
}

@media (max-width: 900px) {
    .resume-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
        gap: 3rem;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
    }

    .hero-image {
        flex: auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

.pub-abstract {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-top: 0;
    color: #555;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
}

.pub-abstract strong {
    color: #000000;
    font-weight: 700;
}

.publication-item.active .pub-abstract {
    max-height: 500px;
    /* Arbitrary large height */
    margin-top: 1rem;
    padding-top: 1rem;
}

.publication-item.active .pub-icon {
    transform: rotate(180deg);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    margin-bottom: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 1rem;
    color: var(--white);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 1;
    color: var(--teal);
}

/* Responsive */
@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
        margin-left: 0;
        text-align: right;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 40px;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: auto;
        right: -10px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -10px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        border-left: 4px solid var(--teal);
        border-right: none;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        border-right: 4px solid var(--teal);
        border-left: none;
    }

    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex !important;
    }
}

@media (max-width: 900px) {
    .resume-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
        gap: 3rem;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
    }

    .hero-image {
        flex: auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .profile-img-container {
        width: 100%;
        height: auto;
        aspect-ratio: 3/4;
        max-width: 300px;
    }

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

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

    .highlight-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 5%;
        /* Reduce padding */
    }

    .section-title {
        left: 0;
        transform: none;
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .name {
        font-size: 2.5rem;
        /* Smaller Title */
    }

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

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
        gap: 2rem;
    }

    .name {
        font-size: 2rem;
    }

    .role-text {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Key Projects Section */
#key-projects {
    padding: 0.1rem 10% 4rem;
    /* Reduced top padding from 4rem to 2rem */
    background-color: #ffffff;
    margin-bottom: -1rem;
    margin-top: 5rem;
    box-shadow: 0 -6px 12px -6px rgba(12, 31, 68, 0.2);
    /* Light gray background to distinguish from hero */
}

#key-projects .section-title {
    text-align: left;
    left: auto;
    transform: none;
    display: block;
    margin-left: 0;
}

#key-projects .section-subtitle {
    text-align: left;
    margin-left: 0;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.project-carousel-viewport {
    width: 100%;
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
}

.project-carousel {
    display: flex;
    gap: 2rem;
    perspective: 1000px;
    width: max-content;
    justify-content: flex-start;
    transition: none;
    will-change: transform;
}

.project-carousel.is-sliding {
    transition: transform 0.6s ease-in-out;
}

.project-card-flip {
    background-color: transparent;
    width: 500px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.project-card-flip.flipped .project-card-inner {
    transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-card-front {
    background-color: #fff;
    color: black;
}

.project-card-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.project-card-front .card-content {
    height: 30%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-card-front h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
    padding: 2rem;
    text-align: center;
}

.project-card-back h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-card-back p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.carousel-next {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.carousel-next:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .project-carousel {
        flex-wrap: nowrap;
    }

    .project-card-flip {
        width: min(90vw, 350px);
    }
}

.btn-view-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.btn-view-more:hover {
    background-color: #eee;
    color: black;
}

.pub-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.8rem 0;
    margin-top: 0.4rem;
    align-items: center;
}

.pub-nav-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pub-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.pub-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.pub-page-info {
    font-size: 0.85rem;
    color: #555;
    font-family: var(--font-mono);
}
.venue-blue {
    color: #0486fffb;
    /* A clean blue, adjust as needed */
    font-style: italic;
    /* keeps it consistent inside <em> */
}

.text-blue {
    color: #0486fffb;
}

.text-white {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem;
}

.about-link {
    color: #0486fffb;
    font-weight: 500;
    text-decoration: none;
}

.about-link:hover {
    text-decoration: underline;
}
