/* =========================================
   1. CSS VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Light Theme */
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-secondary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #1e293b;
    --footer-text: #cbd5e1;
    --success-color: #10b981;
    --error-color: #ef4444;
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --dark-color: #f1f5f9;
    --light-color: #0f172a;
    --text-color: #cbd5e1;
    --text-light: #94a3b8;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --border-color: #334155;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --card-bg: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.95);
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --success-color: #10b981;
    --error-color: #ef4444;
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   3. UTILITY CLASSES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* =========================================
   4. NAVIGATION & HEADER - MOBILE FIRST
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
    z-index: 1001;
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: contain;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1001;
}

.menu-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Mobile Navigation Menu */
.nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-color);
    flex-direction: column;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
}

.nav-menu.active {
    transform: translateX(0);
}

/* Desktop Navigation - Hidden on Mobile */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-bottom: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
    padding: 1rem 1.2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: var(--transition);
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
    background: rgba(16, 185, 129, 0.1);
}

.nav-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

.btn-resume, .btn-hire {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-resume {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-resume:hover {
    background: var(--primary-color);
    color: white;
}

.btn-hire {
    background: var(--primary-color);
    color: white;
}

.btn-hire:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        padding: 0;
        transform: none;
        overflow-y: visible;
        box-shadow: none;
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    
    .nav-links {
        flex-direction: row;
        margin-bottom: 0;
        width: auto;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
        width: auto;
    }
    
    .nav-actions {
        flex-direction: row;
        width: auto;
        gap: 0.8rem;
    }
    
    .btn-resume, .btn-hire {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* =========================================
   5. BREADCRUMBS & UTILITY NAVS
   ========================================= */
.section-indicator {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-indicator.show {
    opacity: 1;
}

#current-section-name {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    font-weight: 700;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.indicator-dot {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

@media (max-width: 1024px) {
    .section-indicator { display: none; }
}

.quick-nav {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 998;
}
.quick-nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.quick-nav-btn:hover { transform: scale(1.1); }
.quick-nav-btn:nth-child(2) { background: var(--secondary-color); }
.quick-nav-btn:nth-child(3) { background: var(--accent-color); }

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1001;
    transition: width 0.1s ease-out;
}

.theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--dark-color);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.theme-toggle:hover { transform: scale(1.1); }

/* =========================================
   6. THANK YOU MODAL & ANIMATIONS
   ========================================= */
.thank-you-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.thank-you-modal.active {
    opacity: 1;
    visibility: visible;
}

.thank-you-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 3rem;
    border-radius: 25px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    color: white;
    position: relative;
    transform: translateY(30px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.thank-you-modal.active .thank-you-content {
    transform: translateY(0) scale(1);
}

.thank-you-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.close-thank-you {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-thank-you:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.thank-you-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite, bounce 2s ease infinite;
    display: inline-block;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.thank-you-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
    to { text-shadow: 0 0 20px rgba(255,255,255,0.6); }
}

.thank-you-message {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.thank-you-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.thank-you-stat {
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.explore-more-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.explore-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.close-modal-btn {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.8;
    z-index: 2000;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(120%);
    color: white;
    font-weight: 500;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

.notification.show {
    transform: translateX(0);
}

/* =========================================
   7. SECTIONS - MOBILE RESPONSIVE
   ========================================= */

/* Hero Section */
.hero {
    padding: 140px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent);
}

.hero .container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.hero-content {
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 700;
}
.hero-title .highlight { color: var(--primary-color); }

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.hero-stats .stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}
.hero-stats .stat p { 
    font-size: 0.9rem; 
    color: var(--text-light);
}

.hero-image {
    position: relative;
    width: 100%;
    height: 300px;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .hero-image {
        height: 350px;
    }
}

@media (min-width: 1024px) {
    .hero-image {
        height: 400px;
    }
}

.math-visualization {
    width: 100%;
    height: 100%;
}

/* About Section */
.about {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .about {
        padding: 100px 0;
    }
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}

.certifications { 
    margin-top: 2rem; 
}
.certifications h3 { 
    margin-bottom: 1rem; 
    color: var(--dark-color);
    font-size: 1.5rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}
.cert-item:hover {
    background: var(--primary-color);
    color: white;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
}
.about-image img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}
.about-image:hover img { transform: scale(1.03); }

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    text-align: center;
}

/* Skills Section */
.skills-stack-section {
    padding: 80px 0;
    background-color: rgba(0,0,0,0);
}

.stack-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stack-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

@media (min-width: 768px) {
    .stack-card {
        padding: 1.5rem 2rem;
    }
}

.stack-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.stack-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 0.5rem;
}

.stack-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.stack-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.primary-list {
    color: var(--accent-color);
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

.hover-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.stack-card:hover .hover-details {
    max-height: 300px;
    opacity: 1;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-details p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0.6rem 0;
    line-height: 1.4;
}

.hover-details strong {
    color: var(--primary-color);
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .services {
        padding: 100px 0;
    }
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .service-card {
        padding: 2.5rem 2rem;
    }
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    position: relative;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.8rem;
}

.service-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    opacity: 0.5;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.service-features i {
    color: var(--accent-color);
    font-size: 0.8rem;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-tags span {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.service-card:hover .service-tags span {
    background: var(--primary-color);
    color: white;
}

.services-cta {
    text-align: center;
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .services-cta {
        flex-direction: row;
    }
}

/* Fix for Services CTA Buttons */
.services-cta a.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    width: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    .services-cta a.btn {
        width: auto;
    }
}

.services-cta .btn {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.services-cta .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.services-cta .btn-primary:hover {
    background: #1d4ed8;
    color: white;
}

.services-cta .btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* =========================================
   8. PROJECTS SECTION WITH MSMU PROJECT
   ========================================= */
.projects {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .projects {
        padding: 100px 0;
    }
}

.projects .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.projects .section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 100px;
    margin-top: 40px;
}

.project-spotlight {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 20px;
    position: relative;
}

@media (min-width: 1024px) {
    .project-spotlight {
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        gap: 60px;
        padding: 0 5%;
        margin-bottom: 0;
    }
    
    .project-spotlight::before {
        content: '';
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    }
    
    .project-spotlight:last-child::before {
        display: none;
    }
}

.project-description-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
}

.tech-pill {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    text-align: center;
}

.story-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-light);
}

