/* Global Styles & Variables */
:root {
    --background-color: #ffffff;
    --text-color: #1f2937; /* Dark Gray */
    --muted-text-color: #6b7280; /* Medium Gray */
    --border-color: #e5e7eb; /* Light Gray */
    --accent-color: #0fa3b1; /* Teal */
    --accent-hover-color: #0c858f;
    --card-background: #f9fafb; /* Very Light Gray */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --heading-font: 'Plus Jakarta Sans', sans-serif;
    --body-font: 'DM Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    line-height: 1.3;
    margin-bottom: 0.75em;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem; /* 40px */
}

h2 {
    font-size: 2rem; /* 32px */
    margin-bottom: 1.5em;
    text-align: center;
    color: var(--text-color);
}

h3 {
    font-size: 1.25rem; /* 20px */
    color: var(--text-color);
}

p {
    margin-bottom: 1em;
    color: var(--muted-text-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}
.nav-logo:hover {
     color: var(--accent-color);
     text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--muted-text-color);
    font-weight: 500;
    font-family: var(--heading-font);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-color);
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background-color: var(--background-color);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--muted-text-color);
}

.hero-text .subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--muted-text-color);
}

/* Custom link styling for hero section */
.custom-link {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.custom-link:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

/* Typewriter effect styles */
.typewriter {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--muted-text-color);
    min-height: 1.8rem;
}

.typewriter-text {
    position: relative;
    color: var(--accent-color);
    font-weight: 500;
    font-family: var(--heading-font);
}

.typewriter-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-family: var(--heading-font);
    transition: background-color 0.2s ease;
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
}

.cta-button:hover {
    background-color: var(--accent-hover-color);
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.hero-image img {
    /* border-radius: 8px;
    box-shadow: var(--shadow-md); */
    /* You might want a specific aspect ratio or size */
    max-width: 400px;
    margin: 0 auto; /* Center if grid column is wider */
}

/* Projects Section */
.projects-section {
    padding: 4rem 0 6rem; /* More padding bottom */
    background-color: var(--card-background); /* Slightly off-white */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.project-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-image {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: contain; /* Ensure entire image is visible */
    border-bottom: 1px solid var(--border-color);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1; /* Ensure content pushes button down */
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 0.5rem;
}

.project-content p {
    font-size: 0.95rem;
    color: var(--muted-text-color);
    flex-grow: 1; /* Push tags and button down */
    margin-bottom: 1rem;
}

.tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #e6f7f8; /* Lighter accent */
    color: #075c64; /* Darker accent text */
    padding: 0.25rem 0.75rem;
    border-radius: 12px; /* Pill shape */
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #8ed4d9;
}

.view-btn {
    display: inline-block;
    margin-top: auto; /* Pushes button to the bottom */
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-weight: 500;
    font-family: var(--heading-font);
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.view-btn:hover {
    background-color: #f3f4f6; /* Light gray hover */
    border-color: #d1d5db;
    color: var(--text-color);
    text-decoration: none;
}

.view-btn.disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #d1d5db;
}
.view-btn.disabled:hover {
    background-color: #e5e7eb;
    color: #9ca3af;
}

/* Publications Section */
.publications-section {
    padding: 5rem 0;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.publication-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.publication-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    padding: 15px;
    transform: rotate(-1deg);
    transition: transform 0.2s ease;
}

.publication-cover:hover {
    transform: rotate(0deg);
}

.publication-cover img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    background-color: #fff7c0; /* Light yellow sticky note color */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    padding: 12px;
    border: 1px solid #e6d990;
    position: relative;
}

.publication-cover img::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.1) 50%);
    border-bottom-left-radius: 8px;
}

.publication-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.publication-meta {
    margin-bottom: 1.2rem;
}

.publication-authors {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.author-name {
    font-weight: 500;
}

.author-name.highlighted {
    font-weight: 700;
    color: var(--accent-color);
}

.publication-venue {
    font-size: 0.95rem;
    color: var(--muted-text-color);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.publication-date {
    font-style: italic;
}

.publication-pages {
    font-size: 0.9rem;
    color: var(--muted-text-color);
    margin-bottom: 0.5rem;
}

.publication-description {
    margin-bottom: 1.5rem;
    color: var(--muted-text-color);
    line-height: 1.6;
}

.publication-links {
    display: flex;
    gap: 1rem;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #e6f7f8;
    color: var(--accent-color);
    font-weight: 500;
    font-family: var(--heading-font);
    border-radius: 6px;
    border: 1px solid #8ed4d9;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.publication-link:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.contact-text {
    text-align: left;
    grid-column: 2;
    grid-row: 1;
}

.contact-text h2 {
    text-align: left;
    margin-left: 0;
    margin-bottom: 1.5rem;
}

.contact-text p {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 2rem;
}

.contact-text .contact-links {
    justify-content: flex-start;
    margin-left: 0;
}

.contact-image {
    grid-column: 1;
    grid-row: 1;
}

.contact-image img {
    max-width: 400px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-link {
    color: var(--text-color);
    font-weight: 500;
    font-family: var(--heading-font);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link i {
    font-size: 1.1rem;
}

.contact-link:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.footer a {
    color: var(--muted-text-color);
    font-weight: 500;
}

.footer a:hover {
    color: var(--text-color);
}

/* Fade-in Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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


/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* 32px */
    }

    h2 {
        font-size: 1.75rem; /* 28px */
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        grid-row: 1; /* Move image above text on mobile */
        margin-bottom: 2rem;
    }
    
    .hero-image img {
        max-width: 300px; /* Smaller image on mobile */
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Single column */
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }
    
    .contact-link {
        width: 100%;
        max-width: 300px;
        padding: 0.6rem 1rem;
        justify-content: center;
        text-align: center;
        font-size: 0.95rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-section, .projects-section, .contact-section {
        padding: 4rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }
    
    .contact-text {
        grid-column: unset;
        text-align: center;
        width: 100%;
        padding: 0 1rem;
        order: 2;
    }
    
    .contact-text h2 {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-text p {
        margin-bottom: 2rem;
    }
    
    .contact-image {
        order: 1;
        margin-bottom: 0;
        grid-column: unset;
        width: 100%;
        max-width: 280px;
        display: flex;
        justify-content: center;
    }
    
    .contact-image img {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
        margin-top: 0;
    }

    .publication-item {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .publication-cover {
        display: flex;
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .publication-cover img {
        max-width: 250px;
    }
    
    .publication-content h3 {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .publication-authors, .publication-venue, .publication-pages {
        text-align: center;
    }
    
    .publication-venue {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .publication-links {
        justify-content: center;
    }
} 