/* ════════════════════════════════════════════════════════════
   PORTFOLITE — PREMIUM DESIGN SYSTEM (SATOSHI REPLICA)
   ════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
    --font-display: 'Inter', -apple-system, sans-serif;
    --font-body:    'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;

    --c-bg:         #000000;
    --c-surface:    #0a0a0a;
    --c-card:       #0d0d0d;
    --c-border:     rgba(255,255,255,0.07);
    --c-border-hi:  rgba(255,255,255,0.18);
    --c-white:      #ffffff;
    --c-text:       rgba(255,255,255,0.85);
    --c-muted:      rgba(255,255,255,0.45);
    --c-faint:      rgba(255,255,255,0.15);

    --header-h:  76px;
    --max-w:    1160px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 9999px;
    --radius-btn: 8px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

@media (pointer: fine) {
    body, a, button { cursor: none; }
}

::selection { background: rgba(255,255,255,0.12); color: #fff; }

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

/* ── CANVAS BACKGROUND ── */
#smokeCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-noise-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: url("noise.png");
    background-size: 40px 40px;
    background-repeat: repeat;
    opacity: 0.08;
}

/* ── CUSTOM CURSOR ── */
.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, width 0.2s, height 0.2s, background 0.2s;
}
.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s, width 0.35s var(--ease-out-expo),
                height 0.35s var(--ease-out-expo), border-color 0.3s;
}
.cursor-dot.visible  { opacity: 1; }
.cursor-ring.visible { opacity: 1; }
.cursor-dot.hover    { width: 4px; height: 4px; background: rgba(255,255,255,0.5); }
.cursor-ring.hover   { width: 56px; height: 56px; border-color: rgba(255,255,255,0.45); }


/* Show native cursor and hide custom cursor when Cal.com modal is open */
html.cal-modal-open * {
    cursor: auto !important;
}
html.cal-modal-open .cursor-dot,
html.cal-modal-open .cursor-ring {
    display: none !important;
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* ── HEADER ── */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.02);
    transition: background 0.4s, border-color 0.4s, height 0.4s;
}
.header.scrolled {
    background: rgba(0,0,0,0.75);
    border-color: rgba(255,255,255,0.05);
    height: 64px;
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--c-white);
    letter-spacing: -0.025em;
    flex-shrink: 0;
}
.logo-grid { transition: transform 0.5s var(--ease-out-expo); }
.logo:hover .logo-grid { transform: rotate(90deg); }

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}
.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.01em;
    position: relative;
    padding: 6px 0;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: var(--c-white);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out-expo);
}
.nav-link:hover { color: var(--c-white); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--c-white); }
.nav-link.active::after { transform: scaleX(1); }

/* Get Template */
.btn-template {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)), 
        linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.3) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--c-white);
    transition: all 0.3s var(--ease-out-expo);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn-template:hover {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)), 
        linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.75) 100%);
    box-shadow: 
        0 0 12px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 15px;
    background: none;
    border: none;
    margin-left: auto;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--c-white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - var(--header-h));
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--c-border);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--c-muted);
    transition: color 0.25s;
}
.mobile-link:hover { color: var(--c-white); }

/* ── HERO ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-h) + 40px) 28px 60px;
    z-index: 1;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 35%;
    background: linear-gradient(to top, var(--c-bg) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    max-width: 820px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    position: relative;
    z-index: 3;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}
.badge-dot {
    width: 5px; height: 5px;
    background: var(--c-white);
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.7);
    animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(255,255,255,0.7); }
    50%       { box-shadow: 0 0 10px 3px rgba(255,255,255,0.3); }
}

/* Hero Title */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7.5vw, 5.2rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.045em;
    color: var(--c-white);
    margin-bottom: 22px;
}

/* Hero Sub */
.hero-sub {
    font-size: clamp(0.88rem, 1.8vw, 0.98rem);
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.55;
    font-weight: 300;
    max-width: 540px;
    margin-bottom: 36px;
}

/* Buttons */
.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-out-expo);
    border: 1.2px solid transparent;
}

