/* ==========================================================================
   MINRI STUDIO — "ANTIGRAVITY MINIMALISM" CORE STYLESHEET
   ========================================================================== */

/* --- Design Tokens (Light Mode Default) --- */
:root {
    --bg-primary: #faf8f5;       /* Alabaster warm soft pastel white */
    --bg-secondary: #f3f0eb;     /* Airy soft sand grey */
    --bg-card: rgba(255, 255, 255, 0.45);
    --border-glass: rgba(0, 0, 0, 0.05);
    --border-glass-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #1c1917;     /* Deep warm grey-charcoal */
    --text-secondary: #6b6661;   /* Muted warm stone grey */
    --accent-rgb: 255, 142, 158; /* Soft Coral Pink RGB */
    --accent-color: rgb(var(--accent-rgb));
    --accent-glow: rgba(var(--accent-rgb), 0.15);
    --accent-glow-intense: rgba(var(--accent-rgb), 0.35);
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-display: 'Outfit', sans-serif;
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Dark Mode Override (Not just inverted - using the custom obsidian/pink palette) --- */
:root.dark-mode, body.dark-mode {
    --bg-primary: #09090b;       /* Pure deep space obsidian */
    --bg-secondary: #121214;     /* Deep charcoal gravity density */
    --bg-card: rgba(255, 255, 255, 0.02);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #f4f4f5;     /* Airy starfield white */
    --text-secondary: #a1a1aa;   /* Muted asteroid grey */
    --accent-rgb: 255, 142, 158; /* Soft Coral Pink RGB - matching light mode accent */
    --accent-color: rgb(var(--accent-rgb));
    --accent-glow: rgba(var(--accent-rgb), 0.15);
    --accent-glow-intense: rgba(var(--accent-rgb), 0.35);
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(var(--accent-rgb), 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 147, 255, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

body.dark-mode {
    background-image: none;
}

/* --- Reset & Base Settings --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    cursor: none; /* Hide default cursor to showcase custom inertial cursor */
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

/* --- Typography Helper Classes --- */
.font-light { font-weight: 300; }
.font-black { font-weight: 900; }

a, button {
    cursor: none; /* Inherits system cursor hiding */
}

/* --- Premium Glassmorphism Utility --- */
.glassmorphic {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

/* --- Custom Dual-Ring Cursor --- */
#cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
    will-change: left, top; /* updated every rAF by cursor LERP loop */
}

#cursor-ring {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, background-color 0.3s;
    will-change: left, top; /* updated every rAF by cursor LERP loop */
}

/* Cursor Interactive States */
body.cursor-hovering #cursor-dot {
    transform: translate(-50%, -50%) scale(1.667); /* GPU-accelerated size animation */
    background-color: var(--accent-color);
}

body.cursor-hovering #cursor-ring {
    transform: translate(-50%, -50%) scale(1.5625); /* GPU-accelerated size animation */
    border-color: var(--accent-color);
    background-color: rgba(var(--accent-rgb), 0.05);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3);
}

/* --- Main Navigation Header --- */
.main-header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: calc(100% - 48px);
    max-width: 1200px;
    height: 70px;
    z-index: 1000;
    border-radius: 35px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-header.nav-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    letter-spacing: 0.15em;
    display: flex;
    gap: 4px;
    transition: var(--transition-fast);
}

.logo-light {
    font-weight: 300;
}

.logo-bold {
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition-fast);
    padding: 6px 0;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item:hover::after {
    width: 100%;
}

/* Hamburger — desktop: hidden; mobile styles are in the 768px media query */
.hamburger-btn {
    display: none;
}

/* Mobile nav dropdown — desktop: never shown */
.mobile-nav {
    display: none;
}

.btn-contact {
    border: 1px solid var(--border-glass);
    padding: 10px 20px;
    border-radius: 20px;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.01);
}

.btn-contact:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(var(--accent-rgb), 0.03);
}

/* --- Hero Section & 3D Centerpiece --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    overflow: hidden;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;          /* Floats right above body background, below sections */
    pointer-events: none; /* Let all mouse events pass straight through to page details */
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    pointer-events: none; /* Pass mouse events to the 3D sculpture behind */
    will-change: transform, opacity; /* promoted to GPU layer — parallax on scroll */
}

.hero-tagline {
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: var(--accent-color);
    margin-bottom: 24px;
    text-shadow: 0 0 10px var(--accent-glow);
    opacity: 0;
    transform: translateY(95px); /* Starts offset to match centered title visual position */
}

.hero-title {
    font-family: var(--font-family-display);
    font-size: 5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    will-change: letter-spacing;
    
    /* Center it vertically on page load by offsetting the tagline/subtitle height differences */
    transform: translateY(75px);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), letter-spacing 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.title-container {
    position: relative;
    display: inline-flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: fit-content;
    margin: 0 auto;
}

.title-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    white-space: nowrap;
    width: fit-content;
    margin: 0 auto;
}

.hero-title-sweep {
    display: none;
}

.kinetic-text {
    display: inline-block;
    will-change: transform, letter-spacing; /* JS-driven on scroll */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px auto;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(40px);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(40px);
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.4);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    animation: scroll-gravity 2s infinite cubic-bezier(0.76, 0, 0.24, 1);
}

@keyframes scroll-gravity {
    0% { transform: translateY(-100%); }
    80%, 100% { transform: translateY(200%); }
}

/* Staggered Entrance Animations for Hero */
.hero-content.intro-complete .hero-title {
    transform: translateY(0);
}

