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

html {
    scroll-behavior: smooth;
}

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #555;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    
    /* Toggle Button Colors */
    --toggle-bg: #f0f0f0;
    --toggle-text: #666;
    --toggle-switch: #ffffff;
    --toggle-icon: #999;
    --toggle-shadow: rgba(0, 0, 0, 0.1);
    --toggle-highlight: rgba(255, 255, 255, 0.8);

    /* Pill/Chip Colors */
    --pill-bg: rgba(102, 126, 234, 0.12);
    --pill-text: #3f51b5;
    --pill-border: rgba(102, 126, 234, 0.25);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --card-bg: #2d2d2d;
    --navbar-bg: rgba(26, 26, 26, 0.95);
    --border-color: #404040;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.6);
    
    /* Toggle Button Colors for Dark Mode */
    --toggle-bg: #404040;
    --toggle-text: #cccccc;
    --toggle-switch: #ffffff;
    --toggle-icon: #999;
    --toggle-shadow: rgba(0, 0, 0, 0.3);
    --toggle-highlight: rgba(255, 255, 255, 0.1);

    /* Pill/Chip Colors */
    --pill-bg: rgba(102, 126, 234, 0.25);
    --pill-text: #dee3ff;
    --pill-border: rgba(118, 75, 162, 0.45);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Typography */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    transition: color 0.3s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

/* Navbar scroll effect */
.navbar.scrolled {
    background: var(--navbar-bg-scrolled);
    box-shadow: var(--navbar-shadow);
}

/* CSS Variables for navbar scroll states */
:root {
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --navbar-bg-scrolled: rgba(26, 26, 26, 0.98);
    --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #764ba2;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--toggle-bg);
    border-radius: 25px;
    padding: 4px;
    box-shadow: 
        inset 4px 4px 8px var(--toggle-shadow),
        inset -4px -4px 8px var(--toggle-highlight);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    min-width: 120px;
    height: 50px;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 
        inset 4px 4px 8px var(--toggle-shadow),
        inset -4px -4px 8px var(--toggle-highlight),
        0 4px 8px var(--toggle-shadow);
}

.theme-toggle.active {
    background: var(--toggle-bg);
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.theme-toggle-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--toggle-text);
    text-align: center;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 2;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    pointer-events: none;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Light mode - text on the right */
.theme-toggle-text {
    right: 10px;
}

/* Dark mode - text on the left */
.theme-toggle.active .theme-toggle-text {
    left: 10px;
    right: auto;
}

.theme-toggle-switch {
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--toggle-switch);
    border-radius: 50%;
    box-shadow: 
        4px 4px 8px var(--toggle-shadow),
        -2px -2px 4px var(--toggle-highlight);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    display: grid;
    place-items: center;
}

.theme-toggle.active .theme-toggle-switch {
    left: calc(100% - 40px);
}

.theme-toggle-icon {
    font-size: 1rem;
    color: var(--toggle-icon);
    transition: all 0.3s ease;
    grid-area: 1 / 1;
}

.theme-toggle-icon.sun {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle-icon.moon {
    opacity: 0;
    transform: scale(0.8);
}

.theme-toggle.active .theme-toggle-icon.sun {
    opacity: 0;
    transform: scale(0.8);
}

.theme-toggle.active .theme-toggle-icon.moon {
    opacity: 1;
    transform: scale(1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}





.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #ffd700;
    color: #333;
    transition: all 0.3s ease;
}

[data-theme="dark"] .btn-primary {
    color: #1a1a1a;
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    transform: translateY(-2px);
}

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

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: white;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator a:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    transition: color 0.3s ease;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-placeholder {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

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

.skill-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    transition: color 0.3s ease;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.skill-item i {
    font-size: 1.5rem;
    color: #667eea;
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
}

/* Research & Publications Section */
.research {
    padding: 6rem 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.research-content {
    max-width: 800px;
    margin: 0 auto;
}

.thesis-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease, background-color 0.3s ease;
}

.thesis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.thesis-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.thesis-details h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.thesis-details h4 {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 500;
}

.thesis-details p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.thesis-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.thesis-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease, background-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--pill-border);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

.project-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    color: #764ba2;
}

/* 3D Printing Section */
.three-d-printing {
    padding: 6rem 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.three-d-printing-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}

.three-d-printing-text h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.three-d-printing-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.three-d-printing-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

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

.contact-info h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-item i {
    color: #667eea;
    font-size: 1.2rem;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease, background-color 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--card-bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form styling improvements for dark mode */
.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--border-color);
}

/* Form Status Messages */
.form-status {
    margin-top: 1rem;
    text-align: center;
}

.status-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    margin: 0;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message:not(.success):not(.error) {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-container {
        gap: 0.5rem;
        position: relative;
    }

    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .theme-toggle {
        order: -1;
        margin-right: 0.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-light);
        padding: 2rem 0;
    }

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

    /* Mobile responsive adjustments for toggle */
    .theme-toggle {
        min-width: 100px;
        height: 45px;
    }
    
    .theme-toggle-switch {
        width: 32px;
        height: 32px;
    }
    
    .theme-toggle.active .theme-toggle-switch {
        left: calc(100% - 36px);
    }
    
    .theme-toggle-text {
        font-size: 0.65rem;
        padding: 0 8px;
    }
    
    .theme-toggle-icon {
        font-size: 0.8rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .thesis-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .thesis-icon {
        margin-bottom: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .three-d-printing-content {
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }
    /* Reserve space for fixed navbar on small screens (match 6rem section padding) */
    body { padding-top: 96px; }
    /* Ensure in-page anchors don't end up hidden under the navbar */
    section { scroll-margin-top: 96px; }
}

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

    .nav-container {
        padding: 0 15px;
    }

    .theme-toggle {
        margin-right: 0.25rem;
        min-width: 90px;
        height: 40px;
    }
    
    .theme-toggle-switch {
        width: 28px;
        height: 28px;
    }
    
    .theme-toggle.active .theme-toggle-switch {
        left: calc(100% - 32px);
    }
    
    .theme-toggle-text {
        font-size: 0.6rem;
        padding: 0 6px;
    }
    
    .theme-toggle-icon {
        font-size: 0.7rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .about-stats {
        gap: 1rem;
    }

    .stat {
        padding: 1rem;
    }

    .stat h3 {
        font-size: 2rem;
    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-buttons .btn:hover,
    .skill-item:hover,
    .project-card:hover,
    .social-link:hover {
        transform: none;
    }
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .thesis-card {
        padding: 1.5rem;
    }
    
    .thesis-details h3 {
        font-size: 1.5rem;
    }
    
    .thesis-details h4 {
        font-size: 1.1rem;
    }
    
    .project-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .project-link {
        padding: 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .thesis-link {
        min-height: 44px;
        padding: 12px 24px;
    }
}