.audit-panel {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    margin-top: 20px;
}

.audit-btn {
    background: var(--dark-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    .audit-btn {
        width: auto;
    }
}

.audit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.audit-idle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* MSMU Phone Mockup */
.phone-mockup-wrapper {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.phone-frame {
    position: relative;
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 35px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 8px var(--border-color),
        0 0 0 12px var(--primary-color);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phone-frame:hover {
    transform: translateY(-10px) rotateX(5deg);
}

.phone-screen-container {
    position: absolute;
    top: 15px;
    left: 10px;
    right: 10px;
    bottom: 15px;
    background: #ffffff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: #0f172a;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    position: relative;
}

.phone-controls {
    position: absolute;
    bottom: 100px;
    right: -5px;
    width: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-power-btn {
    width: 3px;
    height: 40px;
    background: var(--border-color);
    border-radius: 2px;
}

/* MSMU App Interface */
.msmu-app-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'Poppins', sans-serif;
}

.msmu-app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.msmu-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.msmu-logo i {
    font-size: 1.2rem;
}

.msmu-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.9;
}

.msmu-nav {
    display: flex;
    background: #f1f5f9;
    padding: 10px;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
}

.msmu-nav-item {
    flex: 1;
    padding: 8px 5px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.msmu-nav-item.active,
.msmu-nav-item:hover {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.msmu-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: white;
}

.msmu-content h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.msmu-content p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.4;
}

.msmu-feature-list {
    list-style: none;
    margin-top: 10px;
}

.msmu-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.msmu-feature-list i {
    color: #10b981;
    font-size: 0.7rem;
}

/* RAHMS Laptop Mockup */
.laptop-visual-wrapper {
    flex: 1.4;
    display: flex;
    align-items: center;
}

.laptop-frame { 
    width: 100%; 
}

.laptop-screen {
    background: white;
    border: 14px solid #334155;
    border-radius: 20px 20px 0 0;
    aspect-ratio: 16/10;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.laptop-base {
    height: 14px;
    background: #475569;
    border-radius: 0 0 20px 20px;
    position: relative;
}

.laptop-indent {
    width: 100px;
    height: 6px;
    background: #1e293b;
    margin: 0 auto;
    border-radius: 0 0 10px 10px;
}

.app-interface { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}
.app-header { 
    background: #1e293b; 
    color: white; 
    padding: 12px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap;
}
.role-switcher {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

@media (min-width: 480px) {
    .role-switcher {
        margin-top: 0;
        width: auto;
        justify-content: flex-end;
    }
    
    .app-header {
        flex-wrap: nowrap;
    }
}

.role-link { 
    background: transparent; 
    border: none; 
    color: #94a3b8; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.8rem; 
    transition: color 0.3s;
    padding: 5px 10px;
}
.role-link.active { 
    color: #38bdf8; 
    border-bottom: 2px solid #38bdf8; 
}
.app-body { 
    background: #f1f5f9; 
    padding: 20px; 
    flex: 1; 
    overflow-y: auto; 
}

/* Blog Section */
.blog {
    padding: 80px 0;
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .blog {
        padding: 100px 0;
    }
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.blog-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}
.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-image img {
    transform: scale(1.1);
}
.blog-date {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}
.blog-content { 
    padding: 1.5rem; 
}
.blog-content h3 { 
    margin-bottom: 0.5rem; 
    color: var(--dark-color); 
    font-size: 1.2rem;
}
.blog-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}
.blog-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}
.blog-link:hover { 
    gap: 8px; 
}

.blog-cta { 
    text-align: center; 
    margin-top: 3rem; 
}

/* Testimonials */
.testimonials { 
    padding: 80px 0; 
}

@media (min-width: 768px) {
    .testimonials { 
        padding: 100px 0; 
    }
}

.testimonial-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem;
    text-align: center;
}
.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 1.5rem;
}

