/* Centralized final overrides to avoid style regressions across duplicated legacy CSS blocks */

/* Ensure hidden attribute always hides elements, even with explicit display rules */
[hidden] {
    display: none !important;
}

/* ── Select dropdown enhancement ─────────────────────── */
/* Sort controls with dropdown + direction button */
.sort-controls {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.08), rgba(255, 204, 0, 0.02));
}

.sort-select {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 2.375rem 0.75rem 1rem;
    height: 48px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    color: white;
    background-color: rgba(50, 50, 50, 0.5);
    border: 1.5px solid rgba(255, 204, 0, 0.24);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgb(255,204,0)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.sort-select:hover {
    background-color: rgba(50, 50, 50, 0.7);
    border-color: rgba(255, 204, 0, 0.36);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.08);
}

.sort-select:active,
.sort-select:focus {
    outline: none;
    background-color: rgba(50, 50, 50, 0.8);
    border-color: rgba(255, 204, 0, 0.48);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.12), 0 4px 12px rgba(255, 204, 0, 0.1);
}

.sort-select option {
    background-color: #2a2a2a;
    color: white;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 2px 0;
}

.sort-select option:hover {
    background: rgba(255, 204, 0, 0.2);
    color: white;
}

.sort-select option:checked {
    background: linear-gradient(rgba(255, 204, 0, 0.95), rgba(255, 204, 0, 0.95)), #2a2a2a;
    background-color: #ffcc00 !important;
    color: #1a1a1a !important;
    font-weight: 600;
}

.sort-direction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    width: auto;
    padding: 0 0.875rem;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 204, 0, 0.24);
    background: rgba(50, 50, 50, 0.5);
    color: #ffcc00;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.sort-direction-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffcc00;
    transition: opacity 0.15s ease;
}

.sort-direction-btn:hover .sort-direction-label {
    opacity: 0.85;
}

.sort-direction-btn:hover {
    background: rgba(50, 50, 50, 0.7);
    border-color: rgba(255, 204, 0, 0.36);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.08);
    transform: translateY(-1px);
}

.sort-direction-btn:active {
    transform: translateY(0);
    background: rgba(50, 50, 50, 0.9);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sort-direction-btn.ascending svg {
    transform: rotate(180deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sort-direction-btn.descending svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.sort-direction-btn svg {
    width: 20px;
    height: 20px;
}

/* Slider toggles */
.switch-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.switch-text {
    color: #f4e6a2;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    width: 48px;
    height: 24px;
    background: #3a3a3a;
    border: 1px solid rgba(255, 204, 0, 0.6);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.switch-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffcc00;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease;
}

.switch input:checked + .switch-track {
    background: rgba(255, 204, 0, 0.22);
    border-color: #ffcc00;
}

.switch input:checked + .switch-track .switch-thumb {
    transform: translateX(24px);
    background: #fff1a8;
}

.switch input:focus-visible + .switch-track {
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

/* Force social links in contact section to always be visible */
.contact .social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.contact .social-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    min-width: 138px;
    background: #ffcc00 !important;
    color: #121212 !important;
    border: 1px solid #ffdd66;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.contact .social-link i,
.contact .social-link span {
    color: #121212 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

.contact .social-link:hover {
    background: #ffd633 !important;
    transform: translateY(-2px) !important;
}

/* Footer line cleanup */
.footer,
footer {
    border-top-width: 1px !important;
}

.footer .footer-container,
footer .footer-container {
    border-bottom: none !important;
}

@media screen and (max-width: 980px) {
    .navbar nav ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .switch-item {
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 580px) {
    .navbar .container {
        width: 95%;
    }

    .navbar nav ul {
        gap: 8px;
    }

    .navbar nav a {
        font-size: 0.82rem;
    }

    .switch-item {
        width: 100%;
        justify-content: center;
    }

    #back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 42px;
        height: 42px;
    }
}

/* Light theme readability hardening */
body[data-theme="light"] {
    --primary-color: #a86f00;
    --secondary-text: #4a4a4a;
    --border-color: #d6c8a8;
    background-color: #f7f2e8 !important;
    color: #1a1a1a !important;
}

body[data-theme="light"]::before {
    background-color: rgba(250, 246, 236, 0.94) !important;
}

body[data-theme="light"] .navbar,
body[data-theme="light"] footer,
body[data-theme="light"] .project,
body[data-theme="light"] .certificate,
body[data-theme="light"] .contact-info,
body[data-theme="light"] .contact-form-wrapper,
body[data-theme="light"] .admin-section,
body[data-theme="light"] .item-card {
    background-color: #fffdf7 !important;
    color: #181818 !important;
    border-color: #d6c8a8 !important;
    box-shadow: 0 4px 14px rgba(70, 45, 0, 0.06);
}

body[data-theme="light"] .navbar nav a,
body[data-theme="light"] .projects > .container > p,
body[data-theme="light"] .certificates > .container > p,
body[data-theme="light"] .contact > .container > p,
body[data-theme="light"] .project p,
body[data-theme="light"] .certificate p,
body[data-theme="light"] .footer-section p,
body[data-theme="light"] .footer-bottom {
    color: #3f3a33 !important;
}

body[data-theme="light"] .projects h2,
body[data-theme="light"] .certificates h2,
body[data-theme="light"] .about h2,
body[data-theme="light"] .contact h2,
body[data-theme="light"] .project h3,
body[data-theme="light"] .certificate h3,
body[data-theme="light"] .navbar nav a.active,
body[data-theme="light"] .navbar nav a:hover {
    color: #8a5d00 !important;
}

body[data-theme="light"] .footer-section h4 {
    color: #1a1208 !important;
}

body[data-theme="light"] .footer-section a,
body[data-theme="light"] .footer-bottom a {
    color: #5a5245 !important;
}

body[data-theme="light"] .footer-section a:hover,
body[data-theme="light"] .footer-bottom a:hover {
    color: #5e3f00 !important;
}

body[data-theme="light"] .switch-text {
    color: #3d352b !important;
}

body[data-theme="light"] .switch-track {
    background: #ddd4c2;
    border-color: #bca57b;
}

body[data-theme="light"] .switch-thumb {
    background: #a86f00;
}

body[data-theme="light"] .btn,
body[data-theme="light"] .btn-small,
body[data-theme="light"] .social-link,
body[data-theme="light"] .social-icon,
body[data-theme="light"] .btn-copy {
    background: #c68a00 !important;
    color: #17120a !important;
}

body[data-theme="light"] .btn:hover,
body[data-theme="light"] .btn-small:hover,
body[data-theme="light"] .social-link:hover,
body[data-theme="light"] .social-icon:hover,
body[data-theme="light"] .btn-copy:hover {
    background: #a86f00 !important;
    color: #fff8ed !important;
}

body[data-theme="light"] .sort-select {
    background-color: rgba(214, 200, 168, 0.2) !important;
    border-color: rgba(168, 111, 0, 0.24) !important;
    color: #1a1a1a !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgb(168,111,0)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') !important;
}

body[data-theme="light"] .sort-select:hover {
    background-color: rgba(214, 200, 168, 0.35) !important;
    border-color: rgba(168, 111, 0, 0.36) !important;
    box-shadow: 0 2px 8px rgba(168, 111, 0, 0.06) !important;
}

body[data-theme="light"] .sort-select:active,
body[data-theme="light"] .sort-select:focus {
    background-color: rgba(214, 200, 168, 0.45) !important;
    border-color: rgba(168, 111, 0, 0.48) !important;
    box-shadow: 0 0 0 3px rgba(168, 111, 0, 0.1), 0 4px 12px rgba(168, 111, 0, 0.08) !important;
}

body[data-theme="light"] .sort-select option {
    background-color: #fffdf7;
    color: #1a1a1a;
    padding: 0.75rem 0.875rem;
}

body[data-theme="light"] .sort-select option:hover {
    background: rgba(168, 111, 0, 0.15);
    color: #1a1a1a;
}

body[data-theme="light"] .sort-select option:checked {
    background: linear-gradient(rgba(168, 111, 0, 0.95), rgba(168, 111, 0, 0.95)), #fffdf7 !important;
    background-color: #a86f00 !important;
    color: #fffdf7 !important;
    font-weight: 600;
}

body[data-theme="light"] .sort-direction-btn {
    border-color: rgba(168, 111, 0, 0.24) !important;
    background: rgba(214, 200, 168, 0.2) !important;
    color: #a86f00 !important;
}

body[data-theme="light"] .sort-direction-label {
    color: #a86f00 !important;
}

body[data-theme="light"] .sort-direction-btn:hover {
    background: rgba(214, 200, 168, 0.35) !important;
    border-color: rgba(168, 111, 0, 0.36) !important;
    box-shadow: 0 2px 8px rgba(168, 111, 0, 0.06) !important;
}

body[data-theme="light"] .sort-direction-btn:active {
    background: rgba(214, 200, 168, 0.5) !important;
    box-shadow: inset 0 1px 3px rgba(168, 111, 0, 0.2) !important;
}

/* Scrollbar only visible while scrolling */
html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    scrollbar-width: none;
}

html.is-scrolling {
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #0f0f0f;
}

html[data-theme="light"].is-scrolling {
    scrollbar-color: #b57a00 #ece3d2;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
    transition: width 0.25s ease, height 0.25s ease;
}

html.is-scrolling ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-left: 1px solid rgba(255, 204, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffdc66, #ffcc00 55%, #d8a900);
    border-radius: 999px;
    border: 2px solid #0f0f0f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffe89a, #ffd84d 55%, #e7b800);
}

::-webkit-scrollbar-corner {
    background: #0f0f0f;
}

body[data-theme="light"] ::-webkit-scrollbar-track {
    background: #ece3d2;
    border-left: 1px solid rgba(139, 93, 0, 0.2);
}

body[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d49a1a, #b57a00 55%, #8d5d00);
    border-color: #ece3d2;
}

body[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e5b249, #c68a00 55%, #9f6800);
}

/* Projects page redesign */
.projects-page-section {
    padding: 4.5rem 0 5.5rem;
}

.projects-page-section .container {
    max-width: 1280px;
}

.projects-shell {
    position: relative;
    display: grid;
    gap: 1.75rem;
}

.projects-shell::before {
    content: '';
    position: absolute;
    inset: 1.5rem 2rem auto;
    height: 240px;
    background:
        radial-gradient(circle at top left, rgba(255, 204, 0, 0.24), transparent 48%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 34%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
}

.projects-hero,
.projects-toolbar,
.project-catalog,
.projects-empty {
    position: relative;
    z-index: 1;
}

.projects-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
    gap: 1.5rem;
    align-items: stretch;
}

.projects-copy,
.projects-overview,
.projects-toolbar,
.projects-page-section .project-card,
.projects-empty {
    border: 1px solid rgba(255, 204, 0, 0.18);
    background:
        linear-gradient(180deg, rgba(16, 16, 16, 0.92), rgba(16, 16, 16, 0.82)),
        rgba(16, 16, 16, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
}

.projects-copy {
    padding: 2.25rem;
    border-radius: 28px;
}

.projects-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffe082;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.projects-page-section h1 {
    margin: 1rem 0 0.9rem;
    font-size: clamp(2.5rem, 5vw, 4.35rem);
    line-height: 0.98;
    color: #fff6d1;
    letter-spacing: -0.05em;
    text-align: left;
}

.projects-intro {
    max-width: 62ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.projects-overview {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
}

.projects-stat-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 204, 0, 0.14);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.08), rgba(255, 255, 255, 0.02));
}

.projects-stat-card strong {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1;
    color: #fff3ba;
}

.projects-stat-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}

.projects-toolbar {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
}

.projects-toolbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.7fr);
    gap: 1rem;
}