.hero-content.intro-complete .hero-tagline {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.hero-content.intro-complete .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.hero-content.intro-complete .scroll-indicator {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

/* --- Section Formatting --- */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px;
}

.section-label {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 16px;
    text-shadow: 0 0 8px var(--accent-glow);
}

.section-title {
    font-family: var(--font-family-display);
    font-size: 3rem;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 60px;
}

/* --- Low-Gravity Scroll Reveal System --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Founder Section --- */
.founder-section {
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.founder-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
}

.founder-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.founder-bio {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 24px;
    max-width: 650px;
}

/* ==========================================================================
   FOUNDER PORTRAIT & INTERACTIVE SHOWCASE
   ========================================================================== */

/* Showcase Column organizes showcase and capsule button vertically */
.founder-showcase-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

/* Showcase container self-contains all absolute coordinates exactly in the center */
.founder-interactive-showcase {
    position: relative;
    width: 100%;
    height: 440px; /* matched to graph height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Portrait card — clean, no overflow pills.
   Uses the CSS individual `scale` property so it composes with
   the breathing-float transform (translateY/rotate) without conflict. */
.portrait-card {
    position: relative;
    z-index: 2;
    padding: 24px;
    width: 300px;
    margin: 0 auto;
    overflow: hidden;
    scale: 1.25;
    opacity: 1;
    /* Transition for scale, transform rotation, and opacity fade */
    transition: scale 0.75s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.75s cubic-bezier(0.25, 1, 0.5, 1), transform 0.75s cubic-bezier(0.25, 1, 0.5, 1);
    animation: breathing-float 8s ease-in-out infinite alternate;
}

/* Active state: portrait card dissolves and spins out of view elastically */
.founder-interactive-showcase.graph-revealed .portrait-card {
    scale: 0;
    opacity: 0;
    transform: rotate(15deg);
    pointer-events: none;
}

/* ==========================================================================
   MOLECULAR NODE GRAPH — CENTERED PANEL
   ========================================================================== */

/* Outer container for the SVG graph panel — centered absolutely behind card, expands in place */
.tech-graph-col {
    width: 360px;
    height: 440px;
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: none;
    z-index: 1;
    transform-origin: center center;
    /* Default: centered and collapsed at scale 0, opacity 0 */
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Active state: tech graph shoots out from the exact center */
.founder-interactive-showcase.graph-revealed .tech-graph-col {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   PREMIUM CAPSULE SHOWCASE TOGGLE BUTTON
   ========================================================================== */
.showcase-toggle-wrapper {
    margin-top: 8px;
    z-index: 10;
}

.showcase-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15), 
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: scale 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, color 0.4s, background-color 0.4s;
    cursor: none; /* custom cursor */
    position: relative;
    overflow: hidden;
}

.showcase-toggle-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.25), 
        0 0 15px rgba(var(--accent-rgb), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(var(--accent-rgb), 0.03);
}

.toggle-btn-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-toggle-btn:hover .toggle-btn-icon {
    transform: rotate(360deg);
}

/* Light mode overrides for capsule button */
body:not(.dark-mode) .showcase-toggle-btn {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(var(--accent-rgb), 0.4); /* Elegant light pink accent border */
    color: #1c1917; /* Crisp charcoal text */
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

body:not(.dark-mode) .showcase-toggle-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 30px var(--accent-glow);
}

/* SVG configuration */
.tech-graph-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ── LINES ───────────────────────────────────────────────── */
.g-line {
    fill: none;
    stroke-linecap: round;
    opacity: 0;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, filter 0.5s ease;
}

.g-line.draw-active {
    opacity: 1;
    stroke-dashoffset: 0 !important;
}

.g-line.draw-active.g-line-fe {
    filter: drop-shadow(0 0 4px rgba(0, 210, 230, 0.85));
}
.g-line.draw-active.g-line-be {
    filter: drop-shadow(0 0 4px rgba(255, 165, 50, 0.85));
}
.g-line.draw-active.g-line-to {
    filter: drop-shadow(0 0 4px rgba(168, 110, 255, 0.85));
}

/* Styling for line categories */
.g-line-fe { stroke: rgba(0, 210, 230, 0.45); stroke-width: 1.2px; }
.g-line-be { stroke: rgba(255, 165, 50, 0.45); stroke-width: 1.2px; }
.g-line-to { stroke: rgba(168, 110, 255, 0.45); stroke-width: 1.2px; }

/* ── NODES ───────────────────────────────────────────────── */
/* Unified transform origin at graph center (180, 220) makes them shoot outward dynamically */
.g-node {
    opacity: 1;
    transform-origin: 180px 220px;
    transform: scale(0);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--nd, 0s);
}

/* Node layout elements */
.g-circle-outer {
    fill: none;
    stroke-width: 1.5px;
    stroke: currentColor;
}
.g-circle-inner-ring {
    fill: none;
    stroke-width: 1.5px;
    stroke: currentColor;
    opacity: 0.6;
}

/* Leaf tech labels cleanly offset to prevent text overlap */
.g-leaf-label {
    font-family: var(--font-family);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-anchor: middle;
    fill: currentColor;
    opacity: 0.85;
}

/* ── COLOR CATEGORIES ────────────────────────────────────── */
.g-node-fe { color: rgba(0, 210, 230, 0.9); }
.g-node-be { color: rgba(255, 165, 50, 0.9); }
.g-node-to { color: rgba(168, 110, 255, 0.9); }

.g-node-logo .g-circle-outer { stroke-width: 2px; }
.g-node-logo .g-circle-inner-ring { stroke-width: 2px; }

/* ── ACTIVE STATE: scale 1 nodes & draw lines ────────────── */
.founder-interactive-showcase.graph-revealed .g-node {
    opacity: 1;
    transform: scale(1);
}
.founder-interactive-showcase.graph-revealed .g-line {
    opacity: 1;
    stroke-dashoffset: 0 !important;
}

/* ── IDLE FLOAT after reveal (graph-floating class added by JS) ── */
.tech-graph-col.graph-floating .tech-graph-svg {
    animation: svg-molecular-float 6s ease-in-out infinite alternate;
}

@keyframes svg-molecular-float {
    0% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-8px) translateX(3px); }
    100% { transform: translateY(0px) translateX(0px); }
}

/* Individual node zero-gravity pulse & float phase delayed dynamically */
.tech-graph-col.graph-floating .g-node {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: var(--cx) var(--cy);
    animation: node-pulse 5s ease-in-out infinite alternate;
    animation-delay: calc(var(--nd, 0s) * 0.8);
    cursor: pointer;
}

.tech-graph-col.graph-floating .g-node:hover {
    animation-play-state: paused;
}

.tech-graph-col.graph-floating .g-node .g-node-visual {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: var(--cx) var(--cy);
}

.tech-graph-col.graph-floating .g-node:hover .g-node-visual {
    transform: scale(1.3);
}

