/* ========================================
   COSMOWORK - Space / Constellation Theme
   Inspired by the Cosmos
   ======================================== */

/* CSS Variables — Orion Nebula Palette */
:root {
    --primary: #4A9EEB;
    --primary-light: #7BB8F0;
    --secondary: #E8A946;
    --accent: #56CCF2;
    --accent-blue: #2D9CDB;
    --gradient-1: linear-gradient(135deg, #4A9EEB 0%, #56CCF2 50%, #E8A946 100%);
    --gradient-2: linear-gradient(135deg, #2D3A8C 0%, #4A9EEB 100%);
    --gradient-3: linear-gradient(135deg, #56CCF2 0%, #2D9CDB 100%);
    --gradient-hero: radial-gradient(ellipse at 60% 40%, #0d1b3e 0%, #070d1f 40%, #030810 100%);
    --dark: #050a15;
    --dark-light: #0a1225;
    --dark-card: #0e1a35;
    --text: #c8d8f0;
    --text-muted: #7a8faa;
    --white: #f0f4ff;
    --star-gold: #E8A946;
    --nebula-blue: #1a3a6e;
    --nebula-purple: #2a1a4e;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 40px rgba(74, 158, 235, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

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

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(74, 158, 235, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--gradient-1);
    border-radius: 10px;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 235, 0.12);
    border: 1px solid rgba(74, 158, 235, 0.25);
    color: var(--primary-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.lang-toggle:hover {
    background: rgba(74, 158, 235, 0.25);
    border-color: var(--primary);
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(74, 158, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 158, 235, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(74, 158, 235, 0.35);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(74, 158, 235, 0.1);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(13,27,62,0.5) 0%, rgba(7,13,31,0.3) 40%, transparent 100%);
}

/* Nebula clouds */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: nebula-drift 12s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #1a3a8c, #0a1a4e 40%, transparent 70%);
    top: -15%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #E8A946, #8a4a10 40%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -4s;
    opacity: 0.1;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #56CCF2, #1a5a8e 40%, transparent 70%);
    top: 35%;
    left: 25%;
    animation-delay: -7s;
    opacity: 0.12;
}

/* Star field overlay — disabled, using canvas stars instead */
.grid-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(74, 158, 235, 0.15);
    border: 1px solid rgba(74, 158, 235, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--white);
    border-radius: 3px;
    animation: scroll 2s ease-in-out infinite;
}

/* ========================================
   SECTION COMMON
   ======================================== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(74, 158, 235, 0.1);
    border: 1px solid rgba(74, 158, 235, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--white) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background: rgba(10, 18, 37, 0.85);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text strong {
    color: var(--white);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 235, 0.1);
    border-radius: 12px;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.feature h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 4px;
}

.feature p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Code Window */
.code-window {
    background: #1e1e3f;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 158, 235, 0.15);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 158, 235, 0.1);
}

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

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

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.code-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    font-size: 0.88rem;
    line-height: 1.8;
}

.code-body pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.keyword { color: #c792ea; }
.variable { color: #82aaff; }
.property { color: #f78c6c; }
.string { color: #c3e88d; }

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

.service-card {
    background: var(--dark-card);
    border: 1px solid rgba(74, 158, 235, 0.08);
    border-radius: var(--radius);
    padding: 36px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(74, 158, 235, 0.2);
    box-shadow: var(--shadow);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.service-card:nth-child(1) .service-icon { background: rgba(74, 158, 235, 0.15); color: #4A9EEB; }
.service-card:nth-child(2) .service-icon { background: rgba(232, 169, 70, 0.15); color: #E8A946; }
.service-card:nth-child(3) .service-icon { background: rgba(86, 204, 242, 0.15); color: #56CCF2; }
.service-card:nth-child(4) .service-icon { background: rgba(232, 169, 70, 0.15); color: #E8A946; }
.service-card:nth-child(5) .service-icon { background: rgba(45, 156, 219, 0.15); color: #2D9CDB; }
.service-card:nth-child(6) .service-icon { background: rgba(123, 184, 240, 0.15); color: #7BB8F0; }

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

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

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

.service-tags span {
    padding: 4px 12px;
    background: rgba(74, 158, 235, 0.08);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid rgba(74, 158, 235, 0.1);
}

/* ========================================
   PROJECTS SECTION — ORBITAL SYSTEM
   ======================================== */
.projects {
    background: rgba(10, 18, 37, 0.85);
    overflow: hidden;
}

/* Orbit container — 3D perspective tilt */
.orbit-system {
    position: relative;
    width: 700px;
    height: 500px;
    margin: 0 auto;
}

/* Orbit ring outlines — ellipses for 3D perspective look */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(74, 158, 235, 0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-ring-1 {
    width: 240px;
    height: 120px;
    border-color: rgba(74, 158, 235, 0.18);
    box-shadow: 0 0 8px rgba(74, 158, 235, 0.05);
}

.orbit-ring-2 {
    width: 380px;
    height: 180px;
    border-color: rgba(74, 158, 235, 0.12);
    box-shadow: 0 0 6px rgba(74, 158, 235, 0.04);
}

.orbit-ring-3 {
    width: 520px;
    height: 240px;
    border-color: rgba(74, 158, 235, 0.08);
}

.orbit-ring-4 {
    width: 660px;
    height: 310px;
    border-color: rgba(74, 158, 235, 0.06);
    border-style: dashed;
}

/* Center sun — stays outside tilted plane so it faces viewer */
.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}


.orbit-sun {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #E8A946 0%, #c47d20 60%, #8a4a10 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 30px rgba(232, 169, 70, 0.4),
        0 0 60px rgba(232, 169, 70, 0.2),
        0 0 100px rgba(232, 169, 70, 0.1);
    animation: sun-pulse 4s ease-in-out infinite;
    margin: 0 auto 8px;
}

.orbit-sun-icon {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.orbit-sun-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--star-gold);
    text-shadow: 0 0 10px rgba(232, 169, 70, 0.3);
}

@keyframes sun-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(232, 169, 70, 0.4), 0 0 60px rgba(232, 169, 70, 0.2); }
    50% { box-shadow: 0 0 40px rgba(232, 169, 70, 0.5), 0 0 80px rgba(232, 169, 70, 0.25); }
}

/* Orbit paths — positioned by JS for elliptical motion */
.orbit-path {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

/* Pause handled by JS on hover */

/* Planet — positioned by JS along elliptical path */
.planet {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: none;
}

/* Planet core — 3D realistic spheres */
.planet-core {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 5;
    color: white;
}

/* Atmosphere glow ring around planets */
.planet-core::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    opacity: 0.4;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.planet:hover .planet-core::after {
    opacity: 0.7;
}

/* Planet body wrapper for Saturn ring */
.planet-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Planet 1 — Earth-like (blue oceans, green landmass) */
.planet-1 .planet-core {
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,0.35) 0%, transparent 25%),
        radial-gradient(circle at 72% 78%, rgba(0,0,0,0.4) 0%, transparent 35%),
        radial-gradient(ellipse at 45% 40%, rgba(80,180,100,0.5) 0%, transparent 20%),
        radial-gradient(ellipse at 60% 55%, rgba(80,180,100,0.3) 0%, transparent 15%),
        radial-gradient(ellipse at 30% 60%, rgba(80,180,100,0.4) 0%, transparent 18%),
        radial-gradient(circle at 50% 50%, #4a8ad4, #2a6cb8 30%, #1e5a9e 50%, #164578 75%, #0e2d55 100%);
    box-shadow:
        0 0 20px rgba(74, 158, 235, 0.5),
        0 0 40px rgba(74, 158, 235, 0.15),
        inset -6px -6px 14px rgba(0, 0, 0, 0.5),
        inset 4px 4px 8px rgba(255, 255, 255, 0.15);
}

.planet-1 .planet-core::after {
    background: radial-gradient(circle, rgba(100, 180, 255, 0.12), transparent 70%);
}

/* Planet 2 — Saturn-like (golden bands, gas giant) */
.planet-2 .planet-core {
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,0.35) 0%, transparent 22%),
        radial-gradient(circle at 72% 78%, rgba(0,0,0,0.45) 0%, transparent 35%),
        linear-gradient(175deg,
            #e8c370 5%, #d4a84a 12%,
            #c89838 18%, #ddb560 25%,
            #c49030 32%, #b8802a 38%,
            #d4a848 45%, #e0b860 52%,
            #c89838 58%, #b07828 65%,
            #c49030 72%, #a87020 80%,
            #8a5818 90%, #6a4010 100%);
    box-shadow:
        0 0 20px rgba(232, 169, 70, 0.5),
        0 0 40px rgba(232, 169, 70, 0.15),
        inset -6px -6px 14px rgba(0, 0, 0, 0.5),
        inset 4px 4px 8px rgba(255, 255, 255, 0.15);
}

.planet-2 .planet-core::after {
    background: radial-gradient(circle, rgba(232, 180, 80, 0.12), transparent 70%);
}

/* Planet 3 — Neptune-like (deep icy blue with atmosphere bands) */
.planet-3 .planet-core {
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,0.3) 0%, transparent 25%),
        radial-gradient(circle at 72% 78%, rgba(0,0,0,0.45) 0%, transparent 35%),
        radial-gradient(ellipse at 40% 45%, rgba(255,255,255,0.08) 0%, transparent 30%),
        linear-gradient(178deg,
            #5cc8e8 5%, #40b8e0 15%,
            #2898c8 25%, #3aade0 35%,
            #2088b8 45%, #1878a8 55%,
            #2a98c8 65%, #1870a0 75%,
            #106090 85%, #0a4870 100%);
    box-shadow:
        0 0 20px rgba(86, 204, 242, 0.5),
        0 0 40px rgba(86, 204, 242, 0.15),
        inset -6px -6px 14px rgba(0, 0, 0, 0.5),
        inset 4px 4px 8px rgba(255, 255, 255, 0.15);
}

.planet-3 .planet-core::after {
    background: radial-gradient(circle, rgba(86, 204, 242, 0.12), transparent 70%);
}

/* 4th planet — dashed/ghost style CTA */
.planet-core-cta {
    background: radial-gradient(circle at 35% 30%, rgba(74, 158, 235, 0.3), rgba(74, 158, 235, 0.1) 60%, rgba(10, 18, 37, 0.5));
    border: 2px dashed rgba(74, 158, 235, 0.4);
    box-shadow:
        0 0 15px rgba(74, 158, 235, 0.2),
        inset -3px -3px 6px rgba(0, 0, 0, 0.2);
    animation: cta-pulse 2s ease-in-out infinite;
}

.planet-core-cta::after {
    background: radial-gradient(circle, rgba(74, 158, 235, 0.1), transparent 70%);
    border: 1px dashed rgba(74, 158, 235, 0.15);
}

@keyframes cta-pulse {
    0%, 100% { border-color: rgba(74, 158, 235, 0.4); }
    50% { border-color: rgba(74, 158, 235, 0.7); box-shadow: 0 0 25px rgba(74, 158, 235, 0.3); }
}

.planet-cta-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 14px;
    background: var(--gradient-1);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

/* Saturn ring for JKM Copilot */
.saturn-ring {
    position: absolute;
    width: 110px;
    height: 36px;
    border: 3px solid rgba(232, 169, 70, 0.6);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    pointer-events: none;
    z-index: 6;
    background: linear-gradient(90deg, transparent 10%, rgba(232, 169, 70, 0.08) 30%, rgba(232, 169, 70, 0.12) 50%, rgba(232, 169, 70, 0.08) 70%, transparent 90%);
    box-shadow: 0 0 8px rgba(232, 169, 70, 0.2);
}

.saturn-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1.5px solid rgba(232, 169, 70, 0.25);
    border-radius: 50%;
}

.saturn-ring::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1.5px solid rgba(232, 169, 70, 0.35);
    border-radius: 50%;
}

/* Favicon images inside planet cores */
.planet-favicon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 0 3px rgba(255,255,255,0.3));
    border-radius: 4px;
    pointer-events: none;
}

.planet:hover .planet-core {
    transform: scale(1.2);
}

.planet-1:hover .planet-core {
    box-shadow: 0 0 35px rgba(74, 158, 235, 0.7), 0 0 70px rgba(74, 158, 235, 0.3),
        inset -5px -5px 12px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.2);
}

.planet-2:hover .planet-core {
    box-shadow: 0 0 35px rgba(232, 169, 70, 0.7), 0 0 70px rgba(232, 169, 70, 0.3),
        inset -5px -5px 12px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.2);
}

.planet-3:hover .planet-core {
    box-shadow: 0 0 35px rgba(86, 204, 242, 0.7), 0 0 70px rgba(86, 204, 242, 0.3),
        inset -5px -5px 12px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.2);
}

/* Planet info tooltip */
.planet-info {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(10, 18, 37, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 235, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 200px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
}

.planet:hover .planet-info {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

.planet-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.planet-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.planet-tech {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.planet-tech span {
    padding: 3px 8px;
    background: rgba(74, 158, 235, 0.1);
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--primary-light);
}

/* Mobile fallback cards */
.projects-mobile {
    display: none;
}

.project-mobile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--dark-card);
    border: 1px solid rgba(74, 158, 235, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.project-mobile-card:hover {
    border-color: rgba(74, 158, 235, 0.2);
    transform: translateY(-3px);
}

.pmc-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.project-mobile-card h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 4px;
}

.project-mobile-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-mobile-card > i:last-child {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   TECH STACK SECTION
   ======================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: var(--dark-card);
    border: 1px solid rgba(74, 158, 235, 0.08);
    border-radius: var(--radius);
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.tech-item::after {
    content: attr(data-name);
    position: absolute;
    bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 158, 235, 0.3);
    color: var(--primary-light);
    box-shadow: 0 10px 30px rgba(74, 158, 235, 0.15);
}

.tech-item:hover::after {
    opacity: 1;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    background: rgba(10, 18, 37, 0.85);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.contact-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 235, 0.1);
    border-radius: 14px;
    color: var(--primary-light);
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-card);
    border: 1px solid rgba(74, 158, 235, 0.1);
    border-radius: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    background: var(--dark-card);
    border: 1px solid rgba(74, 158, 235, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

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

.form-group select option {
    background: var(--dark-card);
    color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 158, 235, 0.1);
}

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

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 60px 0 30px;
    padding-bottom: 80px;
    border-top: 1px solid rgba(74, 158, 235, 0.08);
    position: relative;
    z-index: 1;
}

.footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    background:
        radial-gradient(ellipse 140% 45px at 50% 100%, rgba(60, 150, 255, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 120% 80px at 50% 100%, rgba(30, 80, 180, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 100% 120px at 50% 100%, rgba(15, 40, 100, 0.04) 0%, transparent 60%);
}


.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(74, 158, 235, 0.06);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes nebula-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
    33% { transform: translate(20px, -15px) scale(1.03); opacity: 0.3; }
    66% { transform: translate(-15px, 10px) scale(0.97); opacity: 0.4; }
}

@keyframes twinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

/* Stagger delay for grid items */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal:nth-child(5) { transition-delay: 0.2s; }
.reveal:nth-child(6) { transition-delay: 0.25s; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .orbit-system {
        width: 500px;
        height: 380px;
    }

    .orbit-ring-1 { width: 180px; height: 90px; }
    .orbit-ring-2 { width: 280px; height: 135px; }
    .orbit-ring-3 { width: 380px; height: 180px; }
    .orbit-ring-4 { width: 480px; height: 230px; }
    .orbit-path-1 { width: 180px; height: 180px; }
    .orbit-path-2 { width: 280px; height: 280px; }
    .orbit-path-3 { width: 380px; height: 380px; }
    .orbit-path-4 { width: 480px; height: 480px; }

    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid rgba(74, 158, 235, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .lang-toggle {
        margin-left: auto;
        margin-right: 16px;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .orbit-system {
        width: 370px;
        height: 300px;
        margin: 0 auto;
        transform-origin: center center;
    }

    .orbit-ring-1 { width: 160px; height: 75px; }
    .orbit-ring-2 { width: 250px; height: 115px; }
    .orbit-ring-3 { width: 340px; height: 160px; }
    .orbit-ring-4 { width: 370px; height: 190px; }

    .orbit-sun {
        width: 64px;
        height: 64px;
    }

    .orbit-sun-icon {
        font-size: 1.6rem;
    }

    .orbit-sun-label {
        font-size: 0.55rem;
        letter-spacing: 2px;
    }

    .planet-core {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }

    .planet-favicon {
        width: 24px;
        height: 24px;
    }

    .saturn-ring {
        width: 88px;
        height: 28px;
        border-width: 2px;
    }

    .planet-info {
        min-width: 140px;
        padding: 10px 12px;
        top: 52px;
    }

    .planet-info h4 {
        font-size: 0.85rem;
    }

    .planet-info p {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .planet-tech span {
        padding: 2px 6px;
        font-size: 0.55rem;
    }

    .projects-mobile {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: 30px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-visual {
        order: -1;
    }

    .about-content,
    .about-visual,
    .code-window {
        max-width: 100%;
        overflow: hidden;
    }

    .code-body {
        padding: 16px;
        font-size: 0.78rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 24px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

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

    .tech-item {
        padding: 20px 10px;
        font-size: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    .hero-content {
        padding-top: 100px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.78rem;
        padding: 6px 16px;
    }

    .planet-info {
        min-width: 160px;
        padding: 12px 14px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-mobile-card {
        padding: 14px;
        gap: 12px;
    }

    .pmc-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.1rem;
    }

    .feature {
        gap: 12px;
    }

    .feature-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-links {
        gap: 12px;
        font-size: 0.85rem;
    }

    .code-body {
        padding: 12px;
        font-size: 0.72rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tech-item {
        padding: 16px 8px;
        font-size: 1.6rem;
    }
}
