:root {
    --primary: #00f2ff;
    --primary-dim: rgba(0, 242, 255, 0.15);
    --bg-color: #020202;
    --glass-bg: rgba(10, 10, 15, 0.3);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #888888;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

::selection {
    background: var(--primary);
    color: #000;
}

/* 3D Canvas fixed to background */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

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

/* Typography */
.highlight {
    color: var(--primary);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    position: fixed;
    width: 90%;
    top: 20px;
    left: 5%;
    z-index: 100;
    /* Soften the glass for nav */
    background: rgba(10, 10, 15, 0.6);
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

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

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary);
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 110;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text-main);
    transition: transform 0.3s, opacity 0.3s;
}

.navbar.open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Layout Containers */
.scroll-container {
    position: relative;
    z-index: 1;
}

.section-padding {
    min-height: 100vh;
    padding: 120px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-wrapper {
    max-width: 800px;
    width: 100%;
}

/* Hero Section */
.hero .headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.availability .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

/* fade-up default: fully visible (no-JS safe). JS animates hidden -> visible. */
.fade-up {
    opacity: 1;
    transform: none;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--text-main);
    color: #000;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 242, 255, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-text {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
}

.btn-text:hover {
    text-decoration: underline;
}

/* About / Skills Section */
.right-align {
    align-items: flex-end;
}

.about .content-wrapper {
    padding: 4rem;
    width: 100%;
    max-width: 800px;
}

.about .desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: left;
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

.skill-category p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Projects Section */
.projects .content-wrapper {
    max-width: 1000px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    padding: 3rem;
    text-align: left;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 242, 255, 0.3);
}

.project-tech {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.project-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    margin: 0.5rem 0 1rem 0;
}

.project-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* Journey / Timeline Section */
.journey .content-wrapper {
    text-align: left;
}

.timeline {
    display: grid;
    gap: 2rem;
    margin-top: 2.5rem;
}

.timeline-card {
    padding: 2rem;
    border-left: 3px solid var(--primary);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.timeline-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 255, 0.6);
}

.timeline-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    background: var(--primary-dim);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 30px;
    padding: 4px 12px;
    margin-bottom: 1rem;
}

.timeline-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.timeline-meta {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline-card p:last-of-type {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Contact Section */
.center-align {
    align-items: center;
    text-align: center;
}

.contact .content-wrapper {
    padding: 5rem 3rem;
    max-width: 600px;
}

.contact .desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Accessibility / UX */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-padding {
        padding: 90px 5%;
    }

    .about .content-wrapper,
    .project-card,
    .contact .content-wrapper {
        padding: 2rem;
    }

    .navbar {
        padding: 1rem;
        width: 96%;
        left: 2%;
    }

    /* Hamburger menu visible */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(75vw, 300px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(5, 5, 10, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        transform: translateX(100%);
        transition: transform 0.35s ease;
        font-size: 1.2rem;
    }

    .navbar.open .nav-links {
        transform: translateX(0);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-up {
        opacity: 1;
        transform: none;
    }
}