.projects-search,
.projects-sort {
    display: grid;
    gap: 0.5rem;
}

.projects-search span,
.projects-sort span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 243, 186, 0.75);
}

.projects-search input,
.projects-sort select {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 204, 0, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--light-text);
    padding: 0.95rem 1rem;
    font: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

.projects-sort select {
    cursor: pointer;
}

.projects-search input:focus,
.projects-sort select:focus {
    border-color: rgba(255, 204, 0, 0.58);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.projects-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.projects-filter,
.project-link-copy {
    border: 1px solid rgba(255, 204, 0, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--light-text);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.projects-filter:hover,
.projects-filter.is-active,
.project-link-copy:hover,
.project-link-copy:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 204, 0, 0.7);
    background: rgba(255, 204, 0, 0.14);
    color: #fff4c2;
}

.projects-results {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
}

.catalog-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.2rem;
}

.catalog-more-btn {
    border: 1px solid rgba(255, 204, 0, 0.28);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.18), rgba(255, 204, 0, 0.1));
    color: #ffeaa4;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    min-width: 140px;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.catalog-more-btn:hover,
.catalog-more-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 204, 0, 0.62);
    box-shadow: 0 12px 28px rgba(255, 204, 0, 0.16);
}

.project-catalog {
    position: relative;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.35rem;
}

.project-catalog.has-collapsed-items::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 104px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.95));
    pointer-events: none;
}

.projects-page-section .project-card {
    display: grid;
    grid-template-rows: 220px 1fr;
    border-radius: 24px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.projects-page-section .project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 204, 0, 0.58);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.project-media-wrap {
    position: relative;
    overflow: hidden;
}

.project-media-wrap::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
    pointer-events: none;
}

.projects-page-section .project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.projects-page-section .project-card:hover .project-img {
    transform: scale(1.06);
}

