:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #111827 50%, #1f2937 100%);
    min-height: 100vh;
    padding-top: 35px;
}

h1, h2, h3, h4, h5, h6, .heading {
    font-family: 'Mozilla Headline', serif !important;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-hover:hover {
    background: rgba(17, 24, 39, 0.9);
    border-color: var(--primary);
    box-shadow: 0 15px 50px rgba(220, 38, 38, 0.2);
}

/* Scroll to top */
#scrollToTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* Skills Ticker */
.skills-ticker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
    z-index: 1001;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-left 40s linear infinite;
    width: max-content;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 1.5rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ticker-item i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

.ticker-item:hover {
    transform: scale(1.05);
}

.ticker-item span {
    font-family: 'Mozilla Headline', serif;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .ticker-item { padding: 0 1rem; font-size: 0.7rem; }
    .ticker-item i { font-size: 0.8rem; margin-right: 0.3rem; }
}

/* Language Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-dialog {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(75, 85, 99, 0.95));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

.language-dialog h2 { color: white; font-size: 2rem; font-weight: bold; margin-bottom: 1rem; }
.language-dialog p { color: #d1d5db; margin-bottom: 2rem; font-size: 1.1rem; }

.language-options { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: rgba(75, 85, 99, 0.5);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    min-width: 180px;
    cursor: pointer;
}

.language-btn:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.language-btn i { margin-right: 0.5rem; font-size: 1.3rem; }

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover { color: #dc2626; }

/* Nav Link underline */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

/* Desktop Navigation Indicator */
.nav-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: none;
}

@media (min-width: 1024px) {
    .nav-indicator { display: block; }
}

.nav-dots { display: flex; flex-direction: column; gap: 1rem; }

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-dot:hover { background: rgba(220, 38, 38, 0.7); transform: scale(1.2); }
.nav-dot.active { background: var(--primary); transform: scale(1.3); }

.nav-dot::after {
    content: attr(data-title);
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: 'Mozilla Headline', serif;
}

.nav-dot:hover::after { opacity: 1; visibility: visible; right: 2rem; }

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(17, 24, 39, 0.98));
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-container {
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-overlay.active .mobile-nav-container {
    transform: translateY(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 300;
    letter-spacing: 2px;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideInNav 0.5s ease forwards;
}

.mobile-nav-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-item:nth-child(2) { animation-delay: 0.2s; }
.mobile-nav-item:nth-child(3) { animation-delay: 0.3s; }
.mobile-nav-item:nth-child(4) { animation-delay: 0.4s; }
.mobile-nav-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInNav {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.mobile-nav-item:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--primary);
    transform: translateX(10px);
}

.mobile-nav-item.active {
    background: rgba(220, 38, 38, 0.3);
    border-color: var(--primary);
}

.nav-number { color: var(--primary); font-family: 'Mozilla Headline', serif; font-weight: bold; font-size: 1.2rem; }
.nav-title { color: white; font-size: 1.1rem; font-weight: 500; flex: 1; text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.nav-arrow { color: rgba(255, 255, 255, 0.5); font-size: 1.2rem; transition: all 0.3s ease; }
.mobile-nav-item:hover .nav-arrow { color: var(--primary); transform: translateX(5px); }

.mobile-nav-progress { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.progress-bar { height: 2px; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 1px; }
.progress-text { color: rgba(255, 255, 255, 0.7); font-family: 'Mozilla Headline', serif; font-size: 0.9rem; letter-spacing: 2px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in { animation: fadeIn 1s ease-out; }
.fade-in-delay { animation: fadeIn 1s ease-out 0.3s both; }
.fade-in-delay-2 { animation: fadeIn 1s ease-out 0.6s both; }
.pulse-slow { animation: pulse 4s ease-in-out infinite; }

/* Service & project cards */
.service-card:hover { transform: translateY(-10px); }
.project-card:hover { transform: translateY(-5px); }

.service-icon i { filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.3)); }
.service-card:hover .service-icon i { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.5)); }

.tech-badge:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(220, 38, 38, 0.5); }

.contact-info:hover { transform: translateY(-5px); }
.contact-info i { filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.3)); }

.hero-image { filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.3)); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(17, 24, 39, 0.8); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* Horizontal Timeline */
.timeline-horizontal-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(17, 24, 39, 0.8);
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 0 0.5rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.timeline-horizontal {
    display: flex;
    gap: 1rem;
    min-width: min-content;
}

.timeline-track {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(220, 38, 38, 0.2) 50%, var(--primary) 100%);
}

.timeline-card {
    position: relative;
    width: 200px;
    min-width: 200px;
    margin-top: 0.75rem;
    z-index: 1;
}

.timeline-dot {
    position: absolute;
    top: -0.9rem;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.timeline-dot.active,
.timeline-card:hover .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
    transform: translateX(-50%) scale(1.2);
}

/* Print styles */
@media print {
    #scrollToTop, .skills-ticker, .nav-indicator, .mobile-nav-overlay { display: none !important; }
    body { font-size: 12pt; line-height: 1.4; }
    .glass { box-shadow: none !important; border: 1px solid #dee2e6 !important; }
}