/* ============================================
   keranmckenzie.com - Base Styles
   Apple-inspired, minimal, light mode only
   ============================================ */

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

:root {
    --color-bg: #fafbfc;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-light: #eff6ff;
    --color-accent: #6366f1;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-glow: rgba(59, 130, 246, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    margin: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

.navbar.scrolled {
    background: rgba(250, 251, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text);
}

.nav-logo {
    width: 32px;
    height: 32px;
}

.logo-orbit {
    width: 32px;
    height: 32px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-orbit::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
}

.logo-core {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-glow);
}

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

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

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

.nav-github {
    display: flex;
    align-items: center;
    color: var(--color-text-secondary);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    left: 0;
    transition: transform var(--transition-fast);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

.nav-mobile {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 251, 252, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px;
}

.nav-mobile.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-mobile-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 8px 0;
    transition: color var(--transition-fast);
}

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 120px;
    overflow: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.04) 40%, transparent 70%);
    animation: gradientPulse 8s ease-in-out infinite;
}

@keyframes gradientPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.floating-dots {
    position: absolute;
    inset: 0;
}

.floating-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    animation: floatDot linear infinite;
}

@keyframes floatDot {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 520px;
}

.hero-tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.hero-title-line {
    display: block;
    padding-bottom: 6px;
}

.hero-title-accent {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 440px;
}

/* Hero Visual - Orbital Animation */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
}

.orbital-system {
    position: relative;
    width: 380px;
    height: 380px;
}

.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(99, 102, 241, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.orbit-sphere {
    position: relative;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 35% 35%, #93c5fd, #3b82f6 50%, #1d4ed8 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.1);
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 50%;
    animation: orbitRotate linear infinite;
}

.orbit-ring-1 {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    animation-duration: 24s;
}

.orbit-ring-2 {
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    animation-duration: 36s;
    animation-direction: reverse;
}

.orbit-ring-3 {
    width: 360px;
    height: 360px;
    margin: -180px 0 0 -180px;
    animation-duration: 48s;
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 35% 35%, #9ec5ff, #2f73ff);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(47, 115, 255, 0.25);
}

.orbit-ring-1 .orbit-dot:first-child {
    top: -4px;
    left: 50%;
    margin-left: -4px;
}

.orbit-ring-1 .orbit-dot:last-child {
    bottom: -4px;
    left: 50%;
    margin-left: -4px;
}

.orbit-ring-2 .orbit-dot:first-child {
    top: 50%;
    right: -4px;
    margin-top: -4px;
    width: 6px;
    height: 6px;
}

.orbit-ring-2 .orbit-dot:last-child {
    top: 50%;
    left: -4px;
    margin-top: -4px;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 35% 35%, #c4b5fd, #8b5cf6);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.orbit-ring-3 .orbit-dot:first-child {
    top: 15%;
    right: 8%;
    width: 6px;
    height: 6px;
}

.orbit-ring-3 .orbit-dot:last-child {
    bottom: 15%;
    left: 8%;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle at 35% 35%, #c4b5fd, #8b5cf6);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

@media (prefers-reduced-motion: reduce) {
    .orbit-ring,
    .orbit-glow,
    .floating-dot {
        animation: none;
    }
}

/* ============================================
   Section Headers
   ============================================ */

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

.section-tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

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

/* ============================================
   Featured Apps Section
   ============================================ */

.apps {
    position: relative;
    z-index: 2;
    margin-top: -100px;
    padding-top: 0;
}

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

.app-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.app-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.app-card-image {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.04));
    border-radius: var(--radius-lg);
    padding: 20px;
}

.app-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-card-content {
    flex: 1;
}

.app-card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.app-card-tagline {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.app-card-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.app-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.app-card-link-status {
    text-decoration: none;
    transition: all var(--transition-base);
}

.app-card-link-status:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(2px);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    margin-top: 60px;
    border-top: 1px solid var(--color-border);
    padding: 48px 0 24px;
    background: var(--color-surface);
}

.footer-content {
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo {
    margin-bottom: 2px;
}

.footer-name {
    font-size: 15px;
    font-weight: 600;
}

.footer-descriptor {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.footer-copyright {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.footer-heart {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.heart {
    color: #ef4444;
}

.robot {
    display: inline-block;
}

/* ============================================
   Responsive - Tablet
   ============================================ */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-visual {
        height: 350px;
    }

    .orbital-system {
        width: 300px;
        height: 300px;
    }

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

/* ============================================
   Responsive - Mobile
   ============================================ */

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

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }

    .apps {
        margin-top: -40px;
    }

    .hero-visual {
        height: 280px;
    }

    .orbital-system {
        width: 240px;
        height: 240px;
    }

    .orbit-ring-1 {
        width: 140px;
        height: 140px;
        margin: -70px 0 0 -70px;
    }

    .orbit-ring-2 {
        width: 190px;
        height: 190px;
        margin: -95px 0 0 -95px;
    }

    .orbit-ring-3 {
        width: 240px;
        height: 240px;
        margin: -120px 0 0 -120px;
    }

    .orbit-core {
        width: 50px;
        height: 50px;
    }

    .orbit-glow {
        width: 80px;
        height: 80px;
    }

    .orbit-sphere {
        width: 40px;
        height: 40px;
    }

    .apps {
        padding: 20px 0 60px;
    }

    .app-card {
        flex-direction: column;
        padding: 24px;
        gap: 20px;
    }

    .app-card-image {
        width: 100px;
        height: 100px;
        padding: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .app-card-title {
        font-size: 20px;
    }
}
