/* ═══════════════════════════════════════════
   gauravyadav.dev — Shared Design System
   ═══════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
    --bg-deepest: #020810;
    --bg-deep: #05101f;
    --bg-card: #0a1628;
    --bg-card-hover: #0d1d35;
    --accent-cyan: #00e5ff;
    --accent-cyan-dim: rgba(0, 229, 255, 0.15);
    --accent-blue: #2979ff;
    --accent-green: #00e676;
    --accent-magenta: #e040fb;
    --accent-orange: #ff9100;
    --accent-yellow: #ffd600;
    --text-primary: #e0e8f5;
    --text-secondary: #7a8ba8;
    --text-dim: #4a5a73;
    --border-subtle: rgba(0, 229, 255, 0.08);
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.1);
    --glow-strong: 0 0 30px rgba(0, 229, 255, 0.5), 0 0 80px rgba(0, 229, 255, 0.15);

    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    --max-width: 1100px;
    --nav-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg-deepest);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: transparent;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #fff;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #33ecff; }

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

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

/* ─── SPACE BACKGROUND + STARS ─── */
.space-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, #0a1a3a 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, #0d0a2a 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, #071525 0%, transparent 60%),
        var(--bg-deepest);
    z-index: 0;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    animation: gridPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

.star--sm {
    width: 1px;
    height: 1px;
    animation: twinkleGentle var(--dur) infinite ease-in-out var(--delay);
}

.star--md {
    width: 1.5px;
    height: 1.5px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
    animation: twinkleMed var(--dur) infinite ease-in-out var(--delay);
}

.star--bright {
    width: 2px;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.7), 0 0 10px 3px rgba(200, 230, 255, 0.3);
    animation: twinkleBright var(--dur) infinite ease-in-out var(--delay);
}

@keyframes twinkleGentle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

@keyframes twinkleMed {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.85; }
}

@keyframes twinkleBright {
    0%, 100% { opacity: 0.25; box-shadow: 0 0 2px 0px rgba(255,255,255,0.4); }
    50% { opacity: 1; box-shadow: 0 0 5px 2px rgba(255,255,255,0.8), 0 0 12px 4px rgba(200,230,255,0.35); }
}

/* ─── NAVIGATION ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(2, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 2px;
    text-decoration: none;
}

.logo::before { content: "> "; opacity: 0.5; }

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

.nav-links a {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: width 0.3s ease;
}

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

/* Nav separator dot */
.nav-links .nav-sep {
    color: var(--text-dim);
    font-size: 6px;
    user-select: none;
}

.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
}

/* ─── PAGE CONTENT ─── */
main {
    position: relative;
    z-index: 2;
}

.page-section {
    min-height: 100vh;
    padding: 120px 5% 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.page-section--auto {
    min-height: auto;
}

/* ─── SECTION TITLES ─── */
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 48px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title .num {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-cyan);
    font-weight: 400;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-subtle), transparent);
    max-width: 300px;
}

/* ─── CARDS ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 28px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ─── BUTTONS ─── */
.btn {
    font-family: var(--font-mono);
    padding: 14px 28px;
    border: 1px solid var(--accent-cyan);
    background: transparent;
    color: var(--accent-cyan);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--accent-cyan-dim);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
    color: var(--accent-cyan);
}

.btn--primary {
    background: var(--accent-cyan);
    color: var(--bg-deepest);
}

.btn--primary:hover {
    background: #33ecff;
    box-shadow: var(--glow-strong);
    color: var(--bg-deepest);
}

.btn--sm {
    padding: 8px 16px;
    font-size: 11px;
}

/* ─── SKILL TAGS ─── */
.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(0, 229, 255, 0.06);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.12);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    display: inline-block;
}

.tag:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.tag--tech { border-color: rgba(0, 229, 255, 0.25); color: var(--accent-cyan); }
.tag--travel { border-color: rgba(0, 230, 118, 0.25); color: var(--accent-green); }

/* ─── FOOTER ─── */
footer {
    position: relative;
    z-index: 2;
    background: var(--bg-deep);
    border-top: 1px solid var(--border-subtle);
    padding: 40px 20px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-dim);
    font-size: 22px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-cyan);
    transform: translateY(-4px);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

footer p {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.animate-ready {
    opacity: 0;
    transform: translateY(40px);
}

.reveal.animate-ready.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animate-ready > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.animate-ready.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.animate-ready.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.animate-ready.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.animate-ready.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.animate-ready.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.animate-ready.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.animate-ready.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.breadcrumb a {
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.4; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    nav { padding: 0 16px; }
    .menu-btn { display: block; }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 24px;
        background: rgba(2, 8, 16, 0.97);
        backdrop-filter: blur(20px);
        transition: all 0.3s ease;
    }
    .nav-links.active { right: 0; }
    .nav-links .nav-sep { display: none; }
    .page-section { padding: 100px 16px 60px; }
    .section-title { font-size: 1.8rem; }
}
