@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap');

:root {
    --bg-color: hsl(260, 87%, 3%);
    --surface-color: hsl(260, 40%, 6%);
    --surface-hover: hsl(260, 30%, 10%);
    --text-primary: hsl(40, 6%, 95%);
    --text-secondary: hsl(40, 6%, 82%);
    --text-muted: hsl(40, 4%, 50%);
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-amber: #fcd34d;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-headline: 'General Sans', 'Inter', sans-serif;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== HERO BACKGROUND IMAGE ===== */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.7;
}

/* ===== LIQUID GLASS ===== */
.liquid-glass {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.45) 0%,
        rgba(255,255,255,0.15) 20%,
        rgba(255,255,255,0) 40%,
        rgba(255,255,255,0) 60%,
        rgba(255,255,255,0.15) 80%,
        rgba(255,255,255,0.45) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== LINKS ===== */
a {
    text-decoration: none;
    color: var(--accent-purple);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-amber);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* ===== HEADER / NAV ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

header.scrolled {
    background-color: rgba(6, 3, 18, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-divider {
    height: 1px;
    margin-top: 3px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.logo:hover {
    color: var(--accent-purple);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.4rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.04);
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}

/* ===== HERO ===== */
.hero-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-color);
}

/* Gradient overlays for readability */
.hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(6,3,18,0.85) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(6,3,18,0.3) 0%, rgba(6,3,18,0.0) 40%, rgba(6,3,18,0.8) 90%, var(--bg-color) 100%);
    pointer-events: none;
}

.hero {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    padding-top: 80px;
}

.hero-headline {
    font-family: var(--font-headline);
    font-size: clamp(4rem, 14vw, 13rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.024em;
    margin-bottom: 0;
}

.hero-headline .gradient-text {
    background-image: linear-gradient(to left, #6366f1, #a855f7, #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 520px;
    margin-top: 12px;
    opacity: 0.8;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 28px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 6px 30px var(--accent-glow);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.1);
}

/* ===== MARQUEE (Skills) at bottom of hero ===== */
.marquee-section {
    position: relative;
    z-index: 2;
    padding-bottom: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.marquee-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
    min-width: 120px;
}

.marquee-track {
    overflow: hidden;
    flex: 1;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-inner {
    display: flex;
    gap: 4rem;
    animation: marqueeScroll 25s linear infinite;
    width: max-content;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.marquee-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.marquee-item span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== CONTENT SECTIONS ===== */
main {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 7rem 0;
}

.section-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 3.5rem;
    opacity: 0.8;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    text-align: center;
}

/* Traits */
.traits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

.trait-card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.trait-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.08);
}

.trait-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.trait-card h3 {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.trait-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    transition: transform var(--transition-slow), border-color var(--transition-fast), box-shadow var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle);
}

.project-card h3 {
    font-family: var(--font-headline);
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.tech-stack {
    font-size: 0.75rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.project-card p:not(.tech-stack) {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.btn-text:hover {
    color: var(--accent-purple);
    transform: translateX(3px);
}

/* ===== SKILLS ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-category {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    transition: border-color var(--transition-fast);
}

.skill-category:hover {
    border-color: rgba(168, 85, 247, 0.2);
}

.skill-category h3 {
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.skill-list li {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    font-size: 0.93rem;
    font-weight: 500;
    transition: transform var(--transition-fast);
}

.skill-list li:hover {
    transform: translateX(6px);
}

.skill-list li::before {
    content: "▹";
    color: var(--accent-purple);
    margin-right: 12px;
    font-size: 0.9rem;
}

/* AI Approach */
.ai-approach {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    margin-top: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.ai-approach h3 {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ai-approach p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-subtle);
}

footer p {
    color: var(--text-secondary);
    max-width: 450px;
    margin: 0 auto 2rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.social-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    transition: color var(--transition-fast);
}

.social-links a:hover {
    color: var(--text-primary);
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-purple));
    transition: width var(--transition-fast);
    border-radius: 2px;
}

.social-links a:hover::after {
    width: 100%;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.2);
    margin-bottom: 0;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.modal.active {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    background-color: var(--surface-color);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 90%;
    max-width: 580px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-btn {
    color: var(--text-muted);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.04);
}

.close-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255,255,255,0.08);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    padding-right: 3rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    font-weight: 600;
}

.modal-body h4 {
    color: var(--accent-purple);
    font-size: 0.8rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.2rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-cta {
        display: none;
    }

    .hero-headline {
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .hero {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    section {
        padding: 5rem 0;
    }

    .traits-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn-primary, .btn-ghost {
        width: 100%;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .social-links {
        gap: 2rem;
    }

    .marquee-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .marquee-label {
        min-width: unset;
    }
}
