/* Shared styles: global layout and common components */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-color: #2563eb;
            --secondary-color: #1e40af;
            --accent-color: #3b82f6;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --background: #0a0e27;
            --background-alt: #111827;
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
            --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--background);
            color: #ffffff;
            overflow-x: hidden;
            line-height: 1.6;
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: rgba(10, 14, 39, 0.8);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--glass-border);
            padding: 1rem 2rem;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateY(0);
            opacity: 1;
        }

        .lang-switcher {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            margin-left: 1rem;
            padding: 0.15rem;
            border-radius: 9999px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
        }

        .lang-btn {
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.8rem;
            padding: 0.25rem 0.6rem;
            border-radius: 9999px;
            cursor: pointer;
            transition: var(--transition-fast);
        }

        .lang-btn.active {
            background: var(--primary-color);
            color: #fff;
        }

        nav.hidden {
            transform: translateY(-100%);
            opacity: 0;
            pointer-events: none;
        }

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

        .nav-logo {
            height: 40px;
            width: auto;
            opacity: 0.9;
            transition: var(--transition-fast);
        }

        .nav-logo:hover {
            opacity: 1;
            transform: scale(1.05);
        }

        .nav-logo-link {
            display: flex;
            align-items: center;
        }

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

        .nav-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition-fast);
            position: relative;
        }

        .nav-links a:hover {
            color: #ffffff;
        }

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

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

        /* Mobile Navigation */
        .nav-hamburger {
            display: none;
        }

        .mobile-menu-overlay {
            display: none;
        }

        @media (max-width: 968px) {
            nav {
                padding: 1.25rem 2rem;
            }

            .nav-container {
                position: relative;
                justify-content: center;
            }

            .nav-hamburger {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                position: absolute;
                left: 0;
                width: 40px;
                height: 40px;
                background: transparent;
                border: none;
                cursor: pointer;
                z-index: 1001;
                padding: 0.5rem;
                transition: var(--transition-fast);
            }

            .nav-hamburger .bar {
                display: block;
                width: 24px;
                height: 3px;
                margin: 3px auto;
                background-color: rgba(255, 255, 255, 0.9);
                transition: var(--transition);
                border-radius: 2px;
            }

            .nav-hamburger:hover .bar {
                background-color: #ffffff;
            }

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

            body.menu-open .nav-hamburger .bar:nth-child(2) {
                opacity: 0;
            }

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

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

            .nav-container .lang-switcher {
                display: inline-flex;
                position: absolute;
                right: 0;
                margin-left: 0;
                z-index: 1001;
            }

            .nav-links {
                display: none;
            }

            .mobile-menu-overlay {
                display: block;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.95);
                backdrop-filter: blur(10px);
                z-index: 999;
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                            visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }

            body.menu-open .mobile-menu-overlay {
                opacity: 1;
                visibility: visible;
            }

            .mobile-menu-content {
                position: absolute;
                top: 0;
                left: 0;
                width: 280px;
                max-width: 85%;
                height: 100%;
                background: rgba(10, 14, 39, 0.7);
                backdrop-filter: blur(20px);
                border-right: 1px solid var(--glass-border);
                padding: 5rem 2rem 2rem;
                overflow-y: auto;
                transform: translateX(-100%);
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }

            body.menu-open .mobile-menu-content {
                transform: translateX(0);
            }

            .mobile-menu-links {
                list-style: none;
                padding: 0;
                margin: 0;
                display: flex;
                flex-direction: column;
                gap: 0.5rem;
            }

            .mobile-menu-links li {
                margin: 0;
            }

            .mobile-menu-links a {
                display: block;
                padding: 1rem 1.25rem;
                color: rgba(255, 255, 255, 0.9);
                text-decoration: none;
                font-weight: 500;
                font-size: 1.1rem;
                border-radius: 12px;
                transition: var(--transition-fast);
                border-left: 3px solid transparent;
            }

            .mobile-menu-links a:hover {
                background: rgba(37, 99, 235, 0.2);
                border-left-color: var(--primary-color);
                color: #ffffff;
                transform: translateX(4px);
            }
        }


        /* Back to Top Button */
        .back-to-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 50px;
            height: 50px;
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            color: #60a5fa;
            border: 1px solid var(--glass-border);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition-fast);
            z-index: 999;
            box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3), 0 0 0 1px rgba(37, 99, 235, 0.2);
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background: rgba(37, 99, 235, 0.2);
            border-color: rgba(37, 99, 235, 0.5);
            color: #ffffff;
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5), 0 0 0 1px rgba(37, 99, 235, 0.3);
        }

        /* Footer */
        footer {
            background: var(--background-alt);
            border-top: 1px solid var(--glass-border);
            padding: 3rem 2rem;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
        }

        .footer-main {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 2rem;
        }

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

        .social-links a {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: var(--transition-fast);
        }

        .social-links a:hover {
            color: #60a5fa;
            transform: translateY(-2px);
        }

        .social-links a[data-tooltip] {
            position: relative;
        }

        .social-links a[data-tooltip]::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 50%;
            bottom: calc(100% + 8px);
            transform: translateX(-50%) translateY(6px);
            opacity: 0;
            pointer-events: none;
            white-space: nowrap;
            font-size: 0.72rem;
            font-weight: 600;
            color: #e5e7eb;
            background: rgba(10, 14, 39, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            padding: 0.25rem 0.45rem;
            transition: opacity 0.15s ease, transform 0.15s ease;
            z-index: 30;
        }

        .social-links a[data-tooltip]:hover::after,
        .social-links a[data-tooltip]:focus-visible::after {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        @media (hover: none) {
            .social-links a[data-tooltip]::after {
                display: none;
            }
        }

        .footer-title {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9rem;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 10000;
            inset: 0;
            background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.08), transparent 40%),
                        radial-gradient(circle at 80% 30%, rgba(14,165,233,0.07), transparent 40%),
                        rgba(6, 8, 20, 0.8);
            backdrop-filter: blur(14px);
            animation: fadeIn 0.25s ease;
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: linear-gradient(160deg, rgba(17,24,39,0.9) 0%, rgba(17,24,39,0.7) 100%);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 18px;
            width: min(1100px, 96vw);
            max-height: 92vh;
            display: flex;
            flex-direction: column;
            animation: slideUp 0.28s ease;
            box-shadow: 0 30px 120px rgba(0,0,0,0.55);
            overflow: hidden;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            background: linear-gradient(90deg, rgba(59,130,246,0.08), transparent);
        }

        .modal-header h3 {
            font-size: 1.25rem;
            font-weight: 700;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            letter-spacing: -0.01em;
        }

        .modal-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modal-header h3 i {
            color: var(--primary-color);
        }

        .modal-close {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.14);
            color: #e5e7eb;
            font-size: 1.1rem;
            cursor: pointer;
            transition: var(--transition-fast);
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
        }

        .modal-close:hover {
            background: rgba(255,255,255,0.12);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.3);
        }

        .modal-body {
            padding: 1.25rem;
            flex: 1;
            overflow: auto;
            background: radial-gradient(circle at 20% 80%, rgba(59,130,246,0.06), transparent 40%);
        }

        .modal-body iframe {
            width: 100%;
            height: min(82vh, 820px);
            border: none;
            border-radius: 14px;
            box-shadow: 0 18px 50px rgba(0,0,0,0.35);
            background: #0f172a;
        }

        .modal-footer {
            display: flex;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.08);
            justify-content: flex-end;
            background: linear-gradient(90deg, transparent, rgba(59,130,246,0.07));
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Animations */
        .animate-on-scroll {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.8s ease-out, transform 0.8s ease-out;
        }

        .animate-on-scroll.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Desktop nav centering across all pages */
        @media (min-width: 969px) {
            nav .nav-container {
                display: grid !important;
                grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr) !important;
                align-items: center !important;
                width: 100%;
            }

            nav .nav-logo-link {
                justify-self: start !important;
            }

            nav .nav-links {
                justify-self: center !important;
                margin: 0 !important;
            }

            nav .lang-switcher {
                justify-self: end !important;
                margin-left: 0 !important;
            }
        }

        /* Responsive Design */
        @media (max-width: 968px) {
            .about-main {
                padding: 2rem;
            }

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

            .about-photo {
                justify-self: center;
            }

            .about-headshot-placeholder,
            .about-headshot {
                width: 120px;
                height: 120px;
            }

            .contact-main-grid {
                grid-template-columns: 1fr;
            }

            .contact-primary {
                grid-column: 1;
                grid-template-columns: 1fr;
            }

            .downloads-card {
                grid-column: 1;
                grid-template-columns: 1fr;
            }


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

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

            .stats-grid {
                display: none;
            }

            .overview-stats {
                display: none;
            }

            .overview-stat-number {
                font-size: 2rem;
            }

            .nav-links {
                gap: 1rem;
                font-size: 0.875rem;
            }

            .content-section {
                padding: 3rem 1.5rem;
            }

            .hero-section {
                height: 68vh;
                min-height: 460px;
            }
        }

        @media (max-width: 640px) {
            .back-to-top {
                bottom: 1.5rem;
                right: 1.5rem;
                width: 45px;
                height: 45px;
            }

            .modal-header {
                flex-wrap: wrap;
                align-items: flex-start;
            }

            .modal-header h3 {
                width: 100%;
            }

            .modal-actions {
                width: 100%;
                display: flex;
                justify-content: flex-end;
                flex-wrap: wrap;
                gap: 0.5rem;
            }

            .download-options {
                flex-direction: column;
            }

            .stats-grid {
                display: none;
            }

            .overview-stats {
                display: none;
            }

            .overview-stat-number {
                font-size: 1.75rem;
            }
        }
