/* ============================================
   PORTFOLIO WEBSITE STYLES
   Author: Harshit Dave
   ============================================ */

/* ============================================
   BASE STYLES & RESET
   ============================================ */

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

/* ============================================
   CSS VARIABLES & THEME SYSTEM
   ============================================ */

:root {
    /* Dark Theme Colors */
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --bg-tertiary: #2C2C2C;
    --text-primary: #E0E0E0;
    --text-secondary: #B0B0B0;
    --text-muted: #888888;
    --accent-primary: #CCCCCC;
    --accent-secondary: #AAAAAA;
    --accent-tertiary: #999999;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: #252525;
    --hover-bg: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
    /* Light Theme Colors - Black & White */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #e5e5e5;
    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.70);
    --text-muted: rgba(0, 0, 0, 0.60);
    --accent-primary: #333333;
    --accent-secondary: #4a4a4a;
    --accent-tertiary: #666666;
    --border-color: rgba(0, 0, 0, 0.12);
    --card-bg: rgba(250, 250, 250, 0.9);
    --hover-bg: rgba(0, 0, 0, 0.04);
}

/* ============================================
   BODY & LAYOUT
   ============================================ */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: all 0.3s ease;
    height: 100vh;
}

/* ============================================
   MATHEMATICAL BACKGROUND ANIMATIONS
   ============================================ */

.math-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    overflow: hidden;
}

[data-theme="light"] .math-bg {
    opacity: 0.35;
}

.math-formula {
    position: absolute;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: rgba(255, 255, 255, 0.2);
    animation: float 8s infinite ease-in-out;
    white-space: nowrap;
    will-change: transform, opacity;
}

[data-theme="light"] .math-formula {
    color: rgba(0, 0, 0, 0.3);
    opacity: 0.6;
}

.math-formula.large {
    font-size: 1.2rem;
    font-weight: 500;
}

.math-formula.medium {
    font-size: 1.05rem;
    opacity: 0.7;
}

.math-formula.small {
    font-size: 0.95rem;
    opacity: 0.6;
}

.math-symbol {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.25);
    animation: pulse 4s infinite ease-in-out;
    will-change: transform, opacity;
}

[data-theme="light"] .math-symbol {
    color: rgba(0, 0, 0, 0.35);
    opacity: 0.5;
}

.weight-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: dataFlow 6s infinite linear;
    will-change: transform;
}

[data-theme="light"] .weight-connection {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.3), transparent);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.4; 
    }
    25% { 
        transform: translateY(-10px) rotate(1deg); 
        opacity: 0.5; 
    }
    50% { 
        transform: translateY(-5px) rotate(-1deg); 
        opacity: 0.35; 
    }
    75% { 
        transform: translateY(-15px) rotate(0.5deg); 
        opacity: 0.6; 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.35; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.5; 
    }
}

@keyframes dataFlow {
    0% { 
        transform: translateX(-100%) scaleX(0); 
    }
    50% { 
        transform: translateX(0%) scaleX(1); 
    }
    100% { 
        transform: translateX(100%) scaleX(0); 
    }
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(var(--bg-primary-rgb), 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-primary);
    text-decoration: none;
}

.logo .full-name {
    display: inline;
}

.logo .short-name {
    display: none;
}

