/* Global Styles */
body {
    background-color: var(--bg-color);
    /* Subtle radial gradient for depth - "Spotlight" effect */
    background-color: var(--bg-color);
    /* Dynamic canvas will handle the background */
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv05", "cv08", "ss01";
}

h1,
h2,
h3,
h4,
.eyebrow,
.tagline,
.nav-links a {
    font-family: var(--font-main);
}

h2,
h3 {
    font-family: var(--font-main);
    /* Switched back to Inter for cleaner look */
    letter-spacing: -0.03em;
    /* Tight tracking for modern feel */
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.container {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .container {
        width: 92%;
        /* Wider container on mobile */
    }
}

.section {
    padding: var(--space-xl) 0;
    position: relative;
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-lg) 0;
        /* Reduced padding on mobile */
    }
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    letter-spacing: -0.04em;
    opacity: 0.9;
}

.hash {
    color: var(--accent-color);
    margin-right: 0.2rem;
    opacity: 0.6;
}

/* Navbar - Glassmorphism */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(6, 35, 29, 0.7);
    /* Translucent dark green */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
    transition: transform 0.3s var(--ease-fluid);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered again */
    text-align: center;
    /* Centered text */
    padding-top: var(--space-lg);
    position: relative;
}

/* Add a cool background mesh glow for the hero */
/* Hero background mesh glow removed in favor of global canvas */
/* .hero::before removed */

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    /* Ensure centered within flex container */
}

.eyebrow {
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    /* Adjusted lower bound */
    line-height: 1.05;
    margin-bottom: var(--space-md);
    font-weight: 800;
    letter-spacing: -0.04em;
    padding-bottom: 0.2em;
    /* Fix for clipped descenders like 'G' */
    background: linear-gradient(to right, #FFFDEE, #E3EF26);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ... existing styles ... */

/* Background Mesh Expansion */
/* Add more subtle glows further down the page */
.tagline {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    /* Centering fix */
    margin-right: auto;
    /* Centering fix */
    font-weight: 400;
}

/* ... existing styles ... */

/* Body pseudo-elements removed for canvas background */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--bg-color);
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent-glow);
}

/* About Section */
.about-content p {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.4;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.about-content p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }
}

.skill-card {
    background: rgba(12, 52, 44, 0.4);
    backdrop-filter: blur(10px);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform var(--transition-fast), background var(--transition-fast);
}

@media (max-width: 768px) {
    .skill-card {
        backdrop-filter: blur(8px);
        /* Reduced blur */
        background: rgba(12, 52, 44, 0.3);
        /* Lower opacity */
        border: 1px solid rgba(255, 255, 255, 0.08);
        /* Lighter border for visibility */
    }
}

.skill-card:hover {
    transform: translateY(-5px);
    background: rgba(12, 52, 44, 0.8);
    border-color: var(--accent-secondary);
}

.skill-card h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-size: 1.25rem;
    font-family: var(--font-mono);
}

.skill-card li {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.skill-card li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }
}

