/* ============================================
   CODE ARTISAN — Style Sheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent: #D4A843;
    --accent-dark: #B8922E;
    --accent-glow: rgba(212, 168, 67, 0.3);
    --accent-subtle: rgba(212, 168, 67, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light Theme Variables --- */
:root[data-theme="light"] {
    --bg-primary: #f8f7f4;
    --bg-secondary: #efede8;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f3ee;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --accent: #B8922E;
    --accent-dark: #9A7A20;
    --accent-glow: rgba(184, 146, 46, 0.25);
    --accent-subtle: rgba(184, 146, 46, 0.06);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

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

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

button, input, textarea {
    cursor: none;
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Cursor --- */
.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-follower.hovering {
    width: 60px;
    height: 60px;
    background: rgba(212, 168, 67, 0.1);
    border-color: var(--accent);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .cursor-follower, .cursor-dot { display: none; }
    body { cursor: auto; }
    a, button, input, textarea { cursor: auto; }
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-inner {
    text-align: center;
}

.preloader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.pl-particle {
    position: absolute;
    border-radius: 50%;
    background: #D4A843;
    box-shadow: 0 0 6px 1px rgba(212, 168, 67, 0.5);
    animation: plParticleFloat 3s ease-in-out infinite alternate;
}

@keyframes plParticleFloat {
    0%   { transform: translateY(0) scale(1); opacity: 0.2; }
    50%  { opacity: 0.7; }
    100% { transform: translateY(-30px) scale(0.6); opacity: 0.1; }
}

.pl-streak {
    position: absolute;
    left: -30%;
    width: 35%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.5), rgba(255, 255, 255, 0.15), transparent);
    animation: plStreakMove 1.6s ease-in-out forwards;
    opacity: 0;
}

@keyframes plStreakMove {
    0%   { left: -30%; opacity: 0; }
    15%  { opacity: 0.8; }
    100% { left: 130%; opacity: 0; }
}

.preloader-logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.preloader-logo {
    display: block;
    opacity: 0;
    overflow: visible;
}

.preloader-glow {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--border);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

#navLogoSvg,
#footerLogoSvg {
    opacity: 0;
    overflow: visible;
}

.logo-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.nav-logo:hover .logo-icon {
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transform: scale(1.05);
}

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

.nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.3px;
}

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

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

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

.nav-link-cta {
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 20px;
    border-radius: 100px;
    transition: var(--transition);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--accent);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    position: absolute;
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

:root[data-theme="light"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

:root[data-theme="light"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

@media (max-width: 768px) {
    .theme-toggle {
        margin-left: auto;
        margin-right: 12px;
    }
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

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

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

.mobile-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
    letter-spacing: 1px;
}

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

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
}

.hero-floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: 10%;
    right: -5%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #4D4DFF 0%, transparent 70%);
    bottom: 10%;
    left: -5%;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: 60%;
    right: 30%;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #FFD700 0%, transparent 70%);
    top: 20%;
    left: 20%;
}

.shape-5 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #4D4DFF 0%, transparent 70%);
    bottom: 30%;
    right: 10%;
}

.hero-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-subtle);
    border: 1px solid rgba(212, 168, 67, 0.15);
    padding: 8px 18px;
    border-radius: 100px;
    margin-bottom: 32px;
    opacity: 0;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.badge-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 28px;
    letter-spacing: -2px;
}

.hero-line {
    display: block;
    overflow: hidden;
}

.hero-word {
    display: inline-block;
    transform: translateY(110%);
}

.hero-word-outline {
    -webkit-text-stroke: 2px var(--text-primary);
    color: transparent;
}

.hero-word-accent {
    color: var(--accent);
    font-family: var(--font-display);
    font-style: italic;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 40px;
    line-height: 1.8;
    opacity: 0;
}

.hero-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
    opacity: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 16px 32px;
    border-radius: 100px;
    border: none;
    cursor: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

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

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

.btn-large {
    padding: 20px 40px;
    font-size: 1.05rem;
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 40px;
    opacity: 0;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-plus {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

/* --- Hero Code Window --- */
.hero-code-window {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    opacity: 0;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-content {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    overflow-x: auto;
}

.code-content code {
    font-family: inherit;
}

.code-keyword { color: #c678dd; }
.code-class { color: #e5c07b; }
.code-var { color: #e06c75; }
.code-string { color: #98c379; }
.code-func { color: #61afef; }

/* --- Hero Scroll Indicator --- */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
}

.hero-scroll-indicator span {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--accent);
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% { top: -50%; }
    100% { top: 100%; }
}

@media (max-width: 1100px) {
    .hero-code-window {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .stat-divider {
        width: 50px;
        height: 1px;
    }
}

/* --- Section Shared --- */
.section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    margin-bottom: 64px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 500px;
}

.text-accent {
    color: var(--accent);
}

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

.about-lead {
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-lead em {
    color: var(--accent);
    font-style: italic;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: attr(data-index);
    position: absolute;
    top: 10px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.value-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateX(8px);
}

.value-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.value-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.value-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(212, 168, 67, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(212, 168, 67, 0.05);
    background: var(--bg-card-hover);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.service-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.service-tags li {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(212, 168, 67, 0.1);
}

@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* --- Work --- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.work-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.work-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card-large {
    grid-column: span 2;
    min-height: 420px;
    flex-direction: row;
    align-items: flex-end;
}

.work-card-wide {
    grid-column: span 2;
}

.work-card-content {
    position: relative;
    z-index: 2;
    padding: 32px;
}

.work-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
    border: 1px solid rgba(212, 168, 67, 0.12);
}

.work-card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.work-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 500px;
}

.work-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-tech span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* Mock Dashboard */
.work-card-visual {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 32px 32px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.mock-dashboard {
    width: 340px;
    height: 220px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    overflow: hidden;
}

.mock-sidebar {
    width: 60px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--border);
}

.mock-main {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-chart {
    flex: 1;
    background: linear-gradient(180deg, rgba(212, 168, 67, 0.08), transparent);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.mock-cards {
    display: flex;
    gap: 8px;
}

.mock-mini-card {
    flex: 1;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .work-grid { grid-template-columns: 1fr; }
    .work-card-large, .work-card-wide { grid-column: span 1; }
    .work-card-large { flex-direction: column; }
    .work-card-visual { display: none; }
}

/* --- Process --- */
/* --- Process Section: Horizontal Flip Cards --- */

/* Horizontal connector bar */
.proc-connector {
    max-width: 900px;
    margin: 0 auto 48px;
    padding: 0 40px;
}

.proc-connector-track {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.proc-connector-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #E8C864);
    border-radius: 3px;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.15s ease;
}

/* Cards grid */
.proc-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}

/* Individual card */
.proc-card {
    position: relative;
    perspective: 1000px;
}

/* Arrow connector between cards */
.proc-arrow {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    z-index: 5;
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.proc-arrow svg {
    width: 100%;
    height: 100%;
}

.proc-card:hover .proc-arrow {
    opacity: 0.7;
}

.proc-card:last-child .proc-arrow {
    display: none;
}

/* Flip card inner */
.proc-card-inner {
    position: relative;
    width: 100%;
    min-height: 380px;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.proc-card:hover .proc-card-inner {
    transform: rotateY(180deg);
}

/* Card faces (shared) */
.proc-card-front,
.proc-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
}

/* Front face */
.proc-card-front {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.proc-card:hover .proc-card-front {
    border-color: rgba(212, 168, 67, 0.2);
}

/* Step badge */
.proc-step-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proc-step-badge span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
}

/* Icon */
.proc-icon-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proc-icon {
    width: 42px;
    height: 42px;
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

.proc-card:hover .proc-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.4));
}

.proc-icon-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1.5px solid rgba(212, 168, 67, 0.12);
    border-radius: 50%;
    transition: all 0.5s ease;
}

.proc-card:hover .proc-icon-ring {
    border-color: rgba(212, 168, 67, 0.3);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.1);
    transform: scale(1.1);
}

/* Card text */
.proc-card-front h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: color 0.3s;
}

.proc-card-front p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

/* Tags */
.proc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.proc-tags span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.12);
    padding: 3px 10px;
    border-radius: 6px;
}

/* Flip hint */
.proc-flip-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-family: var(--font-mono);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.proc-card:hover .proc-flip-hint {
    opacity: 0;
}

/* Back face */
.proc-card-back {
    background: linear-gradient(145deg, #1a1826, #14121e);
    border: 1px solid rgba(212, 168, 67, 0.2);
    transform: rotateY(180deg);
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 168, 67, 0.04);
}

.proc-back-number {
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 5rem;
    font-weight: 900;
    color: rgba(212, 168, 67, 0.04);
    line-height: 1;
    pointer-events: none;
}

.proc-card-back h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.proc-card-back ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.proc-card-back li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 18px;
    position: relative;
}