[data-theme="light"] .logo {
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .logo {
    color: var(--text-primary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a .full-text {
    display: inline;
}

.nav-links a .short-text {
    display: none;
}

[data-theme="light"] .nav-links a {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .nav-links a {
    color: rgba(255, 255, 255, 0.75);
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 80%;
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

[data-theme="light"] .theme-toggle::before {
    transform: translateX(30px);
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */

main {
    margin-top: 100px;
    min-height: calc(100vh - 100px);
    position: relative;
    overflow: auto;
}

.page {
    display: none;
    min-height: calc(100vh - 100px);
    padding: 2rem 0;
}

.page.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.hero-content {
    text-align: center;
    width: 100%;
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.profile-image-container {
    position: relative;
    flex-shrink: 0;
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.profile-image:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 25px 50px rgba(204, 204, 204, 0.2);
}

.profile-image-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image-container:hover::before {
    opacity: 0.3;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

[data-theme="light"] .profile-image {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-image:hover {
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

[data-theme="light"] .hero h1 {
    color: rgba(0, 0, 0, 0.8);
    background: none;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .hero h1 {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.bio {
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.academic-bio {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.bio-section {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.bio-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: justify;
}

.bio-text a {
    font-weight: 700;
}

.bio-text strong {
    color: var(--text-secondary);
    font-weight: 700;
}

.bio-text em {
    color: var(--accent-secondary);
    font-style: italic;
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-container {
    margin-top: 2rem;
}

.skill-category {
    margin-bottom: 2.5rem;
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--hover-bg);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 204, 204, 0.2);
    border-color: var(--accent-primary);
}

[data-theme="light"] .skill-tag {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .skill-tag:hover {
    background: rgba(0, 0, 0, 0.87);
    color: white;
}

/* ============================================
   PROJECTS & WORK EXPERIENCE SECTION
   ============================================ */

.projects-container {
    width: 100%;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

[data-theme="light"] .section-title {
    color: rgba(0, 0, 0, 0.8);
    background: none;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
    align-items: stretch;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .project-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

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

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    line-height: 1.3;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-color);
}

[data-theme="light"] .project-title {
    color: rgba(0, 0, 0, 0.8);
}

.project-description {
    color: var(--text-muted);
    margin-bottom: auto;
    line-height: 1.8;
    flex-grow: 1;
    font-size: 1rem;
    padding-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.tech-tag {
    background: var(--hover-bg);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.tech-tag:hover {
    background: var(--accent-primary);
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 204, 204, 0.2);
}

/* ============================================
   PUBLICATIONS SECTION
   ============================================ */

.publication {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.publication:hover {
    transform: translateX(8px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pub-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

[data-theme="light"] .pub-title {
    color: rgba(0, 0, 0, 0.8);
}

.pub-authors {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.pub-venue {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.pub-abstract {
    color: var(--text-muted);
    line-height: 1.7;
}

.pub-link {
    margin: 1rem 0;
}

.pub-link a {
    display: inline-block;
    background: var(--hover-bg);
    color: var(--accent-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pub-link a:hover {
    background: var(--accent-primary);
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 204, 204, 0.2);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.contact-hero {
    text-align: center;
    max-width: 700px;
}

.contact-hero h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

[data-theme="light"] .contact-hero h2 {
    color: rgba(0, 0, 0, 0.8);
    background: none;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .contact-hero h2 {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.contact-description {
    font-size: 1.4rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.contact-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--card-bg));
    color: var(--text-primary);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
}

.contact-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    word-break: break-all;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--hover-bg);
    color: var(--accent-primary);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.contact-button:hover {
    background: var(--accent-primary);
    color: #121212;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(204, 204, 204, 0.2);
}

/* ============================================
   CTA BUTTONS
   ============================================ */

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.cta-primary, 
.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid;
}

.cta-primary {
    background: var(--accent-primary);
    color: #121212;
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(204, 204, 204, 0.2);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(204, 204, 204, 0.3);
}

.cta-secondary {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.cta-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.urgency-note {
    text-align: center;
    font-size: 0.95rem;
    color: var(--accent-secondary);
    font-style: italic;
    margin-top: 1.5rem;
}

/* ============================================
   BLOG ICON THEMING
   ============================================ */

/* Dark mode - use colorful gradient */
[data-theme="dark"] .blog-icon-stroke {
    stroke: var(--text-secondary);
}

[data-theme="dark"] .blog-icon-fill {
    fill: var(--text-muted);
}

/* Light mode - use black/gray for minimal aesthetic */
[data-theme="light"] .blog-icon-stroke {
    stroke: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .blog-icon-fill {
    fill: rgba(0, 0, 0, 0.5);
}

/* ============================================
   HEADING COLORS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4, 
[data-theme="light"] h5, 
[data-theme="light"] h6 {
    color: rgba(0, 0, 0, 0.8);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ============================================
   TABLET DEVICES (768px - 1024px)
   ============================================ */

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

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

    .about-header {
        gap: 3rem;
    }

    .profile-image {
        width: 240px;
        height: 240px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 2.8rem;
    }

    .bio-section {
        padding: 0 0.5rem;
    }
}

/* ============================================
   MOBILE DEVICES (481px - 768px)
   ============================================ */

@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 0 1rem;
        flex-wrap: nowrap;
    }

    .nav-container {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .nav-links {
        gap: 0.3rem;
        flex-wrap: nowrap;
    }
    
    .nav-links a {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .logo {
        font-size: 1.4rem;
        flex-shrink: 0;
    }

    /* Show abbreviated text on mobile */
    .logo .full-name {
        display: none;
    }

    .logo .short-name {
        display: inline;
    }

    .nav-links a .full-text {
        display: none;
    }

    .nav-links a .short-text {
        display: inline;
    }
    
    /* About Section */
    .about-header {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        align-items: center;
    }

    .hero-text {
        text-align: center;
        min-width: unset;
        max-width: 100%;
    }

    .profile-image {
        width: 200px;
        height: 200px;
        border-radius: 12px;
    }

    .profile-image-container::before {
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .academic-bio {
        padding: 0 0.5rem;
    }

    .bio-section {
        margin-bottom: 2rem;
        padding: 0;
    }

    .bio-heading {
        font-size: 1.2rem;
    }

    .bio-text {
        font-size: 1rem;
        text-align: left;
    }
    
    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 2rem 1.5rem;
    }

    .project-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        padding-bottom: 0.6rem;
    }

    .project-description {
        font-size: 0.95rem;
        padding-bottom: 1rem;
    }

    .project-tech {
        gap: 0.5rem;
        padding-top: 0.8rem;
    }

    /* Skills */
    .skills-container {
        margin-top: 1.5rem;
    }

    .skill-category {
        margin-bottom: 2rem;
    }

    .skill-tags {
        gap: 0.6rem;
    }

    .skill-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Contact */
    .contact-hero h2 {
        font-size: 2.5rem;
    }

    .contact-description {
        font-size: 1.2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-card {
        padding: 2rem 1.5rem;
    }

    .contact-icon {
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }

    /* Publications */
    .publication {
        padding: 2rem 1.5rem;
    }

    .pub-title {
        font-size: 1.3rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }

    /* Main Content */
    main {
        margin-top: 80px;
    }

    header {
        padding: 0.8rem 0;
    }
}

/* ============================================
   SMALL MOBILE DEVICES (≤480px)
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Navigation */
    nav {
        padding: 0 0.8rem;
        flex-wrap: nowrap;
    }

    .nav-container {
        gap: 0.3rem;
    }

    .nav-links {
        gap: 0.2rem;
    }

    .nav-links a {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Ensure abbreviated text shows on small mobile */
    .logo .full-name {
        display: none;
    }

    .logo .short-name {
        display: inline;
    }

    .nav-links a .full-text {
        display: none;
    }

    .nav-links a .short-text {
        display: inline;
    }

    .theme-toggle {
        width: 50px;
        height: 25px;
    }

    .theme-toggle::before {
        width: 20px;
        height: 20px;
        top: 2px;
        left: 2px;
    }

    [data-theme="light"] .theme-toggle::before {
        transform: translateX(25px);
    }

    /* About Section */
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .bio-heading {
        font-size: 1.1rem;
    }

    .bio-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .bio-section {
        margin-bottom: 1.5rem;
    }

    /* Projects */
    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .projects-grid {
        gap: 1.2rem;
    }

    .project-card {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .project-tech {
        gap: 0.4rem;
    }

    .tech-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    /* Skills */
    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Contact */
    .contact-hero h2 {
        font-size: 1.8rem;
    }

    .contact-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .contact-grid {
        gap: 1.2rem;
    }

    .contact-card {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
    }

    .contact-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .contact-label {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .contact-value {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .contact-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Publications */
    .publication {
        padding: 1.5rem 1.2rem;
    }

    .pub-title {
        font-size: 1.1rem;
    }

    .pub-venue {
        font-size: 0.9rem;
    }

    .pub-abstract {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* CTA Buttons */
    .cta-primary,
    .cta-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Main Content */
    main {
        margin-top: 70px;
    }

    .page {
        padding: 1.5rem 0;
    }
}

/* ============================================
   EXTRA SMALL DEVICES (≤375px)
   ============================================ */

@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .contact-hero h2 {
        font-size: 1.6rem;
    }

    .nav-links a {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
    }

    .logo {
        font-size: 1rem;
    }
}