/* Hover micro-interactions for outer circle, inner circle, and text label */
.tech-graph-col.graph-floating .g-node .g-circle-outer,
.tech-graph-col.graph-floating .g-node .g-circle-inner-ring,
.tech-graph-col.graph-floating .g-node .g-leaf-label {
    transition: stroke-width 0.4s ease, stroke 0.4s ease, fill 0.4s ease, filter 0.4s ease, font-weight 0.4s ease;
}

.tech-graph-col.graph-floating .g-node:hover .g-circle-outer {
    stroke-width: 3.5px;
    stroke: var(--accent-color) !important;
    filter: drop-shadow(0 0 6px var(--accent-glow-intense));
}

.tech-graph-col.graph-floating .g-node:hover .g-circle-inner-ring {
    stroke-width: 2.5px;
    stroke: var(--accent-color) !important;
}

.tech-graph-col.graph-floating .g-node:hover .g-leaf-label {
    fill: var(--text-primary) !important;
    font-weight: 900;
}

@keyframes node-pulse {
    0%   { transform: scale(1) translate(0, 0); }
    50%  { transform: scale(1.06) translate(1.5px, -1px); }
    100% { transform: scale(1) translate(0, 0); }
}

.tech-graph-col.graph-floating .g-line {
    opacity: 1;
    stroke-dashoffset: 0 !important;
}

/* ── COLLAPSE STATE ────────────────────────────────────── */
.tech-graph-col.graph-collapsing .g-node {
    transform: scale(0);
    animation: none;
    transition: transform 0.65s cubic-bezier(0.55, 0, 1, 0.45);
    transition-delay: calc(0.5s - var(--nd, 0s));
}
.tech-graph-col.graph-collapsing .g-line {
    stroke-dashoffset: 500 !important;
    transition: stroke-dashoffset 0.65s cubic-bezier(0.55, 0, 1, 0.45);
    transition-delay: calc(0.5s - var(--nd, 0s));
}

/* ── LIGHT MODE OVERRIDES ────────────────────────────────── */
body:not(.dark-mode) .g-line-fe { stroke: rgba(0, 140, 170, 0.4); }
body:not(.dark-mode) .g-line-be { stroke: rgba(180, 90, 10, 0.4); }
body:not(.dark-mode) .g-line-to { stroke: rgba(100, 50, 190, 0.4); }

body:not(.dark-mode) .g-node-fe { color: rgba(0, 140, 170, 0.9); }
body:not(.dark-mode) .g-node-be { color: rgba(180, 90, 10, 0.9); }
body:not(.dark-mode) .g-node-to { color: rgba(100, 50, 190, 0.9); }



/* Github Floating Action Button (FAB) */
.fab-wrapper {
    margin-top: 40px;
}

.linkedin-fab {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15), 
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.linkedin-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.linkedin-fab:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.25), 
        0 0 15px rgba(var(--accent-rgb), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(var(--accent-rgb), 0.03);
}

.linkedin-fab:hover .linkedin-icon {
    fill: var(--accent-color);
    transform: rotate(360deg);
}

.linkedin-fab.clicked .linkedin-icon {
    animation: spin-slow 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



.portrait-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.03);
}

.portrait-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(20px);
    animation: orbit-glow 12s linear infinite;
}

