:root {
    --primary-color: #3b82f6;
    --primary-color-dark: #2563eb;
    --background-color: #f9fafb;
    --text-color: #1f2937;
    --secondary-text-color: #6b7280;
    --card-background: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
    --border-color: #e5e7eb;
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-height: 70px;
    --container-padding: 1.5rem;
}

.dark-mode {
    --primary-color: #60a5fa;
    --primary-color-dark: #3b82f6;
    --background-color: #111827;
    --text-color: #f9fafb;
    --secondary-text-color: #9ca3af;
    --card-background: #1f2937;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --border-color: #374151;
    --header-bg: rgba(17, 24, 39, 0.85);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

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

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-bottom 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    line-height: 1;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: var(--header-height);
    position: relative;
    z-index: 1200;
}

.navbar {
    display: flex;
    align-items: center;
    height: var(--header-height);
    position: relative;
}

.header svg {
    display: block;
}

/* --- Theme Toggle Button --- */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    font-size: 1.25rem;
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.theme-toggle-btn:hover {
    background-color: var(--card-background);
    color: var(--primary-color-dark);
}

.theme-toggle-btn .icon-moon,
.theme-toggle-btn .icon-sun {
    width: 100%;
    height: 100%;
}

.theme-toggle-btn .icon-moon {
    display: block;
}

.theme-toggle-btn .icon-sun {
    display: none;
}

.dark-mode .theme-toggle-btn .icon-moon {
    display: none;
}

.dark-mode .theme-toggle-btn .icon-sun {
    display: block;
}

.hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle-btn:focus:not(:focus-visible),
.hamburger:focus:not(:focus-visible) {
    outline: none;
}

.theme-toggle-btn:focus-visible,
.hamburger:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 0.22s ease, opacity 0.18s ease, width 0.22s ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    width: 0;
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- Main Content --- */
main {
    padding: calc(var(--header-height) + 40px) 0 4rem;
}

.welcome-section {
    text-align: left;
    padding-bottom: 4rem;
}

.welcome-section h1,
.content-section h1,
.content-section h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.content-section {
    padding: 0 0 4rem;
}

.content-section h1,
.content-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* --- Footer --- */
.footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
    margin-top: 4rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.social-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-credit {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #374151;
}

.dark-mode .footer-credit {
    color: #cbd5e1;
}

.footer-usage {
    max-width: 640px;
    margin: 0.5rem auto 0;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* Palette component styling */
.palette {
    background: var(--card-background);
    border-radius: 14px;
    padding: 1.3rem 1.5rem;
    margin: 1.8rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.palette.important {
    background: var(--card-background);
    border-left: 1px solid var(--border-color);
}

.palette strong {
    display: block;
    margin-bottom: 0.6rem;
}

.hero-palette {
    position: relative;
    overflow: hidden;
    margin: 2rem 0 0;
    padding: 1.55rem 1.65rem;
    border-color: rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.06) 42%, rgba(20, 184, 166, 0.08)),
        var(--card-background);
    box-shadow: 0 18px 44px -30px rgba(15, 23, 42, 0.45);
}

.hero-palette::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #06b6d4, #14b8a6);
}

.hero-palette::after {
    content: '';
    position: absolute;
    top: -42px;
    right: -38px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 50%;
    opacity: 0.7;
    pointer-events: none;
}

.hero-palette p {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
}

.hero-palette strong {
    display: inline;
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 1.05rem;
}

.hero-palette p:last-child {
    margin-bottom: 0;
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.1rem;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 1100;
        background-color: var(--header-bg);
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 0;
        border-bottom: none;
        display: none !important;
        pointer-events: none;
    }

    .nav-links.active {
        display: flex !important;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .nav-links a:hover {
        background-color: var(--card-background);
    }

    .nav-links a.active::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    main {
        padding-top: calc(var(--header-height) + 30px);
    }

    .welcome-section h1,
    .content-section h1,
    .content-section h2 {
        font-size: 1.75rem;
    }

    .social-links {
        gap: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 0.9rem;
    }
}

/* About page content alignment */

/* ===================================== HUB REDESIGN OVERRIDES ===================================== */
:root {
    --primary-color: #2563eb;
    --primary-color-dark: #1d4ed8;
    --background-color: #f6f9ff;
    --text-color: #172033;
    --secondary-text-color: #475569;
    --card-background: #ffffff;
    --card-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.22), 0 3px 10px -6px rgba(15, 23, 42, 0.18);
    --border-color: #cbd5e1;
    --header-bg: rgba(255, 255, 255, 0.96);
    --header-height: 64px;
    --container-padding: 1.5rem;
}

.dark-mode {
    --primary-color: #60a5fa;
    --primary-color-dark: #3b82f6;
    --background-color: #111827;
    --text-color: #f9fafb;
    --secondary-text-color: #9ca3af;
    --card-background: #1f2937;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --border-color: #374151;
    --header-bg: rgba(17, 24, 39, 0.88);
}

