:root {
    --bg-color: #050505;
    /* Deep rich black */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    /* Soft gray */
    --accent-color: #3b82f6;
    /* Modern blue */
    --accent-hover: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
}

/* Background glows for premium look */
.glow-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate linear;
    pointer-events: none;
}

.glow-1 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    top: -15vw;
    left: -15vw;
}

.glow-2 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: 5vw;
    right: -10vw;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 40px);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-primary);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color) !important;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--accent-color);
}

.lang-sep {
    color: var(--glass-border);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.avatar-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.avatar-img:hover {
    transform: scale(1.05);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 5px;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero-typewriter {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-family: 'Outfit', sans-serif;
    color: var(--accent-color);
    margin-bottom: 35px;
    height: 3rem;
    /* Prevents layout shift */
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent-color);
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-description {
    color: var(--text-secondary);
    max-width: 600px;
    font-size: 1.15rem;
    margin-bottom: 45px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 14px 32px;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: inline-block;
}

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

/* Projects Preview */
.projects-preview {
    padding: 120px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

.link-arrow {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.3s;
}

.link-arrow:hover {
    color: var(--text-primary);
}

.link-arrow span {
    transition: transform 0.3s ease;
}

.link-arrow:hover span {
    transform: translateX(5px);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.bento-item {
    padding: 40px 30px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 250px;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.bento-icon {
    margin-bottom: 20px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-icon {
    transform: scale(1.1);
}

.bento-item h3 {
    font-size: 1.7rem;
    margin-bottom: 12px;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

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

.popup-content.split {
    display: flex;
    width: 90%;
    max-width: 900px;
    padding: 0;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-overlay.active .popup-content.split {
    transform: translateY(0) scale(1);
}

.split-info {
    padding: 60px 50px;
    width: 45%;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--glass-border);
}

.split-info h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.split-info p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.split-form {
    padding: 60px 50px;
    width: 55%;
    position: relative;
    background: transparent;
}

.close-popup-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-popup-btn:hover {
    color: var(--text-primary);
}

.split-form h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.06);
}

#form-status {
    margin-top: 15px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .popup-content.split {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }

    .split-info,
    .split-form {
        width: 100%;
        border-right: none;
    }

    .split-info {
        border-bottom: 1px solid var(--glass-border);
        padding: 40px;
    }

    .split-form {
        padding: 40px;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Transform hamburger to X */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 5%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links a:not(.btn-primary) {
        font-size: 3rem;
        font-weight: 700;
    }

    .nav-links .btn-primary {
        font-size: 1.5rem;
        padding: 15px 30px;
    }

    /* Center logo normally */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

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

    .hero {
        padding-top: 100px;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Footer Section */
.site-footer {
    margin-top: 100px;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 80px 5% 40px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-info {
    flex: 1;
    min-width: 300px;
}

.footer-info h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.footer-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
}

.footer-form {
    flex: 1;
    min-width: 320px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.footer-form h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.footer-bottom {
    max-width: 1100px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Specific Social Link Hovers */
.social-links a.social-ph:hover {
    color: #da552f !important; /* Product Hunt Orange */
}

.social-links a.social-x:hover {
    color: #ffffff !important; /* X White */
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}