.btn-dark {
    background-color: #060606;
    color: var(--c-white);
    border: 1.2px solid transparent;
    /* Gradient border using background-clip */
    background-image: 
        linear-gradient(#060606, #060606), 
        linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.45) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    
    box-shadow: 
        0 4px 18px rgba(0, 0, 0, 0.75),
        0 2px 8px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn-dark:hover {
    background-image: 
        linear-gradient(#060606, #060606), 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.95) 100%);
    
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1.5px);
}

.btn-submit { align-self: flex-start; gap: 10px; }
.btn-submit svg { transition: transform 0.3s; }
.btn-submit:hover svg { transform: translate(2px,-2px); }

/* Scroll row */
.scroll-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 640px;
    margin-bottom: 72px;
}
.scroll-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}
.scroll-txt {
    font-size: 0.65rem;
    color: #4a4a4a;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.scroll-mouse {
    width: 16px; height: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    padding-top: 4px;
    flex-shrink: 0;
}
.scroll-wheel {
    width: 2px; height: 5px;
    background: var(--c-white);
    border-radius: 1px;
    animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(5px); opacity: 0.25; }
}

/* Logos marquee container & track */
.logos-container {
    overflow: hidden;
    width: 100%;
    max-width: 820px;
    position: relative;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    margin: 0 auto;
}
.logos-track {
    display: flex;
    width: max-content;
    flex-shrink: 0;
    will-change: transform;
    animation: marquee 16s linear infinite;
}
.logos-group {
    display: flex;
    align-items: center;
    gap: 56px;
    padding-right: 56px;
    flex-shrink: 0;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.3333%); }
}

.logo-brand {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 500;
    color: #383838;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.25s ease, transform 0.25s ease;
}
.logo-brand:hover {
    color: rgba(255, 255, 255, 0.65);
    transform: translateY(-1px);
}
.logo-brand svg { opacity: 0.65; }

.serif-italic { font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.fancy-e {
    font-family: var(--font-display);
    font-style: normal;
    letter-spacing: -0.05em;
}
.bold-brand { font-weight: 700; letter-spacing: -0.05em; }

/* ── SECTIONS ── */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 28px;
    background: var(--c-bg);
    border-top: 1px solid rgba(255,255,255,0.02);
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-head {
    max-width: 580px;
    margin-bottom: 56px;
}

.eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 14px;
}

.section-sub {
    font-size: 0.95rem;
    color: var(--c-muted);
    line-height: 1.65;
}

/* ── ABOUT SECTION ── */
.about-section {
    background: var(--c-surface);
}
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: start;
}
.about-bio {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--c-text);
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 300;
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    font-size: 0.8rem;
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-pill);
    color: var(--c-white);
    transition: all 0.2s ease;
}
.tag:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
}
.about-subtitle {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--c-white);
    margin-bottom: 24px;
}
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-left: 20px;
}
.experience-list::before {
    content: '';
    position: absolute;
    left: 4px; top: 8px;
    bottom: 8px; width: 1px;
    background: rgba(255,255,255,0.08);
}
.exp-item {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}
.exp-dot {
    position: absolute;
    left: -20px;
    width: 9px; height: 9px;
    background: #000;
    border: 2px solid var(--c-white);
    border-radius: 50%;
}
.exp-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.exp-company {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-white);
}
.exp-role {
    font-size: 0.82rem;
    color: var(--c-muted);
}
.exp-date {
    font-size: 0.82rem;
    color: var(--c-muted);
}

/* ── SERVICES BENTO GRID ── */
:root {
    --theme-web: #00f2fe;
    --theme-sys: #7928ca;
    --theme-ai: #00dfd8;
    --theme-game: #ff007f;
}

.services-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    margin-top: 40px;
}

/* Bento Card Base */
.bento-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease-out-expo);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.015) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.bento-card:hover {
    border-color: var(--c-border-hi);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02);
    transform: translateY(-4px);
}

.bento-card:hover::before { opacity: 1; }

/* Grid Spanning on Desktop */
.bento-card.web-dev {
    grid-column: span 2;
}

.bento-card.system-design {
    grid-row: span 2;
    justify-content: flex-start;
    gap: 16px;
}

/* Card Header Meta */
.bento-card-meta {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.bento-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}

.bento-card:hover .bento-card-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.bento-card.web-dev:hover .bento-card-icon { color: var(--theme-web); }
.bento-card.system-design:hover .bento-card-icon { color: var(--theme-sys); }
.bento-card.ai-integration:hover .bento-card-icon { color: var(--theme-ai); }
.bento-card.game-dev:hover .bento-card-icon { color: var(--theme-game); }

.bento-card-text h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--c-white);
    margin-bottom: 6px;
}

.bento-card-text p {
    font-size: 0.8rem;
    color: var(--c-muted);
    line-height: 1.5;
}

