:root {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dark {
    --bg-primary: #0a101f;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-1: #38bdf8;
    --accent-2: #818cf8;
    --accent-3: #c084fc;
    --shadow-color: rgba(56, 189, 248, 0.1);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    background-image: radial-gradient(at 20% 20%, hsla(212, 90%, 20%, 0.4) 0px, transparent 50%),
                      radial-gradient(at 80% 20%, hsla(262, 70%, 25%, 0.3) 0px, transparent 50%),
                      radial-gradient(at 20% 80%, hsla(200, 80%, 30%, 0.3) 0px, transparent 50%),
                      radial-gradient(at 80% 80%, hsla(262, 70%, 25%, 0.4) 0px, transparent 50%);
}

body.modal-open { overflow: hidden; }

h1, h2, h3, .font-poppins { font-family: 'Poppins', sans-serif; }

.glass-nav {
    background: rgba(10, 16, 31, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}
.glass-element {
    background: rgba(10, 16, 31, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.glass-element-menu {
    background: rgba(16, 24, 45, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
#language-switcher-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes glow {
    0% { text-shadow: 0 0 3px var(--accent-1), 0 0 5px rgba(56, 189, 248, 0.5); }
    50% { text-shadow: 0 0 5px var(--accent-2), 0 0 10px rgba(129, 140, 248, 0.3); }
    100% { text-shadow: 0 0 3px var(--accent-1), 0 0 5px rgba(56, 189, 248, 0.5); }
}
.hero-title-glow { animation: glow 6s ease-in-out infinite; }
.heading-glow {
    text-shadow: 0 0 15px transparent;
    transition: text-shadow 0.3s ease;
}
.heading-glow:hover { text-shadow: 0 0 15px var(--accent-1); }

.nav-link {
    position: relative;
    padding-bottom: 6px;
    color: rgb(201, 201, 201);
    transition: color 0.3s ease;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    gap: 0.5rem;
}
.cta-button.primary {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    color: var(--bg-primary);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
}
.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--shadow-color);
}
.cta-button.secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.cta-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-1);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1rem;
}
.bento-card {
    position: relative;
    grid-column: span 2;
    padding: 1.5rem;
    cursor: pointer;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(10, 16, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .bento-card { grid-column: span 4; }
    .bento-grid { grid-template-columns: repeat(4, 1fr); }
}
.bento-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bento-card:hover {
    background: rgba(10, 16, 31, 0.3);
    transform: translateY(-5px);
}
.bento-card:hover::before { opacity: 1; }
.bento-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.bento-icon {
    color: var(--accent-1);
    margin-bottom: 1rem;
}

.bento-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
}
.bento-card:hover .bento-indicator {
    opacity: 1;
    transform: translateY(0);
}

#projects-slider {
    transition: transform 0.5s ease-in-out;
}
.project-card { 
    background-color: transparent; 
    cursor: pointer; 
    flex-shrink: 0; 
    width: 100%;
    padding: 1rem;
}
@media (min-width: 640px) { .project-card { width: calc(100% / 2); } }
@media (min-width: 1024px) { .project-card { width: calc(100% / 3); } }

.project-card-inner {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(10, 16, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}
.project-card-inner:hover {
    transform: translateY(-5px);
}
.project-card-image-container { 
    aspect-ratio: 16 / 9; 
    overflow: hidden; 
}
.project-card-image-container img { 
    width: 100%; height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease; 
}
.project-card:hover img { transform: scale(1.05); }

.project-card-content { padding: 1rem; }
.project-card-content h3 { transition: color 0.3s ease; }
.project-card:hover h3 { color: var(--accent-1); }

.slider-nav-btn {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 16, 31, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}
.slider-nav-btn:hover {
    background-color: var(--accent-1);
    color: var(--bg-primary);
}
.slider-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: rgba(10, 16, 31, 0.4);
}

.scroller {
    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}
.scroller-inner { animation: scroll 60s linear infinite; }
.scroller:hover .scroller-inner { animation-play-state: paused; }
.scroller-inner img {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.scroller-inner img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}
@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.footer-link {
    transition: color 0.3s ease, transform 0.3s ease;
}
.footer-link:hover {
    color: var(--accent-1);
    transform: translateY(-2px);
}

#project-modal, #project-modal-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#project-modal-content .cta-button.primary {
    background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
}