:root {
    --hn-green: #D1FF03;
    --hn-yellow: #FECF38;
    --hn-bg: #18191a;
    --hn-black: #101010;
    --hn-blue: #00F0FF;
    --hn-grey: #161616;
    --hn-white: #fff;
    --hn-light-grey: #4b4b4b;
    --card-shadow: 0 2px 14px 0 rgba(209, 255, 3, 0.06);
    --card-shadow-hover: 0 6px 24px 0 rgba(209, 255, 3, 0.13);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--hn-grey);
    margin: 0;
    padding: 0;
    color: var(--hn-white);
    font-family: 'Montserrat', 'Inter', sans-serif;
    min-height: 100vh;
}

.section-title {
    color: var(--hn-yellow, #FECF38);
    font-size: 2.1rem;
    font-family: 'Fira Mono', monospace;
    margin-bottom: 64px;
    text-align: center;
    font-weight: 700;
}

/* Header */

.auth-logged-in,
.auth-logged-out {
    display: none;
}

.hide-header {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.hn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--hn-black);
    border-bottom: 1px solid var(--hn-green);
    padding: 0.5rem 1rem;
    height: 96px;
    z-index: 1000;
    position: sticky;
    top: 0;
}

.hn-header-left {
    display: flex;
    align-items: center;
}

.hn-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 18px;
    transition: all 0.3s ease;
}

.hn-logo-link:hover {
    transform: translateX(5px);
}

.hn-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.hn-header-link {
    color: var(--hn-black);
    font-family: 'Fira Mono', monospace;
    font-size: 1.05rem;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 7px;
    background: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(90deg, var(--hn-green), var(--hn-yellow));
    font-weight: 700;
    transition: all 0.3s ease;
}

.hn-header-link:hover,
.hn-header-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 0 12px 0 var(--hn-green);
    background: linear-gradient(90deg, var(--hn-green), var(--hn-yellow));
    color: var(--hn-black);
}

.hn-header-hamburger {
    width: 38px;
    height: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 12px;
    z-index: 1002;
}

.hn-header-hamburger span {
    display: block;
    height: 4px;
    border-radius: 3px;
    background: var(--hn-green);
    width: 100%;
    transition: all 0.18s;
}

.hn-header-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 52px;
    min-width: 180px;
    background: var(--hn-black);
    border: 1.5px solid var(--hn-grey);
    box-shadow: 0 2px 10px 0 rgba(209, 255, 3, 0.10);
    border-radius: 10px;
    padding: 11px 0;
    z-index: 1001;
    flex-direction: column;
}

.hn-header-menu a {
    color: var(--hn-green);
    text-decoration: none;
    font-family: 'Fira Mono', monospace;
    padding: 10px 22px;
    font-size: 1.02rem;
    transition: all 0.3s ease;
    display: block;
}

.hn-header-menu a:hover {
    background: var(--hn-grey);
    color: var(--hn-yellow);
    transition: all 0.3s ease;
}

/* Hamburger active style */
.hn-header-hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hn-header-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hn-header-hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.hn-header-menu.active {
    display: flex;
}

@media (max-width: 650px) {
    .hn-header-link:not(.hn-login-btn) {
        display: none;
    }

    .hn-header-menu {
        min-width: 135px;
        top: 46px;
    }
}

/*  Hero */

.hero {
    background: var(--hn-black);
    padding: 64px 64px;
    text-align: center;
    border-bottom: 1px solid var(--hn-grey);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-family: 'Montserrat';
    color: var(--hn-yellow);
    font-size: 2.6rem;
    margin-bottom: 0.2em;
    font-weight: 700;
    text-shadow: 0 0 8px var(--hn-yellow);
}

.terminal-bar {
    display: inline-block;
    font-family: 'Fira Mono', monospace;
    font-size: 1.4rem;
    background: var(--hn-grey);
    color: var(--hn-green);
    padding: 14px 32px 14px 28px;
    border-radius: 10px;
    margin-bottom: 42px;
    margin-top: 42px;
    box-shadow: 0 0 10px 1px rgba(0, 255, 0, 0.1);
    position: relative;
}

