/* =========================================
   1. DESIGN TOKENS & RESET
   ========================================= */
:root {
     --gold-primary: #ffb85c; /* Brighter, more vibrant gold */
    --gold-soft: rgba(255, 184, 92, 0.15);
    --gold-glow: rgba(255, 184, 92, 0.4);
    --bg-dark: #12100e; /* Richer dark instead of flat black */
    --bg-darker: #0a0908;
    --text-main: #ffffff; /* Crisp white for main text */
    --text-muted: #c4b9ac; /* Lighter grey for readability */
    --nav-height: 72px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Accessible focus states */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--gold-primary);
    color: var(--bg-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* =========================================
   2. BACKGROUND PARTICLES
   ========================================= */
.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(229, 169, 91, 0.08), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(229, 169, 91, 0.06), transparent 40%);
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 14s ease-in-out infinite;
}
.particles::before {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(229, 169, 91, 0.22), transparent 70%);
    top: 10%; left: 8%;
}
.particles::after {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(229, 169, 91, 0.15), transparent 70%);
    bottom: 5%; right: 6%;
    animation-delay: -7s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(30px, -40px) scale(1.1); }
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.25rem, 5vw, 10%);
    background: rgba(10, 8, 6, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 169, 91, 0.1);
    transition: background 0.3s var(--ease);
}
nav.scrolled { background: rgba(10, 8, 6, 0.95); }

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
/* --- SCROLLING NAV MESSAGE --- */
.nav-marquee {
    flex: 1; /* Takes up all the empty space between logo and links */
    overflow: hidden;
    white-space: nowrap;
    margin: 0 2rem;
    position: relative;
    /* Optional: Fade out edges so text appears/disappears smoothly */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    /* The animation name, duration (20s), linear speed, infinite loop */
    animation: marquee-scroll 20s linear infinite;
}

.marquee-content span {
    color: var(--gold-primary); /* Uses your gold theme color */
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-right: 50px; /* Space between the repeated text */
}

/* The actual movement */
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Adjust for mobile screens */
@media (max-width: 900px) {
    .nav-marquee {
        margin: 0 1rem;
    }
    .marquee-content span {
        font-size: 0.85rem;
    }
}

/* Hide the marquee on small mobile screens where the hamburger menu appears */
@media (max-width: 768px) {
    .nav-marquee {
        display: none;
    }
}
.logo span { color: var(--gold-primary); font-style: italic; }

.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s var(--ease);
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold-primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--gold-soft);
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 20px; height: 2px;
    margin: 0 auto;
    background: var(--gold-primary);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   4. HERO
   ========================================= */
.hero {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--nav-height));
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% text, 50% photo */
    align-items: center;
    
    /* THIS IS THE MAGIC FIX */
    justify-content: center; /* Pulls the whole grid to the center */
    gap: 2rem; /* Tighter gap between text and photo */
    
    max-width: 1100px; /* Made this slightly smaller so it groups in the middle */
    margin: 0 auto; 
    padding: 4rem clamp(1.25rem, 5vw, 5%);
}

.hero-content { 
    max-width: 100%; /* Let it fill the 50% column */
    padding-left: 2rem; /* Pushes the text slightly right, into your green box */
}

.subtitle {
    display: inline-block;
    color: var(--gold-primary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.hero-title span { color: var(--gold-primary); font-style: italic; }

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin-bottom: 1rem;
    line-height: 1.75;
}

.location {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                background 0.25s var(--ease), color 0.25s var(--ease);
    cursor: pointer;
}
.btn-primary {
    background: var(--gold-primary);
    color: var(--bg-dark);
    box-shadow: 0 6px 24px -8px var(--gold-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px var(--gold-glow);
}
.btn-outline {
    border: 1px solid var(--gold-soft);
    color: var(--text-main);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateY(-2px);
}

.hero-image-container {
    display: flex;
    justify-content: center; /* This is the magic line that centers the photo */
    align-items: center;
    position: relative;
    width: 100%;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px; /* Prevents the photo from being too huge on wide screens */
    display: flex;
    justify-content: center;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none;
    box-shadow: none;
}

/* The glowing light behind your photo */
.hero-image-container::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(229, 169, 91, 0.4) 0%, transparent 65%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   5. NEW SECTIONS
   ========================================= */
.section-container {
    padding: 6rem 10%;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    font-weight: 400;
}
.section-title span { color: var(--gold-primary); font-style: italic; }

/* ABOUT */
.about-content {
    max-width: 800px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}
.about-content p { margin-bottom: 1.5rem; }

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.skill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gold-soft);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
                background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-primary);
    background: rgba(229, 169, 91, 0.05);
    box-shadow: 0 20px 40px -20px var(--gold-glow);
}
.skill-card h3 {
    color: var(--gold-primary);
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
    font-weight: 600;
}
.skill-card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* EXPERIENCE TIMELINE */
.timeline {
    position: relative;
    max-width: 800px;
    margin-left: 20px;
    border-left: 2px solid rgba(229, 169, 91, 0.3);
    padding-left: 40px;
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}
.timeline-dot {
    position: absolute;
    left: -51px;
    top: 5px;
    width: 20px; height: 20px;
    background: var(--bg-dark);
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    transition: transform 0.3s var(--ease);
}
.timeline-item:hover .timeline-dot { transform: scale(1.2); }
.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 0.6; transform: translate(-50%, -50%) scale(1.3); }
}
.timeline-item h3 {
    font-size: 1.35rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}
