/* Prevent body from scrolling in either direction */
body.vertical-tabs-mode {
    overflow: hidden;
}

/* Nav → left sidebar */
body.vertical-tabs-mode nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    padding: 10px 0;
    overflow: visible;
}

body.vertical-tabs-mode .nav-container {
    flex-direction: column;
    align-items: center;
    max-width: none;
    height: 100%;
    justify-content: flex-start;
    gap: 15px;
    padding-top: 10px;
}

/* Stack logo above name */
body.vertical-tabs-mode .logo-title {
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Stack "Parth" / "Iyer" on separate lines */
body.vertical-tabs-mode .site-title {
    word-spacing: 9999px;
    text-align: center;
    line-height: 1.3;
}

body.vertical-tabs-mode nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

body.vertical-tabs-mode nav ul li {
    display: block;
    margin-left: 0;
}

/* Tooltip: drop below the toggle, centered in the sidebar */
body.vertical-tabs-mode .tooltip-text {
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    width: 150px;
}

/* Nav link underline → left bar */
body.vertical-tabs-mode nav a::after {
    bottom: auto;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    transition: height 0.3s ease;
}

body.vertical-tabs-mode nav a:hover::after {
    height: 100%;
    width: 2px;
}

/* Content area: fixed-size scroll container, no body scroll */
body.vertical-tabs-mode .container {
    margin-left: 200px;
    width: calc(100vw - 200px);
    height: 100vh;
    box-sizing: border-box;
    max-width: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    padding: 20px;
}

/* Title card: at least 50% of screen width */
body.vertical-tabs-mode .header-group {
    min-width: 50vw;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    align-self: center;
}

/* Section frames become horizontal columns, stretching to full container height */
body.vertical-tabs-mode .section-frame {
    min-width: 420px;
    max-width: 620px;
    height: calc(100vh - 40px) !important;
    flex-shrink: 0;
    overflow-y: auto;
    scroll-margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Gallery section: fixed-width card filling the visible viewport */
body.vertical-tabs-mode #gallery.section-frame {
    width: calc(100vw - 260px);
    min-width: unset;
    max-width: none;
    justify-content: flex-start;
    overflow: hidden;
}

/* Gallery scrolls internally, one image per snap stop */
body.vertical-tabs-mode #gallery .gallery {
    display: flex !important;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    width: 100%;
    gap: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scroll-snap-type: x mandatory;
}

body.vertical-tabs-mode #gallery .gallery a {
    flex: 0 0 100%;
    display: block;
    scroll-snap-align: start;
}

body.vertical-tabs-mode #gallery .gallery img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Posts section: same fixed-width card layout as gallery */
body.vertical-tabs-mode #posts.section-frame {
    width: calc(100vw - 260px);
    min-width: unset;
    max-width: none;
    justify-content: flex-start;
    overflow: hidden;
}

body.vertical-tabs-mode #posts .gallery {
    display: flex !important;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    max-height: none !important;
    width: 100%;
    gap: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scroll-snap-type: x mandatory;
}

body.vertical-tabs-mode #posts .gallery > a {
    flex: 0 0 calc(50% - 20px);
    display: flex;
    scroll-snap-align: start;
    text-decoration: none;
    color: #20c997;
}

body.vertical-tabs-mode #posts .gallery .blog-card {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 15px;
    padding: 40px;
    box-sizing: border-box;
}

/* Social icons → vertical stack, centered */
body.vertical-tabs-mode .social-icons {
    flex-direction: column !important;
    align-items: center !important;
}

/* Footer: stacked and vertically centered */
body.vertical-tabs-mode .footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    text-align: center;
    min-width: 180px;
    max-width: 220px;
    gap: 8px;
}

body.vertical-tabs-mode .footer-info p {
    margin: 0;
    word-wrap: break-word;
}
