/* CSS Variables for Theming */
:root {
    /* Colors - Light Theme (Default Navy/Blue) */
    --primary-color: #0F4C81; /* Classic Blue / Navy */
    --primary-light: #4A7AAB;
    --primary-dark: #0A3258;
    --secondary-color: #F39C12; /* Accent Color - Gold/Orange */
    
    --text-main: #333333;
    --text-muted: #666666;
    --text-inverse: #FFFFFF;
    
    --bg-main: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-card: #FFFFFF;
    
    --border-color: #E2E8F0;
    
    /* Box Shadow */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 30px rgba(15, 76, 129, 0.15);
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
    /* Colors - Dark Theme */
    --primary-color: #4A90E2; 
    --primary-light: #7EABDF;
    --primary-dark: #2C5B94;
    --secondary-color: #F5B041;
    
    --text-main: #E2E8F0;
    --text-muted: #A0AEC0;
    --text-inverse: #1A202C;
    
    --bg-main: #0F172A; /* Slate 900 */
    --bg-light: #1E293B; /* Slate 800 */
    --bg-card: #1E293B;
    
    --border-color: #334155;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
    --shadow-hover: 0 15px 30px rgba(0,0,0,0.5);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Adjust based on navbar height */
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 30px;
}

.text-danger {
    color: #e74c3c;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    font-size: 1rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .btn-primary {
    color: var(--bg-main);
}
[data-theme="dark"] .btn-primary:hover {
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(var(--bg-main-rgb), 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

/* We need to use background color directly since rgba with CSS var is tricky without proper format, let's fallback */
.navbar {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

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

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

.logo:hover {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle, .lang-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
}

.theme-toggle:hover, .lang-toggle:hover {
    color: var(--primary-color);
    background-color: var(--border-color);
}

.lang-toggle {
    font-size: 0.9rem;
    font-weight: 700;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 140px; /* Offset for navbar */
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 10px solid var(--bg-main);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* About & Skills */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

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

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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(15, 76, 129, 0.2);
    transition: all var(--transition-fast);
}

[data-theme="dark"] .tag {
    background-color: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

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

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.styled-list {
    padding-left: 20px;
}

.styled-list li {
    margin-bottom: 12px;
    position: relative;
    list-style-type: none;
    color: var(--text-muted);
}

.styled-list li::before {
    content: '→';
    position: absolute;
    left: -20px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Publications */
.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.pub-item {
    display: flex;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-item:hover {
    background-color: rgba(var(--primary-color), 0.02);
    border-radius: 8px;
    padding: 25px 15px;
}

.pub-year {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    min-width: 60px;
}

.pub-details h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.pub-details h4 a {
    color: var(--text-main);
}

.pub-details h4 a:hover {
    color: var(--primary-color);
}

.pub-details .authors {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.pub-details .journal {
    font-size: 0.95rem;
    color: var(--primary-light);
}

/* Project Cards */
.project-card {
    background-color: var(--bg-main);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

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

.project-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;
}

/* Blog Cards */
.blog-card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

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

.blog-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.blog-card h3 a {
    color: var(--text-main);
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

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

.read-more {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.read-more:hover {
    gap: 12px;
}

/* Certifications */
.cert-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.cert-item {
    background-color: var(--bg-main);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    color: var(--text-main);
    text-decoration: none;
}

.cert-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.cert-item i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.cert-item p {
    font-weight: 500;
    margin: 0;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.contact-list li i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.contact-list li a, .contact-list li span {
    color: var(--text-main);
    transition: color var(--transition-fast);
}

.contact-list li a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer p {
    margin-bottom: 10px;
}

.footer .small-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero .tagline {
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-main);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: left var(--transition-normal);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .grid-2-col, .grid-3-col {
        grid-template-columns: 1fr;
    }
    
    .pub-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .image-placeholder {
        width: 250px;
        height: 250px;
        font-size: 6rem;
    }
}