.project-badge,
.project-category-chip {
    position: absolute;
    top: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.project-badge {
    left: 1rem;
    background: #ffcc00;
    color: #181400;
}

.project-category-chip {
    right: 1rem;
    background: rgba(9, 9, 9, 0.72);
    color: #fff1ba;
    border: 1px solid rgba(255, 204, 0, 0.26);
}

.project-card-body {
    display: grid;
    gap: 0.8rem;
    padding: 1.25rem 1.25rem 1.35rem;
}

.project-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.project-rank,
.project-host {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.83rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.projects-page-section .project-card h3 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.12;
    color: #fff4c2;
}

.projects-page-section .project-card p {
    margin: 0;
    line-clamp: 4;
    color: rgba(255, 255, 255, 0.76);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.9em;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.project-actions {
    display: grid;
    grid-template-columns: minmax(0, 4fr) 68px;
    gap: 0.65rem;
    align-items: stretch;
    margin-top: 0.55rem;
}

.projects-page-section .project-card .btn,
.project-link-copy {
    min-height: 52px;
}

.projects-page-section .project-card .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    width: 100%;
    margin: 0;
    align-self: stretch;
    padding: 0.9rem 1.15rem;
    font-size: 1rem;
    white-space: nowrap;
}

.project-link-copy {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    min-height: 52px;
    padding: 0;
    line-height: 1;
    border: 1px solid rgba(255, 204, 0, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    box-shadow: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.project-link-copy::after {
    content: attr(data-copy-feedback);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(6px);
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.96);
    color: #fff3bf;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.project-link-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    color: #ffd95e;
    font-size: 1.1rem;
    font-weight: 400;
    transform: none;
}

.project-link-copy:hover,
.project-link-copy:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(255, 204, 0, 0.08);
    color: #fff2b0;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.project-link-copy:hover .project-link-copy-icon,
.project-link-copy:focus-visible .project-link-copy-icon {
    color: #ffe27a;
}

.project-link-copy.is-copied {
    border-color: rgba(255, 204, 0, 0.68);
    background: rgba(255, 204, 0, 0.14);
    box-shadow: 0 10px 24px rgba(255, 204, 0, 0.12);
}

.project-link-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(255, 204, 0, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
    font-weight: 600;
}

.project-link-copy.is-copied::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.projects-empty {
    display: grid;
    place-items: center;
    gap: 0.85rem;
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    text-align: center;
}

.projects-empty h2,
.projects-empty p {
    margin: 0;
}

.projects-empty h2 {
    color: #fff2b0;
    font-size: 1.8rem;
}

.projects-empty p {
    max-width: 56ch;
    color: rgba(255, 255, 255, 0.74);
}

.project-catalog.is-empty {
    display: none;
}

.card-reveal-in {
    animation: cardRevealIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardRevealIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body[data-theme="light"] .projects-copy,
body[data-theme="light"] .projects-overview,
body[data-theme="light"] .projects-toolbar,
body[data-theme="light"] .projects-page-section .project-card,
body[data-theme="light"] .projects-empty {
    background:
        linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 248, 233, 0.94)),
        #fffaf0;
    border-color: rgba(168, 111, 0, 0.16);
    box-shadow: 0 20px 55px rgba(90, 61, 0, 0.08);
}

body[data-theme="light"] .projects-kicker,
body[data-theme="light"] .projects-filter:hover,
body[data-theme="light"] .projects-filter.is-active,
body[data-theme="light"] .project-link-copy:hover,
body[data-theme="light"] .project-link-copy:focus-visible {
    background: rgba(198, 138, 0, 0.12);
    color: #8a5d00;
}

body[data-theme="light"] .projects-page-section h1,
body[data-theme="light"] .projects-stat-card strong,
body[data-theme="light"] .projects-page-section .project-card h3,
body[data-theme="light"] .projects-empty h2 {
    color: #5e3f00;
}

body[data-theme="light"] .projects-intro,
body[data-theme="light"] .projects-stat-card span,
body[data-theme="light"] .projects-results,
body[data-theme="light"] .projects-page-section .project-card p,
body[data-theme="light"] .project-rank,
body[data-theme="light"] .project-host,
body[data-theme="light"] .project-tag,
body[data-theme="light"] .projects-empty p {
    color: #5f5343;
}

body[data-theme="light"] .projects-search input,
body[data-theme="light"] .projects-sort select,
body[data-theme="light"] .projects-filter,
body[data-theme="light"] .project-tag,
body[data-theme="light"] .project-category-chip {
    background: rgba(168, 111, 0, 0.05);
    border-color: rgba(168, 111, 0, 0.18);
    color: #4d3c23;
}

body[data-theme="light"] .catalog-more-btn {
    color: #7b5600;
    border-color: rgba(138, 93, 0, 0.28);
    background: linear-gradient(180deg, rgba(198, 138, 0, 0.16), rgba(198, 138, 0, 0.08));
}

body[data-theme="light"] .project-catalog.has-collapsed-items::after,
body[data-theme="light"] .cert-catalog.has-collapsed-items::after {
    background: linear-gradient(180deg, rgba(255, 250, 241, 0), rgba(255, 250, 241, 0.96));
}

body[data-theme="light"] .project-link-copy {
    background: rgba(168, 111, 0, 0.05);
    border: 1px solid rgba(168, 111, 0, 0.18);
    color: #6c5730;
}

body[data-theme="light"] .project-link-copy-icon {
    background: rgba(198, 138, 0, 0.12);
    color: #8a5d00;
}

body[data-theme="light"] .project-link-copy:hover,
body[data-theme="light"] .project-link-copy:focus-visible {
    color: #8a5d00;
    background: rgba(198, 138, 0, 0.1);
    border-color: rgba(168, 111, 0, 0.42);
    box-shadow: 0 10px 20px rgba(90, 61, 0, 0.08);
}

body[data-theme="light"] .project-link-copy.is-copied {
    background: rgba(198, 138, 0, 0.16);
    border-color: rgba(168, 111, 0, 0.5);
}

body[data-theme="light"] .project-link-missing {
    border-color: rgba(168, 111, 0, 0.22);
    background: rgba(168, 111, 0, 0.05);
    color: #81694a;
}

body[data-theme="light"] .project-link-copy::after {
    background: rgba(255, 250, 241, 0.98);
    color: #7a5300;
    box-shadow: 0 10px 20px rgba(90, 61, 0, 0.12);
}

body[data-theme="light"] .projects-search span,
body[data-theme="light"] .projects-sort span {
    color: #8a5d00;
}

body[data-theme="light"] .project-badge {
    background: #c68a00;
    color: #fff8ed;
}

@media screen and (max-width: 980px) {
    .projects-hero,
    .projects-toolbar-main {
        grid-template-columns: 1fr;
    }

    .projects-copy {
        padding: 1.8rem;
    }

    .projects-page-section h1 {
        font-size: clamp(2.3rem, 11vw, 3.5rem);
    }
}

@media screen and (max-width: 640px) {
    .projects-page-section {
        padding: 3.5rem 0 4.5rem;
    }

    .projects-shell::before {
        inset: 0.5rem 0 auto;
        height: 180px;
    }

    .projects-copy,
    .projects-toolbar,
    .projects-overview,
    .projects-empty {
        border-radius: 20px;
    }

    .projects-page-section .project-card {
        grid-template-rows: 210px 1fr;
        border-radius: 20px;
    }

    .project-card-body {
        padding: 1.05rem;
    }

    .project-actions {
        grid-template-columns: 1fr 68px;
    }

    .projects-page-section .project-card .btn,
    .project-link-copy {
        width: 100%;
    }
}

/* ── Navbar separators ──────────────────────────────────────── */
.nav-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 204, 0, 0.25);
    padding: 0;
    flex-shrink: 0;
}