.timeline-item .company {
    display: block;
    color: var(--gold-primary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.timeline-item ul li {
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.95rem;
}
.timeline-item ul li::before {
    content: '▹';
    color: var(--gold-primary);
    position: absolute;
    left: 0; top: 0;
}

/* PROJECTS */
.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gold-soft);
    padding: 3rem;
    border-radius: 14px;
    max-width: 800px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
                box-shadow 0.35s var(--ease);
}
.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 24px 50px -24px var(--gold-glow);
}
.project-card h3 {
    font-size: 1.6rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}
.project-card p {
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.tech-stack {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tech-stack span {
    background: rgba(229, 169, 91, 0.1);
    color: var(--gold-primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(229, 169, 91, 0.3);
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    background: var(--bg-darker);
    padding: 5rem 10% 2rem;
    border-top: 1px solid rgba(229, 169, 91, 0.1);
    position: relative;
    z-index: 1;
    text-align: center;
}
.footer-content {
    max-width: 600px;
    margin: 0 auto;
}
.footer-content .section-title { margin-bottom: 1rem; }
.footer-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}
.contact-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
    word-break: break-word;
}
.contact-link:hover {
    color: var(--gold-primary);
    transform: translateX(4px);
}
.contact-link span {
    color: var(--gold-primary);
    font-weight: 600;
    margin-right: 0.5rem;
}
footer .btn-group {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
}
footer .btn-group .btn { width: 100%; max-width: 300px; }
.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.85rem;
}

/* =========================================
   7. REVEAL ON SCROLL
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   8. CUSTOM CURSOR (desktop only)
   ========================================= */
@media (hover: hover) and (pointer: fine) {
    body, a, button, .btn, .skill-card { cursor: none; }

    .cursor-dot, .cursor-ring {
        position: fixed;
        top: 0; left: 0;
        pointer-events: none;
        border-radius: 50%;
        z-index: 9999;
        will-change: transform;
    }
    .cursor-dot {
        width: 10px; height: 10px;
        background: var(--gold-primary);
        margin: -5px 0 0 -5px;
        box-shadow: 0 0 10px 2px var(--gold-glow);
        transition: width 0.2s, height 0.2s, background-color 0.2s, margin 0.2s;
    }
    .cursor-ring {
        width: 40px; height: 40px;
        border: 1px solid rgba(229, 169, 91, 0.5);
        margin: -20px 0 0 -20px;
        z-index: 9998;
        transition: width 0.3s, height 0.3s, margin 0.3s,
                    background-color 0.3s, border-color 0.3s;
    }
    body.cursor-hover .cursor-dot {
        width: 6px; height: 6px; margin: -3px 0 0 -3px;
        background: #fff;
    }
    body.cursor-hover .cursor-ring {
        width: 60px; height: 60px; margin: -30px 0 0 -30px;
        background: rgba(229, 169, 91, 0.1);
        border-color: var(--gold-primary);
    }
}

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 3rem;
    }
    .hero-content { max-width: 100%; margin: 0 auto; }
    .btn-group { justify-content: center; }
    .hero-image-container { order: -1; }
    .hero-image { width: min(240px, 60%); }
}

@media (max-width: 768px) {
    .section-container { padding: 4rem 5%; }
    .section-title { margin-bottom: 2rem; }
    .project-card { padding: 2rem; }
    .timeline { padding-left: 20px; margin-left: 10px; }
    .timeline-dot { left: -31px; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 8, 6, 0.98);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--gold-soft);
        padding: 1rem 5%;
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
        pointer-events: none;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1rem;
    }
    .nav-links a::after { display: none; }
    footer { padding: 4rem 5% 2rem; }
}

/* =========================================
   10. REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}