.project-card {
    background: var(--surface-color);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .project-card {
        backdrop-filter: blur(8px);
        /* Reduced blur */
        background: rgba(12, 52, 44, 0.3);
        /* Ensure consistency if surface-color is opaque */
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(227, 239, 38, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.project-card:hover {
    transform: scale(1.02);
    border-color: rgba(227, 239, 38, 0.2);
}

.project-card:hover::before {
    opacity: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-header h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 700;
}

.project-header .accent {
    color: var(--accent-color);
    font-weight: 300;
}

.github-link {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.problem-statement {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.tech-stack {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.tech-stack span {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--accent-color);
    background: rgba(7, 102, 83, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.outcome {
    font-size: 1rem;
    color: #FFFDEE;
    font-weight: 500;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

/* Timeline */
.timeline {
    border-left: 2px solid rgba(227, 239, 38, 0.2);
    padding-left: 3rem;
    margin-left: 1rem;
}

.timeline-item {
    padding-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-3rem - 6px);
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.timeline-item:hover::before {
    background: var(--accent-color);
}

/* Contact & Footer Styling */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-links a {
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.8rem 1.5rem 0.95rem 1.5rem;
    /* Extra bottom padding for descenders */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background: rgba(12, 52, 44, 0.3);
    transition: all 0.3s var(--ease-fluid);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
    /* Tighter line height for button text */
}

.social-links a:hover {
    border-color: var(--accent-color);
    background: rgba(227, 239, 38, 0.1);
    transform: translateY(-3px);
    color: var(--accent-color);
}

.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
    background: linear-gradient(to bottom, transparent, rgba(6, 35, 29, 0.8));
}

.footer p {
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* Contact */
.contact-wrapper {
    text-align: center;
}

.email-link {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-lg);
    display: inline-block;
    color: var(--text-primary);
    position: relative;
}

.email-link:hover {
    color: var(--accent-color);
}

/* Fluid Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-reveal {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-fluid) forwards;
}

/* Stagger Children */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Media Queries */
@media (max-width: 768px) {
    body {
        /* Fix mobile background scrolling issue (white bar) */
        background-attachment: scroll;
    }

    .navbar {
        display: none;
        /* Remove top navigation entirely on mobile */
    }

    .nav-links {
        display: flex;
        /* Restore display */
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.9rem;
        color: var(--text-secondary);
        padding: 0.5rem 0.8rem;
        /* Touch target size */
        background: rgba(255, 255, 255, 0.05);
        /* Slight backing for pill look */
        border-radius: 20px;
    }

    .logo {
        display: none;
        /* Hide logo on very small screens to save space for links, or keep it if space allows. 
           For this design, let's keep nav links prioritized */
    }

    .hero {
        justify-content: center;
        text-align: center;
        min-height: 85svh;
        /* Reduced from 100svh to make it smaller as requested */
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Further reduced font size */
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.8rem 2rem;
    }

    .social-links {
        flex-wrap: wrap;
        /* Allow wrapping on small screens */
        gap: 0.8rem;
    }

    .social-links a {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        /* Smaller padding */
    }

    .email-link {
        font-size: 1.25rem;
        /* Prevent email from breaking layout */
        word-break: break-word;
        hyphens: auto;
    }

    /* Mobile Card Optimizations */
    .skill-card,
    .project-card {
        padding: 1.5rem;
    }

    .skill-card h3,
    .project-header h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    /* Mobile-First Optimization (360px-430px) */

    .navbar {
        padding: 0.5rem 0.8rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .hero {
        min-height: auto;
        /* Allow content to dictate height, preventing forced scroll */
        height: 100svh;
        /* Target full viewport height */
        padding-top: 70px;
        /* Reduced from 60px + breathing room */
        align-items: center;
        /* Ensure vertical center */
        padding-bottom: 2rem;
    }

    .hero-content {
        width: 100%;
        padding: 0 1rem;
    }

    .eyebrow {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
        /* Ensure space from bottom */
    }

    .scroll-progress {
        position: fixed;
        top: 0;
        left: 0;
        width: 0%;
        height: 3px;
        background: var(--accent-color);
        z-index: 1001;
        transition: width 0.1s linear;
    }

    .section-title {
        font-size: 2.2rem;
        /* Scaled down from 3rem */
        margin-bottom: 2rem;
        /* Tighter spacing */
    }
}

/* Gradient Parallax Background */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-color);
    /* Fallback */
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

/* Base Orb: Deep Atmospheric Green */
.orb-1 {
    width: 120vw;
    height: 120vh;
    background: radial-gradient(circle, #0C342C 0%, transparent 70%);
    top: -20%;
    left: -10%;
    opacity: 0.8;
    animation: drift 25s infinite alternate ease-in-out;
}

/* Accent Orb: Primary Green -> Soft Yellow */
.orb-2 {
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--accent-secondary) 0%, var(--accent-glow) 100%);
    bottom: -10%;
    right: -20%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

/* Highlight Orb: Light Subtle Overlay */
.orb-3 {
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(227, 239, 38, 0.15) 0%, transparent 60%);
    top: 40%;
    left: 30%;
    filter: blur(60px);
    opacity: 0.4;
    animation: pulse 15s infinite alternate ease-in-out;
}

/* Ambient Animations */
@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes drift {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1) translate(-2%, 2%);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Static anchor: Darkened edges to make center motion more apparent */
    background: radial-gradient(circle at center, transparent 30%, rgba(6, 35, 29, 0.4) 100%);
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 768px) {
    .gradient-orb {
        filter: blur(50px);
        /* Reduce blur radius for performance */
    }

    /* Mobile Contrast Enhancements */
    /* Deeper base layer to create more depth */
    .orb-1 {
        background: radial-gradient(circle, #05201A 0%, transparent 70%);
        opacity: 0.9;
    }

    /* Brighter accents to pop against deeper base */
    .orb-2 {
        opacity: 0.7;
    }

    .orb-3 {
        opacity: 0.6;
    }
}