body {
    background-color: var(--background-color);
    background-image: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.06), transparent 30%);
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
}

.header {
    box-shadow: 0 18px 32px -28px rgba(15, 23, 42, 0.45);
}

.header-container {
    position: relative;
    z-index: 1201;
}

.navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1100;
    display: block;
    width: 100%;
    height: auto;
}

.navbar > .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 18px 32px -26px rgba(15, 23, 42, 0.35);
    transition: max-height 0.3s ease, padding 0.3s ease;
    width: 100%;
}

.nav-links.active {
    max-height: 360px;
    padding: 1rem var(--container-padding) 1.15rem;
    pointer-events: auto;
}

.nav-links li {
    width: 100%;
}

.nav-links a {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.nav-links a::after {
    display: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.25);
    background-color: rgba(37, 99, 235, 0.08);
    transform: translateX(2px);
}

.nav-links a.active {
    font-weight: 700;
}

.header-actions {
    gap: 0.75rem;
}

.theme-toggle-btn {
    background: var(--card-background);
    border-color: var(--border-color);
}

.hamburger {
    display: flex;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.4);
}

.hamburger:hover {
    background-color: var(--card-background);
    color: var(--primary-color-dark);
}

.hamburger-line {
    width: 20px;
}

main {
    padding: calc(var(--header-height) + 48px) 0 4rem;
}

.hero-section.welcome-section {
    text-align: left;
    padding-bottom: 3.5rem;
}

.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: 1.5rem;
    align-items: start;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    max-width: 760px;
    text-align: left;
    animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-right {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 0.35rem;
    animation: heroFadeUp 0.75s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.88rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.32);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.dark-mode .hero-badge {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.22);
    color: #93c5fd;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.7);
    animation: dotPulse 2.5s ease-in-out infinite;
}

.dark-mode .hero-badge-dot {
    background: #60a5fa;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.8);
}

@keyframes dotPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.75);
    }
}

.hero-left h1 {
    font-size: clamp(1.85rem, 2.8vw, 2.7rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
    margin-bottom: 0;
    max-width: 760px;
    text-align: left;
    color: var(--text-color);
}

.hero-title-line {
    display: block;
}

.hero-brand-span {
    background: linear-gradient(125deg, #1d4ed8 0%, #3b82f6 45%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subline {
    display: block;
    font-size: 0.58em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-text-color);
    margin-top: 0.15em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--secondary-text-color);
    max-width: 720px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.18);
    color: var(--primary-color-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.dark-mode .hero-chip {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
}

.network-panel {
    width: 100%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
}

.network-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.network-panel-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.network-panel-status {
    font-size: 0.88rem;
    color: var(--secondary-text-color);
}

.network-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.network-card {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--card-accent, var(--primary-color));
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 20px -18px rgba(15, 23, 42, 0.3);
    transition: transform 0.25s, border-color 0.25s, background-color 0.25s;
}

.network-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.25);
}

.network-card-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--card-accent, var(--primary-color));
}

.network-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--text-color);
}

.network-card p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--secondary-text-color);
}

.network-card--maths {
    --card-accent: #2563eb;
}

.network-card--science {
    --card-accent: #0ea5e9;
}

.network-card--cs {
    --card-accent: #14b8a6;
}

.network-card--about {
    --card-accent: #475569;
}

.dark-mode .network-card {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.03));
}

.dark-mode .hero-palette {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(6, 182, 212, 0.035) 44%, rgba(20, 184, 166, 0.045)),
        rgba(10, 20, 36, 0.78);
    border-color: rgba(96, 165, 250, 0.18);
    box-shadow: 0 18px 44px -32px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-grid,
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.content-section .container > h2 {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    line-height: 1.15;
    color: var(--text-color);
}

.feature-card {
    position: relative;
    overflow: hidden;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.55rem 1.55rem 1.65rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background-color 0.3s;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--feature-accent, var(--primary-color));
}

.feature-card::after {
    content: '';
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--feature-accent, var(--primary-color)) 12%, transparent);
    pointer-events: none;
}

.feature-card:nth-child(1) {
    --feature-accent: #2563eb;
}

.feature-card:nth-child(2) {
    --feature-accent: #0ea5e9;
}

.feature-card:nth-child(3) {
    --feature-accent: #14b8a6;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--feature-accent, var(--primary-color)) 42%, var(--border-color));
    box-shadow: 0 20px 42px -30px rgba(15, 23, 42, 0.45);
}