.proc-card-back li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

/* Duration badge */
.proc-back-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* Active card accent line */
.proc-card-front::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.proc-card.is-active .proc-card-front::before {
    transform: scaleX(1);
}

.proc-card.is-active .proc-card-front {
    border-color: rgba(212, 168, 67, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 168, 67, 0.04);
}

.proc-card.is-active .proc-step-badge {
    background: rgba(212, 168, 67, 0.12);
    border-color: rgba(212, 168, 67, 0.3);
}

.proc-card.is-active .proc-icon-ring {
    animation: proc-ring-pulse 2s ease-out infinite;
}

@keyframes proc-ring-pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.2); }
    100% { box-shadow: 0 0 0 12px rgba(212, 168, 67, 0); }
}

/* Responsive */
@media (max-width: 1100px) {
    .proc-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    .proc-card:nth-child(3) .proc-arrow,
    .proc-card:nth-child(5) .proc-arrow { display: none; }
    .proc-connector { display: none; }
}

@media (max-width: 768px) {
    .proc-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .proc-arrow { display: none; }
    .proc-card-inner { min-height: 350px; }
}

@media (max-width: 500px) {
    .proc-cards {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }
    .proc-card-inner { min-height: 340px; }
    .proc-card-front,
    .proc-card-back { padding: 24px 20px; }
}

/* --- Tech Stack v2 — Dual Orbit --- */
.tech-orbit-v2 {
    position: relative;
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Decorative background rings --- */
.tech-ring {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    pointer-events: none;
    transform-style: preserve-3d;
}
.tech-ring-1 {
    width: 340px; height: 340px;
    margin: -170px 0 0 -170px;
    border: 1px dashed rgba(212,168,67,0.1);
    animation: techRingSpin1 25s linear infinite;
}
.tech-ring-2 {
    width: 500px; height: 500px;
    margin: -250px 0 0 -250px;
    border: 1px dotted rgba(212,168,67,0.06);
    animation: techRingSpin2 35s linear infinite;
}
.tech-ring-3 {
    width: 620px; height: 620px;
    margin: -310px 0 0 -310px;
    border: 1px solid rgba(212,168,67,0.03);
    animation: techRingSpin3 50s linear infinite;
}
.tech-ring-1::after {
    content: '';
    position: absolute; top: -4px; left: 50%;
    width: 8px; height: 8px;
    background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow), 0 0 24px rgba(212,168,67,0.2);
}
.tech-ring-2::after {
    content: '';
    position: absolute; bottom: -3px; right: 20%;
    width: 6px; height: 6px;
    background: #4D4DFF; border-radius: 50%;
    box-shadow: 0 0 12px rgba(77,77,255,0.4);
}
@keyframes techRingSpin1 { to { transform: rotateX(65deg) rotateZ(360deg); } }
@keyframes techRingSpin2 { to { transform: rotateX(72deg) rotateY(25deg) rotateZ(-360deg); } }
@keyframes techRingSpin3 { to { transform: rotateX(58deg) rotateY(-15deg) rotateZ(360deg); } }

/* --- Center logo --- */
.tech-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tech-center-icon {
    position: relative; z-index: 2;
    animation: techCenterPulse 3s ease-in-out infinite;
}
@keyframes techCenterPulse {
    0%, 100% { filter: drop-shadow(0 0 15px var(--accent-glow)); }
    50%      { filter: drop-shadow(0 0 40px var(--accent-glow)); }
}
.tech-center-pulse {
    position: absolute;
    width: 100px; height: 100px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,168,67,0.12) 0%, transparent 70%);
    animation: techPulseExpand 3s ease-in-out infinite;
}
@keyframes techPulseExpand {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50%      { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}
.tech-center-ring {
    position: absolute;
    width: 90px; height: 90px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 50%;
    animation: techCenterRingSpin 12s linear infinite;
}
.tech-center-ring::after {
    content: '';
    position: absolute;
    width: 110px; height: 110px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(212,168,67,0.08);
    border-radius: 50%;
    animation: techCenterRingSpin 18s linear infinite reverse;
}
@keyframes techCenterRingSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- Orbit ring containers --- */
.tech-orbit-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    z-index: 2;
}
.tech-orbit-inner { animation: techOrbitCW 80s linear infinite; }
.tech-orbit-outer { animation: techOrbitCCW 120s linear infinite; }
@keyframes techOrbitCW  { to { transform: rotate(360deg); } }
@keyframes techOrbitCCW { to { transform: rotate(-360deg); } }

/* Pause orbits on hover */
.tech-orbit-v2.orbit-paused .tech-orbit-inner,
.tech-orbit-v2.orbit-paused .tech-orbit-outer { animation-play-state: paused; }
.tech-orbit-v2.orbit-paused .tech-node-inner  { animation-play-state: paused; }

/* --- Tech nodes (circular) --- */
.tech-node {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.35s, box-shadow 0.35s, opacity 0.35s;
    cursor: default;
}
.tech-node-sm {
    width: 100px;
    height: 100px;
}

/* Inner ring: 5 items at 72° apart, 170px radius */
.tech-orbit-inner .tech-node:nth-child(1) { transform: rotate(0deg)    translateY(-170px) rotate(0deg)    translate(-50%,-50%); }
.tech-orbit-inner .tech-node:nth-child(2) { transform: rotate(72deg)   translateY(-170px) rotate(-72deg)  translate(-50%,-50%); }
.tech-orbit-inner .tech-node:nth-child(3) { transform: rotate(144deg)  translateY(-170px) rotate(-144deg) translate(-50%,-50%); }
.tech-orbit-inner .tech-node:nth-child(4) { transform: rotate(216deg)  translateY(-170px) rotate(-216deg) translate(-50%,-50%); }
.tech-orbit-inner .tech-node:nth-child(5) { transform: rotate(288deg)  translateY(-170px) rotate(-288deg) translate(-50%,-50%); }

