:root {
    /* Color Palette */
    --clr-background: #121212;
    --clr-surface: #1e1e1e;
    --clr-neon: #39FF14;
    --clr-neon-glow: rgba(57, 255, 20, 0.4);
    --clr-text-main: #ffffff;
    --clr-text-dim: #a0a0a0;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-max: 1200px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Fluid Spacing */
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body.dark-mode {
    background-color: var(--clr-background);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-weight: 800;
}

.display-lg { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }
.display-md { font-size: clamp(2rem, 3vw, 3rem); line-height: 1.2; }
.display-sm { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.3; }

.body-lg { font-size: 1.125rem; color: var(--clr-text-dim); }
.body-md { font-size: 1rem; color: var(--clr-text-dim); }
.body-sm { font-size: 0.875rem; }

.text-neon { 
    color: var(--clr-neon); 
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.4), 0 0 20px rgba(57, 255, 20, 0.2), 0 0 30px rgba(57, 255, 20, 0.1);
}
.white-glow {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.2), 0 0 30px rgba(255, 255, 255, 0.1);
}
.text-dim { color: var(--clr-text-dim); }

.pt-0 { padding-top: 0; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.pb-4 { padding-bottom: 2rem; }
.text-center { text-align: center; }

/* Global Utilities */
.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-spacing {
    padding: var(--spacing-xl) 0;
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-panel-flat {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.glass-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px; /* Pill shape standard for Shiny Button */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Animated Shiny Button Effect */
.btn-primary {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(57, 255, 20, 0.2);
    box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.05);
    
    /* The shiny gradient text */
    background-image: linear-gradient(
        110deg,
        var(--clr-neon) 40%,
        #ffffff 50%,
        var(--clr-neon) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shiny-text 3s infinite linear;
}

@keyframes shiny-text {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.btn-primary:hover {
    box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.1), 0 0 20px var(--clr-neon-glow);
    transform: translateY(-2px);
    border-color: rgba(57, 255, 20, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-bottom 0.4s ease;
    padding: 1.5rem 0;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-text-main);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--clr-text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--clr-neon);
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.d-none-desktop { display: none; }
.d-none-mobile { display: inline-block; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at bottom, #262626 0%, #000 100%);
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.hero-container-centered {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glow-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: var(--clr-neon);
    filter: blur(120px);
    opacity: 0.12;
    z-index: -1;
    border-radius: 50%;
}

/* Metrics Section */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.metric-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.metric-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(57, 255, 20, 0.2);
}

.metric-icon {
    font-size: 2.5rem;
    color: var(--clr-neon);
    margin-bottom: 1.2rem;
}

.metric-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

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

.service-card {
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(57, 255, 20, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(57, 255, 20, 0.3);
}

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

.service-icon {
    background: rgba(57, 255, 20, 0.1);
    color: var(--clr-neon);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.portrait-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--clr-neon);
}

/* Footer */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--clr-text-dim);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--clr-neon);
    transform: translateY(-3px);
}

