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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

/* ── Theme Variables ── */
body[data-theme="dark"] {
    --bg: #000000;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --divider-color: rgba(255, 255, 255, 0.3);
    --banner-color: #ffffff;
    --btn-resume-bg: #ffffff;
    --btn-resume-text: #000000;
    --btn-outline-border: rgba(255, 255, 255, 0.35);
    --social-bg: rgba(255, 255, 255, 0.08);
    --social-border: rgba(255, 255, 255, 0.25);
    --social-hover-bg: rgba(255, 255, 255, 0.15);
    --folder-back-bg: rgba(109, 40, 217, 0.85);
    --folder-front-start: rgba(168, 85, 247, 0.7);
    --folder-front-end: rgba(109, 40, 217, 0.4);
    --folder-border: rgba(255, 255, 255, 0.25);
    --folder-paper-bg: #ffffff;
    --folder-paper-border: rgba(0, 0, 0, 0.15);
    --nav-bg: rgba(255, 255, 255, 0.04);
    --nav-border: rgba(255, 255, 255, 0.08);
    --dock-icon-bg: rgba(255, 255, 255, 0.12);
    --dock-icon-fill: #ffffff;
    --dock-icon-border: rgba(255, 255, 255, 0.15);
}

body[data-theme="light"] {
    --bg: #ffffff;
    --text: #000000;
    --text-muted: #555555;
    --divider-color: rgba(0, 0, 0, 0.3);
    --banner-color: #000000;
    --btn-resume-bg: #000000;
    --btn-resume-text: #ffffff;
    --btn-outline-border: rgba(0, 0, 0, 0.35);
    --social-bg: rgba(0, 0, 0, 0.06);
    --social-border: rgba(0, 0, 0, 0.2);
    --social-hover-bg: rgba(0, 0, 0, 0.12);
    --folder-back-bg: rgba(139, 92, 246, 0.8);
    --folder-front-start: rgba(192, 132, 252, 0.65);
    --folder-front-end: rgba(124, 58, 237, 0.35);
    --folder-border: rgba(0, 0, 0, 0.18);
    --folder-paper-bg: #ffffff;
    --folder-paper-border: rgba(0, 0, 0, 0.15);
    --nav-bg: rgba(0, 0, 0, 0.03);
    --nav-border: rgba(0, 0, 0, 0.06);
    --dock-icon-bg: #ffffff;
    --dock-icon-fill: #0E100F;
    --dock-icon-border: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── Navigation ── */
.navbar {
    width: 45%;
    margin: 12px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: 999px;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 12px;
    z-index: 100;
    will-change: transform, backdrop-filter;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-family: 'Great Vibes', cursive;
    font-size: 22px;
    font-weight: 400;
    transition: color 0.3s ease;
}

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

/* ── Theme Toggle ── */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--text-muted);
}

body[data-theme="dark"] .icon-moon {
    display: none;
}

body[data-theme="light"] .icon-sun {
    display: none;
}

/* ── Simple Divider (below nav) ── */
.nav-divider {
    width: 45%;
    margin: 0 auto;
    padding: 4px 0;
}

.nav-divider .line {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--divider-color) 20%,
        var(--divider-color) 80%,
        transparent 100%
    );
    transition: background 0.4s ease;
}

/* ── Banner ── */
.banner {
    width: 45%;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-name {
    font-family: 'Parisienne', cursive;
    font-size: clamp(48px, 5vw, 80px);
    font-weight: 400;
    color: var(--banner-color);
    letter-spacing: 2px;
    transition: color 0.4s ease, opacity 0.45s ease, filter 0.45s ease;
    animation: bannerReveal 1.8s ease-out forwards;
    cursor: default;
}

.banner-name.is-switching-out {
    animation: bannerSwitchOut 0.42s ease forwards;
}

.banner-name.is-switching-in {
    animation: bannerSwitchIn 0.42s ease forwards;
}

@keyframes bannerReveal {
    0% {
        opacity: 0;
        filter: blur(8px);
    }
    40% {
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes bannerSwitchOut {
    from {
        opacity: 1;
        filter: blur(0px);
    }
    to {
        opacity: 0;
        filter: blur(7px);
    }
}

@keyframes bannerSwitchIn {
    from {
        opacity: 0;
        filter: blur(7px);
    }
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

/* ── About Section ── */
.about {
    width: 45%;
    margin: 0 auto;
    padding: 20px 0;
    scroll-margin-top: 0;
}

.about-layout {
    display: flex;
    align-items: stretch;
    gap: clamp(18px, 2vw, 36px);
}

.about-main {
    flex: 0 1 65%;
    min-width: 0;
}

.about-text {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    text-align: justify;
    transition: color 0.4s ease;
}

.about-text + .about-text {
    margin-top: 8px;
}

.about-profile-divider {
    flex: 0 0 2px;
    align-self: stretch;
    background: linear-gradient(to bottom, transparent 0%, var(--text) 10%, var(--text) 90%, transparent 100%);
    opacity: 0.85;
}

.profile-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 90px;
}

.profile-frame-wrap {
    position: relative;
    width: min(100%, 116px);
    display: flex;
    justify-content: center;
}

.profile-frame-wrap.keyword-popup-wrap {
    display: flex;
}

.profile-image-popup {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    pointer-events: none !important;
}

.profile-frame {
    position: relative;
    width: min(100%, 116px);
    aspect-ratio: 2 / 3;
    border: 2px solid #b88a2e;
    box-shadow: 0 0 0 3px rgba(184, 138, 46, 0.28), inset 0 0 0 2px rgba(184, 138, 46, 0.55);
    overflow: hidden;
}

.profile-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.25s ease;
}

.profile-image.is-pixelated {
    image-rendering: pixelated;
}

.profile-frame.is-loading .profile-image {
    filter: blur(2px) brightness(0.55);
}

.profile-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.74);
    color: #ffffff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.profile-loading[hidden] {
    display: none;
}

.loading-ring {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: dlssSpin 0.9s linear infinite;
}

@keyframes dlssSpin {
    to {
        transform: rotate(360deg);
    }
}

.dlss-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.dlss-info {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dlss-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1px solid var(--text);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: help;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    padding: 0;
}

.dlss-note {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    width: min(230px, 68vw);
    transform: translateX(-50%) translateY(4px);
    border: 1px solid var(--social-border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    opacity: 0;
    padding: 8px 9px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dlss-note::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg);
}