/* Outer ring: 5 items at 72° apart offset 36°, 290px radius */
.tech-orbit-outer .tech-node:nth-child(1) { transform: rotate(36deg)   translateY(-290px) rotate(-36deg)  translate(-50%,-50%); }
.tech-orbit-outer .tech-node:nth-child(2) { transform: rotate(108deg)  translateY(-290px) rotate(-108deg) translate(-50%,-50%); }
.tech-orbit-outer .tech-node:nth-child(3) { transform: rotate(180deg)  translateY(-290px) rotate(-180deg) translate(-50%,-50%); }
.tech-orbit-outer .tech-node:nth-child(4) { transform: rotate(252deg)  translateY(-290px) rotate(-252deg) translate(-50%,-50%); }
.tech-orbit-outer .tech-node:nth-child(5) { transform: rotate(324deg)  translateY(-290px) rotate(-324deg) translate(-50%,-50%); }

/* Counter-rotate text upright */
.tech-orbit-inner .tech-node-inner { animation: techCounterCW 80s linear infinite; }
.tech-orbit-outer .tech-node-inner { animation: techCounterCCW 120s linear infinite; }
@keyframes techCounterCW  { to { transform: rotate(-360deg); } }
@keyframes techCounterCCW { to { transform: rotate(360deg); } }

/* Node content */
.tech-node-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.tech-node-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.7; transition: opacity 0.3s;
    margin-bottom: 2px;
}
.tech-node-icon svg { width: 100%; height: 100%; }
.tech-node:hover .tech-node-icon { opacity: 1; }

.tech-node-name {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    transition: color 0.3s;
    white-space: nowrap;
}
.tech-node-desc {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.2;
    transition: color 0.3s;
    white-space: nowrap;
}
.tech-node-sm .tech-node-name { font-size: 0.7rem; }
.tech-node-sm .tech-node-desc { font-size: 0.55rem; }

/* Hover states */
.tech-node:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(212,168,67,0.1);
    z-index: 10;
    background: var(--bg-card-hover);
}
.tech-node:hover .tech-node-name { color: var(--accent); }
.tech-node:hover .tech-node-desc { color: var(--text-secondary); }
.tech-node.tech-dimmed { opacity: 0.35; }