.blinking-cursor {
    display: inline-block;
    width: 10px;
    height: 1.3em;
    background: var(--hn-green);
    margin-left: 4px;
    animation: blink 1s steps(1) infinite;
    vertical-align: bottom;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.hero p {
    color: var(--hn-white);
    font-size: 1.3rem;
    margin-top: 0.6em;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.85;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-block;
    margin-top: 28px;
    background: linear-gradient(90deg, var(--hn-green), var(--hn-yellow));
    color: var(--hn-black);
    font-weight: 700;
    padding: 16px 48px;
    font-size: 1.15rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Fira Mono', monospace;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px 0 var(--hn-green);
}

.cta-secondary {
    background: transparent;
    color: var(--hn-white);
    padding: 1rem 2rem;
    border: 1px solid #333;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    margin: 1rem 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Fira Mono', monospace;
}

.cta-secondary:hover {
    border-color: var(--hn-yellow);
    color: var(--hn-yellow);
}


/* Progress Section */
.progress-container {
    margin: 64px;
    max-width: 100%;
    background: var(--hn-grey);
    border-radius: 16px;
    padding: 40px 48px;
    display: flex;
    align-items: flex-start;
    gap: 48px;
    /* slightly smaller gap */
    flex-wrap: wrap;
    justify-content: space-between;
    /* let left & right balance space */
    border: 1px solid var(--hn-green);
}

.progress-left {
    flex: 1;
    /* narrower than before */
    min-width: 240px;
    /* reduced min width */
}

.progress-title {
    font-family: 'Fira Mono', monospace;
    font-size: 1.25rem;
    color: var(--hn-green);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background: var(--hn-black);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 4px 1px var(--hn-green);
    margin-bottom: 14px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hn-green) 0%, var(--hn-yellow) 90%);
    border-radius: 8px 0 0 8px;
    transition: width 0.5s;
}

.progress-metrics {
    font-size: 1.1rem;
    color: var(--hn-yellow);
    font-family: 'Fira Mono', monospace;
    margin-top: 8px;
    opacity: 0.9;
}

/* Badge strip */
.progress-right {
    flex: 1.5;
    /* right side adapts */
    min-width: 220px;
    /* smaller minimum */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge-strip {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    /* desktop: single row */
}

/* ✅ 2 equal rows of 4 badges on mobile */
@media (max-width: 900px) {
    .badge-strip {
        display: grid;
        /* switch from flex → grid */
        grid-template-columns: repeat(4, 1fr);
        /* 4 badges per row */
        gap: 16px;
        /* spacing between badges */
        justify-items: center;
        /* center them in each cell */
        padding-bottom: 8px;
    }

    .badge-strip img {
        width: 42px;
        /* slightly smaller */
        height: 42px;
    }
}

/* base rule */
.badge-strip img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-bottom: 24px;
}

/* locked comes AFTER base to override */
.badge-strip img.badge-locked {
    opacity: 0.4 !important;
    /* force dim */
    filter: grayscale(100%) !important;
    transform: scale(0.8);
    pointer-events: none;
    /* disable interaction */
}

.badge-strip img.badge-earned {
    opacity: 1;
    filter: none;
    transform: scale(0.8);
}

.badge-strip img.badge-current {
    opacity: 1;
    filter: none;
    transform: scale(1.3);
    border-radius: 8px;
}

/* Only earned & current badges should react on hover */
.badge-strip img.badge-earned:hover,
.badge-strip img.badge-current:hover {
    transform: scale(1.3);
    opacity: 1;
    filter: none;
}

.badge-text {
    font-family: 'Fira Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hn-yellow);
}


