/* ============================================================
   RamzanXdesigns — Minimal
   Black · Neon green accent · Type-led · Lots of space
   ============================================================ */

/* NOTE: The whole site is globally scaled to ~67% so that the
   default 100% browser view matches the proportions the design
   was tuned for at 67% zoom. The scale is baked in three ways:
     1. html { font-size: 67% }            → scales every rem
     2. every fixed px value × 0.67         → scales spacing/sizing
     3. vw / % / vh / media breakpoints     → LEFT UNCHANGED
        (they self-compensate against the viewport, so leaving
        them keeps fluid type & wrapping proportional). */

:root {
    --bg:      #000000;
    --bg-alt:  #050505;
    --green:   #74ee15;
    --white:   #ffffff;
    --text:    #f4f4f5;
    --text-2:  #a1a1aa;
    --text-3:  #52525b;
    --line:    rgba(255,255,255,0.07);
    --grid-line: rgba(116,238,21,0.14);

    --font-head: "Syne", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --maxw: 858px;
    --nav-h: 46px;
}

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

html { font-size: 67%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }

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

/* ---------- Background pattern (struck-surface grid + vignette) ----------
   Adapted from impact-headline.html, recolored to the neon-green brand.
   Fixed pseudo-elements so both pages get it with no per-page markup. */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
body::before {
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 43px 43px;
}
body::after {
    background: radial-gradient(ellipse at center, transparent 55%, var(--bg) 125%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { display: block; }
::selection { background: var(--green); color: var(--bg); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 21px; }
.accent { color: var(--green); }
.dot { color: var(--green); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 1000;
    display: flex; align-items: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
    padding: 0 21px;
}
.nav.scrolled { background: rgba(0,0,0,0.85); border-bottom-color: var(--line); }

.nav-logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}
.nav-logo { display: inline-flex; align-items: baseline; }
.nav-logo .logo-mark { color: var(--green); }
.nav-logo .logo-word { color: #fff; }
.nav-logo .logo-x {
    font-size: 1.5em;
    font-weight: 800;
    line-height: 0;
    letter-spacing: -0.02em;
}

.nav-links { margin-left: auto; display: flex; gap: 24px; }
.nav-links a {
    font-size: 0.92rem;
    color: var(--text-2);
    transition: color 0.25s;
    position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
    height: 1px; background: var(--green);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.is-current { color: var(--text); }
.nav-links a.is-current::after { transform: scaleX(1); }

.nav-toggle { display: none; flex-direction: column; gap: 3px; margin-left: auto; padding: 5px; }
.nav-toggle span { width: 16px; height: 1px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    /* Sticky so the hero stays pinned while .about rises over it (GSAP
       ScrollTrigger scrubs opacity/scale/blur on scroll). z-index:1 keeps the
       hero behind .about (z-index:2). See the prefers-reduced-motion block
       for the static fallback. */
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: var(--nav-h);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
    width: 100%;
}
.hero-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.4rem, 7.5vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 21px;
}
.hero-title .line { display: block; }
.hero-title .line-green { color: var(--white); }
.hero-title .space { width: 0.28em; display: inline-block; }

/* SplitText wrappers for the word-rise / random-character-fall loop. */
.hero-title .word,
.hero-title .char {
    display: inline-block;
    will-change: transform, opacity, filter;
    transform-origin: 50% 70%;
}
/* Override the global green ::selection just for the animating title. A char
   that fades to opacity:0 during the fall would otherwise leave its green
   selection box hanging in empty space (a "dead highlight"); a transparent,
   dark selection keeps that leftover box invisible against the black bg. */
.hero-title ::selection { background: transparent; }
.hero-title ::-moz-selection { background: transparent; }
.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text-2);
    max-width: 281px;
    margin-bottom: 30px;
    font-weight: 300;
}
/* Inline wrapper that carries the highlighter background. Because it flows
   with the text, each wrapped line gets its OWN separate green box (not one
   giant rectangle spanning all lines). box-decoration-break:clone keeps the
   padding on every line's box. */
/* Each visual line of the subtitle is wrapped in a .hero-sub-line span (by JS,
   which measures offsetTop to detect line breaks). The green marker wipes in
   left-to-right on each line, and JS staggers them so line 1 finishes before
   line 2 begins. */
.hero-sub__word { display: inline; }
.hero-sub-line {
    background-image: linear-gradient(var(--green), var(--green));
    background-size: 0% 100%;
    background-position: left center;
    background-repeat: no-repeat;
    padding: 1px 4px;
    border-radius: 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size 0.5s var(--ease), color 0.4s var(--ease), font-weight 0.4s var(--ease);
}
.hero-sub-line.is-highlighted {
    background-size: 100% 100%;
    /* Letters take the site background colour so they read as knocked-out holes
       in the green marker bar — matching the black surface used site-wide,
       rather than solid white text on top or fully invisible green. */
    color: var(--bg);
    font-weight: 700;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.hero-cta .arrow { transition: transform 0.3s var(--ease); color: var(--white); }
.hero-cta:hover { color: var(--green); border-color: var(--green); }
.hero-cta:hover .arrow { transform: translateX(4px); }

.hero-media {
    max-width: 390px;
    width: 100%;
    justify-self: end;
}
.hero-media img { width: 100%; height: auto; display: block; }

/* ============================================================
   PAGE HEAD (portfolio page)
   ============================================================ */
.page-head {
    padding: calc(var(--nav-h) + 54px) 0 40px;
}
.page-eyebrow {
    font-size: 0.8rem;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 12px;
}
.page-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 13px;
}
.page-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-2);
    max-width: 348px;
    font-weight: 300;
}

