:root {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --section-spacing: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 1000;
    transition: padding 0.3s ease, background 0.3s ease;
}

nav.scrolled {
    padding: 16px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    position: relative;
    font-weight: 500;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::before {
    width: 100%;
}

.hamburger,
.mobile-menu {
    display: none;
}

.btn-nav {
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-left: 10px;
    border-color: var(--glass-border);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-nav:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

/* Sections */
section {
    padding: var(--section-spacing) 0;
    opacity: 0;
    /* Hidden initially for GSAP */
}

/* Hero */
#hero {
    min-height: 100vh;
    /* Changed from height to min-height */
    height: auto;
    display: flex;
    align-items: center;
    position: relative;
    opacity: 1;
    /* Visible initially */
    padding-top: 0;
}

.hero-btns {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    /* Replaces inline margin */
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.intro-label {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn:hover {
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn:hover::before {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

.btn-outline::before {
    background: var(--text-muted);
}

.btn-outline:hover {
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Profile Photo */
.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    margin-bottom: 2rem;
    display: block;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
}

/* Skills */
.skills-wrapper {
    margin-top: 2rem;
}

.skill-category {
    margin-bottom: 24px;
}

.skill-category h4 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #fff;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    /* Limit max width */
    gap: 32px;
    justify-content: center;
    /* Center the cards */
}

.project-card {
    background: #111;
    /* Darker background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15);
}

.project-img-wrapper {
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #fff;
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    flex-grow: 1;
}

.btn-visit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: auto;
    /* Push to bottom */
}

.btn-visit:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
    position: relative;
    border-left: 1px solid #333;
    padding-left: 32px;
}

.experience-item {
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.exp-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
    font-family: monospace;
}

.exp-role {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.exp-company {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 16px;
    display: block;
}

.exp-desc ul {
    list-style-type: none;
}

.exp-desc li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.exp-desc li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Contact */
.contact-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.contact-text {
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 32px;
    border-radius: 16px;
    transition: all 0.3s ease;
    opacity: 1;
    /* Ensure visible fallback */
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    /* Slight brighten on hover */
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: inline-block;
    /* Fix for some font awesome positioning */
}

.contact-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: #fff;
    /* Enforce white color */
}

.contact-card p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    /* Enforce muted color */
}

.btn-text {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.btn-text:hover {
    border-bottom-color: var(--accent);
    letter-spacing: 0.5px;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 2000;
        padding: 10px;
    }

    .hamburger span {
        width: 30px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }

    /* Mobile Menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        z-index: 1500;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .mobile-menu.active {
        right: 0;
    }

    .close-menu {
        position: absolute;
        top: 24px;
        right: 24px;
        font-size: 2rem;
        cursor: pointer;
        color: var(--accent);
    }

    .mobile-nav-links {
        list-style: none;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .mobile-link {
        font-size: 1.5rem;
        font-weight: 600;
    }

    /* Hero Mobile */
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 120px;
        /* More padding top */
        padding-bottom: 60px;
        /* Space at bottom */
    }

    .hero-title {
        font-size: 2.5rem;
        /* Smaller title */
        word-wrap: break-word;
        /* Prevent overflow */
    }

    .profile-photo {
        margin: 0 auto 2rem auto;
        /* Center photo */
        width: 120px;
        height: 120px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        align-items: center;
        justify-content: center;
        opacity: 1;
        /* Fallback visibility */
    }

    .hero-btns .btn,
    .hero-btns .btn-outline {
        margin: 0;
        width: 100%;
        max-width: 280px;
        text-align: center;
        display: flex;
        /* Ensure flex behavior */
        justify-content: center;
        align-items: center;
    }

    /* Grid Adjustments */
    .about-grid,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        padding: 0 16px;
    }
}