.feature-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--feature-accent, var(--primary-color)) 12%, transparent);
    color: var(--feature-accent, var(--primary-color));
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dark-mode .feature-label {
    background: color-mix(in srgb, var(--feature-accent, #60a5fa) 18%, transparent);
    color: #bfdbfe;
}

.dark-mode .feature-card {
    background:
        linear-gradient(180deg, rgba(96, 165, 250, 0.055), rgba(20, 184, 166, 0.025)),
        rgba(10, 20, 36, 0.74);
    border-color: rgba(96, 165, 250, 0.17);
    box-shadow: 0 18px 44px -32px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card h3,
.benefit-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-color);
}

.feature-card p,
.benefit-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--secondary-text-color);
    font-size: 0.95rem;
}

.benefit-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 2rem 1.75rem 1.75rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.09), rgba(14, 165, 233, 0.035)),
        var(--card-background);
    box-shadow: var(--card-shadow);
    isolation: isolate;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.4rem;
    right: 1.4rem;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, var(--benefit-accent, #3b82f6), transparent);
}

.benefit-card::after {
    content: '';
    position: absolute;
    right: -54px;
    bottom: -58px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--benefit-accent, #3b82f6) 20%, transparent), transparent 68%);
    pointer-events: none;
    z-index: -1;
}

.benefit-card:nth-child(1) {
    --benefit-accent: #60a5fa;
}

.benefit-card:nth-child(2) {
    --benefit-accent: #22d3ee;
}

.benefit-card:nth-child(3) {
    --benefit-accent: #2dd4bf;
}

.dark-mode .benefit-card {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--benefit-accent, #60a5fa) 10%, transparent), rgba(10, 20, 36, 0.72)),
        rgba(5, 13, 28, 0.76);
    border-color: color-mix(in srgb, var(--benefit-accent, #60a5fa) 24%, rgba(148, 163, 184, 0.14));
    box-shadow:
        0 24px 54px -38px rgba(0, 0, 0, 0.95),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark-mode .benefit-card::before {
    box-shadow: 0 0 18px color-mix(in srgb, var(--benefit-accent, #60a5fa) 42%, transparent);
}

.dark-mode .benefit-card::after {
    opacity: 0.75;
}

.benefit-card p {
    line-height: 1.7;
}

@media (max-width: 960px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hero-right {
        justify-content: stretch;
        padding-top: 0;
    }

    .feature-grid,
    .benefit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1.1rem;
    }

    .header-container {
        gap: 1rem;
    }

    .logo {
        font-size: 1.35rem;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1100;
        width: 100%;
        height: auto;
    }

    .nav-links {
        position: static;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        max-height: 0;
        padding: 0 var(--container-padding);
        overflow: hidden;
        pointer-events: none;
        opacity: 0;
        transform: translateY(-8px);
        background-color: var(--card-background);
        border-bottom: 1px solid transparent;
        box-shadow: 0 18px 32px -26px rgba(15, 23, 42, 0.35);
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.22s ease, transform 0.22s ease, border-color 0.3s ease;
    }

    .nav-links.active {
        max-height: 420px;
        padding: 0.9rem var(--container-padding) 1rem;
        pointer-events: auto;
        opacity: 1;
        transform: translateY(0);
        border-bottom-color: var(--border-color);
    }

    .nav-links a {
        padding: 0.82rem 0.95rem;
    }

    main {
        padding-top: calc(var(--header-height) + 30px);
    }

    .hero-left {
        gap: 0.75rem;
    }

    .hero-left h1 {
        font-size: clamp(1.75rem, 8vw, 2.35rem);
    }

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

    .hero-chips {
        gap: 0.55rem;
    }

    .hero-chip {
        font-size: 0.8rem;
        padding: 0.42rem 0.75rem;
    }

    .network-panel {
        padding: 1rem;
        border-radius: 16px;
    }

    .network-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-palette {
        margin-top: 1.25rem;
        padding: 1.35rem 1.2rem 1.35rem 1.3rem;
        border-radius: 14px;
    }

    .hero-palette p {
        font-size: 0.94rem;
        line-height: 1.65;
    }

    .content-section {
        padding-bottom: 3rem;
    }

    .content-section h1,
    .content-section h2,
    .content-section .container > h2 {
        margin-bottom: 1.6rem;
        font-size: clamp(1.55rem, 8vw, 2rem);
        line-height: 1.18;
    }

    .feature-card,
    .benefit-card {
        padding: 1.25rem;
    }

    .benefit-card {
        min-height: auto;
        border-radius: 14px;
    }

    .feature-card h3,
    .benefit-card h3 {
        font-size: 1.08rem;
    }

    .feature-card p,
    .benefit-card p,
    .network-card p {
        font-size: 0.92rem;
    }
}

@media (max-width: 420px) {
    :root {
        --container-padding: 0.95rem;
    }

    .logo {
        font-size: 1.12rem;
    }

    .theme-toggle-btn,
    .hamburger {
        width: 40px;
        height: 40px;
    }

    .header-actions {
        gap: 0.55rem;
    }

    .hero-palette,
    .feature-card,
    .benefit-card {
        padding: 1.15rem;
    }

    .feature-grid,
    .benefit-grid {
        gap: 0.95rem;
    }
}