/* ============================================================
   WORK
   ============================================================ */
.work { padding: 54px 0 80px; }

.filters {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-bottom: 38px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}
.filter-btn {
    font-size: 0.88rem;
    color: var(--text-2);
    padding: 5px 0;
    margin-right: 19px;
    position: relative;
    transition: color 0.25s;
}
.filter-btn::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -17px;
    height: 1px; background: var(--green);
    transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.is-active { color: var(--text); }
.filter-btn.is-active::after { transform: scaleX(1); }

/* Masonry gallery */
.gallery { columns: 3; column-gap: 11px; }
.gallery-item {
    break-inside: avoid;
    margin-bottom: 11px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--bg-alt);
    transition: opacity 0.4s var(--ease);
}
.gallery-item img { width: 100%; height: auto; transition: transform 0.6s var(--ease), filter 0.4s var(--ease); filter: grayscale(20%); }
.gallery-item:hover img { transform: scale(1.04); filter: grayscale(0); }
.gallery-item.hide { display: none; }

/* Load More */
.load-more-wrap { text-align: center; margin-top: 32px; }
.load-more {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    padding: 9px 25px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: transparent;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.load-more:hover {
    color: var(--bg);
    background: var(--green);
    border-color: var(--green);
}

/* ============================================================
   ABOUT
   ============================================================ */
/* position:relative + z-index:2 puts .about ABOVE the sticky .hero. The opaque
   black background guarantees the hero is cleanly hidden as it rises (the grid
   pattern in body::before does not bleed through here). */
.about {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 80px 0;
    border-top: 1px solid var(--line);
}
.about-inner { display: grid; grid-template-columns: 134px 1fr; gap: 40px; align-items: start; }
.about-label {
    font-size: 0.8rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding-top: 8px;
}
.about-text {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 509px;
}
/* About typing/falling-name animation */
.about__name-slot {
    display: inline-block;
    width: 0;
    height: 1.1em;
    margin-right: 0;
    vertical-align: -0.16em;
    white-space: nowrap;
    perspective: 670px;
    will-change: width, margin-right;
}
.about__name {
    display: inline-flex;
    gap: 0.22em;
    visibility: hidden;
    color: var(--green);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 19px rgba(116,238,21,0.18);
}
.about__name-word {
    display: inline-block;
    transform-origin: 50% 0%;
    backface-visibility: hidden;
    will-change: transform, opacity, filter;
}
.about__cursor {
    display: inline-block;
    width: 0.07em;
    height: 0.9em;
    margin-left: 0.08em;
    vertical-align: -0.08em;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
    .about__cursor { display: none; }
    .about__name-slot { width: auto !important; margin-right: 0.2em !important; }
    .about__name { visibility: visible !important; }
}

.about-link {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: fit-content;
    margin: 80px auto 60px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--text);
    padding-bottom: 5px;
    border-bottom: 1px solid var(--text);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.about-link span { transition: transform 0.3s var(--ease); color: var(--white); }
.about-link:hover { color: var(--green); border-color: var(--green); }
.about-link:hover span { transform: translateX(3px); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: 80px 0; text-align: center; border-top: 1px solid var(--line); }
.contact-label {
    font-size: 0.8rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 19px;
}
.contact-email {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.6rem, 5vw, 3.6rem);
    letter-spacing: -0.03em;
    display: inline-block;
    padding-bottom: 4px;
    background: linear-gradient(var(--green), var(--green)) bottom / 0 1px no-repeat;
    transition: background-size 0.4s var(--ease);
}
.contact-email:hover { background-size: 100% 1px; }

.contact-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 21px;
    margin-top: 32px;
}
.contact-links a {
    font-size: 0.95rem;
    color: var(--text-2);
    transition: color 0.25s;
}
.contact-links a:hover { color: var(--green); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 27px 0; border-top: 1px solid var(--line); }
.footer-inner {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    font-size: 0.82rem;
    color: var(--text-3);
}

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa-float {
    position: fixed; bottom: 16px; right: 16px;
    width: 35px; height: 35px;
    border-radius: 50%;
    background: var(--green);
    color: var(--bg);
    display: grid; place-items: center;
    z-index: 900;
    box-shadow: 0 3px 13px rgba(116,238,21,0.35);
    transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 17px; height: 17px; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.96);
    display: none; align-items: center; justify-content: center;
    padding: 27px;
    opacity: 0; transition: opacity 0.3s var(--ease);
}
.lightbox.open { display: flex; opacity: 1; }
.lb-figure { max-width: min(603px, 92vw); display: flex; flex-direction: column; align-items: center; }
.lb-figure img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.lb-caption { margin-top: 9px; font-size: 0.82rem; color: var(--text-3); letter-spacing: 0.03em; }

