/* --- Global Variables (Academic Theme) --- */
:root {
    --primary: #0f766e;     /* Teal - trustworthy, tech */
    --secondary: #334155;   /* Slate - academic, text */
    --accent: #f0fdfa;      /* Very light teal bg */
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-off: #f8fafc;
}

/* --- Reset & Basics --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--bg-white);
}

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

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 8%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.dot { color: var(--primary); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
}

.nav-links a:hover { color: var(--primary); }

.cv-btn {
    border: 1px solid var(--secondary);
    padding: 5px 15px;
    border-radius: 4px;
    color: var(--secondary) !important;
}

.cv-btn:hover {
    background: var(--secondary);
    color: #fff !important;
}

/* --- Hero Section --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    background: radial-gradient(circle at top right, var(--accent), #fff 60%);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
    color: var(--secondary);
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary);
    background: linear-gradient(120deg, rgba(15, 118, 110, 0.1) 0%, rgba(15, 118, 110, 0) 100%);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 400;
}

.bio-short {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 30px;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
}

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

.btn.primary:hover { background: #0d6efd; } /* Keep slight blue shift on hover */

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

.btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- About Grid --- */
.container {
    padding: 5rem 8%;
}

.bg-light { background-color: var(--bg-off); }

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

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

.tag-list {
    list-style: none;
    margin-top: 1rem;
}

.tag-list li {
    display: inline-block;
    background: var(--bg-off);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0 5px 10px 0;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
}

/* --- Research Cards --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.tag.paper { background: #fee2e2; color: #991b1b; } /* Red for PDF/Arxiv */
.tag.project { background: #dbeafe; color: #1e40af; } /* Blue for Code */
.tag.blog { background: #fef3c7; color: #92400e; } /* Yellow for Writing */

.card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.links a:hover { text-decoration: underline; color: var(--primary); }

/* --- Writing List --- */
.writing-list {
    list-style: none;
}

.writing-list li {
    border-bottom: 1px solid #e2e8f0;
}

.writing-list a {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
}

.writing-list a:hover .writing-title { color: var(--primary); }

.writing-source { color: var(--text-light); font-size: 0.9rem; }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem;
    background: var(--bg-white);
    border-top: 1px solid #e2e8f0;
    color: var(--text-light);
}

.socials a {
    margin: 0 10px;
    font-size: 1.4rem;
    color: var(--text-main);
}
.socials a:hover { color: var(--primary); }

/* --- Mobile --- */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Add JS toggle for full mobile menu later */
}