.navbar nav ul > li {
    position: relative;
}

/* Thin line between consecutive link items (no nav-divider between them) */
.navbar nav ul > li:not(.nav-divider):not(.switch-item)
    + li:not(.nav-divider):not(.switch-item)::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: rgba(255, 204, 0, 0.25);
    pointer-events: none;
}

body[data-theme="light"] .nav-divider {
    background: rgba(140, 100, 0, 0.28);
}

body[data-theme="light"] .navbar nav ul > li:not(.nav-divider):not(.switch-item)
    + li:not(.nav-divider):not(.switch-item)::before {
    background: rgba(140, 100, 0, 0.28);
}

/* Mobile navbar: logo left, hamburger right, dropdown menu */
.mobile-nav-toggle {
    display: none;
}

@media screen and (max-width: 768px) {
    .navbar .container {
        position: relative;
        width: 94% !important;
    }

    .navbar .logo img {
        height: 62px !important;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid rgba(255, 204, 0, 0.55);
        background: linear-gradient(180deg, rgba(24, 24, 24, 0.95), rgba(12, 12, 12, 0.98));
        cursor: pointer;
        transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    }

    .mobile-nav-toggle:hover {
        border-color: rgba(255, 204, 0, 0.85);
        box-shadow: 0 6px 18px rgba(255, 204, 0, 0.16);
        transform: translateY(-1px);
    }

    .mobile-nav-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 99px;
        background: #ffcc00;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .navbar.is-mobile-open .mobile-nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .navbar.is-mobile-open .mobile-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .navbar.is-mobile-open .mobile-nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .navbar .primary-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(286px, 86vw);
        padding: 0.6rem;
        border: 1px solid rgba(255, 204, 0, 0.32);
        border-radius: 16px;
        background:
            linear-gradient(180deg, rgba(16, 16, 16, 0.97), rgba(8, 8, 8, 0.98)),
            radial-gradient(circle at top right, rgba(255, 204, 0, 0.14), transparent 45%);
        box-shadow: 0 20px 34px rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        transform-origin: top right;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.22s ease, visibility 0.2s ease;
        z-index: 1100;
    }

    .navbar.is-mobile-open .primary-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .navbar .primary-nav ul {
        display: grid !important;
        gap: 0.4rem !important;
        margin: 0;
        padding: 0;
        list-style: none;
        font-size: 1rem !important;
        justify-items: stretch;
        align-items: stretch;
    }

    .navbar .primary-nav li {
        width: 100%;
        text-align: left;
    }

    .navbar .primary-nav .nav-divider,
    .navbar .primary-nav ul > li:not(.nav-divider):not(.switch-item) + li:not(.nav-divider):not(.switch-item)::before {
        display: none !important;
        content: none !important;
    }

    .navbar .primary-nav a {
        display: block;
        width: 100%;
        padding: 0.68rem 0.72rem;
        border-radius: 10px;
        border-bottom: none !important;
        font-size: 0.98rem !important;
        color: #f4f4f4;
        text-align: left;
    }

    .navbar .primary-nav a:hover,
    .navbar .primary-nav a.active {
        color: #ffcc00;
        background: rgba(255, 204, 0, 0.12);
    }

    .navbar .primary-nav .switch-item {
        width: 100% !important;
        justify-content: space-between !important;
        padding: 0.62rem 0.7rem;
        border-radius: 10px;
        border: 1px solid rgba(255, 204, 0, 0.2);
        background: rgba(255, 255, 255, 0.02);
    }

    .navbar .primary-nav .switch-text {
        font-size: 0.82rem;
    }

    .navbar .primary-nav .switch-track {
        width: 42px;
        height: 21px;
        padding: 2px;
    }

    .navbar .primary-nav .switch-thumb {
        width: 15px;
        height: 15px;
    }

    .navbar .primary-nav .switch input:checked + .switch-track .switch-thumb {
        transform: translateX(20px);
    }
}

@media screen and (max-width: 420px) {
    .navbar .primary-nav {
        right: 0;
        width: min(270px, 90vw);
    }

    .navbar .logo img {
        height: 58px !important;
    }
}

body[data-theme="light"] .mobile-nav-toggle {
    background: linear-gradient(180deg, rgba(245, 240, 232, 0.98), rgba(236, 227, 210, 0.98));
    border-color: rgba(138, 93, 0, 0.45);
}

body[data-theme="light"] .mobile-nav-toggle span {
    background: #8a5d00;
}

body[data-theme="light"] .navbar .primary-nav {
    border-color: rgba(138, 93, 0, 0.32);
    background:
        linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(248, 241, 227, 0.98)),
        radial-gradient(circle at top right, rgba(168, 111, 0, 0.14), transparent 46%);
}

body[data-theme="light"] .navbar .primary-nav a {
    color: #2f2616;
}

body[data-theme="light"] .navbar .primary-nav .switch-item {
    border-color: rgba(138, 93, 0, 0.24);
    background: rgba(168, 111, 0, 0.06);
}

/* ================================================================
   CERTIFICATES PAGE — mirrors projects-page design language
   ================================================================ */

.certs-page-section {
    padding: 4.5rem 0 5.5rem;
}

.certs-page-section .container {
    max-width: 1280px;
}

.certs-shell {
    position: relative;
    display: grid;
    gap: 1.75rem;
}

.certs-shell::before {
    content: '';
    position: absolute;
    inset: 1.5rem 2rem auto;
    height: 240px;
    background:
        radial-gradient(circle at top left, rgba(255, 204, 0, 0.22), transparent 48%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
}

.certs-hero,
.certs-toolbar,
.cert-catalog,
.certs-empty {
    position: relative;
    z-index: 1;
}

.certs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
    gap: 1.5rem;
    align-items: stretch;
}

.certs-copy,
.certs-overview,
.certs-toolbar,
.certs-page-section .cert-card,
.certs-empty {
    border: 1px solid rgba(255, 204, 0, 0.18);
    background:
        linear-gradient(180deg, rgba(16, 16, 16, 0.92), rgba(16, 16, 16, 0.82)),
        rgba(16, 16, 16, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
}

.certs-copy {
    padding: 2.25rem;
    border-radius: 28px;
}

.certs-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffe082;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.certs-page-section h1 {
    margin: 1rem 0 0.9rem;
    font-size: clamp(2.5rem, 5vw, 4.35rem);
    line-height: 0.98;
    color: #fff6d1;
    letter-spacing: -0.05em;
    text-align: left;
}

.certs-intro {
    max-width: 62ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.certs-overview {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
}

.certs-stat-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 204, 0, 0.14);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.08), rgba(255, 255, 255, 0.02));
}

.certs-stat-card strong {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1;
    color: #fff3ba;
}

.certs-stat-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}

/* Toolbar */
.certs-toolbar {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
}

