/* ==========================================
   VARIABLES & RESET
   ========================================== */
:root {
    --bg: #0a0a0a;
    --bg-alt: #111111;
    --text: #e8e8e8;
    --text-muted: #888888;
    --accent: #c8ff00;
    --border: #222222;
    --card: #161616;
    --radius: 12px;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

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

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ==========================================
   CUSTOM CURSOR — SVG Arrow
   ========================================== */
* { cursor: none; }

#custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform-origin: 12px 3px;
    will-change: left, top, transform;
}

/* Phosphor icon sizing */
.contact-link i,
.project-link i {
    font-size: 1.2rem;
    line-height: 1;
}

/* ==========================================
   PRELOADER
   ========================================== */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

/* ==========================================
   SCROLL PROGRESS BAR
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 9997;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
}

/* ==========================================
   NAVIGATION
   ========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 48px;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.6);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    cursor: none;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;
    cursor: none;
    transition: color 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==========================================
   HAMBURGER MENU
   ========================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: none;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 102;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   MOBILE MENU
   ========================================== */
.mobile-menu {
    position: fixed;
    inset: 0;
    padding-top: 80px;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.mobile-menu-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(20px);
    transition: color 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu.active .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-link:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { transition-delay: 0.24s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { transition-delay: 0.32s; }

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

/* ==========================================
   HERO
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 48px 80px;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Hero elements start hidden — GSAP animates them in */
.hero-greeting,
.hero-name,
.hero-title,
.hero-location,
.hero-cta {
    opacity: 0;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text);
    perspective: 600px;
}

.hero-title {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 8px;
}

.hero-location {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    opacity: 0;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 32px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    cursor: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: #d4ff33;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 255, 0, 0.2);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
}

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

.btn-resume {
    position: relative;
}

.resume-badge {
    position: absolute;
    top: -9px;
    right: -9px;
    background: #ff4444;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    pointer-events: none;
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
    padding: 120px 48px;
}

.section-alt {
    background: var(--bg-alt);
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

/* ==========================================
   ABOUT
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text);
    font-weight: 500;
}

.skill-category {
    margin-bottom: 28px;
}

.skill-category h3 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: none;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(200, 255, 0, 0.05);
}

/* ==========================================
   EXPERIENCE
   ========================================== */
.experience-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    transition: all 0.3s ease;
}

.experience-card:hover {
    border-color: rgba(200, 255, 0, 0.2);
    transform: translateY(-2px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.exp-role {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

.exp-company {
    color: var(--accent);
    font-size: 0.95rem;
    margin-top: 4px;
}

.exp-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exp-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.exp-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exp-list li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.exp-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 1px;
    background: var(--accent);
}

/* ==========================================
   PROJECTS — Horizontal Scroll
   ========================================== */
#projects {
    padding-left: 0;
    padding-right: 0;
}

.projects-title-wrap {
    padding: 0 48px;
}

.projects-h-wrapper {
    overflow: hidden;
    width: 100%;
    padding-top: 80px;
}

.projects-h-title {
    max-width: 960px;
    margin: 0 auto 40px;
}

.projects-h-track {
    display: flex;
    gap: 32px;
    padding: 0 48px;
    width: max-content;
    align-items: center;
}

.project-card-h {
    width: 62vw;
    max-width: 720px;
    min-width: 300px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    position: relative;
    overflow: hidden;
    cursor: none;
    transition: border-color 0.4s ease;
}

.project-card-h::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card-h:hover::before {
    transform: scaleX(1);
}

.project-card-h:hover {
    border-color: rgba(200, 255, 0, 0.15);
}

.project-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.project-card-h:hover .project-number {
    color: rgba(200, 255, 0, 0.12);
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    font-size: 0.75rem;
    color: var(--accent);
    padding: 3px 10px;
    border: 1px solid rgba(200, 255, 0, 0.2);
    border-radius: 100px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    cursor: none;
}

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

.project-cta-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 320px;
    min-width: 280px;
    border-style: dashed;
    text-decoration: none;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.project-cta-card:hover {
    border-color: var(--accent);
    background: rgba(200, 255, 0, 0.03);
}

.project-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.project-cta-inner > i {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.project-cta-card:hover .project-cta-inner > i {
    color: var(--accent);
}

.project-cta-card .project-name {
    margin-bottom: 0;
}

.project-cta-card .project-subtitle {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================
   EDUCATION
   ========================================== */
.education-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edu-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.3s ease;
    cursor: none;
}

.edu-card:hover {
    border-color: rgba(200, 255, 0, 0.2);
    transform: translateX(4px);
}

.edu-degree {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.edu-school {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.edu-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-section {
    text-align: center;
}

.contact-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: none;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 255, 0, 0.08);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    padding: 60px 48px 40px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: none;
}

.footer-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(200, 255, 0, 0.1);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.4;
}

/* ==========================================
   SCROLL REVEAL (initial state — GSAP animates)
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
}

/* ==========================================
   NOISE OVERLAY
   ========================================== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.4;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
/* ==========================================
   MOBILE — 768px
   ========================================== */
@media (max-width: 768px) {
    .nav {
        padding: 14px 20px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 90px 20px 48px;
        min-height: calc(100vh - 60px);
        min-height: calc(100dvh - 60px);
    }

    .hero-greeting {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

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

    .hero-location {
        margin-bottom: 32px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-cta .btn {
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.88rem;
    }

    .section {
        padding: 64px 20px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    #projects {
        padding-left: 0;
        padding-right: 0;
    }

    .projects-h-wrapper {
        min-height: auto;
        padding-top: 60px;
    }

    .projects-h-title {
        padding: 0 20px;
        margin-bottom: 24px;
    }

    .projects-h-track {
        flex-direction: column;
        width: 100%;
        padding: 0 20px 32px;
        gap: 16px;
    }

    .project-card-h {
        width: 100%;
        min-width: unset;
        padding: 24px;
    }

    .project-cta-card {
        width: 100%;
        min-width: unset;
        padding: 48px 24px;
    }

    .project-name {
        font-size: 1.3rem;
    }

    .project-desc {
        font-size: 0.88rem;
        line-height: 1.65;
        margin-bottom: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .skill-tags {
        gap: 6px;
    }

    .skill-tag {
        padding: 5px 12px;
        font-size: 0.78rem;
    }

    .experience-card {
        padding: 24px;
    }

    .exp-header {
        flex-direction: column;
    }

    .exp-meta {
        text-align: left;
    }

    .exp-role {
        font-size: 1.2rem;
    }

    .exp-list li {
        font-size: 0.88rem;
    }

    .edu-card {
        padding: 24px;
    }

    .edu-degree {
        font-size: 1.05rem;
    }

    .edu-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 4px;
    }

    .contact-text {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .contact-links {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .contact-link {
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.88rem;
    }

    .mobile-menu-link {
        font-size: 2rem;
    }

    .footer {
        padding: 32px 20px 24px;
    }

    /* Hide cursor on touch */
    #custom-cursor {
        display: none;
    }

    * {
        cursor: auto;
    }

    /* Disable noise overlay for perf */
    body::after {
        display: none;
    }
}

/* ==========================================
   MOBILE — 480px (small phones)
   ========================================== */
@media (max-width: 480px) {
    .hero-name {
        font-size: 2.4rem;
    }

    .hero {
        padding: 80px 16px 40px;
    }

    .section {
        padding: 52px 16px;
    }

    .projects-h-title {
        padding: 0 16px;
    }

    .projects-h-track {
        padding: 0 16px 28px;
    }

    .project-card-h {
        padding: 20px;
    }

    .experience-card {
        padding: 20px;
    }

    .edu-card {
        padding: 20px;
    }

    .contact-link {
        padding: 13px 20px;
    }

    .footer {
        padding: 28px 16px 20px;
    }
}
