/*
  ╔══════════════════════════════════════════════════════════════════╗
  ║                                                                  ║
  ║   HI — IF YOU ARE COPYING THIS CODE, PLEASE ADD A STAR ON THE    ║
  ║   REPO →  https://github.com/nilasissen/nilasissen.github.io     ║
  ║                                                                  ║
  ║   Designed & built by Nilasis Sen. A little ★ goes a long way.   ║
  ║                                                                  ║
  ╚══════════════════════════════════════════════════════════════════╝
*/

:root {
    --bg: #050505;
    --bg-soft: #0a0a0a;
    --surface: #101010;
    --text: #ececec;
    --muted: #8a8a8a;
    --neon: #c8ff2e;
    --neon-dim: rgba(200, 255, 46, 0.14);
    --cyan: #3de7ff;
    --border: rgba(255, 255, 255, 0.08);
    --font-display: "Syne", sans-serif;
    --font-body: "Outfit", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --header-h: 4.5rem;
    --max: 72rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.mono {
    font-family: var(--font-mono);
}

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

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    animation: drift 18s var(--ease) infinite alternate;
}

.orb-a {
    width: 42vw;
    height: 42vw;
    top: -12vw;
    right: -8vw;
    background: radial-gradient(circle, rgba(200, 255, 46, 0.35), transparent 70%);
}

.orb-b {
    width: 36vw;
    height: 36vw;
    bottom: 10vh;
    left: -12vw;
    background: radial-gradient(circle, rgba(61, 231, 255, 0.22), transparent 70%);
    animation-delay: -6s;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-4%, 6%) scale(1.08); }
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.55), transparent);
    backdrop-filter: blur(8px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    transition: color 0.25s ease;
}

.brand:hover {
    color: var(--neon);
}

