/* ==========================================================================
   RUTVIK BAMBHANIYA - DATA ANALYST PORTFOLIO
   Modern Interactive UI/UX Design System (Inspired by Reference Layout)
   ========================================================================== */

:root, [data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;
    --bg-accent-soft: #eff6ff;
    --bg-accent-soft-2: #e0f2fe;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --brand-blue: #1d4ed8;
    --brand-blue-hover: #1e40af;
    --brand-blue-light: #2563eb;
    --accent-cyan: #0284c7;
    --accent-sky: #38bdf8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-accent: rgba(37, 99, 235, 0.35);

    --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --card-shadow-hover: 0 16px 32px -4px rgba(37, 99, 235, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(226, 232, 240, 0.8);
    --modal-bg: #ffffff;
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
}

[data-theme="dark"] {
    --bg-primary: #0b1120;
    --bg-surface: #131d33;
    --bg-alt: #0f172a;
    --bg-accent-soft: #172554;
    --bg-accent-soft-2: #0c4a6e;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --brand-blue: #3b82f6;
    --brand-blue-hover: #60a5fa;
    --brand-blue-light: #60a5fa;
    --accent-cyan: #38bdf8;
    --accent-sky: #7dd3fc;
    
    --border-color: #1e293b;
    --border-hover: #334155;
    --border-accent: rgba(59, 130, 246, 0.4);

    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #38bdf8 100%);
    --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 16px 36px -4px rgba(59, 130, 246, 0.2);
    
    --header-bg: rgba(11, 17, 32, 0.88);
    --header-border: rgba(30, 41, 59, 0.8);
    --modal-bg: #131d33;
    --code-bg: #070b14;
    --code-text: #e2e8f0;
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5.5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--brand-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
    background: var(--brand-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.35);
}

.btn-outline {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 9999px;
    letter-spacing: 0.3px;
}

.badge-blue {
    background-color: var(--bg-accent-soft);
    color: var(--brand-blue);
    border: 1px solid var(--border-accent);
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--header-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.nav-logo:hover .header-logo-img {
    transform: scale(1.06);
}

.logo-brand-text {
    display: flex;
    flex-direction: column;
}

.logo-main-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    line-height: 1.1;
}

.logo-sub-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--brand-blue);
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-link {
    padding: 0.5rem 0.9rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-blue);
    background-color: var(--bg-accent-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: scale(1.06);
}

.nav-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--text-primary);
}

/* ==========================================================================
   SCREEN 1: HERO SECTION
   ========================================================================== */
.hero-section {
    padding: 8.5rem 0 3.5rem;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[data-theme="dark"] .hero-section {
    background: #0b1120;
}

/* Background visual layer on desktop */
.hero-visual-bg-layer {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    max-width: 1100px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-visual-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

[data-theme="dark"] .hero-visual-bg-img {
    opacity: 0.92;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}

/* Soft natural fade gradient masks */
.hero-visual-fade-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

[data-theme="dark"] .hero-visual-fade-left {
    background: linear-gradient(to right, #0b1120 0%, rgba(11, 17, 32, 0) 100%);
}

.hero-visual-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

[data-theme="dark"] .hero-visual-fade-bottom {
    background: linear-gradient(to top, #0b1120 0%, rgba(11, 17, 32, 0) 100%);
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 46% 54%;
    align-items: center;
    min-height: 480px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    z-index: 3;
    max-width: 540px;
}

.hero-greeting {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.hero-name {
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.hero-tagline {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: 1.2rem;
    line-height: 1.35;
}

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

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Right Column (desktop: empty placeholder since background layer renders the visual; mobile: displays image below text) */
.hero-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.hero-mobile-visual-img {
    display: none; /* hidden on desktop */
}

@keyframes floatBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.badge-text-bold {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: 0.3px;
}

/* Trusted Tools Logo Strip */
.trusted-tools-bar {
    margin-top: 4.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.tools-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
}

.tools-logo-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tool-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
}

.tool-chip:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.tool-chip i {
    font-size: 1.15rem;
}

/* ==========================================================================
   SCREEN 2: ABOUT ME & JOURNEY SECTION
   ========================================================================== */
.about-section {
    background-color: var(--bg-surface);
}

.about-top-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4.5rem;
}

.about-bio-text {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.2rem;
}

.stats-2x2-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.about-stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    transition: all 0.25s ease;
}

.about-stat-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--brand-blue);
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.stat-card-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* About Right: Quote Card */
.about-quote-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.2rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.about-card-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--bg-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.quote-bubble {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    margin-top: 1rem;
    position: relative;
}

.quote-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 0.4rem;
}

.quote-author {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-blue);
    font-family: 'JetBrains Mono', monospace;
}

/* Journey vs What I Do Grid */
.journey-capabilities-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
}

.column-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* My Journey Timeline */
.journey-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px dashed var(--border-color);
}