.certs-toolbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.7fr);
    gap: 1rem;
}

.certs-search,
.certs-sort {
    display: grid;
    gap: 0.5rem;
}

.certs-search span,
.certs-sort span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 243, 186, 0.75);
}

.certs-search input,
.certs-sort select {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 204, 0, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--light-text);
    padding: 0.95rem 1rem;
    font: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

.certs-sort select {
    cursor: pointer;
}

.certs-search input:focus,
.certs-sort select:focus {
    border-color: rgba(255, 204, 0, 0.58);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.certs-results {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
}

/* Catalog grid */
.cert-catalog {
    display: grid;
    position: relative;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.35rem;
}

.cert-catalog.has-collapsed-items::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 104px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.95));
    pointer-events: none;
}

/* Cards */
.cert-card {
    display: grid;
    grid-template-rows: 220px 1fr;
    border-radius: 24px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 204, 0, 0.58);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4) !important;
    outline: none;
}

.cert-media-wrap {
    position: relative;
    overflow: hidden;
}

.cert-media-wrap::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
    pointer-events: none;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.cert-card:hover .cert-img {
    transform: scale(1.06);
}

.cert-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #ffcc00;
    color: #181400;
}

.cert-card-body {
    display: grid;
    gap: 0.8rem;
    padding: 1.25rem 1.25rem 1.35rem;
    border: none;
}

.cert-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cert-rank {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.83rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cert-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #72e082;
    font-size: 0.78rem;
    font-weight: 600;
}

.cert-card h3 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.12;
    color: #fff4c2;
}

.cert-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    display: -webkit-box;
    line-clamp: 4;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.9em;
}

.cert-actions {
    display: grid;
    grid-template-columns: minmax(0, 4fr) 68px;
    gap: 0.65rem;
    align-items: stretch;
    margin-top: 0.55rem;
}

.cert-card .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    width: 100%;
    margin: 0;
    align-self: stretch;
    padding: 0.9rem 1.15rem;
    font-size: 1rem;
    min-height: 52px;
    white-space: nowrap;
}

.cert-link-copy {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    min-height: 52px;
    padding: 0;
    line-height: 1;
    border: 1px solid rgba(255, 204, 0, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.cert-link-copy:hover,
.cert-link-copy:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(255, 204, 0, 0.08);
    color: #fff2b0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.cert-link-copy.is-copied {
    border-color: rgba(255, 204, 0, 0.68);
    background: rgba(255, 204, 0, 0.14);
}

.cert-link-copy::after {
    content: attr(data-copy-feedback);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(6px);
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.96);
    color: #fff3bf;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cert-link-copy.is-copied::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cert-link-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffd95e;
}

.cert-link-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(255, 204, 0, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
    font-weight: 600;
    grid-column: 1 / -1;
}

/* Empty state */
.certs-empty {
    display: grid;
    place-items: center;
    gap: 0.85rem;
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    text-align: center;
}

.cert-catalog.is-empty + .certs-empty {
    display: grid;
}

/* ── Light theme ─────────────────────────────────────────────── */
body[data-theme="light"] .certs-copy,
body[data-theme="light"] .certs-overview,
body[data-theme="light"] .certs-toolbar,
body[data-theme="light"] .cert-card,
body[data-theme="light"] .certs-empty {
    background:
        linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 248, 233, 0.94)),
        #fffaf0;
    border-color: rgba(168, 111, 0, 0.16);
    box-shadow: 0 20px 55px rgba(90, 61, 0, 0.08);
}

body[data-theme="light"] .certs-kicker {
    background: rgba(198, 138, 0, 0.12);
    color: #7a5c00;
}

body[data-theme="light"] .certs-page-section h1 {
    color: #1a1208;
}

body[data-theme="light"] .certs-intro {
    color: rgba(30, 22, 5, 0.78);
}

body[data-theme="light"] .certs-stat-card {
    background: linear-gradient(180deg, rgba(198, 138, 0, 0.1), rgba(255, 248, 233, 0.02));
    border-color: rgba(168, 111, 0, 0.18);
}

body[data-theme="light"] .certs-stat-card strong {
    color: #6b4e00;
}

body[data-theme="light"] .certs-stat-card span {
    color: rgba(30, 22, 5, 0.72);
}

body[data-theme="light"] .certs-search span,
body[data-theme="light"] .certs-sort span {
    color: #6b4e00;
}

body[data-theme="light"] .certs-search input,
body[data-theme="light"] .certs-sort select {
    background: #ffffff;
    color: #1f1a12;
    border-color: #d6c8a8;
}

body[data-theme="light"] .certs-results {
    color: rgba(30, 22, 5, 0.7);
}

body[data-theme="light"] .cert-rank {
    color: rgba(30, 22, 5, 0.56);
}

body[data-theme="light"] .cert-card h3 {
    color: #3d2a00;
}

body[data-theme="light"] .cert-card p {
    color: rgba(30, 22, 5, 0.76);
}

body[data-theme="light"] .cert-link-copy {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(168, 111, 0, 0.2);
    color: rgba(30, 22, 5, 0.8);
}

body[data-theme="light"] .cert-link-copy:hover {
    background: rgba(198, 138, 0, 0.1);
    border-color: rgba(168, 111, 0, 0.5);
}

body[data-theme="light"] .cert-link-missing {
    border-color: rgba(168, 111, 0, 0.22);
    color: rgba(30, 22, 5, 0.5);
}

body[data-theme="light"] .cert-badge {
    background: #b48200;
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media screen and (max-width: 980px) {
    .certs-hero {
        grid-template-columns: 1fr;
    }

    .certs-overview {
        grid-template-columns: repeat(3, 1fr);
    }

    .certs-toolbar-main {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 640px) {
    .certs-page-section {
        padding: 3.5rem 0 4.5rem;
    }

    .certs-shell::before {
        inset: 0.5rem 0 auto;
        height: 180px;
    }

    .certs-copy,
    .certs-toolbar,
    .certs-overview,
    .certs-empty {
        border-radius: 20px;
    }

    .cert-card {
        grid-template-rows: 210px 1fr;
        border-radius: 20px;
    }

    .cert-card .btn,
    .cert-link-copy {
        width: 100%;
    }
}

/* ================================================================
   ABOUT ME PAGE
   ================================================================ */

.about-page-section {
    padding: 4.5rem 0 5rem;
}

.about-page-section .container {
    max-width: 1280px;
}

.about-shell {
    position: relative;
    display: grid;
    gap: 1.75rem;
}

.about-shell::before {
    content: '';
    position: absolute;
    inset: 1.5rem 2rem auto;
    height: 260px;
    background:
        radial-gradient(circle at top left, rgba(255, 204, 0, 0.2), transparent 50%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 36%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}

.about-hero,
.about-skills-section,
.about-stats-row {
    position: relative;
    z-index: 1;
}

/* ── Hero layout ──────────────────────────────── */
.about-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.85fr);
    gap: 1.5rem;
    align-items: stretch;
}

.about-copy,
.about-profile-col,
.about-skills-section,
.about-stats-row {
    border: 1px solid rgba(255, 204, 0, 0.18);
    background:
        linear-gradient(180deg, rgba(16, 16, 16, 0.92), rgba(16, 16, 16, 0.82)),
        rgba(16, 16, 16, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 2.25rem;
}

.about-copy {
    display: flex;
    flex-direction: column;
}

.about-profile-col {
    padding: 1.75rem;
    display: grid;
    gap: 1.25rem;
}

/* ── Kicker + heading ──────────────────────────── */
.about-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffe082;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.about-copy h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #fff6d1;
}

.about-role {
    margin: 0 0 1.4rem;
    color: #ffcc00;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── Bio text ──────────────────────────────────── */
.about-bio {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.6rem;
}

.about-bio p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.8;
}

/* ── Actions ───────────────────────────────────── */
.about-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.about-btn-outline {
    background: transparent !important;
    color: #ffcc00 !important;
    border: 1px solid rgba(255, 204, 0, 0.45) !important;
}

.about-btn-outline:hover {
    background: rgba(255, 204, 0, 0.1) !important;
    border-color: rgba(255, 204, 0, 0.72) !important;
    color: #fff4c2 !important;
}

.about-btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 204, 0, 0.12) !important;
    color: #ffdf7d !important;
    border: 1px solid rgba(255, 204, 0, 0.46) !important;
}