/* Widgets Container */
.bento-widget {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #040404;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* 1. Web Dev Widget (Terminal Console) */
.web-widget {
    flex-grow: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.bento-browser {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bento-browser .browser-header {
    background: #0a0a0a;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.bento-browser .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.bento-browser .dot.red { background: #ff5f56; }
.bento-browser .dot.yellow { background: #ffbd2e; }
.bento-browser .dot.green { background: #27c93f; }

.bento-browser .browser-address {
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    padding: 1px 12px;
    font-size: 0.65rem;
    color: var(--c-muted);
    font-family: monospace;
    flex-grow: 1;
    text-align: left;
}

.bento-browser .browser-body {
    padding: 12px;
    font-family: monospace;
    font-size: 0.72rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.7);
    text-align: left;
    flex-grow: 1;
    overflow: hidden;
}

.terminal-logs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100px;
    overflow-y: auto;
}

.text-muted { color: var(--c-muted); }
.text-green { color: #50fa7b; }
.text-yellow { color: #ffbd2e; }

/* 2. System Design Widget (Vertical Flow) */
.sys-widget {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    height: auto;
}

.vertical-architecture {
    width: 100%;
    height: 100%;
}

.vertical-architecture .sys-svg {
    font-family: var(--font-body);
}

.vertical-architecture .node-circle {
    fill: #080808;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1;
    transition: stroke 0.3s;
}

.vertical-architecture .node-rect {
    fill: #080808;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1;
    transition: stroke 0.3s;
}

.vertical-architecture .node-text {
    fill: #ffffff;
    font-size: 8px;
    font-weight: 500;
    text-anchor: middle;
    letter-spacing: 0.5px;
}

.vertical-architecture .font-small {
    font-size: 6.5px;
}

.vertical-architecture .node-subtext {
    fill: rgba(255,255,255,0.35);
    font-size: 6px;
    text-anchor: middle;
}

.status-dot-blink {
    fill: #50fa7b;
    animation: status-blink-key 1.5s infinite ease-in-out;
}

@keyframes status-blink-key {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; filter: brightness(1.2); }
}

.bento-card:hover .node-circle,
.bento-card:hover .node-rect {
    stroke: rgba(255, 255, 255, 0.25);
}

/* 3. AI Integration Widget */
.ai-widget {
    height: 100px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-ai-console {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-prompt-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-size: 0.68rem;
    color: var(--c-muted);
}

.ai-prompt-node.active {
    color: var(--c-white);
    border-color: var(--theme-ai);
    box-shadow: 0 0 10px rgba(0, 223, 216, 0.15);
}

.ai-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-faint);
}

.ai-pulse.active {
    background: var(--theme-ai);
    animation: bento-pulse-glow 2s infinite ease-in-out;
}

@keyframes bento-pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; filter: brightness(1.2); }
}

.ai-middle-flow {
    flex-grow: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
    position: relative;
    margin: 0 8px;
}

.ai-middle-flow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--theme-ai);
    animation: flow-left-to-right 2s infinite linear;
}

@keyframes flow-left-to-right {
    0% { left: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* 4. Game Development Widget */
.game-widget {
    height: 100px;
    position: relative;
}

.bento-game-viewport {
    width: 100%;
    height: 100%;
    position: relative;
}

.viewport-hud-bento {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.35);
    z-index: 5;
    pointer-events: none;
}

#bentoGameCanvas {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #08080c 0%, #000 100%);
    display: block;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .services-bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-card.web-dev,
    .bento-card.system-design {
        grid-column: span 1;
        grid-row: span 1;
    }

    .sys-widget {
        height: 180px;
    }
}

/* ── PROJECTS ── */
.projects-section { background: var(--c-surface); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.project-card,
.carousel-card { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
    perspective: 1000px;
}
.project-img {
    aspect-ratio: 1.65;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
    /* Force GPU rasterizer to strictly respect border-radius clipping */
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: -webkit-radial-gradient(white, black);
    will-change: transform;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Magnetic Spotlight Glow (from Idea 1) */
.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03) 40%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
}
.project-card:hover .project-img::after,
.carousel-card:hover .project-img::after {
    opacity: 1;
}

.project-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    color: rgba(255,255,255,0.1);
    letter-spacing: -0.02em;
    pointer-events: none;
}