.lb-close, .lb-nav {
    position: absolute; color: var(--white);
    line-height: 1; opacity: 0.5; transition: opacity 0.25s, color 0.25s;
    user-select: none;
}
.lb-close:hover, .lb-nav:hover { opacity: 1; color: var(--green); }
.lb-close { top: 16px; right: 21px; font-size: 2.6rem; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .gallery { columns: 2; }
    .about-inner { grid-template-columns: 1fr; gap: 11px; }
    .about-label { padding-top: 0; }

    /* Hero: stack text above image on tablet/mobile. position:static (not
       sticky) because the JS "ghost-away" blur effect is disabled at this
       breakpoint — a sticky hero with no fade would just cover the sections
       below as you scroll. */
    .hero-inner { grid-template-columns: 1fr; gap: 24px; }
    .hero { position: static; min-height: auto; padding-top: calc(var(--nav-h) + 33px); padding-bottom: 33px; }
    .hero-media { max-width: min(100%, 360px); justify-self: start; }
    .about-link { margin-left: auto; margin-right: auto; }
}

@media (max-width: 640px) {
    .container { padding: 0 15px; }
    .nav { padding: 0 15px; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0;
        background: rgba(0,0,0,0.97);
        backdrop-filter: blur(20px);
        flex-direction: column; gap: 0;
        padding: 13px 15px 21px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-130%); transition: transform 0.4s var(--ease);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links a { padding: 9px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a::after { display: none; }

    .gallery { columns: 1; }
    .work { padding: 27px 0 54px; }
    .about, .contact { padding: 54px 0; }
    .hero-media { max-width: min(100%, 320px); }
    .filters { padding-bottom: 13px; margin-bottom: 24px; }
    .filter-btn { margin-right: 15px; }
    .filter-btn::after { bottom: -14px; }
    .lb-nav { font-size: 2.2rem; }
    .lb-close { font-size: 2rem; top: 8px; right: 12px; }
    .wa-float { width: 32px; height: 32px; bottom: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    /* No ghosting animation under reduced motion: put the hero back into normal
       flow so it cannot cover the sections that follow it. */
    .hero { position: static; }
}

/* ========================================
   MINIMAL CUSTOM CURSOR
======================================== */

:root {
    --cursor-green: #62f286;
    --cursor-dark: #061009;
}

/* Hide the default cursor on desktop */
@media (pointer: fine) {
    body.custom-cursor-enabled {
        cursor: none;
    }

    body.custom-cursor-enabled a,
    body.custom-cursor-enabled button,
    body.custom-cursor-enabled [data-cursor-label] {
        cursor: none !important;
    }

    /* Keep the text cursor inside form fields */
    body.custom-cursor-enabled input,
    body.custom-cursor-enabled textarea,
    body.custom-cursor-enabled [contenteditable="true"] {
        cursor: text !important;
    }
}

.custom-cursor-dot,
.custom-cursor-frame {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    will-change: transform;
}

/* Small green pixel */
.custom-cursor-dot {
    --cursor-scale: 1;

    width: 4px;
    height: 4px;
    background: var(--cursor-green);
    box-shadow: 0 0 5px rgb(98 242 134 / 45%);
}

/* Minimal follower */
.custom-cursor-frame {
    width: 16px;
    height: 16px;
    border: 1px solid rgb(98 242 134 / 55%);
    border-radius: 3px;

    transition:
        width 180ms ease,
        height 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

/* Hover state */
.custom-cursor-frame.is-hovering {
    width: 20px;
    height: 20px;
    border-color: var(--cursor-green);
    background: rgb(98 242 134 / 5%);
}

/* Cursor label */
.custom-cursor-label {
    position: absolute;
    top: 50%;
    left: 23px;

    padding: 4px 5px;
    border-radius: 3px;

    color: var(--cursor-dark);
    background: var(--cursor-green);

    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;

    opacity: 0;
    transform: translate(4px, -50%);

    transition:
        opacity 150ms ease,
        transform 150ms ease;
}

.custom-cursor-frame.is-hovering .custom-cursor-label {
    opacity: 1;
    transform: translate(0, -50%);
}

/* Move label to the left near the screen edge */
.custom-cursor-frame.label-left .custom-cursor-label {
    right: 23px;
    left: auto;
}

/* Click animation */
.custom-cursor-dot.is-clicking {
    --cursor-scale: 0.55;
}

/* Disable custom cursor on mobile */
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
    .custom-cursor-dot,
    .custom-cursor-frame {
        display: none !important;
    }
}