/* Animations Reveal */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Responsive adjustments */
@media screen and (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .metrics-grid, .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portrait-container {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .hero-actions {
       display: flex;
       justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .d-none-desktop { display: inline-block; }
    .d-none-mobile { display: none; }
    
    .nav-links {
        display: none;
    }
    
    .metrics-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    
    .flex-between {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .display-lg { font-size: 2.5rem; }
    .display-md { font-size: 2rem; }
}

/* Pixel Canvas Additions */
.pixel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6; 
}
.service-card .card-content {
    position: relative;
    z-index: 10;
}

/* Profile Card Component Styles */
.profile-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    perspective: 1200px;
    z-index: 10;
}

.pc-card-wrapper {
    --pointer-x: 50%;
    --pointer-y: 50%;
    --rotate-x: 0deg;
    --rotate-y: 0deg;
}

.pc-behind {
    position: absolute;
    inset: calc(-1 * var(--behind-glow-size, 30%));
    background: radial-gradient(circle at center, var(--behind-glow-color) 0%, transparent 60%);
    opacity: 0.3;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 50%;
    filter: blur(40px);
}

.pc-card-shell {
    transform-style: preserve-3d;
    transform: rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
    transition: transform 0.1s ease-out; /* fallback fallback */
    cursor: default;
    border-radius: var(--radius-lg);
}

.pc-card-shell.entering {
    transition: transform 0.2s ease-out;
}

.pc-card-shell.active .pc-behind {
    opacity: 0.6;
}

.pc-card {
    position: relative;
    transform-style: preserve-3d;
    border-radius: var(--radius-lg);
    background: rgba(18, 18, 18, 0.4);
    border: 1px solid rgba(57, 255, 20, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    background-image: var(--inner-gradient);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.pc-inside {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
}

.pc-glare {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.1) 0%, rgba(255,255,255,0) 50%);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.pc-card-shell.active .pc-glare {
    opacity: 1;
}

.pc-avatar-content {
    position: relative;
    padding: 1.5rem;
    padding-bottom: 0.5rem;
}

.pc-content {
    position: relative;
    z-index: 10;
}

.pc-details {
    padding: 0 1.5rem 2rem 1.5rem;
    text-align: left;
}

.avatar {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 0.5rem);
    border: 1px solid rgba(57, 255, 20, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.pc-user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    border-radius: 99px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
}

.pc-user-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pc-mini-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.pc-handle {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.pc-status {
    font-size: 0.7rem;
    color: var(--clr-text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--clr-neon);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--clr-neon);
}

/* Magic Bento CSS */
.magic-bento-card {
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
    border-radius: var(--radius-lg);
}

.magic-bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(var(--glow-radius, 300px) circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(var(--glow-color, 57, 255, 20), calc(var(--glow-intensity, 0) * 0.15)), transparent);
    pointer-events: none;
    z-index: 1;
}

.magic-bento-card--border-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; /* border thickness */
    background: radial-gradient(var(--glow-radius, 300px) circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(var(--glow-color, 57, 255, 20), calc(var(--glow-intensity, 0) * 0.4)), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

/* Timeline Process Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}


.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

/* Segmented timeline track */
.timeline-item::before,
.timeline-item::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--clr-neon);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
    z-index: 1;
}

/* Center positioning for left/right items */
.timeline-item.left::before,
.timeline-item.left::after {
    right: -1px;
}

.timeline-item.right::before,
.timeline-item.right::after {
    left: -1px;
}

/* Top half segment (from item top down to circle border) */
.timeline-item:not(:first-child)::before {
    top: 0;
    bottom: calc(50% + 28px);
}

/* Bottom half segment (from circle border down to item bottom) */
.timeline-item:not(:last-child)::after {
    top: calc(50% + 28px);
    bottom: 0;
}

.timeline-marker {
    position: absolute;
    width: 56px;
    height: 56px;
    right: -28px;
    background: var(--clr-background);
    border: 2px solid var(--clr-neon);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--clr-neon);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4), inset 0 0 10px rgba(57, 255, 20, 0.2);
    font-family: 'Montserrat', sans-serif;
}

.timeline-item.right .timeline-marker {
    left: -28px;
}

.timeline-content {
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    border-color: rgba(57, 255, 20, 0.3);
}

.timeline-item:hover .timeline-marker {
    background: var(--clr-neon);
    color: var(--clr-background);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.8);
}

@media screen and (max-width: 768px) {
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0px;
        padding-bottom: 2rem;
        margin-bottom: 0;
    }
    
    .timeline-item.left::before,
    .timeline-item.left::after,
    .timeline-item.right::before,
    .timeline-item.right::after {
        left: 27px;
        right: auto;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        text-align: left !important;
    }
    
    .timeline-item.left .timeline-marker,
    .timeline-item.right .timeline-marker {
        left: 0;
        right: auto;
    }
}