/* Diagonal Shutter Curtain Reveal (from Idea 2) */
.project-hover {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 1;
    clip-path: polygon(-30% 0, -30% 0, 0% 100%, 0% 100%);
    transition: clip-path 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-hover,
.carousel-card:hover .project-hover {
    clip-path: polygon(-30% 0, 130% 0, 130% 100%, 0% 100%);
}

.project-hover-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    text-align: center;
    gap: 12px;
    width: 100%;
}

.project-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    max-width: 78%;
    text-wrap: balance;
    margin: 0 auto;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    transition-delay: 0.04s, 0.04s;
}

.project-card:hover .project-desc,
.carousel-card:hover .project-desc {
    transform: translateY(0);
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 12px;
}
.project-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--c-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, background 0.3s, border-color 0.3s, color 0.3s;
}

/* Staggered Lift for Buttons */
.project-links .project-btn:nth-child(1) {
    transition-delay: 0.1s, 0.1s, 0s, 0s, 0s;
}
.project-links .project-btn:nth-child(2) {
    transition-delay: 0.18s, 0.18s, 0s, 0s, 0s;
}

.project-card:hover .project-btn,
.carousel-card:hover .project-btn {
    transform: translateY(0);
    opacity: 1;
}

.project-btn:hover {
    background: var(--c-white);
    color: #000;
    border-color: var(--c-white);
    transform: translateY(-2px) !important;
}
.project-btn.primary {
    background: var(--c-white);
    color: #000;
    border-color: var(--c-white);
}
.project-btn.primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px) !important;
}

.project-card:hover .project-img,
.carousel-card:hover .project-img { 
    border-color: rgba(255, 255, 255, 0.3); 
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 255, 255, 0.06);
}

/* Image Base & Smooth Color Bloom */
.project-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: inherit;
    filter: grayscale(100%); 
    transform: scale(1);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s cubic-bezier(0.16, 1, 0.3, 1); 
}
.project-card:hover .project-img img,
.carousel-card:hover .project-img img { 
    transform: scale(1.06); 
    filter: grayscale(0%); 
}
.project-meta { display: flex; flex-direction: column; gap: 3px; }
.project-cat {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-faint);
}
.project-meta h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: -0.02em;
}

/* ── PROJECTS CAROUSEL (CONCEPT 3) ── */
.projects-carousel-container {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.carousel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.eyebrow-sm {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-faint);
    display: block;
    margin-bottom: 4px;
}
.carousel-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: -0.02em;
}
.carousel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.carousel-speed-hold-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--c-border);
    color: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s;
    user-select: none;
}
.carousel-speed-hold-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}
.carousel-speed-hold-btn.active,
.carousel-speed-hold-btn:active {
    background: var(--c-white);
    color: #000;
    border-color: var(--c-white);
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
}

.carousel-track-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 -4px;
    padding: 12px 4px 24px 4px;
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    cursor: grab;
    touch-action: pan-y;
}
.carousel-track-wrapper.is-dragging {
    cursor: grabbing;
}
.carousel-track {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
    animation: infiniteCarousel 28s linear infinite;
    user-select: none;
}
.carousel-track:hover,
.carousel-track.paused {
    animation-play-state: paused;
}
.carousel-group {
    display: flex;
    gap: 24px;
}
.carousel-card {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    perspective: 1000px;
}


@keyframes infiniteCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 12px));
    }
}

@media (max-width: 768px) {
    .carousel-card {
        width: 290px;
    }
}