/* ✅ Mobile stacking */
@media (max-width: 900px) {
    .progress-container {
        flex-direction: column;
        gap: 36px;
        margin: 14px 32px;
        /* match modules-section mobile */
        padding: 24px 20px;
        /* keep tighter padding for mobile */
    }

    .progress-left,
    .progress-right {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .progress-left {
        order: 1;
    }

    .progress-right {
        order: 2;
    }
}


/* Modules section */
.modules-section {
    max-width: 100%;
    padding: 64px 64px;
}

.modules-title {
    color: var(--hn-yellow, #FECF38);
    font-size: 2.1rem;
    font-family: 'Fira Mono', monospace;
    margin-bottom: 64px;
    margin-top: 32px;
    text-align: center;
    font-weight: 700;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    position: relative;
    /* important */
}

@media (max-width: 1100px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

.module-content {
    display: flex;
    flex-direction: column;
    /* stack buttons vertically */
}

.module-card {
    background: var(--hn-grey);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--hn-light-grey);
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1;
    position: relative;
    overflow: visible;
}

.module-card:hover {
    /* border-color: var(--hn-green); */
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    z-index: 10;
}

.module-card.not-started {
    background: var(--hn-grey) !important;
    filter: grayscale(1) brightness(1);
    opacity: 0.66;
    pointer-events: none;
}


.progress-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.progress-border rect {
    fill: none;
    stroke: var(--hn-green);
    /* Use your highlight color */
    stroke-width: 0.5;
    stroke-dasharray: 400;
    /* Approx. perimeter of the box */
    stroke-dashoffset: 400;
    /* Start with full offset (hidden) */
    transition: stroke-dashoffset 0.6s ease;
}



.module-status {
    width: 100%;
    min-height: 54px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 64px;
    display: flex;
    gap: 8px;
}

.module-badge {
    background: var(--hn-yellow);
    font-family: 'Fira Mono', monospace;
    font-size: 0.97rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 14px;
    box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.06);
}

.module-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.module-badge.progress {
    color: var(--hn-grey);
}

.module-badge.done {
    color: var(--hn-grey);
}

.module-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-bottom: 0;
    gap: 8px;
}

.module-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--hn-green);
    font-family: 'Montserrat';
}

