:root {
    --bg-main: #0B0F19;
    --bg-secondary: #131A2A;
    --accent-primary: #3B82F6;
    --accent-secondary: #8B5CF6;
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --glass-bg: rgba(19, 26, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --nav-bg-scrolled: rgba(11, 15, 25, 0.9);
}

[data-theme="light"] {
    --bg-main: #F9FAFB;
    --bg-secondary: #F3F4F6;
    --accent-primary: #2563EB;
    --accent-secondary: #7C3AED;
    --text-main: #111827;
    --text-muted: #4B5563;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg-scrolled: rgba(249, 250, 251, 0.9);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Background Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -50px); }
    66% { transform: translate(-20px, 20px); }
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.theme-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.theme-btn:hover {
    color: var(--accent-primary);
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 80px;
    gap: 40px;
}

.hero-content {
    max-width: 600px;
}

.hero-image {
    flex-shrink: 0;
}

.profile-photo-container {
    margin-bottom: 0;
}

.profile-photo {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero .highlight {
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 {
    font-size: 1.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 30px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #2563EB);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-text strong {
    color: var(--text-main);
}

.skills-container h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 8px 16px;
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.project-tech span {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: var(--accent-primary);
}

/* Publications Section */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pub-card {
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.pub-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

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

.pub-card .subtitle {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.pub-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Contact Section */
.contact-card {
    padding: 60px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
    }
    .hero h1 { font-size: 3rem; }
    .hero h2 { font-size: 1.3rem; }
    .hero-actions { justify-content: center; }
    .profile-photo {
        width: 250px;
        height: 250px;
        margin-bottom: 20px;
    }
    .about-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* Simple mobile menu behavior */
}
