:root {
    --primary: #6e45e2;
    --secondary: #88d3ce;
    --accent: #ff7e5f;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --neon: #0ff0fc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.7;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Premium Noise Texture Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03; /* Очень тонкий эффект */
    z-index: 9999;
    pointer-events: none; /* Пропускает клики */
}

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* removed legacy rotating radial background */

/* --- Modern animated header background (2025) --- */
header { isolation: isolate; }

/* Animated gradient blobs layer */
header::before {
	content: '';
	position: absolute;
	top: -20%;
	left: -20%;
	width: 140%;
	height: 140%;
	background:
		radial-gradient(30rem 22rem at 12% 22%, color-mix(in oklab, var(--primary), transparent 65%) 0%, transparent 65%),
		radial-gradient(28rem 20rem at 88% 18%, color-mix(in oklab, var(--accent), transparent 65%) 0%, transparent 65%),
		radial-gradient(34rem 26rem at 50% 85%, color-mix(in oklab, var(--secondary), transparent 70%) 0%, transparent 70%);
	filter: blur(50px) saturate(1.15);
	animation: blobs-float 18s ease-in-out infinite alternate;
	z-index: -2;
}

/* Subtle conic light sweep layer removed */

@keyframes blobs-float {
	0% { transform: translate3d(0,0,0) scale(1); }
	50% { transform: translate3d(0,-2%,0) scale(1.03); }
	100% { transform: translate3d(0,2%,0) scale(0.99); }
}

/* removed angle-rotate and hue-rotate animations */

@media (prefers-reduced-motion: reduce) {
	header::before,
	header::after { animation: none !important; }
}

/* Background video layer for header */
.hero-media {
	position: absolute;
	inset: 0;
	z-index: -3;
	overflow: hidden;
}

.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.45) saturate(1.1);
}

.photo-outer{ width:300px; height:300px; margin:0 auto 2rem; border-radius:50%; }
.photo-wrapper{ position:relative; width:100%; height:100%; border-radius:50%; overflow:hidden; border: 5px solid rgba(255, 255, 255, 0.2); transition: transform 0.5s ease; background: transparent; }
.photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display:block; }

.photo-wrapper:hover { transform: scale(1.05); }

.photo-video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:50%; opacity:0; transition:opacity .3s ease; transform: scale(1.03); transform-origin: center; pointer-events:none; box-shadow: 0 0 30px var(--primary), 0 0 60px rgba(110,69,226,0.4) }
.photo-video::-webkit-media-controls { display:none !important; }
.photo-video::-webkit-media-controls-enclosure { display:none !important; }
.photo-video::-webkit-media-controls-panel { display:none !important; }
.photo-wrapper:hover .photo-video{ opacity:1 }

.photo-sound{ position:absolute; right:10px; bottom:10px; z-index:3; background:rgba(0,0,0,.5); color:#fff; border:1px solid rgba(255,255,255,.3); border-radius:999px; padding:.25rem .5rem; font-size:.9rem; cursor:pointer }
body.light-theme .photo-sound{ background:rgba(255,255,255,.8); color:var(--light); border-color:rgba(0,0,0,.2) }

h1 {
    font-family: 'InterVariable', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 4rem);
    font-weight: 800;
    margin: 1rem 0;
    line-height: 1.1;
    letter-spacing: -0.04em; /* Тугой кернинг (тренд) */
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--light); /* Fallback for browsers that don't support background-clip: text */
    text-transform: none;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    h1 {
        color: transparent;
    }
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-icon:hover {
    background: var(--primary);
    transform: translateY(-5px) scale(1.1);
    color: white;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-down:hover {
    opacity: 1;
    color: var(--neon);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

section {
    padding: 5rem 10%;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.section-darker {
    background: rgba(0,0,0,0.3);
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
    background-size: cover;
    background-position: center;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    color: var(--light);
    letter-spacing: -0.03em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(110, 69, 226, 0.3);
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    overflow-wrap: anywhere;
    letter-spacing: -0.01em;
}

h3 i {
    color: var(--accent);
}

.skill-item {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
    word-break: break-word;
}

.skill-item::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--neon);
    font-size: 1.2rem;
}

.job {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.job:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.job-title {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--secondary);
    gap: 1rem;
}

.job-period {
    color: var(--accent);
    font-weight: normal;
}

.job ul {
    list-style-type: none;
}

.job li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    word-break: break-word;
}