.about-btn-cv:hover {
    background: rgba(255, 204, 0, 0.22) !important;
    border-color: rgba(255, 204, 0, 0.72) !important;
    color: #fff8de !important;
}

.about-btn-cv i {
    font-size: 0.9rem;
}

/* ── Profile photo ─────────────────────────────── */
.about-photo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 204, 0, 0.55);
    box-shadow: 0 0 0 6px rgba(255, 204, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.45);
    display: block;
    margin: 0 auto;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-photo:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 8px rgba(255, 204, 0, 0.14), 0 20px 50px rgba(0, 0, 0, 0.5);
}

.about-photo-glow {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.22), transparent 70%);
    filter: blur(18px);
    pointer-events: none;
    z-index: -1;
}

/* ── Quick facts ───────────────────────────────── */
.about-facts {
    display: grid;
    gap: 0.6rem;
}

.about-fact {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 204, 0, 0.06);
    border: 1px solid rgba(255, 204, 0, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.about-fact:hover {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.26);
}

.about-fact-icon {
    width: 28px;
    display: flex;
    justify-content: center;
    color: #ffcc00;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.about-fact-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 500;
}

a.about-fact-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

a.about-fact-link:hover {
    color: #ffcc00;
    text-decoration: underline;
}

/* ── Skills section ────────────────────────────── */
.about-skills-section {
    padding: 2rem 2.25rem 2.25rem;
}

#about,
#skills,
#contact {
    scroll-margin-top: 120px;
}

.about-section-title {
    margin: 0 0 1.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 243, 186, 0.84);
}

.about-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

.about-skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1rem 0.5rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 204, 0, 0.14);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.06), rgba(255, 255, 255, 0.01));
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    cursor: default;
}

.about-skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 204, 0, 0.45);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.12), rgba(255, 255, 255, 0.02));
}

.about-skill-icon {
    font-size: 1.75rem;
    color: #ffcc00;
    line-height: 1;
}

.about-skill-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ── Extra categorieën grid ────────────────────── */
.about-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-extra-card {
    padding: 1.25rem 1.35rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 204, 0, 0.14);
    background: linear-gradient(160deg, rgba(255, 204, 0, 0.06), rgba(255, 255, 255, 0.01));
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.about-extra-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 204, 0, 0.38);
    background: linear-gradient(160deg, rgba(255, 204, 0, 0.1), rgba(255, 255, 255, 0.02));
}

.about-extra-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #ffcc00;
    margin: 0 0 0.9rem;
}

.about-extra-title i {
    font-size: 0.95rem;
    opacity: 0.9;
}

.about-extra-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-extra-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
}

.about-extra-list li i {
    color: #ffcc00;
    font-size: 0.65rem;
    flex-shrink: 0;
}

body[data-theme="light"] .about-extra-card {
    border-color: rgba(168, 111, 0, 0.14) !important;
    background: linear-gradient(160deg, rgba(168, 111, 0, 0.05), rgba(0, 0, 0, 0.01)) !important;
}

body[data-theme="light"] .about-extra-card:hover {
    border-color: rgba(168, 111, 0, 0.38) !important;
    background: linear-gradient(160deg, rgba(168, 111, 0, 0.1), rgba(0, 0, 0, 0.02)) !important;
}

body[data-theme="light"] .about-extra-title {
    color: #a86f00 !important;
}

body[data-theme="light"] .about-extra-list li {
    color: rgba(26, 26, 26, 0.82) !important;
}

body[data-theme="light"] .about-extra-list li i {
    color: #a86f00 !important;
}

/* ── Stats strip ───────────────────────────────── */
.about-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    padding: 1.6rem 2rem;
    border-radius: 24px;
    flex-wrap: wrap;
}

.about-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.about-stat strong {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1;
    color: #fff3ba;
    font-weight: 800;
}

.about-stat span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    white-space: nowrap;
}

.about-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 204, 0, 0.2);
    flex-shrink: 0;
}

/* ── Light theme ───────────────────────────────── */
body[data-theme="light"] .about-copy,
body[data-theme="light"] .about-profile-col,
body[data-theme="light"] .about-skills-section,
body[data-theme="light"] .about-stats-row {
    background:
        linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 248, 233, 0.94)),
        #fffaf0;
    border-color: rgba(168, 111, 0, 0.16);
    box-shadow: 0 20px 55px rgba(90, 61, 0, 0.08);
}

body[data-theme="light"] .about-kicker {
    background: rgba(198, 138, 0, 0.12);
    color: #7a5c00;
}

body[data-theme="light"] .about-copy h1 {
    color: #1a1208;
}

body[data-theme="light"] .about-role {
    color: #8a5d00;
}

body[data-theme="light"] .about-bio p {
    color: rgba(30, 22, 5, 0.82);
}

body[data-theme="light"] .about-btn-outline {
    color: #7a5c00 !important;
    border-color: rgba(140, 90, 0, 0.38) !important;
}

body[data-theme="light"] .about-btn-outline:hover {
    background: rgba(180, 120, 0, 0.1) !important;
    color: #5a4000 !important;
}

body[data-theme="light"] .about-btn-cv {
    background: rgba(180, 120, 0, 0.12) !important;
    color: #6a4700 !important;
    border-color: rgba(140, 90, 0, 0.4) !important;
}

body[data-theme="light"] .about-btn-cv:hover {
    background: rgba(180, 120, 0, 0.2) !important;
    color: #4c3300 !important;
    border-color: rgba(140, 90, 0, 0.62) !important;
}

body[data-theme="light"] .about-photo {
    border-color: rgba(180, 120, 0, 0.55);
}

body[data-theme="light"] .about-fact {
    background: rgba(198, 138, 0, 0.07);
    border-color: rgba(168, 111, 0, 0.18);
}

