:root {
    /* Base Variables - Softer Dark Theme (Default) */
    --bg-body: #1e1e2e;
    /* Catppuccin Mocha Base */
    --bg-card: #252538;
    /* Slightly lighter */
    --bg-glass: rgba(30, 30, 46, 0.8);
    --text-primary: #cdd6f4;
    /* Text */
    --text-secondary: #c4c9de;
    /* Subtext0 */
    --text-muted: #6c7086;
    /* Overlay0 */
    --primary-color: #a6a968;
    /* Blue */
    --secondary-color: #2eafd6;
    /* Mauve */
    --accent-color: #85875e;
    /* Teal */
    --border-color: #313244;
    /* Surface0 */
    --border-glass: rgba(147, 153, 178, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #89b4fa 0%, #114189 100%);
    --gradient-bg: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);

    /* Common */
    --radius-sm: 6px;
    --radius-base: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --transition-base: all 0.3s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    /* Light Theme */
    --bg-body: #eff1f5;
    /* Latte Base */
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #4c4f69;
    /* Text */
    --text-secondary: #6c6f85;
    /* Subtext0 */
    --text-muted: #9ca0b0;
    /* Overlay0 */
    --primary-color: #175ce8;
    /* Blue */
    --secondary-color: #359881;
    /* Mauve */
    --accent-color: #179299;
    /* Teal */
    --border-color: #ccd0da;
    /* Surface0 */
    --border-glass: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #042c7c 0%, #042c7c 100%);
    --gradient-bg: linear-gradient(135deg, #eff1f5 0%, #e6e9ef 100%);
}

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

body {
    font-family: var(--font-main);
    background: var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-base);
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 1.2rem;
}

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

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

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
}

.profile-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    padding: 4px;
    margin: 0 auto 2rem;
    position: relative;
}

.profile-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    gap: 0.5rem;
}

.btn--primary {
    background: var(--gradient-primary);
    color: #fff;
    /* Always white for contrast on gradient */
    box-shadow: 0 4px 15px rgba(137, 180, 250, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 180, 250, 0.4);
}

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

.btn--outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-card);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

/* Cards */
.card-grid,
.projects-grid,
.blog-grid,
.academic-grid,
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card,
.blog-card,
.academic-card,
.education-card,
.interest-card,
.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    /* Default padding, overridden for project-card */
    transition: var(--transition-base);
    overflow: hidden;
}

.project-card {
    padding: 0;
    /* Reset for image */
}

.project-card:hover,
.blog-card:hover,
.academic-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Project Specifics */
.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 46, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
}

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

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

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(137, 180, 250, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(137, 180, 250, 0.2);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-link {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Skills */
.skills-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category-new h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tech-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag-group span {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.tech-tag-group span:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    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: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 2px solid var(--primary-color);
    z-index: 1;
}

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

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-period {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

/* Contact & Guestbook */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-base);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.1);
}

/* Giscus Container */
.giscus-container {
    margin-top: 3rem;
    width: 100%;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-base);
}

.modal-close:hover {
    color: var(--text-primary);
}

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

.footer p {
    color: var(--text-secondary);
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Nav */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-base);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-body);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition-base);
    }

    .nav-menu.active {
        left: 0;
    }
}

/* Particles */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

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

.loading-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.2s ease;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* About Section Updates */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-interests h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tech-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-tag-group span {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.tech-tag-group span:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Achievements Section */
.achievements-section {
    margin-top: 4rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 4rem;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.achievement-card h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.achievement-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Navbar Fix */
@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
}

/* Stats Counter Improvements */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Certification Cards */
.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
    margin-bottom: 1rem;
}

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

.cert-card-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cert-icon {
    width: 40px;
    height: 40px;
    background: rgba(137, 180, 250, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.cert-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.cert-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

.cert-card-title a:hover {
    color: var(--primary-color);
}

.cert-card-org {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cert-card-badge {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.cert-group h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.group-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
}

.group-toggle:hover {
    color: var(--primary-color);
}

.group-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.expand-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem 2rem;
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: var(--transition-base);
    display: block;
    margin: 2rem auto 0;
}

.expand-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-card);
}

/* About Me Restructure */
.about-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 900px) {
    .about-grid-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.achievements-list {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.achievements-list h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.achievement-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

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

.achievement-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.2rem;
    min-width: 24px;
}

.achievement-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.achievement-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Project Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    /* Ensure contrast */
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Project Modal Fixes */
.modal-content {
    max-width: 900px;
    width: 95%;
}

.modal-video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-base);
    margin-bottom: 2rem;
    background: #000;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Blog Card Styling (Yellowish Note Style) */