.dlss-info:hover .dlss-note,
.dlss-info:focus-within .dlss-note {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dlss-note-highlight {
    color: #f59e0b;
    font-weight: 800;
}

.dlss-toggle {
    position: relative;
    width: 46px;
    height: 24px;
    border: 2px solid var(--text);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.dlss-toggle:disabled {
    cursor: wait;
    opacity: 0.8;
}

.dlss-knob {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text);
    transform: translateY(-50%);
    transition: transform 0.25s ease;
}

.dlss-state {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

.dlss-toggle.is-on {
    background: rgba(50, 167, 255, 0.18);
    border-color: #32a7ff;
}

.dlss-toggle.is-on .dlss-knob {
    transform: translate(22px, -50%);
    background: #32a7ff;
}

.dlss-toggle.is-on .dlss-state {
    right: auto;
    left: 5px;
}

.keyword {
    color: inherit;
    display: inline-block;
    font-weight: inherit;
    position: relative;
    transition: color 0.28s ease;
}

.keyword::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.about-content:hover .keyword::after {
    opacity: 1;
    transform: scaleX(1);
}

.about-content:hover .keyword-india {
    background-image: linear-gradient(90deg, #ff9933 0 33%, #ffffff 33% 66%, #138808 66% 100%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body[data-theme="light"] .about-content:hover .keyword-india {
    -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.45);
}

.about-content:hover .keyword-india::after {
    background: linear-gradient(90deg, #ff9933 0 33%, #ffffff 33% 66%, #138808 66% 100%);
}

.about-content:hover .keyword-python {
    color: #ffd43b;
}

.about-content:hover .keyword-cpp {
    color: #4f8cff;
}

.about-content:hover .keyword-azure,
.about-content:hover .keyword-certified {
    color: #32a7ff;
}

.about-content:hover .keyword-docker {
    color: #1d9bf0;
}

.about-content:hover .keyword-esp,
.about-content:hover .keyword-atmega {
    color: #22c55e;
}

.about-content:hover .keyword-open-source {
    color: #c084fc;
}

.about-content:hover .keyword-stars {
    color: #f59e0b;
}

/* ── Keyword Popup ── */
.keyword-popup-wrap {
    position: relative;
    display: inline;
}

.keyword-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: var(--mouse-x, 50%);
    z-index: 20;
    transform: translateX(-50%) translateY(6px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border: 1.5px solid var(--text);
    border-radius: 9px;
    background: var(--bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    will-change: transform, opacity;
}

.keyword-popup::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.keyword-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text);
}

.keyword-popup-wrap:hover .keyword-popup {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.keyword-popup img {
    width: 39px;
    height: 39px;
    object-fit: contain;
}

.keyword-popup-btn {
    display: inline-block;
    padding: 6px 12px;
    border: 1.5px solid var(--text);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.keyword-popup-btn:hover {
    background-color: var(--text);
    color: var(--bg);
}
/* ── Action Bar ── */
.action-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 5px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn svg {
    width: 12px;
    height: 12px;
}

.btn-resume {
    position: relative;
    overflow: hidden;
    background-color: var(--btn-resume-bg);
    color: var(--btn-resume-text);
    border: 1.5px solid var(--btn-resume-bg);
}

.btn-resume::after {
    content: '';
    position: absolute;
    top: -55%;
    left: -85%;
    width: 62%;
    height: 210%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.28) 25%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.28) 75%, transparent 100%);
    transform: rotate(24deg);
    animation: resumeGlare 2.4s ease-in-out infinite;
    pointer-events: none;
}

.btn-resume:hover {
    opacity: 0.85;
}

@keyframes resumeGlare {
    0%,
    32% {
        left: -85%;
    }
    72%,
    100% {
        left: 135%;
    }
}

.action-separator {
    color: var(--divider-color);
    font-size: 15px;
    font-weight: 300;
    margin: 0 2px;
    user-select: none;
}

.social-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(24px * 1.07);
    height: calc(24px * 1.07);
    border-radius: 50%;
    border: 1.5px solid var(--social-border);
    background-color: var(--social-bg);
    text-decoration: none;
    transform-origin: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.social-icon img,
.social-icon svg {
    width: calc(13px * 1.07);
    height: calc(13px * 1.07);
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.social-icon .icon-color {
    position: absolute;
    opacity: 0;
}

body[data-theme="dark"] .social-icon .icon-outline {
    filter: invert(1);
}

body[data-theme="dark"] .social-icon[aria-label="GitHub"] .icon-color {
    filter: invert(1);
}

.social-icon:hover .icon-outline {
    opacity: 0;
}

.social-icon:hover .icon-color {
    opacity: 1;
}

.social-icon:hover {
    background-color: var(--social-hover-bg);
    border-color: var(--text);
    box-shadow: 0 0 0 5px rgba(160, 160, 160, 0.28);
    transform: translateY(-1px) scale(1.12);
    z-index: 2;
}

/* ── Tooltip ── */
.tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: var(--text);
    color: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text);
}

.social-icon:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Experience Section */
.experience-section {
    width: 45%;
    margin: 26px auto 0;
    padding-bottom: 24px;
}

.section-divider {
    height: 1px;
    margin-bottom: 18px;
    background: linear-gradient(to right, transparent 0%, var(--divider-color) 18%, var(--divider-color) 82%, transparent 100%);
}


.experience-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
}

.experience-tab {
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.experience-tab.is-active {
    background: var(--bg);
    color: var(--text);
}

.timeline-panel {
    position: relative;
    margin-top: 18px;
    padding-left: 52px;
}

.timeline-panel::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 20px;
    width: 1px;
    background: var(--social-border);
}

.timeline-panel[hidden] {
    display: none;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 14px;
}

.timeline-item + .timeline-item {
    margin-top: 26px;
}

