/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #050505;
    --surface-color: #0f0f0f;
    --border-color: #222222;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent-primary: #ccff00; /* Acid Lime */
    --accent-secondary: #7c3aed; /* Electric Violet */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom one */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.text-muted {
    color: var(--text-muted);
}

.accent-text {
    color: var(--accent-primary);
}

/* --- CUSTOM CURSOR --- */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: var(--accent-primary);
    opacity: 0.8;
    border: none;
}

/* --- MOUSE GLOW --- */
.mouse-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(204, 255, 0, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.5s ease;
    will-change: transform, left, top;
}

/* --- ACCESSIBLE FOCUS STATES --- */
a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--accent-primary);
    border-radius: 4px;
}

/* --- REVEAL ANIMATION CLASS (controlled by JS) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- STAGGERED ANIMATIONS (BENTO GRID) --- */
/* Adjusted for 8 items */
.bento-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.bento-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.bento-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.bento-grid .reveal:nth-child(4) { transition-delay: 0.4s; }
.bento-grid .reveal:nth-child(5) { transition-delay: 0.5s; }
.bento-grid .reveal:nth-child(6) { transition-delay: 0.6s; }
.bento-grid .reveal:nth-child(7) { transition-delay: 0.7s; }
.bento-grid .reveal:nth-child(8) { transition-delay: 0.8s; }

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-list a:hover {
    color: var(--text-main);
}

/* --- HERO --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    z-index: 1; 
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-color);
    border: 2px solid var(--accent-primary);
    transition: transform 0.2s ease-out, background-color 0.3s ease, color 0.3s ease;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* --- MARQUEE --- */
.marquee-container {
    width: 100%;
    background: var(--surface-color);
    padding: 15px 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.marquee-content span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 40px;
    color: var(--text-muted);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- BENTO GRID (WORK) --- */
.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.bento-grid {
    display: grid;
    /* 3 Columns for a tighter, curated look */
    grid-template-columns: repeat(3, 1fr);
    /* 4 Rows to fit all 8 projects */
    grid-template-rows: repeat(4, 320px);
    gap: 24px;
    
    /* Constraint to prevent it from filling the whole screen width */
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-muted);
}

/* Clickable Project Link */
.project-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-image {
    width: 100%;
    height: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7), transparent);
    z-index: 2;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    line-height: 1.2;
}

/* --- CREATIVE CARD STYLING (Violet Accent) --- */
.card-creative {
    border-color: rgba(124, 58, 237, 0.3);
}

.card-creative:hover {
    border-color: var(--accent-secondary);
}

/* --- BADGE STYLES --- */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.badge.tech {
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.badge.creative {
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}

/* Grid Spans (Adjusted for 3 Columns, 4 Rows) */
.card-large {
    /* Spans 2 columns, 2 rows (Top Left) */
    grid-column: span 2;
    grid-row: span 2;
}

.card-tall {
    /* Spans 1 column, 2 rows (Top Right) */
    grid-column: span 1;
    grid-row: span 2;
}

.card-wide {
    /* Spans 2 columns, 1 row */
    grid-column: span 2;
    grid-row: span 1;
}

/* --- ABOUT --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius-lg);
    filter: grayscale(100%);
    transition: var(--transition);
}

.about-image:hover img {
    filter: grayscale(0%);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.large-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #ccc;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--accent-primary);
    color: var(--text-main);
}

/* --- CONTACT --- */
.contact-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-card h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.contact-info {
    margin-bottom: 40px;
    text-align: center;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 20px auto;
}

.email-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
    transition: opacity 0.3s ease;
}

.email-link:hover {
    opacity: 0.8;
}

.contact-socials {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    padding: 10px;
}

.social-link:hover {
    color: var(--text-main);
}

.social-link svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* --- FOOTER --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- NEW: TESTIMONIALS SECTION --- */
.testimonial-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.testimonial-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.1);
}

.testimonial-content {
    flex: 1;
    text-align: center;
    min-height: 100px; /* prevent jumping */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.review-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.5;
}

.review-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.review-name {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

.review-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.add-review-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.add-review-btn:hover {
    color: var(--accent-primary);
}

/* --- NEW: MODAL STYLES --- */
.review-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-md);
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.review-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-main);
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-form input,
.review-form textarea {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.review-form button {
    width: 100%;
    margin-top: 10px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    /* Reset spans for 2-column layout */
    .card-large, .card-tall, .card-wide {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    /* Hide custom cursor on touch devices */
    .cursor {
        display: none;
    }
    * {
        cursor: auto;
    }

    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-list {
        display: none;
    }
    
    .header-inner {
        justify-content: center;
    }
    
    .contact-card {
        padding: 40px 20px;
    }
    
    .contact-card h2 {
        font-size: 2rem;
    }
    
    .contact-info p {
        font-size: 1rem;
    }

    .email-link {
        font-size: 1.25rem; 
        word-break: break-all;
        line-height: 1.4;
    }
    
    /* Adjustments for Mobile Testimonials */
    .testimonial-slider {
        gap: 10px;
    }
    .review-text {
        font-size: 1rem;
    }

    /* --- FIX: MOBILE FOOTER --- */
    .footer {
        padding: 18px 0;
        margin-top: 40px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        font-size: 0.8rem;
    }
}