body[data-theme="light"] .about-fact:hover {
    background: rgba(198, 138, 0, 0.13);
    border-color: rgba(168, 111, 0, 0.35);
}

body[data-theme="light"] .about-fact-icon {
    color: #8a5d00;
}

body[data-theme="light"] .about-fact-label,
body[data-theme="light"] a.about-fact-link {
    color: rgba(30, 22, 5, 0.82);
}

body[data-theme="light"] a.about-fact-link:hover {
    color: #7a5c00;
}

body[data-theme="light"] .about-section-title {
    color: #6b4e00;
}

body[data-theme="light"] .about-skill-card {
    background: linear-gradient(180deg, rgba(198, 138, 0, 0.08), rgba(255, 248, 233, 0.02));
    border-color: rgba(168, 111, 0, 0.16);
}

body[data-theme="light"] .about-skill-card:hover {
    background: linear-gradient(180deg, rgba(198, 138, 0, 0.16), rgba(255, 248, 233, 0.04));
    border-color: rgba(168, 111, 0, 0.38);
}

body[data-theme="light"] .about-skill-icon {
    color: #8a5d00;
}

body[data-theme="light"] .about-skill-name {
    color: rgba(30, 22, 5, 0.78);
}

body[data-theme="light"] .about-stat strong {
    color: #4a3200;
}

body[data-theme="light"] .about-stat span {
    color: rgba(30, 22, 5, 0.66);
}

body[data-theme="light"] .about-stat-divider {
    background: rgba(168, 111, 0, 0.22);
}

/* ── Responsive ────────────────────────────────── */
@media screen and (max-width: 980px) {
    .about-hero {
        grid-template-columns: 1fr;
    }

    .about-profile-col {
        grid-template-columns: auto 1fr;
        align-items: start;
    }

    .about-photo-wrap {
        justify-content: flex-start;
    }

    .about-photo {
        width: 140px;
        height: 140px;
        margin: 0;
    }
}

@media screen and (max-width: 640px) {
    .about-page-section {
        padding: 3.5rem 0 4rem;
    }

    .about-shell::before {
        inset: 0.5rem 0 auto;
        height: 180px;
    }

    .about-copy,
    .about-profile-col,
    .about-skills-section,
    .about-stats-row {
        border-radius: 20px;
        padding: 1.5rem;
    }

    .about-profile-col {
        grid-template-columns: 1fr;
    }

    .about-photo {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .about-stats-row {
        gap: 0.75rem;
    }

    .about-stat-divider {
        display: none;
    }

    .about-stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
   Contact Section — Redesign
   ============================================================ */

.contact-new-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.contact-new-section::before {
    content: '';
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse at center, rgba(255,204,0,0.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.contact-new-section .container {
    position: relative;
    z-index: 1;
}

.contact-shell {
    max-width: 1080px;
    margin: 0 auto;
}

/* Header */
.contact-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.contact-kicker {
    display: inline-block;
    background: rgba(255,204,0,0.12);
    color: #ffcc00;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255,204,0,0.22);
    margin-bottom: 1rem;
}

.contact-heading {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.8rem;
    line-height: 1.15;
}

.contact-heading span {
    color: #ffcc00;
}

.contact-sub {
    color: rgba(255,255,255,0.58);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.65;
}

/* Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    align-items: stretch;
}

.contact-panel {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,204,0,0.14);
    border-radius: 16px;
    padding: 2.2rem;
    backdrop-filter: blur(10px);
}

/* --- Availability badge --- */
.contact-avail {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(39,174,96,0.12);
    color: #5ce087;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 30px;
    border: 1px solid rgba(39,174,96,0.25);
    margin-bottom: 2rem;
}

.contact-avail-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #27ae60;
    box-shadow: 0 0 0 3px rgba(39,174,96,0.3);
    animation: contact-pulse 2s ease infinite;
}

@keyframes contact-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(39,174,96,0.3); }
    50%       { box-shadow: 0 0 0 6px rgba(39,174,96,0.06); }
}

/* --- Info rows --- */
.contact-item-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item-row:last-of-type {
    margin-bottom: 0;
}

.contact-item-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,204,0,0.1);
    border: 1px solid rgba(255,204,0,0.2);
    border-radius: 10px;
    color: #ffcc00;
    font-size: 1rem;
}

.contact-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.22rem;
}

.contact-item-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.contact-item-value,
.contact-item-value:visited {
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}

a.contact-item-value:hover {
    color: #ffcc00;
}

/* --- Social buttons --- */
.contact-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    background: rgba(255,204,0,0.1);
    border: 1px solid rgba(255,204,0,0.22);
    color: #ffcc00;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.18s;
}

.contact-social-btn:hover {
    background: rgba(255,204,0,0.2);
    transform: translateY(-2px);
}

/* --- Form panel --- */
.contact-form-group {
    margin-bottom: 1.3rem;
}

.contact-form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,204,0,0.18);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder {
    color: rgba(255,255,255,0.22);
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: rgba(255,204,0,0.55);
    background: rgba(255,204,0,0.04);
}

.contact-form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.contact-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.9rem 2rem;
    background: #ffcc00;
    color: #121212;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.contact-submit-btn:hover {
    background: #ffd633;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,204,0,0.28);
}

/* Responsive */
@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 580px) {
    .contact-new-section {
        padding: 4rem 0;
    }

    .contact-panel {
        padding: 1.6rem;
    }
}

/* Light theme */
body[data-theme="light"] .contact-new-section::before {
    background: radial-gradient(ellipse at center, rgba(168,111,0,0.05) 0%, transparent 65%);
}

body[data-theme="light"] .contact-kicker {
    background: rgba(168,111,0,0.1);
    color: #8a5d00;
    border-color: rgba(168,111,0,0.2);
}

body[data-theme="light"] .contact-heading {
    color: #1a1208;
}

body[data-theme="light"] .contact-heading span {
    color: #8a5d00;
}

body[data-theme="light"] .contact-sub {
    color: #5a5245;
}

body[data-theme="light"] .contact-panel {
    background: #fffdf7;
    border-color: rgba(168,111,0,0.16);
}

body[data-theme="light"] .contact-item-icon {
    background: rgba(168,111,0,0.08);
    border-color: rgba(168,111,0,0.18);
    color: #8a5d00;
}

body[data-theme="light"] .contact-item-label {
    color: rgba(26,18,8,0.42);
}

body[data-theme="light"] .contact-item-value,
body[data-theme="light"] .contact-item-value:visited {
    color: #1a1208;
}

body[data-theme="light"] a.contact-item-value:hover {
    color: #8a5d00;
}

body[data-theme="light"] .contact-social-btn {
    background: rgba(168,111,0,0.08);
    border-color: rgba(168,111,0,0.2);
    color: #8a5d00;
}

body[data-theme="light"] .contact-social-btn:hover {
    background: rgba(168,111,0,0.16);
}

body[data-theme="light"] .contact-form-group label {
    color: rgba(26,18,8,0.52);
}