.blog-card {
    background: #fff9c4;
    /* Light Yellow Base */
    border: none;
    color: #5d4037;
    /* Brownish text for contrast */
    position: relative;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .blog-card {
    background: #423e28;
    /* Darker Yellow/Brown for dark mode */
    color: #e6e1c5;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-width: 0 40px 40px 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.1) #fff;
    /* Fold effect */
    display: block;
    width: 0;
    box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .blog-card::before {
    border-color: rgba(0, 0, 0, 0.2) var(--bg-body);
}

.blog-title {
    color: inherit;
    font-weight: 700;
}

.blog-date {
    color: inherit;
    opacity: 0.7;
}

.blog-excerpt {
    color: inherit;
    opacity: 0.9;
}

.read-more {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Final Polish: Spacing & Layout */

/* Education & Experience Spacing */
.academic-projects,
.experience {
    padding: 6rem 0;
    /* Increased padding */
}

.academic-grid {
    gap: 3rem;
    /* Increased gap between cards */
}

.timeline-item {
    margin-bottom: 4rem;
    /* More space between timeline items */
    padding-left: 60px;
}

.timeline-content {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Contact Section Spacing & Styling */
.contact {
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--bg-body), var(--bg-card));
    /* Subtle gradient */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    color: var(--text-secondary);
    background: var(--bg-body);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.education-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag-small {
    font-size: 0.8rem;
    background: var(--bg-body);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-base);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

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

.contact-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.contact-socials {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-socials .social-link {
    width: 45px;
    height: 45px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
    font-size: 1.2rem;
}

.contact-socials .social-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Main Page Blog Section Background */
/* Assuming there is a section with id="blog" or class="blog-section" in index.html */
/* If not, I will need to check index.html again. Based on previous reads, there is a link to blog.html but maybe not a full section. */
/* Let's double check index.html for a blog section. */


/* Blog Section Background on Main Page */
/* Blog Section Refinements */
#blog {
    background-color: var(--bg-body);
    padding: 6rem 0;
    position: relative;
}

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

.blog-intro h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.blog-redirect-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.blog-redirect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
}

.blog-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.blog-redirect-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.blog-redirect-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.blog-topics {
    grid-column: 1 / -1;
    margin-top: 3rem;
    text-align: center;
}

.blog-topics h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.topic-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.topic-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(137, 180, 250, 0.05);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .blog-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Ensure blog cards on main page also get the yellow style if they don't already */
#blog .blog-card {
    background: #fff9c4;
    color: #5d4037;
}

[data-theme="dark"] #blog .blog-card {
    background: #423e28;
    color: #e6e1c5;
}

/* Vintage Paper Blog Post Theme */
.blog-post-page {
    background-color: #fdfbf7;
    /* Off-white background for the whole page */
    color: #2c2c2c;
    font-family: 'Georgia', serif;
    /* Serif font for vintage feel */
    line-height: 1.8;
}

[data-theme="dark"] .blog-post-page {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.paper-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 4rem;
    background-color: #fffdf0;
    /* Yellowish paper color */
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.05),
        0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #e6e0d0;
}

[data-theme="dark"] .paper-container {
    background-color: #2a2620;
    /* Darker paper for dark mode */
    border-color: #3e3830;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Paper texture effect */
.paper-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.paper-content {
    position: relative;
    z-index: 1;
}

.blog-post-title {
    font-family: 'Playfair Display', serif;
    /* Elegant heading font */
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #4a3b32;
    border-bottom: 2px solid #d4c5b0;
    padding-bottom: 1rem;
}

[data-theme="dark"] .blog-post-title {
    color: #d4c5b0;
    border-color: #5a4b42;
}

.blog-post-meta {
    font-family: 'Courier New', monospace;
    /* Typewriter style for meta */
    font-size: 0.9rem;
    color: #8a7b72;
    margin-bottom: 2rem;
    font-style: italic;
}

.blog-post-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.blog-post-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #5d4037;
}

[data-theme="dark"] .blog-post-body h2 {
    color: #ccbfa3;
}

.blog-post-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 2rem 0;
    border: 5px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .blog-post-body img {
    border-color: #3e3830;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    color: #5d4037;
    border-bottom: 1px dashed #5d4037;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #8d6e63;
    border-bottom-style: solid;
}

[data-theme="dark"] .back-link {
    color: #ccbfa3;
    border-color: #ccbfa3;
}

@media (max-width: 768px) {
    .paper-container {
        padding: 2rem;
        margin: 2rem 1rem;
    }

    .blog-post-title {
        font-size: 2rem;
    }
}

/* Featured Project Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.featured-badge i {
    font-size: 0.75rem;
    color: #ffd700;
}