:root {
    --bg-dark: #0A0F14;
    --bg-light: #161B22;
    --accent: #00E5FF;
    --accent-dark: #00B8D4;
    --success-color: #64ffda;
    --text-light: #f0f6fc;
    --text-dark: #8b949e;
    --border-color: rgba(0, 229, 255, 0.1);
    --error-color: #ff5555;
    --spotlight-x: 50%;
    --spotlight-y: 50%;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    cursor: default;
    overflow-x: hidden;
}
#interactive-background {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: -20;
}
#aurora-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#particles-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
#grid-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 3; overflow: hidden; }
#grid-overlay::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: calc(100% + 50px); height: calc(100% + 50px);
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: pan 60s linear infinite;
    will-change: transform;
}
@keyframes pan { from { transform: translate(0, 0); } to { transform: translate(-50px, -50px); } }
.aurora-shape {
    position: absolute; border-radius: 50%;
    filter: blur(150px); opacity: 0.1; will-change: transform;
}
.aurora-shape1 {
    width: 700px; height: 700px; background: var(--accent);
    top: -25%; left: -25%; animation: move1 25s ease-in-out infinite alternate;
}
.aurora-shape2 {
    width: 600px; height: 600px; background: #ff00c1;
    bottom: -25%; right: -25%; animation: move2 30s ease-in-out infinite alternate;
}
@keyframes move1 { from { transform: translate(-20%, -20%) rotate(0deg); } to { transform: translate(20%, 20%) rotate(70deg); } }
@keyframes move2 { from { transform: translate(20%, 20%) rotate(0deg); } to { transform: translate(-20%, -20%) rotate(90deg); } }
body::before {
    content: ''; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 85%);
    z-index: -19;
}
@media (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}
.custom-cursor {
    position: fixed; top: 0; left: 0; width: 28px; height: 28px;
    border: 2px solid var(--accent); border-radius: 50%;
    pointer-events: none; transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-width 0.3s ease;
    z-index: 9999;
}
.custom-cursor-dot {
    position: fixed; top: 0; left: 0; width: 6px; height: 6px;
    background-color: var(--accent); border-radius: 50%;
    pointer-events: none; transform: translate(-50%, -50%); z-index: 9999;
}
.custom-cursor.hovered { width: 50px; height: 50px; background-color: rgba(0, 229, 255, 0.1); border-width: 0; }
.glass-card {
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

header nav.glass-card {
    overflow: visible;
}

.group .glass-card {
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.fixed { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; }
header nav { transition: height 0.3s ease, margin-top 0.3s ease, box-shadow 0.3s ease; }
header nav.scrolled {
    height: 4.25rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.glass-card::before {
    content: ''; position: absolute;
    top: var(--spotlight-y); left: var(--spotlight-x);
    width: 0; height: 0;
    background: radial-gradient(circle 400px, rgba(0, 229, 255, 0.15), transparent 70%);
    transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.4s ease;
}
.glass-card:hover::before { opacity: 1; }
.neon-text {
    background: linear-gradient(45deg, var(--accent), var(--accent-dark), #64ffda);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}
.neon-button {
    border: 2px solid var(--accent); color: var(--accent);
    transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1;
    will-change: transform, box-shadow;
    display: inline-block;
}
.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(0, 229, 255, 0.4), transparent);
    transition: all 0.5s;
    z-index: -1;
}
.neon-button:hover {
    color: var(--bg-dark); background-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.7); transform: translateY(-3px) scale(1.02);
}
.neon-button:hover::before { 
    left: 100%;
}
.secondary-button {
    background: transparent; border: 2px solid var(--text-dark); color: var(--text-dark);
    transition: all 0.3s ease;
}
.secondary-button:hover {
    background-color: var(--text-dark);
    color: var(--bg-dark);
}

.nav-link {
    transition: color 0.3s ease;
}
.nav-link.active .nav-link-text {
    color: var(--accent);
}
.nav-link:hover .nav-link-text {
    color: var(--accent);
}
.nav-link-text {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}
.hidden.lg\\:flex .nav-link-text {
    visibility: visible;
    opacity: 1;
}

.nav-link-text::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover .nav-link-text::after,
.nav-link.active .nav-link-text::after {
    width: 100%;
}
.mega-menu-item.active h4 {
    color: var(--accent);
}
.mega-menu-item.active {
    background-color: rgba(0, 229, 255, 0.1);
}
.reveal-up { transform: translateY(100px); opacity: 0; visibility: hidden; will-change: transform, opacity; }
#mobile-menu { transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); }

.mobile-main-link {
    font-size: 1.75rem;
    font-weight: 700;
    padding: 0.75rem 0;
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
}
.mobile-main-link:hover {
    color: var(--accent);
    transform: scale(1.05);
}
.mobile-sub-link {
    display: block;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}
.mobile-sub-link:hover {
    color: var(--accent);
}

.portfolio-card { transform-style: preserve-3d; }

#back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--accent); color: var(--bg-dark); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s ease; z-index: 999;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#manage-cookies-btn {
    position: fixed; bottom: 2rem; left: 2rem; width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--accent); color: var(--bg-dark); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s ease; z-index: 999;
}
#manage-cookies-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }


input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, textarea:-webkit-autofill:hover, textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--accent-dark) !important;
    box-shadow: 0 0 0px 1000px var(--bg-light) inset !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-light) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
input, textarea { color: var(--accent-dark) !important; }
input::placeholder, textarea::placeholder { color: var(--text-dark); }
.form-error { color: var(--error-color); font-size: 0.875rem; margin-top: 0.25rem; display: none; }
input.invalid, textarea.invalid { border-color: var(--error-color) !important; }
.footer-link { position: relative; color: var(--text-dark); transition: color 0.3s ease; }
.footer-link:hover { color: var(--text-light); }
.footer-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 50%; background-color: var(--accent);
    transition: all 0.3s ease; transform: translateX(-50%);
}
.footer-link:hover::after { width: 100%; }
#typing-container { position: relative; padding-right: 10px; }
.typing-cursor {
    display: inline-block; width: 3px; height: 1em; background-color: var(--accent);
    animation: blink 0.7s infinite; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%); margin-left: 0;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 640px) { #hero h1 { line-height: 1.2; } }
@media (max-width: 767px) {
    section { padding-left: 1rem; padding-right: 1rem; }
    .contact-info { flex-direction: column; gap: 0.5rem; }
    .contact-info .separator { display: none; }
}

.privacy-content h2 { font-size: 1.875rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--accent); }
.privacy-content h3 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--text-light); }
.privacy-content p { margin-bottom: 1rem; line-height: 1.75; color: var(--text-dark); }
.privacy-content ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-dark); }
.privacy-content li { margin-bottom: 0.5rem; }
.privacy-content a { color: var(--accent); text-decoration: underline; transition: color 0.3s; }
.privacy-content a:hover { color: var(--accent-dark); }

.category-button { transition: all 0.3s ease; border: 1px solid var(--border-color); background-color: rgba(22, 27, 34, 0.5); }
.category-button:hover, .category-button.active { background-color: var(--accent); color: var(--bg-dark); border-color: var(--accent); box-shadow: 0 0 15px rgba(0, 229, 255, 0.5); }


.language-selector #language-toggle-button.open i,
.language-selector #language-toggle-button-mobile.open i {
    transform: rotate(180deg);
}

#language-dropdown, #language-dropdown-mobile {
    background: rgba(16, 21, 28, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 229, 255, 0.1);
    position: absolute;
    top: calc(100% + 12px);
    width: 160px;
    padding: 8px;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
}

#language-dropdown {
    right: 0;
    transform: translateY(10px) scale(0.95);
}

#language-dropdown-mobile {
    top: calc(100% + 12px);
    bottom: auto;
    left: 50%;
    transform: translate(-50%, 10px) scale(0.95);
}

#language-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#language-dropdown-mobile.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
}

#language-dropdown::before, #language-dropdown-mobile::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: glow 1.5s infinite alternate;
}

#language-dropdown-mobile::before {
    top: -1px;
    bottom: auto;
}

@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.language-option {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-light);
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.language-option:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.language-option.active {
    background-color: rgba(0, 229, 255, 0.15);
    font-weight: 600;
}

.language-option svg {
    flex-shrink: 0;
    width: 20px;
    height: auto;
    border-radius: 3px;
}
.cookie-toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 44px;
    height: 24px;
    display: inline-block;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    outline: none;
    border: none;
    cursor: pointer;
    background-color: #777;
    transition: background-color 0.3s;
}

.cookie-toggle:before {
    content: "";
    display: block;
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    transition: all 0.3s;
}

.cookie-toggle:checked {
    background-color: var(--accent);
}

.cookie-toggle:checked:before {
    transform: translateX(20px);
}
#cookie-consent-modal {
    transform: translateX(-50%);
    will-change: bottom, opacity;
}
.cookie-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.cookie-pref-row:last-child {
    border-bottom: none;
}