.job li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--neon);
    font-size: 1.5rem;
    line-height: 1;
}

.education-item, .language-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.education-item i, .language-item i {
    color: var(--accent);
    font-size: 1.5rem;
}

/* .about-content wrapper removed (empty ruleset) */

.about-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-me {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.about-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.about-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.cta-section {
    text-align: center;
    padding: 6rem 3%;
    background: linear-gradient(135deg, rgba(110,69,226,0.1) 0%, rgba(136,211,206,0.1) 100%);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.02)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    color: var(--light);
}

.cta-text {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.cta-button:hover::before {
    left: 100%;
}

footer {
    text-align: center;
    padding: 3rem;
    background-color: rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-5px) scale(1.1);
    color: white;
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    text-decoration: underline;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* --- Navigation Menu --- */
.main-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none; /* Hidden on desktop */
    position: relative;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above the menu */
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--light);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.hamburger {
    top: 9px;
}

.hamburger::before {
    top: -9px;
}

.hamburger::after {
    top: 9px;
}

.nav-toggle.is-active .hamburger {
    background: transparent;
}

.nav-toggle.is-active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.is-active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(110, 69, 226, 0.3);
}

.portfolio-item h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.portfolio-item p {
    flex-grow: 1; /* Pushes the link to the bottom */
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.portfolio-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start; /* Align link to the left */
}

.portfolio-link:hover {
    color: var(--light);
}

.portfolio-note {
    text-align: center;
    font-style: italic;
    opacity: 0.8;
    max-width: 600px;
    margin: 2rem auto 0;
}

/* Badges for tech stack and KPI */
.badge {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    line-height: 1;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    margin: 0 .35rem .35rem 0;
}
.badge-kpi { border-color: color-mix(in oklab, var(--accent), transparent 40%); color: var(--secondary); }

body.light-theme .badge { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.12); color: var(--light); }
body.light-theme .badge-kpi { color: var(--primary); }

.semantic-list {
    list-style: none;
    padding: 0;
}

/* Анимации при прокрутке */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll-driven animations (native) */
@supports (animation-timeline: view()) {
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        animation: fadeUp 1 both;
        animation-timeline: view();
        animation-range: entry 20% cover 35%;
    }
    @keyframes fadeUp {
        from { opacity: 0; transform: translateY(24px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Reading progress bar */
.progress {
    position: fixed;
    left: 0; top: 0; height: 3px; width: 100%;
    transform-origin: 0 0; transform: scaleX(0);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1002; pointer-events: none;
}
@supports (animation-timeline: scroll()) {
    .progress { animation: grow linear both; animation-timeline: scroll(root block); }
    @keyframes grow { from { transform: scaleX(0) } to { transform: scaleX(1) } }
}

/* Container queries setup */
section { container-type: inline-size; }
.skills-container, .portfolio-grid { container-type: inline-size; }
@container (max-width: 520px) {
    .skill-category { padding: 1.25rem; }
    .portfolio-item { padding: 1.25rem; }
}

/* --- Responsive Navigation --- */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        border-radius: 0;
        border: none;
        backdrop-filter: none;
    }

    .nav-menu.nav-menu--visible {
        transform: translateX(0);
    }
    .nav-toggle { display: block; }
    .nav-link { font-size: 1.5rem; }
}

/* Prevent nav overlapping the hero photo on medium desktop widths (e.g., MacBook 13") */
@media (max-width: 1440px) and (min-width: 993px) {
	header { padding-top: 9.5rem; }
	.photo { margin-top: 0; }
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }
    
    .photo-outer { width: min(300px, 80vw); height: min(300px, 80vw); }
    
    section {
        padding: 3rem 5%;
    }
    
    .contact-icons, .social-links {
        gap: 1rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .about-me {
        grid-template-columns: 1fr;
    }
    
    .cta-button {
        padding: 1rem 2rem;
    }

    .main-nav {
        top: 15px;
        left: 15px;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
    }

    /* Align hamburger and theme toggle on one horizontal line */
    .nav-toggle {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: inline-block;
    }
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        width: 26px;
        height: 3px;
        left: 50%;
        background: var(--light);
    }
    .hamburger {
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .hamburger::before {
        top: -8px;
        transform: translateX(-50%);
    }
    .hamburger::after {
        top: 8px;
        transform: translateX(-50%);
    }
}

body.light-theme .main-nav .nav-menu {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .nav-menu {
    background: var(--dark);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    color: var(--light);
}

.theme-toggle:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.2rem;
    position: absolute;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: translateY(25px);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: translateY(0);
}

/* --- Light Theme --- */

body.light-theme .theme-toggle .fa-sun {
    opacity: 1;
    transform: translateY(0);
}

body.light-theme .theme-toggle .fa-moon {
    opacity: 0;
    transform: translateY(-25px);
}

body.light-theme {
    --primary: #6e45e2;
    --secondary: #00796b; /* Darker teal for better contrast */
    --accent: #e64a19; /* Darker orange */
    --dark: #ffffff; /* Light background */
    --light: #0f172a; /* Dark text */
    --neon: #0056b3; /* Darker blue for text */

    background: var(--dark);
}

/* Keep animated header background in light theme as well */

body.light-theme .photo {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 20px rgba(110,69,226,0.2), 0 0 40px rgba(110,69,226,0.1);
}

body.light-theme .contact-icon,
body.light-theme .social-link {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--light);
}

