.middle {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    overflow-y: auto;
}

.content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 40px;
}

.main-heading {
    text-align: center;
    font-size: 2.5em;
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 40px;
    font-weight: 700;
    /* Changed from 500 to 700 for bold */
    transform: translateY(20px);
    /* Move just the text down by 20px */
}

.columns-container {
    display: flex;
    gap: 120px;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 40px;
    /* Add bottom margin to prevent footer overlap */
    margin-top: 0;
    /* Reset to original */
}

.column {
    flex: 1;
}

.column h3 {
    font-size: 1.5em;
    color: var(--heading-color);
    margin-bottom: 20px;
    font-weight: 500;
}

/* Active nav link */
.nav-links a.active {
    color: var(--heading-color);
    font-weight: bold;
}

/* Responsive adjustments for Links page */
@media (max-width: 768px) {

    /* Mobile header - ensure proper spacing to match Home page */
    .top-footer {
        justify-content: space-between !important;
        padding: 15px 20px !important;
        /* Match Home page padding */
    }

    /* Mobile footer - ensure proper spacing to match Home page */
    .bottom-footer {
        justify-content: space-between !important;
        padding: 15px 20px !important;
        /* Match Home page padding */
    }

    /* Override fixed positioning - make it flow normally */
    body[data-page="links"] {
        overflow-y: auto;
        overflow-x: hidden;
    }

    body[data-page="links"] .middle {
        position: relative !important;
        top: auto !important;
        transform: none !important;
        height: auto !important;
        min-height: auto !important;
        padding: 20px 24px !important;
        /* Slightly more horizontal padding */
        display: block !important;
    }

    body[data-page="links"] .content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center the content */
    }

    body[data-page="links"] .main-heading {
        font-size: 1.8em;
        margin-bottom: 25px;
        transform: none;
        text-align: center;
    }

    body[data-page="links"] .columns-container {
        flex-direction: column !important;
        gap: 35px !important;
        margin-bottom: 30px;
        align-items: center;
        /* Center the blocks horizontally */
        width: 100%;
    }

    body[data-page="links"] .column {
        width: 180px;
        /* Same fixed width for ALL categories */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* Left-align ALL content within */
    }

    body[data-page="links"] .column h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
        width: 100%;
        text-align: center;
        /* Center the category titles */
    }

    body[data-page="links"] .link-list {
        width: 150px;
        /* Same fixed width for ALL link lists */
        margin: 0 auto;
        /* Center the link block */
        align-items: flex-start;
        /* Left-align links within */
    }

    body[data-page="links"] .link-list a {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .bottom-footer {
        padding: 10px 16px !important;
    }
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Space between text and icon */
}

.link-list a i {
    font-size: 1.1em;
    /* Slightly larger than text */
    opacity: 0.8;
    /* Slightly dimmed */
    width: 1.1em;
    /* Fixed width for consistent alignment */
    text-align: center;
    /* Center the icon within its width */
}

.link-list a:hover {
    opacity: 0.7;
}

.custom-icon {
    width: 1.1em;
    height: 1.1em;
    opacity: 0.8;
    filter: var(--icon-filter);
    /* Will be defined in variables.css */
}

/* Fix Substack SVG icon color to match other icons */
.link-list a svg {
    width: 1.1em;
    height: 1.1em;
    opacity: 0.8;
    fill: currentColor;
}

.logo-link:hover {
    opacity: 0.8;
}

.circle.tumblr:hover {
    background: linear-gradient(135deg, #00cf35, #001935);
    /* Tumblr's blue gradient */
    color: white;
    transform: translateY(-2px);
}

.top-footer {
    padding: 15px 40px;
}

.bottom-footer {
    padding: 15px 40px;
}

/* Check for any social icon related styles */

/* Theme toggle button styles */
.theme-toggle-container {
    position: relative;
    padding-left: 28px;
    margin-left: 10px;
}

.theme-toggle-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background-color: var(--border-color);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 0;
    font-size: 1.2em;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background-color: var(--border-color);
}

.theme-toggle:hover {
    opacity: 0.8;
}