/* --- Tech Orbit Responsive --- */
@media (max-width: 768px) {
    .tech-orbit-v2 { min-height: 540px; }
    .tech-node { width: 95px; height: 95px; }
    .tech-node-sm { width: 85px; height: 85px; }
    .tech-orbit-inner .tech-node:nth-child(1) { transform: rotate(0deg)    translateY(-130px) rotate(0deg)    translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(2) { transform: rotate(72deg)   translateY(-130px) rotate(-72deg)  translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(3) { transform: rotate(144deg)  translateY(-130px) rotate(-144deg) translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(4) { transform: rotate(216deg)  translateY(-130px) rotate(-216deg) translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(5) { transform: rotate(288deg)  translateY(-130px) rotate(-288deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(1) { transform: rotate(36deg)   translateY(-220px) rotate(-36deg)  translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(2) { transform: rotate(108deg)  translateY(-220px) rotate(-108deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(3) { transform: rotate(180deg)  translateY(-220px) rotate(-180deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(4) { transform: rotate(252deg)  translateY(-220px) rotate(-252deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(5) { transform: rotate(324deg)  translateY(-220px) rotate(-324deg) translate(-50%,-50%); }
    .tech-node-name { font-size: 0.78rem; }
    .tech-node-desc { font-size: 0.62rem; }
    .tech-ring-1 { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
    .tech-ring-2 { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
    .tech-ring-3 { width: 480px; height: 480px; margin: -240px 0 0 -240px; }
}
@media (max-width: 500px) {
    .tech-orbit-v2 { min-height: 440px; }
    .tech-node { width: 76px; height: 76px; }
    .tech-node-sm { width: 70px; height: 70px; }
    .tech-node-icon { display: none; }
    .tech-node-desc { display: none; }
    .tech-orbit-inner .tech-node:nth-child(1) { transform: rotate(0deg)    translateY(-100px) rotate(0deg)    translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(2) { transform: rotate(72deg)   translateY(-100px) rotate(-72deg)  translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(3) { transform: rotate(144deg)  translateY(-100px) rotate(-144deg) translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(4) { transform: rotate(216deg)  translateY(-100px) rotate(-216deg) translate(-50%,-50%); }
    .tech-orbit-inner .tech-node:nth-child(5) { transform: rotate(288deg)  translateY(-100px) rotate(-288deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(1) { transform: rotate(36deg)   translateY(-170px) rotate(-36deg)  translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(2) { transform: rotate(108deg)  translateY(-170px) rotate(-108deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(3) { transform: rotate(180deg)  translateY(-170px) rotate(-180deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(4) { transform: rotate(252deg)  translateY(-170px) rotate(-252deg) translate(-50%,-50%); }
    .tech-orbit-outer .tech-node:nth-child(5) { transform: rotate(324deg)  translateY(-170px) rotate(-324deg) translate(-50%,-50%); }
    .tech-node-name { font-size: 0.72rem; }
    .tech-ring-1 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
    .tech-ring-2 { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
    .tech-ring-3 { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
}

/* --- Testimonials --- */
.testimonials-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
    opacity: 0.5;
}

.testimonial-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent-subtle);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
}

.testimonial-author strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
}

.testimonial-author span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

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

/* --- CTA --- */
.cta {
    padding: 80px 0 120px;
}

.cta-wrapper {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 80px;
    overflow: hidden;
}

.cta-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cta-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
}

.cta-circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -200px;
    right: -100px;
}

.cta-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #4D4DFF, transparent 70%);
    bottom: -100px;
    left: -50px;
}

.cta-grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 16px 0 16px;
    letter-spacing: -1px;
}

.cta-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 36px;
    line-height: 1.7;
}

/* --- Form --- */
.cta-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(212, 168, 67, 0.03);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

@media (max-width: 768px) {
    .cta-wrapper { padding: 40px 24px; }
    .form-row { grid-template-columns: 1fr; }
}

/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

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

/* --- Magnetic Button Effect --- */
.magnetic-btn {
    transition: transform 0.3s ease;
}

/* --- Reveal Animations (GSAP will handle these) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
}

/* ============================================
   ENHANCED ANIMATIONS & EFFECTS
   ============================================ */

/* --- Matrix Canvas Background --- */
.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

/* --- Scrolling Marquee Ticker --- */
.marquee-section {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Edge fade overlays for seamless feel */
.marquee-fade {
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.marquee-fade-left {
    left: 0;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, transparent 100%);
}

.marquee-fade-right {
    right: 0;
    background: linear-gradient(270deg, var(--bg-secondary) 0%, transparent 100%);
}

/* Glowing accent lines on top/bottom borders */
.marquee-glow-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 168, 67, 0.15) 20%,
        rgba(212, 168, 67, 0.4) 50%,
        rgba(212, 168, 67, 0.15) 80%,
        transparent 100%
    );
    animation: marquee-glow-shift 4s ease-in-out infinite alternate;
}

.marquee-glow-top { top: 0; }
.marquee-glow-bottom { bottom: 0; animation-delay: -2s; }

@keyframes marquee-glow-shift {
    0% { opacity: 0.3; background-size: 60% 100%; background-position: 20% 0; }
    100% { opacity: 0.7; background-size: 40% 100%; background-position: 80% 0; }
}

/* Marquee rows */
.marquee-row {
    overflow: hidden;
    position: relative;
}

.marquee-row:first-of-type {
    padding: 20px 0 12px;
}

.marquee-row:last-of-type {
    padding: 12px 0 20px;
}

/* Subtle divider between rows */
.marquee-row + .marquee-row {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.marquee-content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Row 1 items — tech stack */
.marquee-item {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s, text-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.marquee-item:hover {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Code bracket icon */
.marquee-icon {
    color: var(--accent);
    font-size: 0.72rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.marquee-item:hover .marquee-icon {
    opacity: 1;
}

/* // separator between items */
.marquee-separator {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.2;
    padding: 0 4px;
    flex-shrink: 0;
}

/* Dot separator for row 2 */
.marquee-separator-dot {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    opacity: 0.3;
    margin: 0 12px;
    animation: marquee-dot-pulse 3s ease-in-out infinite;
}

.marquee-separator-dot:nth-child(4n) { animation-delay: -0.5s; }
.marquee-separator-dot:nth-child(4n+2) { animation-delay: -1.5s; }

@keyframes marquee-dot-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.5); }
}

/* Row 2 items — outline/keyword style */
.marquee-item-outline {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 3px;
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s;
}

.marquee-item-outline:hover {
    opacity: 1;
    color: var(--text-secondary);
    text-shadow: none;
}

/* --- Glowing Section Dividers --- */
.section-divider {
    position: relative;
    height: 1px;
    margin: 0 auto;
    max-width: 1240px;
    padding: 0 24px;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    position: relative;
}

.divider-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 1px;
    background: var(--accent);
    filter: blur(4px);
    opacity: 0.4;
    animation: divider-pulse 3s ease-in-out infinite;
}

@keyframes divider-pulse {
    0%, 100% { opacity: 0.2; width: 100px; }
    50% { opacity: 0.6; width: 300px; }
}

/* --- Big Text Divider --- */
.big-text-divider {
    overflow: hidden;
    padding: 40px 0;
    position: relative;
}

.big-text-track {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    will-change: transform;
}

.big-text-track span {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: -2px;
    flex-shrink: 0;
    text-transform: uppercase;
    line-height: 1;
}

.big-text-outline {
    -webkit-text-stroke: 1px rgba(212, 168, 67, 0.08);
    color: transparent !important;
}

/* --- Section Background Patterns --- */
.section-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 0;
}

.circuit-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, var(--accent) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, var(--accent) 1px, transparent 1px),
        linear-gradient(90deg, transparent 49.5%, rgba(212,168,67,0.1) 49.5%, rgba(212,168,67,0.1) 50.5%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(212,168,67,0.1) 49.5%, rgba(212,168,67,0.1) 50.5%, transparent 50.5%);
    background-size: 80px 80px;
}

.dots-pattern {
    background-image: radial-gradient(circle, rgba(212, 168, 67, 0.3) 1px, transparent 1px);
    background-size: 30px 30px;
}

.hex-pattern {
    background-image:
        linear-gradient(30deg, rgba(212,168,67,0.05) 12%, transparent 12.5%, transparent 87%, rgba(212,168,67,0.05) 87.5%),
        linear-gradient(150deg, rgba(212,168,67,0.05) 12%, transparent 12.5%, transparent 87%, rgba(212,168,67,0.05) 87.5%),
        linear-gradient(30deg, rgba(212,168,67,0.05) 12%, transparent 12.5%, transparent 87%, rgba(212,168,67,0.05) 87.5%),
        linear-gradient(150deg, rgba(212,168,67,0.05) 12%, transparent 12.5%, transparent 87%, rgba(212,168,67,0.05) 87.5%),
        linear-gradient(60deg, rgba(212,168,67,0.03) 25%, transparent 25.5%, transparent 75%, rgba(212,168,67,0.03) 75%),
        linear-gradient(60deg, rgba(212,168,67,0.03) 25%, transparent 25.5%, transparent 75%, rgba(212,168,67,0.03) 75%);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* --- Service Card Enhanced Hover Effects --- */
.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(212, 168, 67, 0.03) 50%,
        rgba(212, 168, 67, 0.06) 100%
    );
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
}

.service-card:hover::before {
    height: 100%;
}

/* Accent line on left side that slides in */
.service-card .service-icon {
    position: relative;
}

.service-card .service-icon::after {
    content: '';
    position: absolute;
    left: -36px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 3px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px var(--accent-glow);
}

.service-card:hover .service-icon::after {
    height: 52px;
}

/* Service number glow on hover */
.service-card:hover .service-number {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

/* --- Work Card Shimmer Effect --- */
.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    z-index: 1;
    transition: none;
}

.work-card:hover::before {
    animation: shimmer 1.5s ease;
}

@keyframes shimmer {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* --- Enhanced Value Card Glow --- */
.value-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.value-card:hover::after {
    opacity: 1;
}

/* --- Testimonial Card Gradient Border --- */
.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

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

/* --- CTA Floating Particles --- */
.cta-wrapper::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle-1 6s ease-in-out infinite;
    pointer-events: none;
}

.cta-wrapper::after {
    content: '';
    position: absolute;
    bottom: 30%;
    right: 25%;
    width: 4px;
    height: 4px;
    background: #4D4DFF;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle-2 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-particle-1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(-20px, -30px) scale(1.5); opacity: 0.6; }
    50% { transform: translate(10px, -50px) scale(1); opacity: 0.2; }
    75% { transform: translate(30px, -20px) scale(1.3); opacity: 0.5; }
}

@keyframes float-particle-2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    33% { transform: translate(30px, 20px) scale(1.5); opacity: 0.5; }
    66% { transform: translate(-20px, 40px) scale(0.8); opacity: 0.3; }
}

/* --- Process Dot Active Animation --- */
.process-step.is-active .process-dot {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(212, 168, 67, 0.1);
}

.process-step.is-active .process-dot span {
    color: var(--accent);
}

.process-step.is-active .process-content h3 {
    color: var(--accent);
}

/* --- Hero Glitch Text Effect on Hover --- */
.hero-word-accent {
    position: relative;
}

.hero-word-accent::before,
.hero-word-accent::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.hero-word-accent::before {
    color: #00ffff;
    z-index: -1;
}

.hero-word-accent::after {
    color: #ff00ff;
    z-index: -1;
}

.hero-word-accent:hover::before {
    animation: glitch-1 0.3s ease;
}

.hero-word-accent:hover::after {
    animation: glitch-2 0.3s ease;
}

@keyframes glitch-1 {
    0% { opacity: 0; transform: translate(0); }
    20% { opacity: 0.5; transform: translate(-3px, 2px); }
    40% { opacity: 0.5; transform: translate(3px, -2px); }
    60% { opacity: 0.5; transform: translate(-2px, -1px); }
    80% { opacity: 0.3; transform: translate(2px, 1px); }
    100% { opacity: 0; transform: translate(0); }
}

@keyframes glitch-2 {
    0% { opacity: 0; transform: translate(0); }
    20% { opacity: 0.5; transform: translate(3px, -2px); }
    40% { opacity: 0.5; transform: translate(-3px, 2px); }
    60% { opacity: 0.5; transform: translate(2px, 1px); }
    80% { opacity: 0.3; transform: translate(-2px, -1px); }
    100% { opacity: 0; transform: translate(0); }
}

/* --- Footer Hover Glow Lines --- */
.footer-links a {
    position: relative;
    display: block;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.footer-links a:hover::before {
    width: 8px;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #E8C864, var(--accent));
    background-size: 200% 100%;
    animation: gradient-shift 3s linear infinite;
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- Navbar link active indicator --- */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
    background: var(--accent);
}

/* --- Code Window Enhanced Glow --- */
.hero-code-window {
    border-color: rgba(212, 168, 67, 0.1);
}

.hero-code-window::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), transparent 50%, rgba(77, 77, 255, 0.1));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

.hero-code-window:hover::before {
    opacity: 1;
}

/* --- Cursor blink animation for code --- */
.cursor-blink {
    animation: cursor-blink-anim 1s step-end infinite;
    color: var(--accent);
    font-weight: 300;
}

@keyframes cursor-blink-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Stat number glow on visible --- */
.stat-number {
    text-shadow: 0 0 0 transparent;
    transition: text-shadow 1s ease;
}

.stat-number.counted {
    text-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================
   3D ANIMATIONS
   ============================================ */

/* --- 3D Floating Code Cube in Hero --- */
.hero-3d-cube {
    position: absolute;
    right: 12%;
    bottom: 18%;
    z-index: 1;
    perspective: 600px;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.15));
}

.cube {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: cube-spin 20s linear infinite;
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 168, 67, 0.15);
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 8px;
}

.cube-face span {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.6;
    text-shadow: 0 0 15px var(--accent-glow);
}

.cube-front  { transform: rotateY(0deg)   translateZ(40px); }
.cube-back   { transform: rotateY(180deg) translateZ(40px); }
.cube-right  { transform: rotateY(90deg)  translateZ(40px); }
.cube-left   { transform: rotateY(-90deg) translateZ(40px); }
.cube-top    { transform: rotateX(90deg)  translateZ(40px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes cube-spin {
    0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg); }
}

/* Cube glow pulse */
.cube::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 168, 67, 0.12), transparent 70%);
    border-radius: 50%;
    animation: cube-glow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes cube-glow {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.3); }
}

@media (max-width: 1100px) {
    .hero-3d-cube { display: none; }
}

/* --- 3D Value Card Hover (About Section) --- */
.about-values {
    perspective: 1200px;
}

.value-card {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, background 0.3s;
}

.value-card:hover {
    transform: translateX(8px) rotateY(-4deg) rotateX(2deg);
}

.value-card .value-icon {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card:hover .value-icon {
    transform: translateZ(30px) scale(1.1);
}

.value-card h3 {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card:hover h3 {
    transform: translateZ(15px);
}

/* --- 3D Process Timeline --- */
.process-timeline {
    perspective: 1200px;
}

.process-step {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step.is-active {
    transform: translateZ(20px) scale(1.02);
}

.process-step:hover {
    transform: rotateX(-2deg) translateZ(15px);
}

.process-dot {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.process-step.is-active .process-dot {
    transform: rotateY(360deg) scale(1.1);
    animation: process-dot-spin 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes process-dot-spin {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.15); }
    100% { transform: rotateY(360deg) scale(1.1); }
}

/* --- 3D CTA Card Depth --- */
.cta-wrapper {
    transform-style: preserve-3d;
    perspective: 1500px;
}

.cta-content {
    transform-style: preserve-3d;
}

/* --- 3D Section Title Depth on scroll --- */
.section-title {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.section-title .text-accent {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title:hover .text-accent {
    transform: translateZ(20px) scale(1.05);
}

/* --- 3D Testimonial Card depth layers --- */
.testimonial-card {
    transform-style: preserve-3d;
}

.testimonial-card .testimonial-quote {
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.testimonial-card:hover .testimonial-quote {
    transform: translateZ(30px) scale(1.2);
}

.testimonial-card:hover .testimonial-author {
    transform: translateZ(15px);
    transition: transform 0.4s ease;
}

/* ============================================
   3D CODE SHOWCASE SECTION
   ============================================ */
.code-showcase-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Tabbed Code Editor --- */
.cs-editor {
    background: #0d0d15;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
    transform-style: preserve-3d;
    transition: transform 0.6s var(--transition), box-shadow 0.6s ease;
}

.cs-editor:hover {
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212,168,67,0.04);
}

.cs-editor-chrome {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.cs-dots {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.cs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.cs-dot-r { background: #ff5f57; }
.cs-dot-y { background: #febc2e; }
.cs-dot-g { background: #28c840; }

.cs-tabs {
    display: flex;
    gap: 2px;
}

.cs-tab {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cs-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.cs-tab.active {
    color: var(--text-primary);
    background: rgba(212, 168, 67, 0.08);
}

.cs-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

/* Code area */
.cs-code-area {
    position: relative;
    display: flex;
    min-height: 310px;
    overflow: hidden;
}

.cs-line-numbers {
    width: 44px;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.12);
    user-select: none;
    border-right: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.cs-code-panels {
    flex: 1;
    position: relative;
}

.cs-code-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.85;
    color: var(--text-secondary);
    white-space: pre;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.cs-code-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cs-code-panel code {
    font-family: inherit;
}

.cp-keyword { color: #c678dd; }
.cp-class { color: #e5c07b; }
.cp-var { color: #e06c75; }
.cp-string { color: #98c379; }
.cp-func { color: #61afef; }
.cp-num { color: #d19a66; }

/* Active line highlight */
.cs-active-line {
    position: absolute;
    left: 44px;
    width: calc(100% - 44px);
    height: 22px;
    background: rgba(212, 168, 67, 0.04);
    border-left: 2px solid var(--accent);
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0.7;
    top: 20px;
}

/* Status bar */
.cs-statusbar {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid var(--border);
    gap: 16px;
}

.cs-status-item {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.4);
}

.cs-status-right {
    margin-left: auto;
}

/* --- 3D Architecture Diagram --- */
.cs-architecture {
    position: relative;
}

.cs-arch-scene {
    position: relative;
    width: 100%;
    height: 420px;
    perspective: 900px;
    transform-style: preserve-3d;
}

.cs-connectors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.cs-conn-line {
    transition: stroke 0.5s ease;
}

.cs-arch-scene:hover .cs-conn-line {
    stroke: rgba(212, 168, 67, 0.35);
}

/* Data particles */
.cs-data-particle {
    filter: drop-shadow(0 0 4px currentColor);
}

/* Architecture nodes */
.cs-arch-node {
    position: absolute;
    transform-style: preserve-3d;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-node-request    { top: 30px;  left: 50%;  transform: translateX(-50%); }
.cs-node-controller { top: 130px; left: 22%; }
.cs-node-service    { top: 200px; left: 48%; }
.cs-node-model      { top: 310px; left: 43%; }
.cs-node-event      { top: 100px; right: 8%; }
.cs-node-cache      { top: 250px; right: 12%; }

.cs-node-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: default;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.cs-arch-node:hover .cs-node-inner {
    border-color: rgba(212, 168, 67, 0.3);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 168, 67, 0.06);
    transform: scale(1.08) translateZ(20px);
}

.cs-node-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.cs-node-icon svg {
    width: 100%;
    height: 100%;
}

.cs-node-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Pulse ring */
.cs-node-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    border: 1px solid var(--accent);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.cs-arch-node.pulse-active .cs-node-pulse {
    animation: node-pulse 2s ease-out infinite;
}

@keyframes node-pulse {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* Architecture caption */
.cs-arch-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.cs-caption-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: caption-blink 2s ease-in-out infinite;
}

@keyframes caption-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.cs-arch-caption span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .code-showcase-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .cs-arch-scene { height: 360px; }
}

@media (max-width: 600px) {
    .cs-code-panel { font-size: 0.68rem; padding: 16px 14px; }
    .cs-tab { font-size: 0.65rem; padding: 5px 10px; }
    .cs-arch-scene { height: 300px; }
    .cs-node-inner { padding: 8px 12px; gap: 6px; }
    .cs-node-label { font-size: 0.65rem; }
    .cs-node-icon { width: 22px; height: 22px; }
}

/* ============================================
   3D METRICS SECTION
   ============================================ */
.metrics-3d-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.metric-cube-card {
    text-align: center;
    perspective: 800px;
}

.metric-cube-wrapper {
    width: 160px;
    height: 140px;
    margin: 0 auto 24px;
    position: relative;
    perspective: 800px;
}

.metric-cube-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(20deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-cube-card:hover .metric-cube-3d {
    transform: rotateX(-20deg) rotateY(30deg) translateZ(10px);
}

.metric-face {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.metric-face-front {
    width: 160px;
    height: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transform: translateZ(0px);
    flex-direction: row;
    gap: 2px;
}

.metric-face-top {
    width: 160px;
    height: 50px;
    background: linear-gradient(180deg, rgba(212, 168, 67, 0.08), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: rotateX(90deg) translateZ(0px) translateY(-25px);
    transform-origin: bottom center;
}

.metric-face-top svg {
    width: 28px;
    height: 28px;
    opacity: 0.5;
}

.metric-face-right {
    width: 50px;
    height: 140px;
    background: linear-gradient(90deg, var(--bg-card), rgba(212, 168, 67, 0.05));
    border: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
    transform: rotateY(90deg) translateZ(160px) translateX(-25px);
    transform-origin: left center;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    transition: text-shadow 0.6s ease;
}

.metric-cube-card:hover .metric-value {
    text-shadow: 0 0 30px var(--accent-glow);
}

.metric-unit {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
    margin-top: 8px;
}

.metric-side-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.metric-cube-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.metric-cube-card:hover h3 {
    color: var(--accent);
}

.metric-cube-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 220px;
    margin: 0 auto;
}

/* Glow on card base */
.metric-cube-card::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin: 20px auto 0;
    background: var(--accent);
    border-radius: 4px;
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.5s ease;
}

.metric-cube-card:hover::after {
    opacity: 0.4;
}

@media (max-width: 900px) {
    .metrics-3d-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (max-width: 500px) {
    .metrics-3d-grid { grid-template-columns: 1fr; }
    .metric-cube-wrapper { width: 140px; height: 120px; }
    .metric-face-front { width: 140px; height: 120px; }
    .metric-face-top { width: 140px; }
    .metric-value { font-size: 2.2rem; }
}

/* ============================================
   3D WHY CHOOSE US SECTION
   ============================================ */
.why-us-3d-scene {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    perspective: 1400px;
}

.why-card-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card-3d:nth-child(1) { transform: translateZ(0px); }
.why-card-3d:nth-child(2) { transform: translateZ(0px); }
.why-card-3d:nth-child(3) { transform: translateZ(0px); }
.why-card-3d:nth-child(4) { transform: translateZ(0px); }

.why-card-3d:hover {
    transform: translateZ(40px) rotateX(-3deg) rotateY(3deg) scale(1.02);
}

.why-card-face {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    transform-style: preserve-3d;
}

.why-card-3d:hover .why-card-face {
    border-color: rgba(212, 168, 67, 0.25);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 168, 67, 0.06);
}

.why-card-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.why-card-3d:hover .why-card-icon {
    transform: translateZ(30px) scale(1.1);
}

.why-card-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    line-height: 1;
    transition: color 0.5s ease;
    transform-style: preserve-3d;
}

.why-card-3d:hover .why-card-number {
    color: rgba(212, 168, 67, 0.06);
    transform: translateZ(20px);
}

.why-card-face h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    transition: color 0.3s, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.why-card-3d:hover .why-card-face h3 {
    color: var(--accent);
    transform: translateZ(15px);
}

.why-card-face p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.why-card-3d:hover .why-card-face p {
    transform: translateZ(10px);
}

.why-card-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 168, 67, 0.04) 100%);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-radius: inherit;
}

.why-card-3d:hover .why-card-glow {
    height: 100%;
}

/* Top accent line animation */
.why-card-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #E8C864, var(--accent));
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card-3d:hover .why-card-face::before {
    transform: scaleX(1);
    animation: gradient-shift 3s linear infinite;
}

/* Floating shadow beneath cards */
.why-card-3d::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 10%;
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
}

.why-card-3d:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .why-us-3d-scene { grid-template-columns: 1fr; }
    .why-card-face { padding: 28px; }
}


/* ============================================
   LIGHT THEME OVERRIDES (hardcoded colors)
   ============================================ */

/* Smooth theme transition */
:root[data-theme="light"] {
    color-scheme: light;
}

/* --- Navbar scrolled background --- */
:root[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 247, 244, 0.90);
}

/* --- Mobile menu --- */
:root[data-theme="light"] .mobile-menu {
    background: rgba(248, 247, 244, 0.98);
}

:root[data-theme="light"] .mobile-link {
    color: var(--text-primary);
}

/* --- Preloader --- */
:root[data-theme="light"] .preloader {
    background: var(--bg-primary);
}

/* --- Logo visible on light background --- */
:root[data-theme="light"] #navLogoSvg .logo-text-group .text-draw {
    fill: #1a1a2e !important;
    stroke: #1a1a2e !important;
}

/* --- Hero grid lines --- */
:root[data-theme="light"] .hero-bg-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* --- Hero floating shapes: toned down --- */
:root[data-theme="light"] .floating-shape {
    opacity: 0.04;
}

/* --- Hero outline text --- */
:root[data-theme="light"] .hero-word-outline {
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.15);
}

/* --- Code syntax: One Light palette --- */
:root[data-theme="light"] .code-keyword,
:root[data-theme="light"] .cp-keyword { color: #a626a4; }

:root[data-theme="light"] .code-class,
:root[data-theme="light"] .cp-class { color: #c18401; }

:root[data-theme="light"] .code-var,
:root[data-theme="light"] .cp-var { color: #e45649; }

:root[data-theme="light"] .code-string,
:root[data-theme="light"] .cp-string { color: #50a14f; }

:root[data-theme="light"] .code-func,
:root[data-theme="light"] .cp-func { color: #4078f2; }

:root[data-theme="light"] .cp-num { color: #986801; }

/* --- Code editor background --- */
:root[data-theme="light"] .cs-editor {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .cs-editor-chrome {
    background: rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .cs-line-numbers {
    background: rgba(0, 0, 0, 0.02);
    color: rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .cs-active-line {
    background: rgba(184, 146, 46, 0.06);
}

:root[data-theme="light"] .cs-statusbar {
    background: rgba(0, 0, 0, 0.03);
}

/* --- Hero code window --- */
:root[data-theme="light"] .hero-code-window {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
}

:root[data-theme="light"] .code-window-header {
    background: rgba(0, 0, 0, 0.03);
}

/* --- Matrix canvas: very faint --- */
:root[data-theme="light"] .matrix-canvas {
    opacity: 0.02;
}

/* --- Noise overlay --- */
:root[data-theme="light"] .noise-overlay {
    opacity: 0.015;
    mix-blend-mode: multiply;
}

/* --- Big text divider --- */
:root[data-theme="light"] .big-text-track span {
    color: rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .big-text-outline {
    -webkit-text-stroke-color: rgba(184, 146, 46, 0.12);
    color: transparent;
}

/* --- Marquee --- */
:root[data-theme="light"] .marquee-section {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- Section bg patterns: softer --- */
:root[data-theme="light"] .circuit-pattern,
:root[data-theme="light"] .dots-pattern,
:root[data-theme="light"] .hex-pattern {
    opacity: 0.4;
}

/* --- Work cards: soften inline gradient backgrounds --- */
:root[data-theme="light"] .work-card-bg {
    opacity: 0.5;
}

:root[data-theme="light"] .work-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* --- Selection color --- */
:root[data-theme="light"] ::selection {
    background: var(--accent);
    color: #ffffff;
}

/* --- Cursor follower --- */
:root[data-theme="light"] .cursor-follower {
    mix-blend-mode: normal;
    border-color: var(--accent);
}

:root[data-theme="light"] .cursor-dot {
    background: var(--accent);
}

/* --- Glitch text muted --- */
:root[data-theme="light"] .hero-word-accent::before { color: rgba(0, 128, 255, 0.3); }
:root[data-theme="light"] .hero-word-accent::after { color: rgba(200, 0, 200, 0.3); }

/* --- Scroll progress bar --- */
:root[data-theme="light"] .scroll-progress {
    background: var(--accent);
}

/* --- Metric cube faces --- */
:root[data-theme="light"] .metric-face-front {
    background: var(--bg-card);
    border-color: var(--border);
}

:root[data-theme="light"] .metric-face-top {
    background: var(--bg-secondary);
}

:root[data-theme="light"] .metric-face-right {
    background: var(--bg-card-hover);
}

/* --- Testimonial quote mark --- */
:root[data-theme="light"] .testimonial-quote {
    color: rgba(184, 146, 46, 0.3);
}

/* --- CTA wrapper --- */
:root[data-theme="light"] .cta-wrapper {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

/* --- Process card back face --- */
:root[data-theme="light"] .proc-card-back {
    background: linear-gradient(145deg, #1a1a2e, #111120);
    color: #f0f0f5;
}

:root[data-theme="light"] .proc-card-back h4 {
    color: #D4A843;
}

:root[data-theme="light"] .proc-card-back li,
:root[data-theme="light"] .proc-card-back li::before {
    color: rgba(240, 240, 245, 0.8);
}

:root[data-theme="light"] .proc-back-duration {
    color: rgba(240, 240, 245, 0.6);
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* --- Service card number --- */
:root[data-theme="light"] .service-number {
    color: rgba(0, 0, 0, 0.04);
}

/* --- Why-us card glow --- */
:root[data-theme="light"] .why-card-glow {
    opacity: 0.3;
}

/* --- Tech orbit rings --- */
:root[data-theme="light"] .tech-ring-1 {
    border-color: rgba(184, 146, 46, 0.12);
}

:root[data-theme="light"] .tech-ring-2 {
    border-color: rgba(184, 146, 46, 0.08);
}

:root[data-theme="light"] .tech-ring-3 {
    border-color: rgba(184, 146, 46, 0.04);
}

/* --- Section divider --- */
:root[data-theme="light"] .divider-line {
    background: var(--border);
}

:root[data-theme="light"] .divider-glow {
    background: radial-gradient(ellipse at center, rgba(184, 146, 46, 0.15), transparent 70%);
}

/* --- Footer stays dark --- */
:root[data-theme="light"] .footer {
    background: #1a1a2e;
}

:root[data-theme="light"] .footer,
:root[data-theme="light"] .footer .logo-text,
:root[data-theme="light"] .footer .logo-accent,
:root[data-theme="light"] .footer h4,
:root[data-theme="light"] .footer a,
:root[data-theme="light"] .footer p,
:root[data-theme="light"] .footer .footer-tagline {
    color: #f0f0f5;
}

:root[data-theme="light"] .footer a:hover {
    color: #D4A843;
}

:root[data-theme="light"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* --- Form inputs --- */
:root[data-theme="light"] .cta-form input,
:root[data-theme="light"] .cta-form textarea {
    color: var(--text-primary);
    background: var(--bg-card);
}

:root[data-theme="light"] .cta-form input::placeholder,
:root[data-theme="light"] .cta-form textarea::placeholder {
    color: var(--text-muted);
}

/* --- Author avatar --- */
:root[data-theme="light"] .author-avatar {
    background: var(--accent-subtle);
    color: var(--accent);
}


/* ============================================
   COMPREHENSIVE MOBILE / TABLET RESPONSIVE FIX
   ============================================ */

/* ---- Tablet (max-width: 1024px) ---- */
@media (max-width: 1024px) {

    /* Section headers — center everything */
    .section-header {
        text-align: center;
        margin-bottom: 48px;
    }

    .section-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    /* Hero stats center */
    .hero-stats {
        justify-content: center;
    }

    /* About — stack to single column on tablet */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 640px;
        margin: 0 auto;
    }

    .about-values {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .value-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 24px 20px;
        gap: 14px;
    }

    .value-card:hover {
        transform: translateY(-4px);
    }

    .value-card:hover .value-icon {
        transform: scale(1.1);
    }

    .value-card:hover h3 {
        transform: none;
    }

    /* Code Showcase — stack & center */
    .code-showcase-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 640px;
        margin: 0 auto;
    }

    .cs-editor {
        width: 100%;
    }

    /* Architecture diagram — center */
    .cs-architecture {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cs-arch-scene {
        width: 100%;
        max-width: 480px;
    }

    /* Process cards — tablet layout */
    .proc-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        justify-items: center;
        max-width: 640px;
        margin: 0 auto;
    }

    .proc-card {
        width: 100%;
    }

    .proc-arrow {
        display: none;
    }

    .proc-card-inner {
        min-height: 340px;
    }

    .proc-card-front,
    .proc-card-back {
        padding: 24px 20px;
    }

    .proc-connector {
        display: none;
    }

    /* Metrics — center */
    .metrics-3d-grid {
        justify-items: center;
    }

    .metric-cube-card {
        width: 100%;
        max-width: 280px;
    }

    /* Why Us — center */
    .why-us-3d-scene {
        max-width: 640px;
        margin: 0 auto;
    }

    /* Testimonials center */
    .testimonials-track {
        max-width: 640px;
        margin: 0 auto;
    }
}

/* ---- Mobile (max-width: 768px) ---- */
@media (max-width: 768px) {

    /* Section header centering */
    .section-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .section-tag {
        text-align: center;
    }

    .section-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    /* Hero centering */
    .hero-content {
        text-align: center;
        align-items: center;
    }

    .hero-badge {
        justify-content: center;
    }

    .hero-title {
        text-align: center;
    }

    .hero-line {
        justify-content: center;
    }

    .hero-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .stat {
        text-align: center;
        align-items: center;
    }

    /* About — center text */
    .about-grid {
        text-align: center;
        max-width: 100%;
    }

    .about-text {
        text-align: center;
    }

    .about-lead {
        text-align: center;
    }

    .about-text p {
        text-align: center;
    }

    .about-values {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 480px;
        margin: 0 auto;
    }

    .value-card {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        padding: 22px 20px;
        gap: 16px;
        max-width: 100%;
        width: 100%;
    }

    .value-card:hover {
        transform: translateX(6px);
    }

    /* Services — center */
    .services-grid {
        justify-items: center;
    }

    .service-card {
        text-align: center;
        max-width: 480px;
        width: 100%;
    }

    .service-icon {
        margin: 0 auto 16px;
    }

    .service-tags {
        justify-content: center;
    }

    /* Code Showcase mobile */
    .code-showcase-layout {
        max-width: 100%;
    }

    .cs-arch-scene {
        max-width: 100%;
    }

    .cs-arch-scene {
        height: 350px;
    }

    .cs-node-request    { top: 15px;  left: 50%; transform: translateX(-50%); }
    .cs-node-controller { top: 100px; left: 8%; }
    .cs-node-service    { top: 175px; left: 35%; }
    .cs-node-model      { top: 270px; left: 30%; }
    .cs-node-event      { top: 80px;  right: 5%; left: auto; }
    .cs-node-cache      { top: 210px; right: 5%; left: auto; }

    /* Process cards — mobile */
    .proc-cards {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 16px;
        max-width: 580px;
        margin: 0 auto;
    }

    .proc-card {
        max-width: 100%;
        width: 100%;
    }

    .proc-card-inner {
        min-height: 320px;
    }

    .proc-arrow {
        display: none;
    }

    /* Metrics center */
    .metrics-3d-grid {
        justify-items: center;
    }

    .metric-cube-card {
        max-width: 280px;
        width: 100%;
    }

    .metric-cube-card p {
        text-align: center;
    }

    /* Why Us center */
    .why-us-3d-scene {
        max-width: 100%;
        justify-items: center;
    }

    .why-card-3d {
        max-width: 480px;
        width: 100%;
    }

    /* Work cards center */
    .work-grid {
        justify-items: center;
    }

    .work-card {
        max-width: 520px;
        width: 100%;
    }

    /* Testimonials center */
    .testimonials-track {
        justify-items: center;
    }

    .testimonial-card {
        max-width: 520px;
        width: 100%;
    }

    /* CTA center */
    .cta-content {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-content .section-tag {
        text-align: center;
    }

    .cta-title {
        text-align: center;
    }

    .cta-text {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-form {
        text-align: left;
    }

    .cta-form .btn {
        margin: 0 auto;
    }

    /* Footer center */
    .footer-grid {
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* ---- Small Mobile (max-width: 600px) ---- */
@media (max-width: 600px) {

    .section-header {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }

    .section-subtitle {
        font-size: 0.92rem;
    }

    /* About value cards — stack icon on top */
    .about-values {
        max-width: 100%;
    }

    .value-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 24px 20px;
        gap: 12px;
    }

    .value-card:hover {
        transform: translateY(-4px);
    }

    .value-card h3 {
        font-size: 1rem;
    }

    .value-card p {
        font-size: 0.85rem;
    }

    /* Hero — stacked & centered */
    .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .stat-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Code Showcase — tighter on mobile */
    .cs-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cs-tab {
        white-space: nowrap;
        font-size: 0.65rem;
        padding: 5px 10px;
    }

    .cs-code-panel {
        font-size: 0.65rem;
        padding: 14px 12px;
        line-height: 1.7;
    }

    .cs-line-numbers {
        width: 36px;
        font-size: 0.65rem;
        padding-right: 8px;
    }

    .cs-code-area {
        min-height: 250px;
    }

    /* Architecture — scale down nodes */
    .cs-arch-scene {
        height: 280px;
    }

    .cs-node-inner {
        padding: 7px 10px;
        gap: 6px;
    }

    .cs-node-label {
        font-size: 0.62rem;
    }

    .cs-node-icon {
        width: 20px;
        height: 20px;
    }

    /* Process cards full width */
    .proc-cards {
        grid-template-columns: 1fr;
    }

    .proc-card {
        max-width: 100%;
    }

    .proc-card-inner {
        min-height: 320px;
    }

    .proc-card-front,
    .proc-card-back {
        padding: 22px 18px;
    }

    .proc-card-front h3 {
        font-size: 0.98rem;
    }

    .proc-card-front p {
        font-size: 0.82rem;
    }

    /* Metrics single column */
    .metrics-3d-grid {
        grid-template-columns: 1fr;
    }

    .metric-cube-card {
        max-width: 100%;
    }

    /* Why Us single column */
    .why-us-3d-scene {
        grid-template-columns: 1fr;
    }

    .why-card-3d {
        max-width: 100%;
    }

    .why-card-face {
        padding: 24px 20px;
    }

    /* Services single column */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        max-width: 100%;
    }

    /* Testimonials */
    .testimonials-track {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        max-width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---- Extra Small Mobile (max-width: 400px) ---- */
@media (max-width: 400px) {

    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(1.4rem, 8vw, 2rem);
    }

    .proc-icon-wrap {
        width: 52px;
        height: 52px;
    }

    .proc-icon {
        width: 34px;
        height: 34px;
    }

    .proc-tags span {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    .cs-editor-chrome {
        padding: 8px 12px;
        gap: 10px;
    }

    .cs-dots {
        gap: 5px;
    }

    .cs-dot {
        width: 8px;
        height: 8px;
    }

    .metric-cube-wrapper {
        width: 130px;
        height: 110px;
    }

    .metric-face-front {
        width: 130px;
        height: 110px;
    }

    .metric-face-top {
        width: 130px;
    }

    .metric-value {
        font-size: 2rem;
    }

    .metric-unit {
        font-size: 1rem;
    }
}