.timeline-icon {
    position: absolute;
    top: 0;
    left: -52px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--social-border);
    background: var(--bg);
    overflow: hidden;
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-content {
    min-width: 0;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.timeline-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.timeline-heading h2 {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.timeline-heading span,
.timeline-place {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.timeline-heading span {
    flex: 0 0 auto;
}

.timeline-place {
    margin-top: 2px;
}

.timeline-content p:not(.timeline-place) {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    text-align: justify;
}

.verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    background: var(--btn-resume-bg);
    color: var(--btn-resume-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.verify-btn:hover {
    opacity: 0.86;
    transform: translateY(-1px);
}

/* ── Projects Section ── */
.projects-section {
    width: 45%;
    margin: 26px auto 0;
    padding-bottom: 24px;
    scroll-margin-top: 90px;
}

.projects-heading {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(38px, 4.5vw, 48px);
    font-weight: 400;
    text-align: center;
    color: var(--text);
    margin-bottom: 22px;
    letter-spacing: 1.5px;
    transition: color 0.4s ease;
}

.project-card-row {
    display: flex;
    gap: 12px;
    width: 100%;
    height: 420px;
    margin-top: 20px;
}

.project-card {
    position: relative;
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--social-bg);
    border: 1px solid var(--social-border);
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    will-change: flex;
    contain: content;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.project-card.is-active {
    flex: 6;
    cursor: default;
}

.project-card:not(.is-active):hover {
    border-color: var(--text);
}

/* ── Toggle Sidebar (collapsed cards) ── */
.project-card-toggle {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    cursor: pointer;
    outline: none;
    position: relative;
    z-index: 2;
}

/* Hide toggle entirely when card is active */
.project-card.is-active .project-card-toggle {
    display: none;
}

.project-card-index {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--social-bg);
    border: 1.5px solid var(--social-border);
    color: var(--text-muted);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 16px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.project-card:not(.is-active):hover .project-card-index {
    border-color: var(--text);
    color: var(--text);
}

.project-card-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.project-card:not(.is-active):hover .project-card-title {
    color: var(--text);
}

/* ── Expanded Panel ── */
.project-card-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    visibility: hidden;
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s, visibility 0.4s ease 0.15s;
    pointer-events: none;
    overflow: hidden;
    min-width: 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.project-card.is-active .project-card-panel {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
}

/* ── Project Image (top portion of expanded card) ── */
.project-card-panel > img {
    width: 100%;
    flex: 0 0 auto;
    max-height: 58%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--social-border);
    margin-bottom: 16px;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* ── Project Info (below image) ── */
.project-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    color: var(--text);
    min-width: 0;
}

.project-card-info h3 {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.project-card-info p {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* ── View Project Button ── */
.btn-view-project {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 1.5px solid var(--text);
    background: transparent;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-view-project:hover {
    background-color: var(--text);
    color: var(--bg);
}

/* ── Placeholder (empty card) ── */
.project-placeholder {
    width: 100%;
    flex: 0 0 auto;
    max-height: 58%;
    border-radius: 10px;
    border: 2px dashed var(--social-border);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 16 / 10;
}

body[data-theme="light"] .project-placeholder {
    background: rgba(0, 0, 0, 0.01);
}

.project-placeholder::before {
    content: '+';
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 42px;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: transform, opacity;
}

.project-card:hover .project-placeholder::before {
    opacity: 0.8;
    transform: scale(1.1);
}

/* ── Certifications Section ── */
.certifications-section {
    width: 45%;
    margin: 26px auto 0;
    padding-bottom: 24px;
    scroll-margin-top: 90px;
}

.certifications-heading {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(38px, 4.5vw, 48px);
    font-weight: 400;
    text-align: center;
    color: var(--text);
    margin-bottom: 22px;
    letter-spacing: 1.5px;
    transition: color 0.4s ease;
}

.cert-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cert-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 14px;
    border: 1px solid var(--social-border);
    background-color: var(--social-bg);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.cert-badge:hover {
    transform: translateY(-4px);
    border-color: var(--text);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] .cert-badge:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cert-badge img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    transition: transform 0.3s ease;
    will-change: transform;
}

.cert-badge:hover img {
    transform: scale(1.08);
}

.cert-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: var(--text);
    color: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: transform, opacity;
}

.cert-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text);
}

.cert-badge:hover .cert-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Riddle Game in Card ── */
.riddle-game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    padding: 10px;
}

.r-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 340px;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.r-screen.r-active {
    display: flex;
    opacity: 1;
}

/* Home Screen */
.r-logo {
    font-family: 'Great Vibes', cursive;
    font-size: 46px;
    font-weight: 400;
    margin-bottom: 6px;
    color: var(--text);
}

.r-tagline {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 24px;
}

.r-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.r-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 70px;
}

.r-meta-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.r-meta-lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Buttons */
.r-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 1.5px solid var(--text);
    background: transparent;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.r-btn:hover {
    background-color: var(--text);
    color: var(--bg);
}

.r-btn:active {
    transform: scale(0.97);
}

.r-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.r-btn-primary {
    background-color: var(--text);
    color: var(--bg);
}

.r-btn-primary:hover {
    background-color: transparent;
    color: var(--text);
}

.r-btn-lg {
    padding: 10px 24px;
    font-size: 13px;
}

/* Play Screen */
.r-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--social-border);
    margin-bottom: 12px;
}

.r-hud-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.r-hud-lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.r-hud-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.r-hud-stars {
    font-size: 14px;
    color: #eab308;
    letter-spacing: 2px;
}

.r-prog-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.r-pdot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.r-pdot.done {
    background: var(--text);
    border-color: var(--text);
}

.r-pdot.now {
    background: var(--text);
    border-color: var(--text);
    box-shadow: 0 0 6px var(--text);
    animation: r-pdotPulse 1.4s ease-in-out infinite;
}

@keyframes r-pdotPulse {
    0%, 100% { box-shadow: 0 0 4px var(--text); opacity: 0.8; }
    50% { box-shadow: 0 0 10px var(--text); opacity: 1; }
}

.r-game-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.r-cat-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid var(--social-border);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.r-question {
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
    color: var(--text);
    margin-bottom: 6px;
    min-height: 48px;
    max-width: 90%;
}