.module-desc {
    color: var(--hn-yellow);
    line-height: 1.6;
    font-weight: 500;
    font-family: 'Montserrat';
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.module-body {
    max-height: 0;
    overflow: hidden;
    /* background: #222318; */
    transition: max-height 0.36s cubic-bezier(.29, 1.39, .48, .91), padding 0.26s;
    font-size: 1rem;
    color: #eee;
    padding: 0;
    width: 100%;
    margin: 0 auto;
}

.module-card.expanded .module-body {
    max-height: 500px;
    padding: 8px 0;
}

.module-btn {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    background: linear-gradient(90deg, var(--hn-green, #D1FF03), var(--hn-yellow, #FECF38));
    color: var(--hn-black, #001413);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 16px;
    border-radius: 8px;
    box-shadow: 0 0 7px 0 var(--hn-green, #D1FF03);
    transition: transform 0.09s, box-shadow 0.09s;
    letter-spacing: 0.5px;
    text-align: center;
    cursor: pointer;
    margin-top: 12px;
}

.module-btn.share {
    background: linear-gradient(90deg, var(--hn-blue, #00F0FF), var(--hn-yellow, #FECF38));
    color: var(--hn-black, #001413);
    display: block;
    /* takes full width */
    width: 100%;
    /* stretch across card */
    text-align: center;
    /* center text inside */
    margin-top: 8px;
    /* add spacing if needed */
}

.module-btn:last-child {
    margin-bottom: 0;
}

.module-btn:hover {
    transform: translateY(-5px);
}


@media (max-width: 600px) {
    .modules-section {
        padding: 14px 32px;
    }

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

/* Wrapper keeps button + menu aligned */
.share-wrapper {
    position: relative;
    display: block;
    /* let it take full width of module card */
    width: 100%;
    /* full width button */
}

/* Share button full width */
.module-btn.share {
    background: linear-gradient(90deg, var(--hn-blue, #00F0FF), var(--hn-yellow, #FECF38));
    color: var(--hn-black, #001413);
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

/* Menu hidden by default */
.share-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: var(--hn-grey);
    border: 1px solid var(--hn-green);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 10;
}

/* ✅ Show on hover instead of click */
.share-wrapper:hover .share-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Individual share links */
.share-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hn-yellow);
    text-decoration: none;
    font-family: 'Fira Mono', monospace;
    font-size: 0.95rem;
    padding: 8px 16px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    /* ✅ prevent wrapping */
}

.share-link:hover {
    background: var(--hn-black);
    color: var(--hn-green);
}

/* Share link with icon */
.share-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;   /* inherit text color */
  }
  

/* Invisible hover bridge between button and menu */
.share-wrapper::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    height: 12px;  /* same as your gap */
    width: 100%;
}




/* FAQ */

.faq {
    padding: 64px 64px;
    background: var(--hn-grey);
}

.faq-item {
    background: var(--dark-bg);
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--hn-light-grey);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border: 1px solid var(--hn-green);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-family: 'Montserrat';
    font-weight: 700;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-family: 'Montserrat';
    font-weight: 500;
}

.faq-answer.active {
    max-height: 200px;
}

.faq-answer-content {
    padding: 0 2rem 1.5rem;
    color: var(--text-secondary);
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-toggle.active {
    transform: rotate(45deg);
}

/* Footer CTA */
.footer-cta {
    padding: 64px 64px;
    text-align: center;
    background: var(--hn-black);
    font-size: 1.2rem;
}

/* Default: 5 columns */
.footer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    padding: 64px 5vw;
    background: var(--hn-black);
    border-top: 1px solid var(--hn-yellow);
}

/* Footer links styling */
.footer-links-title {
    font-weight: bold;
    color: var(--hn-green);
    margin-bottom: 12px;
    font-size: 1.2rem;
    letter-spacing: 0.1px;
    font-family: 'Fira Mono', monospace;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links-title::after {
    content: "+";
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.footer-links.open .footer-links-title::after {
    content: "−";
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-link {
    color: #f8fae8;
    text-decoration: none;
    opacity: 0.88;
    font-size: 0.9rem;
    font-family: 'Montserrat';
    font-weight: 500;
    line-height: 1.6;
    transition: color 0.14s, opacity 0.14s;
}

.footer-link:hover {
    color: var(--hn-yellow);
    opacity: 1;
}

/* Social section */
.footer-social-title {
    color: var(--hn-yellow);
    font-size: 1.2rem;
    margin-bottom: 24px;
    font-weight: bold;
    font-family: 'Fira Mono', monospace;
}

.footer-social-icons {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-social-icon {
    width: 32px;
    height: 32px;
    opacity: 0.83;
    fill: var(--hn-yellow);
    cursor: pointer;
    transition: opacity 0.16s, transform 0.14s;
}

.footer-social-icon:hover {
    opacity: 1;
    transform: scale(1.12);
    fill: var(--hn-green);
}

/* Hide +/− on desktop screens */
@media (min-width: 1101px) {
    .footer-links-title::after {
        content: none;
    }
}

/* Responsive Accordion */
@media (max-width: 1100px) {
    .footer {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 32px 5vw;
    }

    /* Hide links by default */
    .footer-links-list {
        display: none;
    }

    /* Show links when open */
    .footer-links.open .footer-links-list {
        display: flex;
    }

    /* Social always visible */
    .footer-social {
        order: 5;
    }

    .footer-copyright {
        order: 6
    }
}

.footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--hn-light-grey);
    font-size: 0.95rem;
    padding-top: 16px;
    border-top: 1px solid var(--hn-light-grey);
    margin-top: 32px;
}


/* Scroll animation */

.scroll-animate {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s cubic-bezier(.21, .97, .59, 1), transform 0.9s cubic-bezier(.21, .97, .59, 1);
    will-change: opacity, transform;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}