/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #6e6e80;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border: rgba(255, 255, 255, 0.06);
    --success: #22c55e;
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background: var(--accent);
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s, opacity 0.15s;
    opacity: 0.5;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 4rem 4rem;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-greeting {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.title-line.accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 450px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ===== CODE WINDOW ===== */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

.code-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.code-content {
    padding: 1.5rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.token-keyword { color: #c678dd; }
.token-name { color: #e5c07b; }
.token-op { color: #56b6c2; }
.token-prop { color: #e06c75; }
.token-str { color: #98c379; }
.token-bool { color: #d19a66; }

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 2s ease infinite;
}

/* ===== SECTIONS ===== */
section {
    padding: 6rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.section-num {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
}

/* ===== ABOUT ===== */
.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.image-frame {
    position: relative;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent);
    border-radius: 16px;
    opacity: 0.3;
}

.image-placeholder {
    background: var(--bg-tertiary);
    border-radius: 12px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.image-placeholder svg {
    width: 60%;
    height: 60%;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.skill-category {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.8rem;
}

.skill-category h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.skill-item span::after {
    content: attr(data-level)'%';
    color: var(--text-muted);
    font-size: 0.8rem;
}

.skill-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    width: 0;
    transition: width 1.2s ease;
}

/* ===== EXPERIENCE ===== */
.experience {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.8rem;
    transition: border-color 0.3s;
}

.timeline-content:hover {
    border-color: var(--accent);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0.5rem 0 0.2rem;
}

.timeline-company {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-content p:last-child {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.project-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 4rem;
    opacity: 0.9;
    transform: scale(1);
    transition: transform 0.3s;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
}

.project-info {
    padding: 1.8rem;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-info > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.project-links {
    display: flex;
    gap: 1.2rem;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.project-link:hover {
    color: var(--accent-hover);
}

/* ===== CONTACT ===== */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, transform 0.3s;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-quote {
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== REVEAL ANIMATIONS ===== */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== KEYFRAMES ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollWheel {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.3; transform: translateY(8px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 7rem 2rem 4rem;
        gap: 3rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-visual {
        order: -1;
    }

    .about-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}