.testimonial-author img {
    margin-right: 0;
    margin-bottom: 1rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}
.testimonial-author h4 { color: var(--dark-color); }
.testimonial-author p { font-size: 0.9rem; color: var(--text-light); }

/* Modern Newsletter Checkbox */
.checkbox-wrapper {
    margin: 1.5rem 0;
    display: flex;
    justify-content: flex-start;
}

.newsletter-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    user-select: none;
    transition: var(--transition);
}

.newsletter-toggle input {
    display: none;
}

.custom-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
}

.newsletter-toggle input:checked + .custom-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.custom-check::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s;
}

.newsletter-toggle input:checked + .custom-check::after {
    transform: rotate(45deg) scale(1);
}

.label-text {
    font-weight: 500;
    opacity: 0.8;
}

.newsletter-toggle:hover .custom-check {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.newsletter-toggle:hover .label-text {
    opacity: 1;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .contact {
        padding: 100px 0;
    }
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-content {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item h3 {
    margin-bottom: 0.2rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.contact-item p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .contact-form {
        padding: 2.5rem;
    }
}

.form-group { 
    margin-bottom: 1.5rem; 
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
    font-size: 1rem;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23334155' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer Newsletter Form */
.newsletter-subtitle {
    color: var(--footer-text);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

@media (min-width: 480px) {
    .newsletter-input-group {
        flex-direction: row;
        gap: 0;
    }
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 480px) {
    .newsletter-btn {
        width: auto;
    }
}

.newsletter-btn:hover {
    background: #1d4ed8;
    transform: translateX(2px);
}

.newsletter-note {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
}

@media (min-width: 768px) {
    .footer {
        padding: 4rem 0 2rem;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(5, 1fr);
    }
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul li { 
    margin-bottom: 0.8rem; 
}
.footer-col a { 
    color: var(--footer-text); 
    transition: var(--transition); 
    font-size: 0.9rem;
}
.footer-col a:hover { 
    color: white; 
    padding-left: 5px; 
}

.footer-social { 
    display: flex; 
    gap: 1rem; 
    margin-top: 1rem; 
}
.footer-social a {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.footer-social a:hover { 
    background: var(--primary-color); 
    transform: translateY(-3px); 
    padding: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* =========================================
   9. MODAL
   ========================================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}
.modal-close:hover { color: var(--primary-color); }

/* =========================================
   10. EDUCATION TIMELINE
   ========================================= */
.education { 
    padding: 80px 0; 
}

@media (min-width: 768px) {
    .education { 
        padding: 100px 0; 
    }
}

.education-timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding-left: 50px;
}

@media (max-width: 768px) {
    .education-timeline {
        padding-left: 30px;
    }
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    width: 3px;
    height: 95%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    opacity: 0.2;
}

@media (max-width: 768px) {
    .education-timeline::before {
        left: 10px;
    }
}

.edu-item {
    position: relative;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .edu-item {
        margin-bottom: 2rem;
    }
}

.edu-icon {
    position: absolute;
    left: -53px;
    top: 0;
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--primary-color);
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .edu-icon {
        left: -43px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.edu-item:hover .edu-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(10deg);
}

.edu-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .edu-content {
        padding: 2rem;
    }
}

.edu-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.edu-year {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.edu-institution {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-style: italic;
}

/* =========================================
   11. MOBILE-SPECIFIC FIXES
   ========================================= */
@media (max-width: 767px) {
    /* Typography adjustments for mobile */
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Hero stats grid */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .hero-stats .stat h3 {
        font-size: 1.5rem;
    }
    
    /* Service cards mobile optimization */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Project spotlight mobile layout */
    .project-spotlight {
        padding: 0 15px;
    }
    
    .phone-mockup-wrapper {
        order: -1;
        margin-bottom: 30px;
    }
    
    .phone-frame {
        width: 250px;
        height: 500px;
    }
    
    .laptop-screen {
        border-width: 10px;
    }
    
    /* Contact form mobile optimization */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer mobile layout */
    .footer-content {
        gap: 2rem;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Mobile menu fixes */
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    /* Adjust quick nav for mobile */
    .quick-nav {
        right: 15px;
        bottom: 15px;
    }
    
    .quick-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Adjust theme toggle for mobile */
    .theme-toggle {
        bottom: 80px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Education timeline mobile fixes */
    .education-timeline {
        padding-left: 25px;
    }
    
    .education-timeline::before {
        left: 7px;
    }
    
    .edu-icon {
        left: -38px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .edu-content {
        padding: 1.25rem;
    }
    
    /* MSMU app mobile fixes */
    .msmu-nav-item {
        font-size: 0.6rem;
        padding: 6px 3px;
    }
    
    .msmu-app-header {
        padding: 12px 15px;
    }
    
    .msmu-content {
        padding: 12px;
    }
    
    /* Prevent horizontal scroll on mobile */
    html, body {
        position: relative;
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Fix images overflowing on mobile */
    img, canvas, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix table overflow on mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .phone-frame {
        width: 220px;
        height: 440px;
    }
    
    .project-spotlight {
        gap: 20px;
    }
}

/* =========================================
   12. PRINT STYLES
   ========================================= */
@media print {
    .navbar, .theme-toggle, .quick-nav, .footer, .skip-link, .scroll-progress, .thank-you-modal {
        display: none !important;
    }
    body { color: black; background: white; }
    .hero, .about, .projects { padding: 0; page-break-inside: avoid; }
    a { text-decoration: none; color: black; }
    .btn { border: 1px solid #ccc; color: black; }
}

/* =========================================
   13. ACCESSIBILITY IMPROVEMENTS
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0044cc;
        --secondary-color: #5c2d91;
        --accent-color: #00875a;
        --text-color: #000000;
        --dark-color: #000000;
    }
}

/* =========================================
   14. PERFORMANCE OPTIMIZATIONS
   ========================================= */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* =========================================
   15. BROWSER COMPATIBILITY
   ========================================= */
/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .nav-menu {
        height: -webkit-fill-available;
    }
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* Webkit scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}