/* ============================================
   WAHOO-INSPIRED DESIGN SYSTEM
   Bold, Dynamic, Tech-Forward
   ============================================ */

:root {
    /* Primary - Wahoo Blue */
    --primary: #00a6fb;
    --primary-dark: #0080c7;
    --primary-light: #4dc3ff;
    --primary-glow: rgba(0, 166, 251, 0.4);

    /* Accent - Teal/Cyan */
    --accent: #00d4aa;
    --accent-dark: #00a885;
    --accent-light: #4de8c7;
    --accent-glow: rgba(0, 212, 170, 0.4);

    /* Backgrounds - GitHub Dark */
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-elevated: #21262d;
    --bg-hover: #30363d;

    /* Text */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    /* Borders */
    --border-color: rgba(240, 246, 252, 0.1);
    --border-hover: rgba(240, 246, 252, 0.2);

    /* Data/Stats Colors */
    --data-blue: #58a6ff;
    --data-green: #3fb950;
    --data-orange: #d29922;
    --data-red: #f85149;
    --data-purple: #a371f7;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-hero: linear-gradient(135deg, rgba(0, 166, 251, 0.15), rgba(0, 212, 170, 0.1));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   GENERAL STYLES
   ============================================ */

main {
    flex: 1;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    backdrop-filter: blur(12px);
    background: rgba(13, 17, 23, 0.9) !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.nav-link-custom {
    position: relative;
    padding: 0.5rem 1rem !important;
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--text-primary) !important;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    width: 70%;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.display-hero {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.display-4 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
}

.lead {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 400;
    color: var(--text-secondary);
}

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

.text-primary-custom {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 166, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-stats-ticker {
    display: flex;
    gap: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.ticker-item {
    text-align: center;
}

.ticker-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.ticker-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   CARDS & GLASS MORPHISM
   ============================================ */

.card-glass {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    border-color: var(--border-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-elevated {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
}

.card-glow {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.card-glow:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-4px);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(0, 166, 251, 0.15); color: var(--primary); }
.stat-icon.green { background: rgba(0, 212, 170, 0.15); color: var(--accent); }
.stat-icon.orange { background: rgba(210, 153, 34, 0.15); color: var(--data-orange); }
.stat-icon.purple { background: rgba(163, 113, 247, 0.15); color: var(--data-purple); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-value.blue { color: var(--primary); }
.stat-value.green { color: var(--accent); }
.stat-value.orange { color: var(--data-orange); }
.stat-value.purple { color: var(--data-purple); }

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.stat-trend.up { color: var(--data-green); }
.stat-trend.down { color: var(--data-red); }

/* ============================================
   ACTIVITY CARDS
   ============================================ */

.activity-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) var(--bg-dark);
}

.activity-scroll::-webkit-scrollbar {
    height: 6px;
}

.activity-scroll::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}

.activity-scroll::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

.activity-card {
    flex: 0 0 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.activity-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.activity-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.activity-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.activity-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.activity-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
}

.activity-stat i {
    color: var(--text-muted);
}

.activity-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ============================================
   BLOG CARDS
   ============================================ */

.blog-card-featured {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card-featured:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-elevated);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.blog-card-category.tech {
    background: rgba(0, 166, 251, 0.15);
    color: var(--primary);
}

.blog-card-category.cycling {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent);
}

.blog-card-category.general {
    background: rgba(163, 113, 247, 0.15);
    color: var(--data-purple);
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Compact blog card */
.blog-card-compact {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.blog-card-compact:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.blog-card-compact .blog-card-content {
    padding: 0;
    flex: 1;
}

.blog-card-compact .blog-card-title {
    font-size: 1rem;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-4px);
}

.project-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 14px;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline-accent {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 0;
}

.btn-ghost:hover {
    color: var(--primary-light);
}

.btn-ghost i {
    transition: transform 0.2s ease;
}

.btn-ghost:hover i {
    transform: translateX(4px);
}

/* ============================================
   BADGES
   ============================================ */

.badge-tech {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.badge-category:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.badge-category.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.badge-stack {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   SECTION STYLES
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

/* ============================================
   PROFILE IMAGE STYLES
   ============================================ */

.profile-image-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.profile-image-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   ICONS
   ============================================ */

.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   BLOG CONTENT
   ============================================ */

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-content h2,
.blog-content h3 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content code {
    background: var(--bg-elevated);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary);
}

.blog-content pre {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.blog-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(0, 166, 251, 0.3);
    text-underline-offset: 2px;
}

.blog-content a:hover {
    text-decoration-color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    margin-top: auto;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in-delay-1 { animation-delay: 0.1s; }
.animate-fade-in-delay-2 { animation-delay: 0.2s; }
.animate-fade-in-delay-3 { animation-delay: 0.3s; }

.animate-pulse {
    animation: pulse 2s ease infinite;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .hero-stats-ticker {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .ticker-item {
        flex: 1 1 calc(50% - 0.75rem);
    }
}

@media (max-width: 768px) {
    .display-hero {
        font-size: 2.5rem;
    }

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

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .activity-card {
        flex: 0 0 240px;
    }

    .stat-card {
        padding: 1rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1100;
    transition: width 0.1s ease-out;
}

/* ============================================
   BLOG SEARCH
   ============================================ */

.form-control.bg-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control.bg-card::placeholder {
    color: var(--text-muted);
}

.form-control.bg-card:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.bg-dark-custom { background-color: var(--bg-dark) !important; }
.bg-card { background-color: var(--bg-card) !important; }
.bg-elevated { background-color: var(--bg-elevated) !important; }

.border-subtle { border-color: var(--border-color) !important; }

.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 20px !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