.journey-node {
    position: relative;
}

.journey-dot {
    position: absolute;
    left: -1.95rem;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-blue);
    border: 3px solid var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.journey-date {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: 0.2rem;
}

.journey-role {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.journey-org {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* What I Do 4 Cards */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.capability-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem;
    transition: all 0.25s ease;
}

.capability-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.cap-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-accent-soft);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-accent);
}

.cap-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.cap-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   SCREEN 3: MY PROJECTS SECTION
   ========================================================================== */
.projects-section {
    background-color: var(--bg-primary);
}

.filter-pills-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-pill {
    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 9999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.filter-pill:hover, .filter-pill.active {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.projects-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.project-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    background: var(--bg-alt);
    overflow: hidden;
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumbnail {
    transform: scale(1.05);
}

.project-card-content {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.project-tags-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.project-tag {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-accent-soft);
    color: var(--brand-blue);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.project-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex: 1;
}

.project-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-top: auto;
}

.project-card:hover .project-card-action {
    color: var(--brand-blue-hover);
    gap: 0.6rem;
}

/* ==========================================================================
   SCREEN 4: TEMPLATES SECTION
   ========================================================================== */
.templates-section {
    background-color: var(--bg-surface);
}

.templates-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 820px;
    margin: 0 auto 3rem;
    flex-wrap: wrap;
}

.template-search-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.template-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.template-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.template-search-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.template-category-select {
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.templates-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.template-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.template-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.template-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--bg-alt);
    overflow: hidden;
}

.template-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-badge-price {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    backdrop-filter: blur(8px);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
}

.template-content {
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.template-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.template-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.2rem;
    flex: 1;
}

.template-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 0.8rem;
}

.btn-view-template {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ==========================================================================
   SCREEN 5: INSIGHTS & LEARNINGS (BLOG) SECTION
   ========================================================================== */
.insights-section {
    background-color: var(--bg-primary);
}

.insights-layout-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2.8rem;
    align-items: start;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card-row {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
}

.article-card-row:hover {
    border-color: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.article-thumb-box {
    width: 200px;
    min-width: 200px;
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
}

.article-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info-box {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.article-category-pill {
    background: var(--bg-accent-soft);
    color: var(--brand-blue);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.article-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.article-excerpt {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-read-more {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
}

/* Insights Sidebar */
.insights-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: var(--card-shadow);
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.sidebar-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.newsletter-input:focus {
    border-color: var(--brand-blue);
}

.categories-pills-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.category-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.category-row-item:hover {
    background: var(--bg-accent-soft);
    color: var(--brand-blue);
}

.category-count {
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}

/* ==========================================================================
   SCREEN 6: LET'S CONNECT & FOOTER
   ========================================================================== */
.connect-section {
    background-color: var(--bg-surface);
}

.connect-layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
}

.connect-form-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: var(--card-shadow);
}

.form-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* Connect Right Side */
.connect-right-col {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.contact-info-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.info-box-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.info-box-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-channels-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.channel-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.channel-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.build-great-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(2, 132, 199, 0.08) 100%);
    border: 1.5px dashed var(--border-accent);
    border-radius: 20px;
    padding: 1.8rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.banner-icon {
    font-size: 1.8rem;
    color: var(--brand-blue);
    margin-top: 0.2rem;
}

.banner-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.banner-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 2rem;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav-links a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-nav-links a:hover {
    color: var(--brand-blue);
}

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

.social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-motto {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 0.4rem;
}

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    padding: 2.2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.25s ease;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.code-box-pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.2rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

/* Toast Notification */
.toast-notice {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.92rem;
    font-weight: 700;
    animation: slideUp 0.3s ease;
}

[data-theme="light"] .toast-notice {
    background: #1e293b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .projects-cards-grid, .templates-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-section {
        padding: 6.5rem 0 3rem;
        min-height: auto;
    }

    .hero-visual-bg-layer {
        display: none; /* Prevent background collision on mobile */
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
    }

    .hero-left {
        max-width: 100%;
        order: 1; /* TEXT FIRST */
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .hero-right {
        order: 2; /* IMAGE BELOW */
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .hero-mobile-visual-img {
        display: block;
        width: 100%;
        max-width: 520px;
        height: auto;
        object-fit: contain;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .about-top-grid, .journey-capabilities-grid, .insights-layout-grid, .connect-layout-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .article-card-row {
        flex-direction: column;
    }

    .article-thumb-box {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 540px) {
    .hero-name {
        font-size: 2.3rem;
        letter-spacing: -1px;
    }

    .hero-tagline {
        font-size: 1.15rem;
    }

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

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        width: 100%;
        background: var(--modal-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        display: none;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-toggle {
        display: block;
    }

    .projects-cards-grid, .templates-cards-grid, .capabilities-grid, .stats-2x2-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}
