:root {
    --bg-dark: #050508;
    --text-main: #f0f0f5;
    --text-muted: #a0a0b0;
    --accent-1: rgba(255, 255, 255, 0.9);
    --accent-2: rgba(255, 255, 255, 0.6);
    --accent-3: rgba(255, 255, 255, 0.3);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --glass-bg: rgba(20, 20, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Dynamic Background */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: url('abstract.gif') no-repeat center center;
    background-size: cover;
}

.glow-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Overlay to ensure text legibility */
    z-index: 0;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.8;
    mix-blend-mode: overlay;
    /* Dynamically brightens and inherits GIF colors */
    z-index: 1;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-1), transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-2), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(10%, 15%) scale(1.1);
    }

    100% {
        transform: translate(-5%, 5%) scale(0.9);
    }
}

/* Nav */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

.glass-nav.scrolled {
    padding: 0.8rem 0;
    background: rgba(5, 5, 8, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.4rem;
}

.dev-text {
    color: white;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 1.2rem;
}

.lang-flags {
    display: flex;
    gap: 0.5rem;
}

.flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    border-radius: 2px;
}

.flag-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.flag-btn.active {
    opacity: 1;
}

.flag-btn img {
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-right {
    gap: 2rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

/* Sub-buttons and old language button override */
.btn-white {
    background-color: white;
    color: black;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Typography & Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    padding-top: 140px;
    padding-bottom: 100px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 4rem;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: skewX(-20deg);
    transition: 0.7s;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 150%;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 140px - 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--bg-dark);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

@keyframes ripple-anim {
    0% {
        width: 0px;
        height: 0px;
        opacity: 0.5;
    }

    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* Blank Canvas Area */
.blank-canvas {
    padding: 6rem 2rem;
    text-align: center;
    border-style: dashed;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 15, 0.3);
}

.blank-canvas:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(10, 10, 15, 0.5);
    transform: translateY(0);
    box-shadow: var(--glass-shadow);
}

.awaiting-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.awaiting-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
}

.awaiting-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.pulse-icon {
    color: var(--accent-2);
    animation: pulse 2s infinite;
    margin-bottom: 1rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 0 rgba(168, 85, 247, 0));
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
    }

    100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 0 rgba(168, 85, 247, 0));
    }
}

/* Sections Styling */
.content-section {
    margin-bottom: 6rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header.align-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 3rem;
}

.about-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-list {
    list-style: none;
    color: var(--text-muted);
}

.about-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}

.about-list strong {
    color: var(--text-main);
    font-weight: 600;
}

.about-text {
    color: var(--text-muted);
    line-height: 1.8;
}

.highlight-text {
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 30%;
    background: rgba(168, 85, 247, 0.3);
    z-index: -1;
    transform: skewX(-15deg);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.project-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-2);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.project-card:hover .tech-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.project-link {
    display: inline-block;
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.project-link:hover {
    color: var(--accent-2);
    text-decoration: underline;
}

/* Contact Section */
.contact-card {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.6) 0%, rgba(10, 10, 15, 0.8) 100%);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #f0f0f5;
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.2rem;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: var(--font-body);
}

.contact-btn-full:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.contact-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.2rem;
    border-radius: 12px;
    margin-top: 1rem;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
    font-family: var(--font-body);
}

.contact-btn-outline:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    main {
        padding-top: 110px;
        padding-bottom: 60px;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

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

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

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .cta-group .btn {
        width: 100%;
    }
}