/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --bg: #030712;
    --surface: #0d1117;
    --surface-2: #111827;
    --border: #1e2d3d;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-2: #818cf8;
    --text-1: #f1f5f9;
    --text-2: #64748b;
    --text-3: #374151;
    --success: #22c55e;
    --error: #f43f5e;
    --warning: #f59e0b;
    --radius-card: 12px;
    --radius-el: 8px;
    --radius-btn: 6px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
    /* Skeleton shimmer colors (derived from surface tokens) */
    --skeleton-base: #111827;
    --skeleton-shine: #1e2d3d;
    /* Nav background */
    --nav-bg: rgba(3, 7, 18, 0.88);
    --nav-link-hover-bg: rgba(255, 255, 255, 0.05);
}

/* ===== LIGHT MODE ===== */
html.light {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --text-1: #0f172a;
    --text-2: #64748b;
    --text-3: #94a3b8;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --skeleton-base: #f1f5f9;
    --skeleton-shine: #e2e8f0;
    --nav-bg: rgba(248, 250, 252, 0.92);
    --nav-link-hover-bg: rgba(0, 0, 0, 0.04);
}

html.light #star-canvas { opacity: 0.25; }
html.light #cursor-glow { display: none; }

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg);
    color: var(--text-1);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', system-ui, sans-serif;
    line-height: 1.2;
    color: var(--text-1);
}

.font-mono, code, pre, .mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ===== STAR CANVAS ===== */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== CURSOR GLOW ===== */
#cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s var(--transition);
    opacity: 0;
}

/* ===== LAYOUT ===== */
main {
    position: relative;
    z-index: 2;
    flex: 1;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: var(--radius-btn);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 200ms var(--transition), box-shadow 200ms var(--transition), transform 200ms var(--transition);
    white-space: nowrap;
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.3), 0 4px 16px rgba(99,102,241,0.25);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 200ms var(--transition), color 200ms var(--transition), box-shadow 200ms var(--transition);
    white-space: nowrap;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.3);
}

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    transition: border-color 200ms var(--transition), box-shadow 200ms var(--transition);
}
.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.3);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SECTION TITLES ===== */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--accent-soft);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent-2);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 50;
    transition: transform 200ms var(--transition), box-shadow 200ms var(--transition), bottom 320ms var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #25D366;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37,211,102,0.45);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ===== INTERSECTION OBSERVER FADE-IN ===== */
.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--transition), transform 600ms var(--transition);
}
.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== UTILITY ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.blink { animation: blink-cursor 1s step-end infinite; }

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== SKELETON LOADING ===== */
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-wrap {
    position: relative;
    overflow: hidden;
    background: var(--skeleton-base);
}
.skeleton-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg,
        var(--skeleton-base) 0%,
        var(--skeleton-shine) 40%,
        var(--skeleton-base) 80%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 300ms var(--transition);
}
.skeleton-wrap.img-loaded::before {
    opacity: 0;
}
.skeleton-wrap img {
    opacity: 0;
    transition: opacity 300ms var(--transition);
    position: relative;
    z-index: 3;
}
.skeleton-wrap.img-loaded img {
    opacity: 1;
}

/* ===== KVKK / COOKIE BANNER ===== */
.kvkk-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
    transform: translateY(100%);
    transition: transform 320ms var(--transition);
}
.kvkk-banner.show { transform: translateY(0); }
.kvkk-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.kvkk-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.kvkk-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-2);
    min-width: 200px;
}
.kvkk-actions { display: flex; gap: 8px; flex-shrink: 0; }
.kvkk-accept {
    padding: 7px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms;
    font-family: 'Outfit', sans-serif;
}
.kvkk-accept:hover { background: var(--accent-hover); }
.kvkk-decline {
    padding: 7px 14px;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 200ms, color 200ms;
    font-family: 'Outfit', sans-serif;
}
.kvkk-decline:hover { border-color: var(--accent); color: var(--text-1); }

/* ===== THEME TRANSITION ===== */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 250ms var(--transition),
                border-color 250ms var(--transition),
                color 200ms var(--transition) !important;
}