.brand-mark {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 12px var(--neon), 0 0 28px rgba(200, 255, 46, 0.45);
    animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.site-nav {
    display: flex;
    gap: clamp(1.25rem, 3vw, 2.25rem);
}

.site-nav a {
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
    transition: color 0.25s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.3rem;
    width: 100%;
    height: 1px;
    background: var(--neon);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
    box-shadow: 0 0 8px var(--neon);
}

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

.site-nav a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-toggle span {
    display: block;
    width: 1.1rem;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(0.25rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-0.25rem) rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 4vw, 3rem) 4rem;
    max-width: var(--max);
    margin: 0 auto;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(200, 255, 46, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 255, 46, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
}

.hero-eyebrow {
    margin: 0 0 1.25rem;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
}

.hero-name {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hero-greet {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    color: var(--muted);
}

.hero-display {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(4.2rem, 14vw, 9.5rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--text);
    text-shadow:
        0 0 40px rgba(200, 255, 46, 0.18),
        0 0 80px rgba(200, 255, 46, 0.08);
    background: linear-gradient(180deg, #fff 30%, var(--neon) 160%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    margin: 1.75rem 0 0;
    max-width: 42rem;
    font-size: clamp(1.02rem, 1.9vw, 1.15rem);
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
}

.hero-lead p {
    margin: 0 0 1rem;
}

.hero-lead p:first-child {
    color: var(--text);
    font-size: clamp(1.1rem, 2.1vw, 1.28rem);
    font-weight: 400;
}

.hero-lead p:last-child {
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 2px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-neon {
    background: var(--neon);
    color: #0a0a0a;
    border: 1px solid var(--neon);
    box-shadow: 0 0 24px rgba(200, 255, 46, 0.35);
}

.btn-neon:hover {
    box-shadow: 0 0 40px rgba(200, 255, 46, 0.55);
}

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

.btn-ghost:hover {
    border-color: var(--neon);
    color: var(--neon);
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 3rem;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.pulse {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 10px var(--neon);
    animation: blink 1.6s ease-in-out infinite;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }

/* Sections */
.section {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 4vw, 3rem);
}

.section-head {
    margin-bottom: clamp(2rem, 5vw, 3rem);
    max-width: 40rem;
}

.section-label {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neon);
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.85rem, 4.5vw, 2.85rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

/* About */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.about-portrait {
    margin: 0;
    position: relative;
}

.about-portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    background: #0a0e1a;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 1px solid var(--border);
    box-shadow: 0 0 0 1px rgba(200, 255, 46, 0.08), 0 20px 60px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.5s ease;
}

.about-portrait:hover img {
    box-shadow: 0 0 0 1px rgba(200, 255, 46, 0.35), 0 0 40px rgba(200, 255, 46, 0.12);
}

.about-portrait figcaption {
    margin-top: 0.85rem;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.about-copy p {
    margin: 0 0 1.15rem;
    color: var(--muted);
    font-size: 1.05rem;
}

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

.creds {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.cred {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.65rem 0.9rem 0.65rem 0.65rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cred:hover {
    border-color: rgba(200, 255, 46, 0.45);
    box-shadow: 0 0 24px rgba(200, 255, 46, 0.1);
}

.cred img {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
}

.cred span {
    font-size: 0.85rem;
    color: var(--text);
}

.cred-loading {
    position: relative;
    overflow: hidden;
    border-style: dashed;
    border-color: rgba(61, 231, 255, 0.35);
    background:
        linear-gradient(120deg, transparent 30%, rgba(61, 231, 255, 0.06) 50%, transparent 70%),
        var(--surface);
    background-size: 200% 100%, auto;
    animation: shimmer 2.8s ease-in-out infinite;
    cursor: default;
    pointer-events: none;
}

.cred-loading:hover {
    border-color: rgba(61, 231, 255, 0.55);
    box-shadow: 0 0 24px rgba(61, 231, 255, 0.12);
}

.cred-icon-loading {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(200, 110, 70, 0.35);
    background: rgba(200, 110, 70, 0.08);
}

.cred-claude-icon {
    width: 1.65rem;
    height: 1.65rem;
    color: #da7756;
    opacity: 0.85;
    filter: drop-shadow(0 0 6px rgba(218, 119, 86, 0.35));
    animation: icon-pulse 2.2s ease-in-out infinite;
}

.cred-spinner {
    position: absolute;
    right: -0.2rem;
    bottom: -0.2rem;
    width: 0.85rem;
    height: 0.85rem;
    border: 1.5px solid rgba(61, 231, 255, 0.25);
    border-top-color: var(--cyan);
    border-radius: 50%;
    background: var(--bg);
    animation: spin 0.9s linear infinite;
    box-shadow: 0 0 8px rgba(61, 231, 255, 0.35);
}

@keyframes icon-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
}

.cred-loading-meta {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}

.cred-loading-title {
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
}

.cred-loading-bar {
    display: block;
    width: 100%;
    max-width: 9.5rem;
    height: 3px;
    border-radius: 2px;
    background: rgba(61, 231, 255, 0.12);
    overflow: hidden;
}

.cred-loading-bar i {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--neon), transparent);
    animation: load-slide 1.6s ease-in-out infinite;
}

.cred-loading-status {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    opacity: 0.9;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes load-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

@keyframes shimmer {
    0%, 100% { background-position: 100% 0, 0 0; }
    50% { background-position: -100% 0, 0 0; }
}

/* Work */
.company-rail {
    list-style: none;
    margin: 0 0 3rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.35rem 0;
}

.company-rail li {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    letter-spacing: -0.02em;
    color: var(--muted);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
}

.company-rail li:hover {
    color: var(--neon);
    text-shadow: 0 0 18px rgba(200, 255, 46, 0.45);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.focus h3 {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.focus h3::before {
    content: "";
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.55rem;
    background: var(--neon);
    box-shadow: 0 0 10px var(--neon);
    vertical-align: middle;
}

.focus p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

/* Now */
.now-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 42rem;
}

.now-list li {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 1.02rem;
}

.now-tag {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cyan);
    padding-top: 0.2rem;
}

.juggle {
    display: inline-block;
    color: var(--neon);
    transition: transform 0.4s var(--ease);
}

.juggle.is-juggling {
    animation: juggle 0.7s var(--ease);
}

@keyframes juggle {
    0% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-10px) rotate(-4deg); }
    50% { transform: translateY(2px) rotate(3deg); }
    75% { transform: translateY(-6px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0); }
}

.now-cta {
    margin-top: 2.25rem;
}

/* Contact */
.contact-lead {
    margin: 0 0 1.5rem;
    max-width: 32rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.contact-email {
    display: inline-block;
    margin: 0 0 2.25rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.65rem, 5.5vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-decoration: none;
    color: var(--neon);
    text-shadow: 0 0 24px rgba(200, 255, 46, 0.35);
    border-bottom: 2px solid rgba(200, 255, 46, 0.45);
    transition: color 0.25s ease, text-shadow 0.25s ease, border-color 0.25s ease;
}

.contact-email:hover {
    color: #e8ff8a;
    border-color: var(--neon);
    text-shadow: 0 0 36px rgba(200, 255, 46, 0.55);
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.social-row a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    text-decoration: none;
    letter-spacing: -0.02em;
    color: var(--text);
    position: relative;
    transition: color 0.25s ease;
}

.social-row a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.1em;
    width: 100%;
    height: 2px;
    background: var(--neon);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
    box-shadow: 0 0 12px var(--neon);
}

.social-row a:hover {
    color: var(--neon);
}

.social-row a:hover::after {
    transform: scaleX(1);
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0;
}

.cycle {
    color: var(--neon);
    display: inline-block;
    min-width: 3.2em;
}

/* Responsive */
@media (max-width: 860px) {
    .about-layout,
    .focus-grid {
        grid-template-columns: 1fr;
    }

    .about-portrait {
        max-width: 28rem;
        margin-inline: auto;
    }
}

@media (max-width: 720px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        gap: 0;
        padding: 1rem 1.25rem 1.5rem;
        background: rgba(5, 5, 5, 0.96);
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s var(--ease), opacity 0.35s ease;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav a {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
        font-size: 1.1rem;
    }

    .now-list li {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .hero-display {
        font-size: clamp(3.5rem, 18vw, 5.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orb,
    .brand-mark,
    .pulse,
    .juggle.is-juggling,
    .cred-loading,
    .cred-spinner,
    .cred-claude-icon,
    .cred-loading-bar i {
        animation: none;
    }
    .cred-loading-bar i {
        width: 55%;
        background: var(--cyan);
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