body[data-theme="light"] .contact-form-group input,
body[data-theme="light"] .contact-form-group textarea {
    background: #f5f0e8;
    border-color: rgba(168,111,0,0.2);
    color: #1a1208;
}

body[data-theme="light"] .contact-form-group input::placeholder,
body[data-theme="light"] .contact-form-group textarea::placeholder {
    color: rgba(26,18,8,0.28);
}

body[data-theme="light"] .contact-form-group input:focus,
body[data-theme="light"] .contact-form-group textarea:focus {
    border-color: rgba(168,111,0,0.5);
    background: rgba(168,111,0,0.04);
}

body[data-theme="light"] .contact-submit-btn {
    background: #ffcc00;
    color: #121212;
}

body[data-theme="light"] .contact-submit-btn:hover {
    background: #ffd633;
    box-shadow: 0 6px 20px rgba(168,111,0,0.2);
}


/* ============================================================
   Home / Hero Section — Redesign
   ============================================================ */

.hero-new-section {
    padding: 5.5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-new-section::before {
    content: '';
    position: absolute;
    top: -260px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(ellipse at center, rgba(255,204,0,0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.hero-new-section .container {
    position: relative;
    z-index: 1;
}

.hero-shell {
    max-width: 1200px;
    margin: 0 auto;
}

/* Badge */
.hero-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.hero-kicker {
    display: inline-block;
    background: rgba(255,204,0,0.12);
    color: #ffcc00;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255,204,0,0.22);
}

/* Main hero grid */
.hero-main {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* Photo column */
.hero-photo-col {
    display: flex;
    justify-content: center;
}

.hero-photo-wrap {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,204,0,0.4);
    box-shadow: 0 0 0 20px rgba(255,204,0,0.08), 0 20px 60px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-photo-wrap:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 20px rgba(255,204,0,0.12), 0 25px 70px rgba(255,204,0,0.2);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content column */
.hero-content-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-name {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.hero-name:hover {
    color: #ffcc00;
}

.hero-role {
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffcc00;
    letter-spacing: 0.04em;
}

.hero-desc {
    margin: 0.8rem 0 0;
    color: rgba(255,255,255,0.62);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 450px;
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-stat-item strong {
    font-size: 2rem;
    font-weight: 800;
    color: #fff3ba;
    line-height: 1;
}

.hero-stat-item span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.52);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.hero-btn-primary {
    background: #ffcc00;
    color: #121212;
}

.hero-btn-primary:hover {
    background: #ffd633;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,204,0,0.32);
}

.hero-btn-secondary {
    background: rgba(255,204,0,0.15);
    color: #ffcc00;
    border: 1px solid rgba(255,204,0,0.35);
}

.hero-btn-secondary:hover {
    background: rgba(255,204,0,0.25);
    border-color: rgba(255,204,0,0.6);
    transform: translateY(-2px);
}

/* Featured cards strip */
.hero-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.hero-featured-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,204,0,0.12);
    border-radius: 14px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s;
}

.hero-featured-card i {
    font-size: 1.4rem;
    color: #ffcc00;
    flex-shrink: 0;
}

.hero-featured-card span {
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-featured-card:hover {
    background: rgba(255,204,0,0.1);
    border-color: rgba(255,204,0,0.3);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 920px) {
    .hero-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-photo-col {
        order: -1;
    }

    .hero-desc {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .hero-new-section {
        padding: 3.5rem 0 4rem;
    }

    .hero-new-section::before {
        top: -180px;
        width: 600px;
        height: 600px;
    }

    .hero-photo-wrap {
        width: 240px;
        height: 240px;
        border-width: 2px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-featured {
        grid-template-columns: 1fr;
    }
}

/* Light theme */
body[data-theme="light"] .hero-new-section::before {
    background: radial-gradient(ellipse at center, rgba(168,111,0,0.06) 0%, transparent 65%);
}

body[data-theme="light"] .hero-kicker {
    background: rgba(168,111,0,0.1);
    color: #8a5d00;
    border-color: rgba(168,111,0,0.2);
}

body[data-theme="light"] .hero-photo-wrap {
    border-color: rgba(180,120,0,0.45);
    box-shadow: 0 0 0 20px rgba(168,111,0,0.08), 0 20px 60px rgba(90,61,0,0.15);
}

body[data-theme="light"] .hero-photo-wrap:hover {
    box-shadow: 0 0 0 20px rgba(168,111,0,0.12), 0 25px 70px rgba(168,111,0,0.2);
}

body[data-theme="light"] .hero-name {
    color: #1a1208;
}

body[data-theme="light"] .hero-name:hover {
    color: #8a5d00;
}

body[data-theme="light"] .hero-role {
    color: #8a5d00;
}

body[data-theme="light"] .hero-desc {
    color: rgba(26,18,8,0.68);
}

body[data-theme="light"] .hero-stat-item strong {
    color: #c9a155;
}

body[data-theme="light"] .hero-stat-item span {
    color: rgba(26,18,8,0.52);
}

body[data-theme="light"] .hero-btn-primary {
    background: #ffcc00;
    color: #121212;
}

body[data-theme="light"] .hero-btn-primary:hover {
    background: #ffd633;
    box-shadow: 0 8px 24px rgba(168,111,0,0.25);
}

body[data-theme="light"] .hero-btn-secondary {
    background: rgba(168,111,0,0.1);
    color: #8a5d00;
    border-color: rgba(168,111,0,0.3);
}

body[data-theme="light"] .hero-btn-secondary:hover {
    background: rgba(168,111,0,0.2);
    border-color: rgba(168,111,0,0.55);
}

body[data-theme="light"] .hero-featured-card {
    background: rgba(168,111,0,0.04);
    border-color: rgba(168,111,0,0.15);
    color: #1a1208;
}

body[data-theme="light"] .hero-featured-card i {
    color: #8a5d00;
}

body[data-theme="light"] .hero-featured-card:hover {
    background: rgba(168,111,0,0.1);
    border-color: rgba(168,111,0,0.3);
}

/* ============================================================
   Global Mobile Safety Net
   ============================================================ */

@media screen and (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    .container,
    .projects-page-section .container,
    .certs-page-section .container,
    .about-page-section .container,
    .contact-new-section .container {
        width: min(100%, 96%);
    }

    .navbar nav ul {
        row-gap: 0.45rem;
    }

    .projects-overview,
    .certs-overview,
    .about-stats-row,
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .projects-toolbar,
    .certs-toolbar,
    .contact-panel,
    .hero-featured-card {
        padding: 1.25rem;
    }

    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        min-width: 0;
    }
}

@media screen and (max-width: 520px) {
    .projects-overview,
    .certs-overview,
    .about-stats-row,
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .project-actions,
    .cert-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .sort-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0;
        background: none;
    }

    .sort-select,
    .sort-direction-btn {
        width: 100%;
    }

    .sort-direction-btn {
        justify-content: center;
    }

    .contact-item-row {
        gap: 0.75rem;
    }

    .contact-item-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .hero-buttons {
        gap: 0.65rem;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .hero-photo-wrap {
        width: 210px;
        height: 210px;
    }
}