body.light-theme::after {
    opacity: 0.04; /* В светлой теме шум можно сделать чуть-чуть ярче */
}

body.light-theme header::after {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
}

body.light-theme .contact-icon:hover,
body.light-theme .social-link:hover {
    background: var(--primary);
    color: #fff;
}

body.light-theme .section-darker {
    background: #f8fafc;
}

body.light-theme .skill-category,
body.light-theme .job,
body.light-theme .about-item,
body.light-theme .portfolio-item {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .skill-category:hover,
body.light-theme .job:hover,
body.light-theme .about-item:hover,
body.light-theme .portfolio-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(110, 69, 226, 0.3);
}

body.light-theme .cta-section {
    background: linear-gradient(135deg, rgba(110,69,226,0.05) 0%, rgba(0,121,107,0.05) 100%);
}

body.light-theme footer {
    background-color: #e9ecef;
}

body.light-theme .skill-item::before,
body.light-theme .job li::before {
    color: var(--neon);
    text-shadow: none;
    animation: none;
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light);
}

body.light-theme .hamburger,
body.light-theme .hamburger::before,
body.light-theme .hamburger::after {
    background: var(--light);
}

body.light-theme .footer-links a {
    color: var(--light);
}

body.light-theme .footer-links a:hover {
    color: var(--primary);
}

/* --- Cookie Consent Banner --- */
.cookie-consent-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
    max-width: 300px; 
}

.cookie-consent-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #fff; /* Light theme default */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.cookie-consent-container.show-banner .cookie-consent-banner {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cookie-consent-banner .cookie-icon {
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.cookie-consent-banner .cookie-text {
    font-size: 0.7rem;
    line-height: 1.3;
    color: #5a5a6e; /* text-secondary for light theme */
    margin: 0;
}

.cookie-consent-banner .cookie-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.cookie-consent-banner .cookie-text a:hover {
    text-decoration: underline;
}

.cookie-consent-banner .cookie-btn {
    padding: 2px 5px;
    font-size: 0.7rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.3s;
    margin-left: 4px;
    vertical-align: baseline;
}

.cookie-consent-banner .cookie-btn:hover {
    opacity: 0.9;
}

.cookie-consent-trigger {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); /* Dark theme default */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light); /* This is light text in dark theme */
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.cookie-consent-container.show-trigger .cookie-consent-trigger {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.cookie-consent-trigger:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--primary);
    color: #fff;
}

body.light-theme .cookie-consent-trigger {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--light); /* In light theme, this is dark text */
}

/* Dark theme adjustments */
body.dark-theme .cookie-consent-banner {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

body.dark-theme .cookie-consent-banner .cookie-text {
    color: var(--light); /* light text in dark theme */
    opacity: 0.8;
}

body.dark-theme .cookie-consent-banner .cookie-text a {
    color: var(--accent);
}

/* --- Accessibility Improvements --- */

/* 1. Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
.contact-icon:focus-visible,
.social-link:focus-visible {
    outline: 3px solid var(--neon);
    outline-offset: 4px;
    border-radius: 5px;
    transition: outline 0.2s ease, outline-offset 0.2s ease;
}

/* 2. Respect user's motion preference */
@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;
    }
}