.r-word-len {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.r-boxes {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.r-box {
    width: 34px;
    height: 40px;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-radius: 8px;
    text-align: center;
    line-height: 40px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.r-box:focus {
    border-color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .r-box:focus {
    background: rgba(0, 0, 0, 0.03);
}

.r-box.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    animation: r-boxPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes r-boxPop {
    0% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

.r-box.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: r-boxShake 0.4s ease;
}

.r-box.revealed {
    border-color: var(--social-border);
    background: var(--social-bg);
    color: var(--text-muted);
}

@keyframes r-boxShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.r-guess-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 16px;
}

.r-guess-lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 4px;
}

.r-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.6;
    transition: background-color 0.3s, opacity 0.3s;
}

.r-dot.gone {
    background: var(--social-border);
    opacity: 0.25;
}

.r-dot.last {
    background: #ef4444;
    opacity: 1;
    box-shadow: 0 0 6px #ef4444;
}

.r-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.r-hint-badge {
    background: var(--text);
    color: var(--bg);
    border-radius: 50%;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.r-hint-area {
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.r-hint-item {
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-left: 3px solid var(--text);
    border-radius: 6px;
    padding: 8px 12px;
    text-align: left;
    animation: r-slideDown 0.3s ease;
}

.r-hint-n {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.r-hint-text {
    font-size: 11px;
    color: var(--text);
    line-height: 1.4;
}

@keyframes r-slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.r-feedback {
    font-size: 11px;
    margin-top: 10px;
    min-height: 16px;
    transition: color 0.2s;
    font-weight: 600;
}

.r-feedback.ok { color: #22c55e; }
.r-feedback.bad { color: #ef4444; }

/* Win Screen Overlay */
.r-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    text-align: center;
}

body[data-theme="light"] .r-overlay {
    background: rgba(255, 255, 255, 0.85);
}

.r-win-header.perfect {
    animation: r-winFlicker 3s linear infinite;
}

@keyframes r-winFlicker {
    0%, 19%, 21%, 54%, 56%, 100% { opacity: 1; }
    20%, 22%, 55% { opacity: 0.65; }
}

.r-win-header {
    font-family: 'Great Vibes', cursive;
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 10px;
}

.r-win-stars {
    font-size: 20px;
    color: #eab308;
    margin-bottom: 14px;
}

.r-win-answer {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.r-win-answer-word {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.r-win-fact {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--social-border);
    border-bottom: 1px solid var(--social-border);
    padding: 10px 0;
    margin-bottom: 14px;
    max-width: 90%;
}

.r-win-pts {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.r-win-pts b {
    color: var(--text);
    font-size: 14px;
}

/* End Screen */
.r-end-title {
    font-family: 'Great Vibes', cursive;
    font-size: 42px;
    font-weight: 400;
    margin-bottom: 4px;
}

.r-end-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.r-end-stars {
    font-size: 18px;
    color: #eab308;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.r-end-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.r-end-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.r-end-stat-num {
    font-size: 24px;
    font-weight: 800;
}

.r-end-stat-lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.r-rank-badge {
    font-size: 10px;
    font-weight: 700;
    border: 1px solid var(--text);
    border-radius: 4px;
    padding: 6px 16px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Extra Section ── */
.extra-section {
    width: 45%;
    margin: 26px auto 0;
    padding-bottom: 24px;
    scroll-margin-top: 90px;
}

.extra-heading {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(38px, 4.5vw, 48px);
    font-weight: 400;
    text-align: center;
    color: var(--text);
    margin-bottom: 22px;
    letter-spacing: 1.5px;
    transition: color 0.4s ease;
}

.folder-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    min-height: 202px;
    margin-top: 6px;
    overflow: visible;
    padding: 12px 0 0;
}

.folder-wrapper {
    --folder-rotate: 0deg;
    --folder-y: 0px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    width: 136px;
    justify-self: center;
    margin: 0 -37px;
    transform: translateY(var(--folder-y)) rotate(var(--folder-rotate));
    transform-origin: 50% 145%;
    transition: background-color 0.25s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.folder-wrapper:nth-child(1) {
    --folder-rotate: -24deg;
    --folder-y: 51px;
    z-index: 1;
}

.folder-wrapper:nth-child(2) {
    --folder-rotate: -12deg;
    --folder-y: 16px;
    z-index: 2;
}

.folder-wrapper:nth-child(3) {
    --folder-rotate: 0deg;
    --folder-y: 0px;
    z-index: 3;
}

.folder-wrapper:nth-child(4) {
    --folder-rotate: 12deg;
    --folder-y: 16px;
    z-index: 2;
}

.folder-wrapper:nth-child(5) {
    --folder-rotate: 24deg;
    --folder-y: 51px;
    z-index: 1;
}

.folder-wrapper:hover {
    transform: translateY(calc(var(--folder-y) - 12px)) rotate(var(--folder-rotate)) scale(1.04);
    z-index: 5;
}

body[data-theme="light"] .folder-wrapper:hover {
    background-color: transparent;
}

.folder-wrapper:hover .mac-folder-icon {
    transform: scale(1.144);
}

/* ── macOS-Style Folder Icon ── */
.mac-folder-icon {
    position: relative;
    width: 115px;
    height: 86px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
    transform: scale(1.1);
}

.folder-info-overlay {
    position: absolute;
    bottom: 12px;
    left: 16px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 1px;
    pointer-events: none;
    text-align: left;
}

.folder-title {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    line-height: 1.25;
}

.folder-subtitle {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
}

/* ── macOS Folder SVG Layering ── */
.folder-svg-back,
.folder-svg-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.folder-svg-back {
    z-index: 1;
}

.folder-svg-front {
    z-index: 3;
}

/* ── Folder Previews (Sandwiched Papers) ── */
.folder-previews {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
    clip-path: inset(-200px -100px 0px -100px);
}

.preview-paper {
    position: absolute;
    width: 48px;
    height: 60px;
    background: #ffffff;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background-color 0.35s ease, 
                border-color 0.35s ease,
                box-shadow 0.35s ease;
    opacity: 0.95;
}

.preview-paper .paper-title {
    opacity: 1;
    filter: none;
    transition: opacity 0.3s ease;
}

.preview-paper .paper-list {
    opacity: 0.25;
    filter: blur(0.6px);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.paper-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 7px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
    padding-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.paper-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.paper-list li {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 5px;
    font-weight: 600;
    color: #555555;
    line-height: 1.2;
    padding-left: 5px;
    position: relative;
}

.paper-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #888888;
}

/* ── Closed / Rest Position (Tucked inside) ── */
/* 3-paper configuration default offsets */
.folder-previews .paper-1 {
    left: 14px;
    top: 15px;
    transform: translateY(0px) rotate(-6deg);
    z-index: 3;
}

.folder-previews .paper-2 {
    left: 54px;
    top: 15px;
    transform: translateY(2px) rotate(5deg);
    z-index: 2;
}

.folder-previews .paper-3 {
    left: 34px;
    top: 15px;
    transform: translateY(4px) rotate(0deg);
    z-index: 1;
}

/* 2-paper configuration default offsets */
.folder-previews:not(:has(.paper-3)) .paper-1 {
    left: 20px;
    top: 15px;
    transform: translateY(0px) rotate(-6deg);
    z-index: 2;
}

.folder-previews:not(:has(.paper-3)) .paper-2 {
    left: 48px;
    top: 15px;
    transform: translateY(2px) rotate(5deg);
    z-index: 1;
}

/* ── Hover / Popping State ── */
/* 3-paper pop-up */
.folder-wrapper:hover .folder-previews .paper-1 {
    transform: translateY(-44px) translateX(-20px) rotate(-14deg) scale(1.25);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.folder-wrapper:hover .folder-previews .paper-2 {
    transform: translateY(-44px) translateX(20px) rotate(12deg) scale(1.25);
    opacity: 1;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.folder-wrapper:hover .folder-previews .paper-3 {
    transform: translateY(-50px) translateX(0) rotate(0deg) scale(1.3);
    opacity: 1;
    z-index: 4;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

/* 2-paper pop-up */
.folder-wrapper:hover .folder-previews:not(:has(.paper-3)) .paper-1 {
    transform: translateY(-46px) translateX(-18px) rotate(-12deg) scale(1.28);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.folder-wrapper:hover .folder-previews:not(:has(.paper-3)) .paper-2 {
    transform: translateY(-46px) translateX(18px) rotate(10deg) scale(1.28);
    opacity: 1;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Make preview papers solid, clear, and unblurred on hover */
.folder-wrapper:hover .preview-paper {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.folder-wrapper:hover .preview-paper .paper-list {
    opacity: 1;
    filter: none;
}


/* ── Folder Previews (Sandwiched Badges) ── */
.preview-badge {
    position: absolute;
    width: 32px;
    height: 32px;
    object-fit: contain;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, filter 0.35s ease;
    opacity: 0.95;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* 6-badge configuration default offsets */
.folder-previews .badge-1 {
    left: 12px;
    top: 16px;
    transform: translateY(0px) rotate(-15deg);
    z-index: 6;
}

.folder-previews .badge-2 {
    left: 24px;
    top: 14px;
    transform: translateY(1px) rotate(-9deg);
    z-index: 5;
}

.folder-previews .badge-3 {
    left: 36px;
    top: 12px;
    transform: translateY(2px) rotate(-3deg);
    z-index: 4;
}

.folder-previews .badge-4 {
    left: 48px;
    top: 12px;
    transform: translateY(2px) rotate(3deg);
    z-index: 3;
}

.folder-previews .badge-5 {
    left: 60px;
    top: 14px;
    transform: translateY(1px) rotate(9deg);
    z-index: 2;
}

.folder-previews .badge-6 {
    left: 72px;
    top: 16px;
    transform: translateY(0px) rotate(15deg);
    z-index: 1;
}

/* 6-badge hover configuration pop-up offsets */
.folder-wrapper:hover .folder-previews .badge-1 {
    transform: translateY(-44px) translateX(-36px) rotate(-22deg) scale(1.3);
    opacity: 1;
    z-index: 6;
}

.folder-wrapper:hover .folder-previews .badge-2 {
    transform: translateY(-50px) translateX(-22px) rotate(-13deg) scale(1.35);
    opacity: 1;
    z-index: 5;
}

.folder-wrapper:hover .folder-previews .badge-3 {
    transform: translateY(-54px) translateX(-8px) rotate(-4deg) scale(1.35);
    opacity: 1;
    z-index: 4;
}

.folder-wrapper:hover .folder-previews .badge-4 {
    transform: translateY(-54px) translateX(8px) rotate(4deg) scale(1.35);
    opacity: 1;
    z-index: 3;
}

.folder-wrapper:hover .folder-previews .badge-5 {
    transform: translateY(-50px) translateX(22px) rotate(13deg) scale(1.35);
    opacity: 1;
    z-index: 2;
}

.folder-wrapper:hover .folder-previews .badge-6 {
    transform: translateY(-44px) translateX(36px) rotate(22deg) scale(1.3);
    opacity: 1;
    z-index: 1;
}

/* ── Folder Previews (Sandwiched Certificates) ── */
.preview-cert {
    position: absolute;
    width: 60px;
    height: 42px;
    object-fit: contain;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, filter 0.35s ease;
    opacity: 0.95;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) blur(0.5px);
    border-radius: 2px;
    background: #ffffff;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    padding: 1.5px;
}

/* 3-certificate configuration default offsets */
.folder-previews .cert-1 {
    left: 10px;
    top: 18px;
    transform: translateY(0px) rotate(-8deg);
    z-index: 3;
}

.folder-previews .cert-2 {
    left: 46px;
    top: 18px;
    transform: translateY(1px) rotate(8deg);
    z-index: 2;
}

.folder-previews .cert-3 {
    left: 28px;
    top: 18px;
    transform: translateY(2px) rotate(0deg);
    z-index: 1;
}

/* 3-certificate hover configuration pop-up offsets */
.folder-wrapper:hover .folder-previews .cert-1 {
    transform: translateY(-44px) translateX(-22px) rotate(-14deg) scale(1.3);
    opacity: 1;
    z-index: 3;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.folder-wrapper:hover .folder-previews .cert-2 {
    transform: translateY(-44px) translateX(22px) rotate(14deg) scale(1.3);
    opacity: 1;
    z-index: 2;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.folder-wrapper:hover .folder-previews .cert-3 {
    transform: translateY(-50px) translateX(0) rotate(0deg) scale(1.35);
    opacity: 1;
    z-index: 4;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.35));
}

.folder-wrapper:hover .preview-cert {
    opacity: 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}


/* ── macOS Finder-Style Modal ── */
.finder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    will-change: opacity;
}

.finder-modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.finder-window {
    width: min(92vw, 800px);
    height: 540px;
    background: rgba(25, 25, 25, 0.7);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
}

.finder-modal:not([hidden]) .finder-window {
    transform: scale(1);
    opacity: 1;
}

body[data-theme="light"] .finder-modal {
    background-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="light"] .finder-window {
    background: rgba(240, 240, 243, 0.75);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.finder-titlebar {
    height: 38px;
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
}

body[data-theme="light"] .finder-titlebar {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.finder-controls {
    display: flex;
    gap: 8px;
    padding-left: 14px;
}

.finder-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    outline: none;
}

.finder-close { background-color: #ff5f56; }
.finder-minimize { background-color: #ffbd2e; }
.finder-maximize { background-color: #27c93f; }

.finder-close:hover::after,
.finder-minimize:hover::after,
.finder-maximize:hover::after {
    content: '•';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: rgba(0, 0, 0, 0.45);
    font-weight: 700;
}

.finder-title {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.finder-content {
    flex: 1;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.finder-content > :not(.finder-stats-layout) {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

/* ── macOS Finder Stats Tabs Layout ── */
.finder-stats-layout,
.finder-badges-layout {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.finder-stats-sidebar,
.finder-badges-sidebar {
    flex: 0 0 180px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

body[data-theme="light"] .finder-stats-sidebar,
body[data-theme="light"] .finder-badges-sidebar {
    background: rgba(0, 0, 0, 0.02);
    border-right-color: rgba(0, 0, 0, 0.08);
}

.stats-sidebar-item,
.badges-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: background-color 0.2s, color 0.2s;
    outline: none;
}

.stats-sidebar-item:hover,
.badges-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

body[data-theme="light"] .stats-sidebar-item:hover,
body[data-theme="light"] .badges-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.stats-sidebar-item.active,
.badges-sidebar-item.active {
    background: var(--folder-back-bg);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-tab-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s, filter 0.2s;
}

body[data-theme="dark"] .sidebar-tab-icon {
    filter: invert(1);
}

.stats-sidebar-item:hover .sidebar-tab-icon,
.badges-sidebar-item:hover .sidebar-tab-icon {
    opacity: 1;
}

.stats-sidebar-item.active .sidebar-tab-icon,
.badges-sidebar-item.active .sidebar-tab-icon {
    opacity: 1;
}

body[data-theme="light"] .stats-sidebar-item.active .sidebar-tab-icon,
body[data-theme="light"] .badges-sidebar-item.active .sidebar-tab-icon {
    filter: invert(1);
}

.finder-stats-main,
.finder-badges-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
}

.stats-tab-content,
.badges-tab-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
}

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

.stats-main-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--social-border);
    padding-bottom: 8px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.stats-card {
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: center;
    border-radius: 8px;
}

.stats-card.graph-card {
    max-width: 660px;
}

/* ── Stats Card Skeleton & Fade-In ── */
.stats-card.skeleton {
    position: relative;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px;
    overflow: hidden;
    min-height: 120px;
    border: 1px solid var(--social-border);
}

body[data-theme="light"] .stats-card.skeleton {
    background: rgba(0, 0, 0, 0.05) !important;
}

.stats-card.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.15) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: stats-shimmer 1.5s infinite;
}

body[data-theme="light"] .stats-card.skeleton::after {
    background-image: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 20%,
        rgba(0, 0, 0, 0.08) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

@keyframes stats-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.stats-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}

.stats-row {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 660px;
    justify-content: center;
}

.stats-row .stats-card {
    flex: 1;
    max-width: 320px;
    display: flex;
    flex-direction: column;
}

.stats-row .stats-card img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: fill;
    border-radius: 8px;
}

@media (max-width: 620px) {
    .stats-row {
        flex-direction: column;
        align-items: center;
    }
    .stats-row .stats-card {
        max-width: 100%;
    }
}

.stats-card img:hover {
    transform: scale(1.015);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stats-card.iframe-card {
    max-width: 660px;
    height: 280px;
    border: 1px solid var(--social-border);
    background: rgba(255, 255, 255, 0.01);
}

.stats-card.iframe-card iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

/* ── Codolio Glass Card Styling ── */
.codolio-glass-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--social-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body[data-theme="light"] .codolio-glass-card {
    background: rgba(0, 0, 0, 0.015);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.codolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.codolio-logo-area {
    display: flex;
    align-items: center;
    gap: 6px;
}

.codolio-logo-icon {
    width: 22px;
    height: 22px;
    background: var(--folder-back-bg);
    color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.codolio-logo-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text);
}

.codolio-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

.codolio-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.codolio-avatar-col {
    display: flex;
    align-items: center;
    gap: 10px;
}

.codolio-avatar-frame {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--social-border);
    overflow: hidden;
}

.codolio-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.codolio-user-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.codolio-user-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.codolio-stats-summary {
    display: flex;
    gap: 14px;
}

.c-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.c-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.c-lbl {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-top: 1px;
}

.codolio-divider {
    height: 1px;
    background: var(--social-border);
}

.codolio-connected-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.platform-badge {
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.p-icon {
    font-size: 16px;
}

.p-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text);
}

.p-status {
    font-size: 8px;
    color: #22c55e;
    font-weight: 600;
}

.codolio-action {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.codolio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 16px;
    background: var(--folder-back-bg);
    color: #ffffff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: opacity 0.2s, transform 0.1s;
}

.codolio-btn:hover {
    opacity: 0.9;
}

.codolio-btn:active {
    transform: scale(0.98);
}

/* Mobile responsive layout */
@media (max-width: 620px) {
    .finder-window {
        width: 95vw;
        height: 80vh;
    }
    .finder-stats-layout,
    .finder-badges-layout {
        flex-direction: column;
    }
    .finder-stats-sidebar,
    .finder-badges-sidebar {
        flex: 0 0 auto;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 8px;
        scrollbar-width: none;
    }
    .finder-stats-sidebar::-webkit-scrollbar,
    .finder-badges-sidebar::-webkit-scrollbar {
        display: none;
    }
    body[data-theme="light"] .finder-stats-sidebar,
    body[data-theme="light"] .finder-badges-sidebar {
        border-bottom-color: rgba(0, 0, 0, 0.08);
    }
    .stats-sidebar-item,
    .badges-sidebar-item {
        flex: 0 0 auto;
        width: auto;
        padding: 6px 12px;
    }
    .finder-stats-main,
    .finder-badges-main {
        padding: 16px;
    }
}

/* ── Finder Content Layouts ── */
.finder-stats-grid,
.finder-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── I Use Grid Layout ── */
.finder-content > .finder-iuse-layout {
    padding: 22px;
    overflow-y: auto;
}

.iuse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
}

.iuse-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--social-border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

body[data-theme="light"] .iuse-card {
    background: rgba(0, 0, 0, 0.015);
}

.iuse-card:hover {
    transform: translateY(-2px);
    border-color: var(--folder-back-bg);
}

.iuse-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--social-border);
    padding-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.iuse-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.iuse-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 54px;
    gap: 6px;
    text-align: center;
}

.iuse-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.iuse-item img:hover {
    transform: scale(1.18);
}

.iuse-item span {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    word-break: break-word;
    line-height: 1.15;
}

@media (min-width: 621px) {
    .finder-content > .finder-iuse-layout {
        padding: 22px;
        overflow-y: hidden; /* Prevent scrolling completely on desktop */
        height: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

body[data-theme="dark"] .iuse-outline-logo {
    filter: invert(1);
}

body[data-theme="light"] .iuse-invert-light {
    filter: invert(1);
}

.finder-stat-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.stat-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.45;
}

.finder-list-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.list-bullet {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.list-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.list-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.45;
}

/* ── Main Content Container ── */
.container {
    width: 45%;
    margin: 0 auto;
    min-height: 100vh;
}

@media (max-width: 1100px) {
    .about,
    .experience-section,
    .projects-section,
    .certifications-section,
    .extra-section,
    .extra-divider,
    .navbar,
    .nav-divider,
    .banner,
    .container {
        width: 56%;
    }
}

@media (max-width: 820px) {
    .about,
    .experience-section,
    .projects-section,
    .certifications-section,
    .extra-section,
    .extra-divider,
    .navbar,
    .nav-divider,
    .banner,
    .container {
        width: min(88%, 560px);
    }

    .about-layout {
        gap: 18px;
    }
}

@media (max-width: 620px) {
    .about-layout {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .about-main {
        width: 100%;
        flex-basis: auto;
    }

    .about-profile-divider {
        width: 100%;
        height: 1px;
        flex-basis: 1px;
        background: linear-gradient(to right, transparent 0%, var(--text) 10%, var(--text) 90%, transparent 100%);
    }

    .profile-panel {
        width: 100%;
    }

    .profile-frame,
    .profile-frame-wrap {
        width: min(38vw, 128px);
    }

    .timeline-heading {
        display: block;
    }

    .timeline-heading span {
        display: inline-block;
        margin-top: 3px;
    }

    /* Projects Mobile overrides */
    .project-card-row {
        flex-direction: column;
        height: auto;
        gap: 12px;
    }

    .project-card {
        flex: none;
        width: 100%;
        height: 60px;
        flex-direction: column;
        transition: height 0.5s cubic-bezier(0.25, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease;
        will-change: height;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
    }

    .project-card.is-active {
        flex: none;
        height: auto;
        cursor: default;
    }

    .project-card-toggle {
        height: 60px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 16px;
    }

    .project-card-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 13px;
    }

    .project-card-index {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-bottom: 0;
    }

    .project-card-panel {
        gap: 12px;
        padding: 16px;
    }

    .project-card-info h3 {
        font-size: 18px;
    }

    .project-card-info p {
        font-size: 13px;
    }

    .project-card-panel > img {
        max-height: none;
        height: auto;
    }

    .project-placeholder {
        max-height: none;
        height: 180px;
    }

    .riddle-game-container {
        height: auto;
        min-height: 360px;
        overflow: visible;
        padding: 5px;
    }

    .r-screen {
        min-height: auto;
    }
}

@media (max-width: 430px) {
    .navbar {
        padding: 12px 16px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 18px;
    }

    .about-text {
        font-size: 13px;
    }

    .timeline-panel {
        padding-left: 44px;
    }

    .timeline-panel::before {
        left: 18px;
    }

    .timeline-icon {
        left: -44px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .folder-grid {
        min-height: 160px;
        padding-top: 8px;
    }
    .folder-wrapper {
        width: 96px;
        margin: 0 -24px;
        padding: 6px;
        gap: 0;
    }
    .folder-wrapper:nth-child(1) {
        --folder-y: 39px;
    }
    .folder-wrapper:nth-child(2) {
        --folder-y: 13px;
    }
    .folder-wrapper:nth-child(4) {
        --folder-y: 13px;
    }
    .folder-wrapper:nth-child(5) {
        --folder-y: 39px;
    }
    .mac-folder-icon {
        width: 76px;
        height: 58px;
    }
    .folder-info-overlay {
        left: 9px;
        bottom: 8px;
    }
    .folder-title {
        font-size: 10px;
    }
    .folder-subtitle {
        font-size: 7.5px;
    }

    /* ── Mobile Folder Previews ── */
    .preview-paper {
        width: 30px;
        height: 32px;
        padding: 4px;
        gap: 2px;
        border-radius: 3px;
        border-width: 0.25px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
        background: #ffffff;
        opacity: 0.95;
    }
    
    .preview-paper .paper-title {
        opacity: 1;
        filter: none;
    }

    .preview-paper .paper-list {
        opacity: 0.25;
        filter: blur(0.5px);
        transition: opacity 0.35s ease, filter 0.35s ease;
    }
    
    .paper-title {
        font-size: 5px;
        padding-bottom: 1px;
        border-bottom-width: 0.25px;
    }
    
    .paper-list {
        gap: 1.5px;
    }
    
    .paper-list li {
        font-size: 4px;
        padding-left: 3.5px;
    }
    
    /* 3-paper mobile offsets */
    .folder-previews .paper-1 {
        left: 9px;
        top: 10px;
        transform: translateY(0px) rotate(-6deg);
    }

    .folder-previews .paper-2 {
        left: 35px;
        top: 10px;
        transform: translateY(1px) rotate(5deg);
    }

    .folder-previews .paper-3 {
        left: 22px;
        top: 10px;
        transform: translateY(2px) rotate(0deg);
    }

    /* 2-paper mobile offsets */
    .folder-previews:not(:has(.paper-3)) .paper-1 {
        left: 13px;
        top: 10px;
        transform: translateY(0px) rotate(-6deg);
    }

    .folder-previews:not(:has(.paper-3)) .paper-2 {
        left: 29px;
        top: 10px;
        transform: translateY(1px) rotate(5deg);
    }

    /* 3-paper mobile pop-up */
    .folder-wrapper:hover .folder-previews .paper-1 {
        transform: translateY(-28px) translateX(-14px) rotate(-14deg) scale(1.25);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .folder-wrapper:hover .folder-previews .paper-2 {
        transform: translateY(-28px) translateX(14px) rotate(12deg) scale(1.25);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .folder-wrapper:hover .folder-previews .paper-3 {
        transform: translateY(-32px) translateX(0) rotate(0deg) scale(1.3);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    }

    /* 2-paper mobile pop-up */
    .folder-wrapper:hover .folder-previews:not(:has(.paper-3)) .paper-1 {
        transform: translateY(-30px) translateX(-12px) rotate(-12deg) scale(1.28);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .folder-wrapper:hover .folder-previews:not(:has(.paper-3)) .paper-2 {
        transform: translateY(-30px) translateX(12px) rotate(10deg) scale(1.28);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .folder-wrapper:hover .preview-paper .paper-list {
        opacity: 1;
        filter: none;
    }

    .preview-badge {
        width: 20px;
        height: 20px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }
    
    /* 6-badge mobile closed offsets */
    .folder-previews .badge-1 {
        left: 8px;
        top: 11px;
        transform: translateY(0px) rotate(-15deg);
    }
    .folder-previews .badge-2 {
        left: 16px;
        top: 10px;
        transform: translateY(1px) rotate(-9deg);
    }
    .folder-previews .badge-3 {
        left: 24px;
        top: 9px;
        transform: translateY(1px) rotate(-3deg);
    }
    .folder-previews .badge-4 {
        left: 32px;
        top: 9px;
        transform: translateY(1px) rotate(3deg);
    }
    .folder-previews .badge-5 {
        left: 40px;
        top: 10px;
        transform: translateY(1px) rotate(9deg);
    }
    .folder-previews .badge-6 {
        left: 48px;
        top: 11px;
        transform: translateY(0px) rotate(15deg);
    }
    
    /* 6-badge mobile hover pop-up offsets */
    .folder-wrapper:hover .folder-previews .badge-1 {
        transform: translateY(-28px) translateX(-22px) rotate(-22deg) scale(1.3);
    }
    .folder-wrapper:hover .folder-previews .badge-2 {
        transform: translateY(-32px) translateX(-13px) rotate(-13deg) scale(1.35);
    }
    .folder-wrapper:hover .folder-previews .badge-3 {
        transform: translateY(-35px) translateX(-5px) rotate(-4deg) scale(1.35);
    }
    .folder-wrapper:hover .folder-previews .badge-4 {
        transform: translateY(-35px) translateX(5px) rotate(4deg) scale(1.35);
    }
    .folder-wrapper:hover .folder-previews .badge-5 {
        transform: translateY(-32px) translateX(13px) rotate(13deg) scale(1.35);
    }
    .folder-wrapper:hover .folder-previews .badge-6 {
        transform: translateY(-28px) translateX(22px) rotate(22deg) scale(1.3);
    }

    /* 3-certificate mobile overrides */
    .preview-cert {
        width: 40px;
        height: 28px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) blur(0.3px);
        padding: 1px;
    }
    
    .folder-previews .cert-1 {
        left: 8px;
        top: 10px;
        transform: translateY(0px) rotate(-8deg);
    }
    
    .folder-previews .cert-2 {
        left: 28px;
        top: 10px;
        transform: translateY(1px) rotate(8deg);
    }
    
    .folder-previews .cert-3 {
        left: 18px;
        top: 10px;
        transform: translateY(2px) rotate(0deg);
    }
    
    .folder-wrapper:hover .folder-previews .cert-1 {
        transform: translateY(-28px) translateX(-14px) rotate(-14deg) scale(1.35);
    }
    
    .folder-wrapper:hover .folder-previews .cert-2 {
        transform: translateY(-28px) translateX(14px) rotate(14deg) scale(1.35);
    }
    
    .folder-wrapper:hover .folder-previews .cert-3 {
        transform: translateY(-32px) translateX(0) rotate(0deg) scale(1.4);
    }


    .profile-image-popup {
        white-space: normal;
        width: 240px;
        font-size: 9px;
        line-height: 1.35;
        left: 50% !important;
    }
}

@media (max-width: 380px) {
    .r-box {
        width: 28px;
        height: 36px;
        font-size: 14px;
        line-height: 36px;
    }
}

/* ── Badges Grid and Name Styling ── */
.badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
}

.badge-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 110px;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body[data-theme="light"] .badge-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.badge-item:hover {
    transform: translateY(-4px);
    border-color: var(--folder-back-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.badge-item img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 8px;
}

.badge-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    width: 100%;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: auto;
}

/* ── Certificate Grid and Item Styling ── */
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
}

.cert-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 212px;
    height: 185px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

body[data-theme="light"] .cert-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.cert-item:hover {
    transform: translateY(-4px);
    border-color: var(--folder-back-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cert-item img {
    width: 100%;
    height: 125px;
    object-fit: contain;
    border-radius: 4px;
}

.cert-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    width: 100%;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: auto;
}

@media (max-width: 620px) {
    .badge-grid {
        gap: 10px;
    }
    .badge-item {
        width: 90px;
        height: 100px;
        padding: 8px 4px;
    }
    .badge-item img {
        width: 44px;
        height: 44px;
        margin-bottom: 4px;
    }
    .badge-name {
        font-size: 8px;
    }
    .cert-grid {
        gap: 12px;
    }
    .cert-item {
        width: 168px;
        height: 150px;
        padding: 6px;
    }
    .cert-item img {
        height: 100px;
    }
    .cert-name {
        font-size: 9px;
    }
}

/* ── System Info Cards ── */
.sys-info-card {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--social-border);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

body[data-theme="light"] .sys-info-card {
    background: rgba(0, 0, 0, 0.015);
}

.sys-info-card:hover {
    transform: translateY(-2px);
    border-color: var(--folder-back-bg);
}

.sys-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    font-size: 13px;
    gap: 12px;
}

body[data-theme="light"] .sys-info-row {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.sys-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sys-info-label {
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sys-info-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    max-width: 70%;
    word-break: break-word;
}

/* ── Footer ── */
.footer {
    width: 45%;
    margin: 26px auto 10px;
    padding-bottom: 10px;
}

.footer-divider {
    width: 100%;
    margin-bottom: 20px;
}

.footer-divider .line {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--divider-color) 20%,
        var(--divider-color) 80%,
        transparent 100%
    );
    transition: background 0.4s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-text {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.4s ease;
}


.back-to-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border: 1px solid var(--btn-outline-border);
    border-radius: 6px;
    background: transparent;
    transition: all 0.3s ease;
}

.back-to-top-btn svg {
    transition: transform 0.3s ease;
}

.back-to-top-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: translateY(-2px);
}

.back-to-top-btn:hover svg {
    transform: translateY(-2px);
}


@media (max-width: 1100px) {
    .footer {
        width: 56%;
    }
}

@media (max-width: 820px) {
    .footer {
        width: min(88%, 560px);
    }
}

@media (max-width: 620px) {
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .footer-left {
        align-items: center;
    }
}

/* Lenis Smooth Scroll Core Styles */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Outro Banner Styling */
.outro-banner {
    width: 100%;
    max-width: 800px;
    margin: 24px auto 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.outro-text {
    font-family: 'Parisienne', cursive;
    font-size: clamp(38px, 4.5vw, 68px);
    font-weight: 400;
    color: var(--text);
    letter-spacing: 2px;
    opacity: 0.85;
    transition: color 0.4s ease, opacity 0.4s ease;
    cursor: default;
}

.outro-text:hover {
    opacity: 1;
    color: var(--banner-color);
}

/* ── Footer Social Dock ── */
.footer-middle {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.footer-dock {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 50px;
    padding: 4px 6px;
    border-radius: 9999px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-sizing: border-box;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.dock-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: var(--dock-icon-bg);
    border: 1px solid var(--dock-icon-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.2s ease;
}

.dock-icon-wrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.dock-icon-wrapper svg {
    width: 60%;
    height: 60%;
    display: block;
    transition: none;
}

.dock-icon-wrapper svg path {
    fill: var(--dock-icon-fill);
    transition: fill 0.4s ease;
}



/* Tooltip styles */
.dock-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: rgba(14, 16, 15, 0.95);
    color: #FFFFFF;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.dock-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: rgba(14, 16, 15, 0.95) transparent transparent transparent;
}

.dock-icon-wrapper:hover .dock-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive grid layout for centering footer content */
@media (min-width: 621px) {
    .footer-content {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        width: 100%;
    }
    .footer-left {
        justify-self: start;
    }
    .footer-middle {
        justify-self: center;
    }
    .footer-right {
        justify-self: end;
    }
}

@media (max-width: 1023px) {
    .hidden-mobile {
        display: none !important;
    }
}

/* ── Keyboard Accessibility Focus States ── */
a:focus-visible,
button:focus-visible,
.project-card-toggle:focus-visible,
.folder-wrapper:focus-visible,
.dlss-toggle:focus-visible,
.experience-tab:focus-visible,
.social-icon:focus-visible,
.back-to-top-btn:focus-visible,
.dock-icon-wrapper a:focus-visible,
.stats-sidebar-item:focus-visible,
.badges-sidebar-item:focus-visible,
.finder-close:focus-visible {
    outline: 2.5px solid var(--folder-back-bg);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(109, 40, 217, 0.25) !important;
}