.portrait-placeholder {
    font-size: 3rem;
    letter-spacing: 0.05em;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.portrait-caption {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.caption-lead {
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.caption-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes breathing-float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(1.5deg); }
}

@keyframes orbit-glow {
    0% { transform: rotate(0deg) translate(40px) rotate(0deg); }
    100% { transform: rotate(360deg) translate(40px) rotate(-360deg); }
}

/* --- Brand Vision Section --- */
.brand-section {
    position: relative;
    background-color: transparent;
    z-index: 2;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    align-items: start;
}

.brand-card {
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Floating layer effects - Asymmetrical off-grid spacing */
.brand-card.float-layer-1 {
    transform: translateY(0);
}
.brand-card.float-layer-2 {
    transform: translateY(40px);
}
.brand-card.float-layer-3 {
    transform: translateY(-20px);
}

/* Micro-interaction on card hover */
.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.brand-card:hover {
    transform: translateY(var(--hover-y, -8px)) scale(1.01);
    border-color: var(--border-glass-hover);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.35), 
        0 0 20px rgba(var(--accent-rgb), 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-card:hover::before {
    opacity: 1;
}

.card-title {
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.card-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

/* --- Projects Bento Box Grid Section --- */
.projects-section {
    background-color: transparent;
    position: relative;
    z-index: 2;
}

/* Asymmetrical 12-Column Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 30px;
}

.bento-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Spanning Sizes */
.bento-large {
    grid-column: span 8;
    grid-row: span 2;
    min-height: 400px;
}

.bento-medium {
    grid-column: span 4;
    grid-row: span 3;
    min-height: 600px;
}

.bento-wide {
    grid-column: span 6;
    grid-row: span 1;
    min-height: 240px;
    display: flex;
    flex-direction: row;
    align-items: flex-start !important;
    gap: 20px;
}

.bento-wide .bento-info {
    flex: 1;
    align-self: flex-start !important;
}

.bento-wide .bento-visual-emu {
    flex: 0 0 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bento-small {
    grid-column: span 4;
    grid-row: span 1;
    min-height: 240px;
}

/* Hover effect on Bento card */
.bento-card:hover {
    transform: translateY(-8px) scale(1.005);
    border-color: var(--accent-color);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.35), 
        0 0 20px rgba(var(--accent-rgb), 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Inner glow dynamic backdrop */
.card-inner-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--accent-rgb), 0.07), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover .card-inner-glow {
    opacity: 1;
}

/* Bento elements style */
.bento-tag {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    text-transform: uppercase;
    z-index: 2;
    text-shadow: 0 0 5px var(--accent-glow);
}

.bento-media {
    flex-grow: 1;
    margin: 20px 0;
    min-height: 120px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    z-index: 2;
}

/* Animated visual placeholders within Bento */
.bento-mesh-canvas, .bento-graph-network {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.bento-info {
    z-index: 2;
}

.bento-title {
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.bento-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.bento-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.bento-tech {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.85;
    text-transform: uppercase;
}

.bento-title-link {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.bento-title-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}

body:not(.dark-mode) .bento-title-link:hover {
    color: var(--accent-color);
    text-shadow: none;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid var(--border-glass-hover);
    border-radius: 20px;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: none;
}

.launch-btn:hover {
    background: var(--accent-color);
    color: #09090b !important;
    box-shadow: 0 0 15px var(--accent-glow-intense);
    transform: translateY(-2px);
}

body:not(.dark-mode) .launch-btn {
    background: rgba(200, 64, 80, 0.05);
}

body:not(.dark-mode) .launch-btn:hover {
    color: #ffffff !important;
    background: #c84050;
    box-shadow: 0 0 15px rgba(200, 64, 80, 0.35);
}

/* Staggered loading state for cards */
.scroll-reveal-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    will-change: transform; /* parallax-shifted on scroll */
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Contact Section & Gravity Form --- */
.contact-section {
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 80px;
    align-items: center;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 48px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.contact-method {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 24px;
    transition: border-color 0.3s;
}

.contact-method:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.method-label {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--accent-color);
    text-transform: uppercase;
}

.method-link {
    font-size: 1.35rem;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    display: inline-block;
    width: fit-content;
    transition: var(--transition-smooth);
}

.method-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.method-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.method-link:hover::after {
    transform: scaleX(1);
}

.method-value {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* The Glowing Form Card */
.form-card {
    padding: 48px;
    position: relative;
    overflow: hidden;
    border-radius: 24px; /* Increased border radius for more premium aesthetic */
}

/* Tracking Glow Background inside Form Card */
.form-glowing-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(500px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(var(--accent-rgb), 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.form-card:hover .form-glowing-glow {
    opacity: 1;
}

#contact-form {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    font-weight: 300;
    outline: none;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

textarea.form-input {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
}

/* Focus and Active styles for Inputs */
.form-label {
    position: absolute;
    top: 18px;
    left: 24px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Line expanding transition */
.input-line {
    display: none; /* Hidden since we have a fully enclosed glowing card input border now */
}

/* Floating Label Lift */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    transform: translateY(-38px) translateX(-4px) scale(0.8);
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}

.form-input:focus {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--accent-rgb), 0.01);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Submit Button with Dynamic Glow */
.submit-btn {
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-primary);
    padding: 18px 36px;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
    width: fit-content;
}

.btn-arrow {
    width: 18px;
    height: 18px;
    fill: var(--text-primary);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px var(--accent-glow-intense);
    background: rgba(var(--accent-rgb), 0.05);
}

.submit-btn:hover .btn-arrow {
    fill: var(--accent-color);
    transform: translateX(6px);
}

/* --- Footer --- */
.main-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.footer-logo {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 0.2em;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

    .brand-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .brand-card.float-layer-2,
    .brand-card.float-layer-3 {
        transform: translateY(0);
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bento-large {
        grid-column: span 2;
    }
    
    .bento-medium {
        grid-column: span 1;
        grid-row: span 2;
        min-height: 480px;
    }
    
    .bento-wide {
        grid-column: span 2;
    }
    
    .bento-small {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .founder-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .founder-portrait-col {
        order: -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto; /* Fallback to default cursor on mobile devices for utility */
    }
    
    #cursor-dot, #cursor-ring {
        display: none; /* Hide custom cursor on mobile */
    }
    
    .main-header {
        top: 12px;
        width: calc(100% - 16px);
        padding: 0 16px;
        height: 56px;
        /* Allow height to grow when menu is open */
        overflow: visible;
    }

    /* Hide the desktop text links — keep only theme toggle */
    .nav-link-item {
        display: none !important;
    }

    .logo {
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }

    /* Hide STUDIO on mobile — logo shows as just MINRI */
    .logo-light {
        display: none;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-item {
        font-size: 0.68rem;
        letter-spacing: 0.05em;
    }

    .btn-contact {
        padding: 6px 12px;
    }

    /* ── Hamburger button ── */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        margin-left: 4px;
        flex-shrink: 0;
    }

    .hamburger-btn span {
        display: block;
        width: 20px;
        height: 1.5px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity  0.2s ease;
        transform-origin: center;
    }

    /* Animate to × when menu is open */
    .main-header.menu-open .hamburger-btn span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }
    .main-header.menu-open .hamburger-btn span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .main-header.menu-open .hamburger-btn span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    /* ── Mobile dropdown ── */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: var(--bg-card);
        backdrop-filter: blur(20px) saturate(1.4);
        -webkit-backdrop-filter: blur(20px) saturate(1.4);
        border: 1px solid var(--border-glass);
        border-radius: 20px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity    0.25s ease;
    }

    .main-header.menu-open .mobile-nav {
        max-height: 220px;
        opacity: 1;
        pointer-events: all;
    }

    .mobile-nav-item {
        display: block;
        padding: 15px 20px;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.8rem;
        font-weight: 400;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        border-bottom: 1px solid var(--border-glass);
        transition: color 0.2s ease, background 0.2s ease;
    }

    .mobile-nav-item:last-child {
        border-bottom: none;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item:active {
        color: var(--accent-color);
        background: var(--accent-glow);
    }

    .mobile-nav-cta {
        color: var(--accent-color);
        font-weight: 500;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .section-title {
        font-size: 2.25rem;
        margin-bottom: 40px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-large, .bento-medium, .bento-wide, .bento-small {
        grid-column: span 1;
        grid-row: span 1;
        min-height: auto;
    }
    
    .bento-wide {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bento-wide .bento-info,
    .bento-wide .bento-visual-emu {
        flex: none;
        width: 100%;
        height: auto; /* prevents 100% collapsing to 0 in flex-column layout */
    }

    /* Let the phone breathe at the bottom of the card */
    .bento-wide .bento-visual-emu {
        padding-bottom: 12px;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Very narrow viewports (< 420px): scale phone frames to avoid horizontal overflow.
   transform doesn't affect layout size, so we also pull up the margin to close the gap. */
@media (max-width: 420px) {
    .phone-frame,
    .calc-phone-frame {
        transform: scale(0.84);
        transform-origin: top center;
        margin-bottom: -61px; /* 380px * (1 - 0.84) ≈ 61px dead space */
    }
}

/* --- Premium Theme Toggle Switch (Capsule Slider) --- */
.theme-toggle-btn {
    background: transparent;
    border: none;
    padding: 0;
    width: 54px;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: none;
    border-radius: 14px;
    position: relative;
    overflow: visible;
}

.toggle-track {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 3px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

body:not(.dark-mode) .toggle-track {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s, box-shadow 0.4s;
    transform: translateX(0);
    position: relative;
}

body:not(.dark-mode) .toggle-thumb {
    transform: translateX(26px);
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.65);
}

/* SVG Icon styles */
.toggle-icon {
    width: 12px;
    height: 12px;
    color: #09090b;
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Switches on Light Mode */
body:not(.dark-mode) .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
    color: #ffffff;
}

body:not(.dark-mode) .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

/* --- Light Mode Visual Styling Refinements --- */
body:not(.dark-mode) #cursor-ring {
    border-color: rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode).cursor-hovering #cursor-ring {
    border-color: var(--accent-color);
    background-color: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 0 15px var(--accent-glow);
}

body:not(.dark-mode) .glassmorphic {
    background: rgba(255, 255, 255, 0.85); /* Solid translucent glass for high distinction */
    border-color: rgba(28, 25, 23, 0.09);  /* Slightly darker warm border outline */
    box-shadow: 
        0 4px 12px rgba(28, 25, 23, 0.03), 
        0 20px 40px rgba(28, 25, 23, 0.08), 
        inset 0 1px 0 rgba(255, 255, 255, 0.65); /* Elegant light-mode top glossy highlight */
}

body:not(.dark-mode) .bento-card:hover,
body:not(.dark-mode) .brand-card:hover {
    box-shadow: 
        0 6px 15px rgba(28, 25, 23, 0.06), 
        0 25px 50px rgba(28, 25, 23, 0.1), 
        0 0 25px rgba(var(--accent-rgb), 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* High-contrast node text labels for maximum legibility in light mode */
body:not(.dark-mode) .g-leaf-label {
    fill: #1c1917 !important;
    font-weight: 500;
}
body:not(.dark-mode) .g-node:hover .g-leaf-label {
    fill: var(--accent-color) !important; /* Soft rose highlight on hover */
    font-weight: 900;
}

body:not(.dark-mode) .btn-contact {
    background: rgba(0, 0, 0, 0.01);
}

body:not(.dark-mode) .btn-contact:hover {
    background: rgba(var(--accent-rgb), 0.03);
}

body:not(.dark-mode) .linkedin-fab {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body:not(.dark-mode) .linkedin-fab:hover {
    background: rgba(var(--accent-rgb), 0.04);
}

body:not(.dark-mode) .linkedin-icon {
    fill: var(--text-primary);
}

body:not(.dark-mode) .linkedin-fab:hover .linkedin-icon {
    fill: var(--accent-color);
}

body:not(.dark-mode) .portrait-placeholder {
    color: var(--accent-color);
}

body:not(.dark-mode) .portrait-image-wrapper {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.02);
}

body:not(.dark-mode) .bento-mesh-canvas,
body:not(.dark-mode) .bento-graph-network {
    opacity: 0.85; /* Soften visualizer overlays slightly for light mode */
}

body:not(.dark-mode) .scroll-line {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
}

body:not(.dark-mode) .submit-btn {
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.01);
}

body:not(.dark-mode) .submit-btn .btn-arrow {
    fill: var(--text-primary);
}

body:not(.dark-mode) .submit-btn:hover {
    border-color: var(--accent-color);
    color: #ffffff;
    background: var(--accent-color);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
}

body:not(.dark-mode) .submit-btn:hover .btn-arrow {
    fill: #ffffff;
}

body:not(.dark-mode) .main-footer {
    border-top-color: rgba(0, 0, 0, 0.04);
}

body:not(.dark-mode) .footer-container {
    color: rgba(0, 0, 0, 0.45);
}

body:not(.dark-mode) .footer-logo {
    color: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .bento-tag {
    color: #c84050; /* High-contrast pastel rose for readability */
    text-shadow: none; /* Crisp legibility */
}

/* Light Mode Form Input & Label Overrides */
body:not(.dark-mode) .form-input {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.01);
    color: var(--text-primary);
}

body:not(.dark-mode) .form-input:focus {
    border-color: rgba(0, 150, 180, 0.4);
    background: rgba(0, 150, 180, 0.01);
    box-shadow: 0 0 15px rgba(0, 150, 180, 0.08), inset 0 1px 0 rgba(0, 0, 0, 0.01);
}

body:not(.dark-mode) .form-label {
    color: rgba(0, 0, 0, 0.45);
}

body:not(.dark-mode) .form-input:focus ~ .form-label,
body:not(.dark-mode) .form-input:not(:placeholder-shown) ~ .form-label {
    color: var(--accent-color); /* Matching high-contrast elegant light-mode pink accent */
    text-shadow: none;
}

body:not(.dark-mode) .contact-method {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   SHARED PHONE HARDWARE SHELL
   Both the KneadTrack and Solaria Calculator use the same hardware frame —
   same border-radius, notch, status bar layout, and shadow. Only the app
   content inside changes.
   ========================================================================== */

.bento-visual-emu {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 100%;
}

/* Unified phone frame — charcoal hardware shell, both emulators */
.phone-frame,
.calc-phone-frame {
    width: 258px;
    height: 380px;
    border-radius: 36px;
    border: 9px solid #1a1a1c;
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    font-family: var(--font-family);
    transition: var(--transition-smooth);
}

/* Notch — hardware cutout at top center */
.phone-notch,
.calc-phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 66px;
    height: 10px;
    background: #1a1a1c;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 10;
}

/* ==========================================================================
   KNEADTRACK EMULATOR — App Content Styles
   Colours pulled directly from KneadTrack's AppColors.dart:
     Primary (navy)   #0E3B69   |  Orange CTA    #DD6B20
     Surface          #F9F9FF   |  onSurface     #111C2C
     Success bg/text  #E6F4ED / #2F855A
     Danger  bg/text  #FEE2E2 / #C53030
   ========================================================================== */

/* KneadTrack phone interior: light like the real app */
.phone-frame {
    background-color: #F9F9FF;

    /* Local tokens used by KT styles below */
    --kt-primary:      #0E3B69;
    --kt-orange:       #DD6B20;
    --kt-surface:      #FFFFFF;
    --kt-surface-low:  #F0F3FF;
    --kt-border:       #C3C6D0;
    --kt-text:         #111C2C;
    --kt-text-sub:     #43474F;
    --kt-success:      #2F855A;
    --kt-success-bg:   #E6F4ED;
    --kt-danger:       #C53030;
    --kt-danger-bg:    #FEE2E2;
}

/* KneadTrack Dark Theme — deep navy canvas, same brand accents */
.phone-frame.kt-dark {
    background-color: #111C2C;
    --kt-primary:      #4A90D9;
    --kt-orange:       #F07830;
    --kt-surface:      #182437;
    --kt-surface-low:  #0D1622;
    --kt-border:       #2A3E5A;
    --kt-text:         #E1E8F0;
    --kt-text-sub:     #8A9AB8;
    --kt-success:      #4DB87A;
    --kt-success-bg:   #1A3328;
    --kt-danger:       #F87171;
    --kt-danger-bg:    #3B1A1A;
}

/* Screen body bg must also match dark surface */
.phone-frame.kt-dark .phone-screen-layout {
    background: #111C2C;
}

/* Fix hardcoded #D8E3FA avatar pill on dark app bar */
.phone-frame.kt-dark .kt-avatar {
    background: #2A3E5A;
    color: #4A90D9;
}

/* Status bar (sits atop the light screen, dark text) */
.phone-frame .phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 12px 2px 12px;
    background: var(--kt-surface);
    flex-shrink: 0;
}

.kt-status-time {
    font-size: 0.52rem;
    font-weight: 700;
    color: var(--kt-text);
}

.kt-status-icons {
    font-size: 0.42rem;
    color: var(--kt-text);
    opacity: 0.6;
    letter-spacing: 0.04em;
}

/* KneadTrack app bar (white bar with logo + avatar) */
.kt-app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px 5px 10px;
    background: var(--kt-surface);
    border-bottom: 0.75px solid var(--kt-border);
    flex-shrink: 0;
}

.kt-app-logo {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Right-side app-bar group: theme toggle + avatar */
.kt-app-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Theme toggle button inside the KT emulator */
.kt-theme-btn {
    background: none;
    border: none;
    font-size: 0.55rem;
    cursor: none;
    outline: none;
    padding: 1px 2px;
    line-height: 1;
    border-radius: 3px;
    transition: background 0.2s;
}

.kt-theme-btn:hover {
    background: rgba(14, 59, 105, 0.10);
}

.phone-frame.kt-dark .kt-theme-btn:hover {
    background: rgba(74, 144, 217, 0.15);
}

/* Real KneadTrack logo image — replaces the 〜 placeholder */
.kt-logo-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    /* mix-blend-mode: multiply removes the white background on the light app bar */
    mix-blend-mode: multiply;
}

/* In dark mode: filter the navy logo to a light tone that reads on the dark bar */
.phone-frame.kt-dark .kt-logo-img {
    mix-blend-mode: normal;
    filter: brightness(0) invert(1) sepia(0.35) hue-rotate(175deg) saturate(3) brightness(1.15);
}

.kt-app-name {
    font-size: 0.68rem;
    color: var(--kt-primary);
    letter-spacing: -0.01em;
}

.kt-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D8E3FA;
    color: var(--kt-primary);
    font-size: 0.48rem;
    display: flex;
    align-items: center;
    /* dark mode override is below in kt-dark block */
    justify-content: center;
}

/* Screen layout: catalog (flex-grow) + side-cart (slide-in) */
.phone-screen-layout {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;  /* allow children to scroll inside */
    position: relative;
    overflow: hidden;
    background: #F9F9FF;
}

/* LEFT: Inventory Catalog */
.phone-catalog {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 7px 6px 0 6px;
    box-sizing: border-box;
    transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Page header */
.kt-page-header {
    margin-bottom: 5px;
    flex-shrink: 0;
}

.kt-page-title {
    font-size: 0.88rem;
    color: var(--kt-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.kt-page-sub {
    font-size: 0.44rem;
    color: var(--kt-text-sub);
    margin-top: 1px;
    transition: opacity 0.3s;
}

/* Add/Restock CTA — orange, matching Flutter PrimaryButton */
.kt-add-btn {
    background: var(--kt-orange);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 4px 9px;
    font-size: 0.5rem;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(221, 107, 32, 0.3);
    cursor: none;
    outline: none;
    margin-bottom: 5px;
    flex-shrink: 0;
    transition: filter 0.2s, opacity 0.3s;
}

.kt-add-btn:hover { filter: brightness(1.08); }

/* Search bar */
.kt-search-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--kt-surface);
    border: 0.75px solid var(--kt-border);
    border-radius: 6px;
    padding: 4px 6px;
    margin-bottom: 5px;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.kt-search-icon { font-size: 0.5rem; opacity: 0.5; }

.kt-search-text {
    font-size: 0.48rem;
    color: var(--kt-text-sub);
}

/* Filter chips row */
.kt-chips-row {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
    overflow: hidden;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.kt-chip {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 0.42rem;
    background: var(--kt-surface-low);
    color: var(--kt-text);
    transition: all 0.2s ease;
}

.kt-chip-selected {
    background: var(--kt-primary);
    color: #ffffff;
}

.kt-chip-warn {
    background: var(--kt-danger-bg);
    color: var(--kt-danger);
    border: 0.5px solid rgba(197, 48, 48, 0.25);
}

/* Item list */
.phone-item-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    padding-right: 2px;
    min-height: 0;
}

.phone-item-list::-webkit-scrollbar { width: 2px; }
.phone-item-list::-webkit-scrollbar-thumb {
    background: var(--kt-border);
    border-radius: 1px;
}

/* Item card — horizontal: [emoji] [name+badge+sku] [−qty+] */
.phone-item-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 8px;
    border: 0.75px solid var(--kt-border);
    background: var(--kt-surface);
    box-shadow: 0 1px 4px rgba(17, 28, 44, 0.04);
    transition: border-color 0.25s, box-shadow 0.25s;
    flex-shrink: 0;
}

.phone-item-card:hover {
    border-color: var(--kt-primary);
    box-shadow: 0 2px 8px rgba(14, 59, 105, 0.10);
}

/* Low-stock card gets a red border accent (matches Flutter low-stock card) */
.item-card-low {
    border-color: rgba(197, 48, 48, 0.4) !important;
    background: rgba(254, 226, 226, 0.15) !important;
}

/* Emoji icon box */
.item-emoji-box {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--kt-surface-low);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: width 0.38s, height 0.38s, font-size 0.38s;
}

/* Item details column */
.item-details-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.item-name {
    font-size: 0.56rem;
    font-weight: 900;
    color: var(--kt-text);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge + SKU row */
.item-meta-row {
    display: flex;
    align-items: center;
    gap: 3px;
    transition: opacity 0.3s;
}

.item-badge {
    font-size: 0.38rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Status: In Stock = green (matches KT AppColors.successBg / success) */
.badge-in {
    background: var(--kt-success-bg);
    color: var(--kt-success);
}

/* Status: Low Stock / Out of Stock = red (matches KT AppColors.dangerBg / danger) */
.badge-low {
    background: var(--kt-danger-bg);
    color: var(--kt-danger);
}

.item-sku {
    font-size: 0.36rem;
    color: var(--kt-text-sub);
    opacity: 0.7;
}

/* Stepper column — vertical stack: [−] qty [+] */
.item-stepper-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.emu-step-val {
    font-size: 0.6rem;
    font-weight: 900;
    color: var(--kt-text);
    min-width: 14px;
    text-align: center;
    line-height: 1;
}

/* Low-stock quantity shown in danger red */
.val-low { color: var(--kt-danger) !important; }

/* Dec button: subtle gray square */
.emu-step-btn.btn-dec {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: none;
    background: var(--kt-surface-low);
    color: var(--kt-text);
    font-size: 0.58rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    outline: none;
    transition: background 0.2s;
}

.emu-step-btn.btn-dec:hover { background: #DEE8FF; }

/* Inc button: KT primary navy (matches Flutter _StepperButton isPrimary) */
.emu-step-btn.btn-inc {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: none;
    background: var(--kt-primary);
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    outline: none;
    transition: filter 0.2s;
}

.emu-step-btn.btn-inc:hover { filter: brightness(1.15); }

/* Footer Nav — 5 tabs, matching the actual app shell */
.kt-footer-nav {
    display: flex;
    border-top: 0.75px solid var(--kt-border);
    background: var(--kt-surface);
    flex-shrink: 0;
    margin-top: auto;
}

.kt-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 0 3px;
    gap: 1px;
    color: var(--kt-text-sub);
    opacity: 0.45;
    transition: opacity 0.2s;
}

.kt-nav-active {
    opacity: 1;
    color: var(--kt-orange);
}

.kt-nav-icon { font-size: 0.6rem; }

.kt-nav-label {
    font-size: 0.36rem;
    transition: opacity 0.3s, max-height 0.3s;
}

/* RIGHT: HED Adjustment Cart Side Panel */
.phone-side-cart {
    flex: 0 0 112px;
    width: 112px;
    height: 100%;
    background: var(--kt-surface);
    border-left: 0.75px solid var(--kt-border);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: margin-right 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s, visibility 0.38s;
    margin-right: -112px;
    opacity: 0;
    visibility: hidden;
    z-index: 5;
}

.phone-side-cart.active {
    margin-right: 0;
    opacity: 1;
    visibility: visible;
}

.cart-header-row {
    padding: 6px 7px 5px;
    border-bottom: 0.75px solid var(--kt-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--kt-surface);
}

.cart-title {
    font-size: 0.44rem;
    letter-spacing: 0.06em;
    color: var(--kt-primary);
    font-weight: 900;
}

.cart-count-badge {
    font-size: 0.37rem;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(221, 107, 32, 0.12);
    color: var(--kt-orange);
    font-weight: 700;
    width: fit-content;
    text-transform: uppercase;
}

.cart-item-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 5px;
    min-height: 0;
}

.cart-item-row {
    background: var(--kt-surface-low);
    border: 0.5px solid var(--kt-border);
    border-radius: 5px;
    padding: 4px 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-info { display: flex; flex-direction: column; }

.cart-item-name {
    font-size: 0.48rem;
    font-weight: 900;
    color: var(--kt-text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 90px;
}

.cart-item-cat {
    font-size: 0.36rem;
    color: var(--kt-text-sub);
    opacity: 0.7;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1px;
}

.cart-item-stepper { display: flex; align-items: center; gap: 2px; }

.cart-step-btn {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    border: none;
    background: var(--kt-border);
    color: var(--kt-text);
    font-size: 0.44rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    outline: none;
    transition: background 0.2s;
}

.cart-step-btn:hover { background: #c0c6d8; }

.cart-step-val {
    font-size: 0.46rem;
    font-weight: 700;
    padding: 0 1px;
}

.cart-step-val.pos { color: var(--kt-success); }
.cart-step-val.neg { color: var(--kt-danger); }

.cart-remove-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--kt-text-sub);
    opacity: 0.35;
    font-size: 0.5rem;
    cursor: none;
    outline: none;
    line-height: 1;
    transition: opacity 0.2s;
}

.cart-remove-btn:hover { opacity: 0.8; }

/* Cart bottom: disclaimer + confirm button */
.cart-bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 6px 6px;
    border-top: 0.75px solid var(--kt-border);
    background: var(--kt-surface);
    flex-shrink: 0;
}

.cart-disclaimer {
    font-size: 0.34rem;
    opacity: 0.45;
    line-height: 1.2;
    text-align: center;
    color: var(--kt-text-sub);
}

/* Confirm Adjustments — matches KT orange PrimaryButton */
.confirm-adjustments-btn {
    width: 100%;
    border: none;
    background: var(--kt-orange);
    color: #ffffff;
    padding: 5px;
    border-radius: 5px;
    font-size: 0.46rem;
    font-weight: 900;
    cursor: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 1px 4px rgba(221, 107, 32, 0.3);
    transition: filter 0.2s;
}

.confirm-adjustments-btn:hover { filter: brightness(1.08); }

/* Squeezed state: catalog compressed to make room for side cart */
.phone-catalog.squeezed { max-width: calc(100% - 112px); }

.phone-catalog.squeezed .kt-page-sub,
.phone-catalog.squeezed .kt-add-btn,
.phone-catalog.squeezed .kt-search-bar,
.phone-catalog.squeezed .kt-chips-row { display: none !important; }

.phone-catalog.squeezed .item-meta-row { display: none !important; }

.phone-catalog.squeezed .kt-nav-label { display: none !important; }

.phone-catalog.squeezed .item-emoji-box {
    width: 16px;
    height: 16px;
    font-size: 0.62rem;
}

.phone-catalog.squeezed .item-name {
    font-size: 0.48rem;
    max-width: 52px;
}

.phone-catalog.squeezed .emu-step-btn.btn-dec,
.phone-catalog.squeezed .emu-step-btn.btn-inc {
    width: 12px;
    height: 12px;
    font-size: 0.46rem;
}

.phone-catalog.squeezed .emu-step-val { font-size: 0.5rem; min-width: 10px; }

/* Success toast */
.phone-toast {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: var(--kt-success);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.46rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(47, 133, 90, 0.35);
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease;
    white-space: nowrap;
}

.phone-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}




/* ==========================================================================
   PASTEL NEUMORPHIC CALCULATOR EMULATOR WIDGET STYLES
   ========================================================================== */
/* Calculator frame — shares hardware shell with .phone-frame (defined above).
   Overrides only: background colour and inner padding specific to the calc app. */
.calc-phone-frame {
    background-color: #f5f5f7;
    padding: 8px;
    /* Width / height / border / border-radius / box-shadow come from shared rule */
}

/* Calculator Dark Theme Skin */
.calc-phone-frame.calc-dark {
    background-color: #1e1d24;
}

/* Notch colour is set in shared .phone-notch, .calc-phone-notch rule above */

/* Header Tier & Actions */
.calc-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.calc-tier-badge {
    font-size: 0.48rem;
    font-weight: 500;
    color: #6b6661;
    background: #e4e4e7;
    padding: 3px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.05), inset -1px -1px 2px rgba(255,255,255,0.8);
    transition: var(--transition-fast);
}

.calc-phone-frame.calc-dark .calc-tier-badge {
    color: #a1a1aa;
    background: #282630;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3), inset -1px -1px 2px rgba(255,255,255,0.05);
}

.calc-tier-limit {
    background: #00b0ff;
    color: #ffffff;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.4rem;
    font-weight: 700;
}

.calc-tier-limit.calc-depleted {
    background: #ef4444;
}

.calc-header-actions {
    display: flex;
    gap: 4px;
}

.calc-action-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #f5f5f7;
    color: #6b6661;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    outline: none;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.08), -2px -2px 4px rgba(255,255,255,0.9);
    transition: var(--transition-fast);
}

.calc-phone-frame.calc-dark .calc-action-btn {
    background: #1e1d24;
    color: #a1a1aa;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3), -2px -2px 4px rgba(255,255,255,0.05);
}

.calc-action-btn:hover {
    transform: scale(1.08);
}

.calc-action-btn:active {
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1), inset -1px -1px 2px rgba(255,255,255,0.8);
}

.calc-phone-frame.calc-dark .calc-action-btn:active {
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4), inset -1px -1px 2px rgba(255,255,255,0.05);
}

/* Calculator Screen */
.calc-screen {
    width: 100%;
    height: 48px;
    background: #ececf0;
    border-radius: 12px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.06), inset -2px -2px 5px rgba(255,255,255,0.9);
    padding: 8px 12px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-bottom: 10px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.calc-phone-frame.calc-dark .calc-screen {
    background: #16151a;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.4), inset -2px -2px 5px rgba(255,255,255,0.02);
}

.calc-display {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1c1917;
    word-break: break-all;
    text-align: right;
    line-height: 1;
}

.calc-phone-frame.calc-dark .calc-display {
    color: #f4f4f5;
}

/* Neumorphic Keyboard Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    width: 100%;
}

.calc-btn {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    color: #1c1917;
    font-size: 0.65rem;
    font-weight: 700;
    outline: none;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06), -2px -2px 5px rgba(255,255,255,0.9);
    transition: var(--transition-fast);
}

.calc-phone-frame.calc-dark .calc-btn {
    background: #1e1d24;
    color: #f4f4f5;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3), -2px -2px 5px rgba(255,255,255,0.05);
}

.calc-btn:hover {
    transform: translateY(-1px);
}

.calc-btn:active {
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.1), inset -1px -1px 3px rgba(255,255,255,0.8) !important;
    transform: translateY(1px);
}

.calc-phone-frame.calc-dark .calc-btn:active {
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4), inset -1px -1px 3px rgba(255,255,255,0.05) !important;
}

.btn-operator {
    color: #00b0ff;
}

.calc-phone-frame.calc-dark .btn-operator {
    color: #40c4ff;
}

.btn-accent-operator {
    color: #00b0ff;
}

.calc-phone-frame.calc-dark .btn-accent-operator {
    color: #40c4ff;
}

.btn-zero {
    grid-column: span 2;
    aspect-ratio: auto;
    height: 100%;
}

.btn-equals {
    background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 100%);
    color: #ffffff !important;
    box-shadow: 2px 2px 5px rgba(59, 130, 246, 0.25), -2px -2px 5px rgba(255,255,255,0.9);
}

.calc-phone-frame.calc-dark .btn-equals {
    box-shadow: 2px 2px 5px rgba(59, 130, 246, 0.2), -2px -2px 5px rgba(255,255,255,0.05);
}


/* (Calculator uses the static HTML mockup — see .calc-grid rules below) */

/* ==========================================================================
   PREMIUM LIQUID OVERLAY & KINETIC TEXT SPLITTING STYLES
   ========================================================================== */

#liquid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
}

#liquid-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hero Title Tracking Management */
.hero-content.loaded .hero-title {
  letter-spacing: 0.05em;
}

/* Structural clip safety for layout typography reveals */
.letter-wrapper {
  vertical-align: bottom;
}

.letter-char {
  transform: translateY(115%);
  will-change: transform;
}

/* --- DOM Magnetic Elements removed to restore pristine Canvas Mascot companion --- */