/* ── DESIGN PROCESS ── */
.process-section {
    background: var(--c-bg);
}
.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 24px;
}
.process-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}
.step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}
.process-step h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: -0.01em;
}
.process-step p {
    font-size: 0.88rem;
    color: var(--c-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* ── STATS & GRIDS ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px 24px;
    text-align: center;
}
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    padding: 10px;
    min-width: 0;
}
.stat-card.mobile-only-stat {
    display: none;
}
.stat-val {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--c-white);
    letter-spacing: -0.03em;
}
.stat-lbl {
    font-size: 0.8rem;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stat-desc {
    font-size: 0.72rem;
    color: var(--c-muted);
    opacity: 0.6;
    margin-top: 4px;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    transition: opacity 0.3s, color 0.3s;
}
.stat-card:hover .stat-desc {
    opacity: 1;
    color: var(--c-white);
}

/* ── TESTIMONIALS & REVIEWS ── */
.testimonials-section {
    background: var(--c-bg);
    padding-bottom: 120px;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 64px;
}
.testimonials-image-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: #0d0d0d;
    aspect-ratio: 16 / 10;
}
.testimonials-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.testimonials-image-wrap:hover .testimonials-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.02);
}
.testimonials-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.testimonials-btns {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.reviews-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

/* Reviews scrolling marquee */
.reviews-marquee-wrap {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 24px 0;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    cursor: grab;
    touch-action: pan-y;
}
.reviews-marquee-wrap.is-dragging {
    cursor: grabbing;
}
.reviews-track {
    display: flex;
    width: max-content;
    flex-shrink: 0;
    will-change: transform;
    animation: reviews-marquee 45s linear infinite;
}
.reviews-track:hover {
    animation-play-state: paused;
}
.reviews-group {
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding-right: 24px;
    flex-shrink: 0;
}

.review-card {
    width: 380px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    padding: 32px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}
.review-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-white);
    flex-shrink: 0;
}
.review-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.review-meta h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-white);
}
.review-meta span {
    font-size: 0.76rem;
    color: var(--c-faint);
}
.review-text {
    font-size: 0.88rem;
    color: var(--c-muted);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    font-weight: 300;
}
.review-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    margin-top: auto;
}
.rating-num {
    font-weight: 600;
    color: var(--c-white);
}
.stars {
    color: #ffb400;
    font-size: 0.95rem;
}

@keyframes reviews-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.3333%); }
}

/* ── FAQ SECTION (ACCORDION) ── */
.faq-section {
    background: var(--c-surface);
}
.faq-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: start;
}
.faq-left {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}
.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.accordion-item {
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.accordion-item:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.025);
}
.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--c-white);
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 500;
    text-align: left;
    outline: none;
}
.chevron {
    color: var(--c-muted);
    transition: transform 0.3s var(--ease-out-expo);
    flex-shrink: 0;
}
.accordion-item.active .chevron {
    transform: rotate(180deg);
    color: var(--c-white);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out-expo);
}
.accordion-content p {
    padding: 0 24px 20px;
    font-size: 0.88rem;
    color: var(--c-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* ── CONTACT / CTA BANNER ── */
.contact-section {
    background: var(--c-bg);
    padding: 120px 28px;
}
.cta-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}
.cta-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.status-pulse {
    width: 6px; height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.8); }
}
.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    color: var(--c-white);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 40px;
    max-width: 720px;
}
.cta-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cta-email {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--c-white);
    border-bottom: 1.5px solid rgba(255,255,255,0.25);
    padding-bottom: 4px;
    transition: border-color 0.25s ease, opacity 0.25s ease;
}
.cta-email:hover {
    border-color: var(--c-white);
    opacity: 0.85;
}

/* ── FOOTER ── */
.footer {
    padding: 40px 28px;
    background: var(--c-bg);
    border-top: 1px solid rgba(255,255,255,0.04);
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-copy {
    flex: 1;
    font-size: 0.78rem;
    color: var(--c-faint);
    text-align: center;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a {
    font-size: 0.8rem;
    color: var(--c-muted);
    transition: color 0.25s;
}
.footer-links a:hover { color: var(--c-white); }

/* ── REVEAL ANIMATION ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s var(--ease-out-expo), transform 0.75s var(--ease-out-expo);
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .about-grid, .faq-grid-layout, .testimonials-grid { grid-template-columns: 1fr; gap: 48px; }
    .faq-left { position: relative; top: 0; }
    .process-steps { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 900px) {
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .nav, .btn-template { display: none; }
    .hamburger { display: flex; }
    .hero-btns { flex-direction: row; justify-content: center; gap: 12px; }
    .hero-btns .btn { width: auto; flex: 1; max-width: 140px; padding: 10px 16px; font-size: 0.8rem; white-space: nowrap; }
    .btn { width: 100%; justify-content: center; }
    .scroll-row { display: none; }
    .footer-copy { text-align: center; }
    .logos-row { gap: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .stat-card.mobile-only-stat { display: flex; }
    .desktop-only-desc { display: none !important; }

    .hero-title {
        font-size: clamp(2.35rem, 8.8vw, 3.35rem);
        line-height: 1.08;
    }
    .hero-title-line {
        white-space: nowrap;
        display: inline-block;
    }

    /* Hide inner animated widget boxes on Mobile while keeping main bento card boxes & text */
    .services-section .bento-widget {
        display: none !important;
    }
    .services-section .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .services-section *,
    .services-section *::before,
    .services-section *::after {
        animation: none !important;
    }
    .sys-svg animateMotion {
        display: none !important;
    }
}

