/* Core Utilities & Custom Scrollbar */
html {
    --scrollbar-track-color: #f3f4f4;
    --scrollbar-thumb-color: #d9dddc;
    --scrollbar-border-color: #c8cecc;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
}

html.dark {
    --scrollbar-track-color: #000000;
    --scrollbar-thumb-color: #3a3a3a;
    --scrollbar-border-color: #525252;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color);
    border: 1px solid var(--scrollbar-border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-color);
}

/* Reusable UI Components extracted for cleaner HTML */
@layer components {
    .nav-link {
        @apply text-slate-600 dark:text-slate-300 hover:text-brand dark:hover:text-brand transition-colors relative;
    }
    .nav-link::after {
        @apply content-[''] absolute -bottom-1 left-0 w-0 h-0.5 bg-brand transition-all duration-300;
    }
    .nav-link:hover::after {
        @apply w-full;
    }
    
    .section-title {
        @apply text-3xl md:text-4xl font-heading font-bold text-slate-900 dark:text-white mb-8 relative inline-block;
    }
    
    .card-base {
        @apply bg-card-light dark:bg-card-dark rounded-2xl border border-slate-200 dark:border-slate-800 shadow-sm transition-all duration-300;
    }
    
    .badge {
        @apply px-3 py-1 bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 rounded-full text-xs font-semibold border border-slate-200 dark:border-slate-700;
    }

    /* Modern Form Input */
    .form-group {
        position: relative;
    }
    .form-label {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: #334155;
        margin-bottom: 0.5rem;
        transition: color 0.2s;
    }
    .dark .form-label {
        color: #cbd5e1;
    }
    .form-input {
        width: 100%;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 0.75rem;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        font-weight: 400;
        color: #0f172a;
        outline: none;
        transition: all 0.2s;
        box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }
    .dark .form-input {
        background: #1e293b;
        border-color: #475569;
        color: #f1f5f9;
    }
    .form-input::placeholder {
        color: #94a3b8;
    }
    .dark .form-input::placeholder {
        color: #64748b;
    }
    .form-input:hover {
        border-color: #94a3b8;
    }
    .dark .form-input:hover {
        border-color: #64748b;
    }
    .form-input:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    }
    .dark .form-input:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    }
    .form-textarea {
        width: 100%;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 0.75rem;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        color: #0f172a;
        outline: none;
        transition: all 0.2s;
        resize: none;
        min-height: 200px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }
    .dark .form-textarea {
        background: #1e293b;
        border-color: #475569;
        color: #f1f5f9;
    }
    .form-textarea::placeholder {
        color: #94a3b8;
    }
    .dark .form-textarea::placeholder {
        color: #64748b;
    }
    .form-textarea:hover {
        border-color: #94a3b8;
    }
    .dark .form-textarea:hover {
        border-color: #64748b;
    }
    .form-textarea:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    }
    .dark .form-textarea:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    }

    .social-icon {
        @apply w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 flex items-center justify-center text-slate-600 dark:text-slate-400 hover:bg-brand hover:text-white hover:border-brand transition-all transform hover:-translate-y-1 shadow-sm;
    }

    .mobile-nav-link {
        @apply block px-4 py-3 rounded-xl text-slate-700 dark:text-slate-300 font-medium hover:bg-brand/10 hover:text-brand dark:hover:text-brand transition-all duration-200;
    }
}

/* Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
.animation-delay-4000 {
    animation-delay: 4s;
}

/* Carousel Styles */
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-slide.active {
    opacity: 1;
    position: relative;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stagger-element {
    opacity: 0;
    transform: translateY(20px);
}


.profile-photo-layer {
    position: relative;
}

/* Navigation scroll progress */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
@supports (overflow: clip) {
    html,
    body { overflow-x: clip; }
}
#navbar {
    left: 0;
    right: 0;
    width: auto !important;
    max-width: 100vw;
    box-sizing: border-box;
}
#navbar > .flex {
    position: relative;
    width: 100%;
    min-width: 0;
}
#navbar > .flex > a {
    min-width: 0;
    flex-shrink: 1;
    white-space: nowrap;
}
#theme-toggle-mobile,
#menu-toggle {
    flex-shrink: 0;
}
#mobile-menu {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 767px) {
    #navbar > .flex {
        padding-right: 5.75rem;
        box-sizing: border-box;
    }
    .mobile-nav-controls {
        position: absolute;
        top: 50%;
        right: 0;
        z-index: 2;
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        transform: translateY(-50%);
    }
}
@supports (width: 100dvw) {
    #navbar { max-width: 100dvw; }
}
@media (max-width: 380px) {
    #navbar { padding-inline: 1rem; }
    #navbar > .flex > a { font-size: 1.25rem; }
}
.scroll-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.16);
}
.scroll-progress-bar {
    width: 100%;
    height: 100%;
    background: #059669;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.35);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}
.dark .scroll-progress-track {
    background: rgba(148, 163, 184, 0.12);
}
.dark .scroll-progress-bar {
    background: #059669;
}

/* Individual skill-card puzzle layout */
.skills-showcase {
    display: block;
    max-width: 1120px;
}
.skill-category {
    margin-bottom: 2.75rem;
    overflow: visible;
    padding: 0 4px 8px;
}
.skill-category:last-child { margin-bottom: 0; }
.skill-category-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}
.dark .skill-category-header { border-color: #334155; }
.skill-category-symbol {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.8rem;
    color: #475569;
    background: #fff;
}
.dark .skill-category-symbol {
    border-color: #475569;
    color: #cbd5e1;
    background: #1e293b;
}
.skill-category-header span:not(.skill-category-symbol) {
    display: block;
    margin-bottom: 0.08rem;
    color: #94a3b8;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.skill-category-header h3 {
    margin: 0;
    color: #0f172a;
    font: 700 1.05rem Poppins, sans-serif;
}
.dark .skill-category-header h3 { color: #f8fafc; }
.skill-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.skill-tile {
    position: relative;
    min-width: 0;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.045);
    opacity: 1;
    transform: none;
    transition: border-color 220ms ease, box-shadow 220ms ease;
}
.dark .skill-tile {
    border-color: #334155;
    background: rgba(30, 41, 59, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.skill-tile:hover,
.skill-tile:focus-visible {
    z-index: 3;
    border-color: #94a3b8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.11);
}
.dark .skill-tile:hover,
.dark .skill-tile:focus-visible { border-color: #64748b; }
.skill-tile:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.42);
    outline-offset: 3px;
}
.skill-tile-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    flex: 0 0 2.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.72rem;
    background: #f8fafc;
    font-size: 1.55rem;
}
.dark .skill-tile-icon { border-color: #334155; background: #0f172a; }
.skill-tile-name {
    min-width: 0;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.3;
}
.dark .skill-tile-name { color: #e2e8f0; }
.tool-letter {
    font: 800 1rem Poppins, sans-serif;
}
.tool-tone-hive { color: #f59e0b; }
.tool-tone-wamp { color: #7c3aed; }
.tool-tone-python { color: #3776ab; }
.tool-tone-unity { color: #111827; }
.dark .tool-tone-unity { color: #f8fafc; }
@media (max-width: 700px) {
    .skill-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Resume download CTA */
.resume-cta-card {
    border-color: #dbe3ea;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}
.dark .resume-cta-card {
    border-color: #334155;
    background: #1e293b;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}
.resume-cta-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #059669;
}
.resume-cta-kicker {
    display: inline-flex;
    align-items: center;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.dark .resume-cta-kicker { color: #059669; }
.resume-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.resume-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid #059669;
    border-radius: 0.8rem;
    background: #059669;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.16);
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.resume-download-button:hover {
    border-color: #059669;
    background: #059669;
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.2);
    transform: translateY(-2px);
}
.resume-download-button:active { transform: translateY(0); }
.resume-download-button:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.32);
    outline-offset: 4px;
}
.resume-download-icon {
    font-size: 1.15rem;
    transition: transform 200ms ease;
}
.resume-download-button:hover .resume-download-icon { transform: translateY(2px); }
.resume-file-meta {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.dark .resume-file-meta { color: #94a3b8; }
@media (prefers-reduced-motion: reduce) {
    .resume-download-button,
    .resume-download-icon { transition: none; }
    .resume-download-button:hover,
    .resume-download-button:active,
    .resume-download-button:hover .resume-download-icon { transform: none; }
}

/* Contact section redesign — visual only; form behavior remains unchanged */
.contact-redesign {
    isolation: isolate;
    overflow: hidden;
}
.contact-redesign::before {
    display: none;
}
.contact-intro {
    align-self: center;
}
.contact-methods {
    display: grid;
    gap: 0.75rem;
}
.contact-method {
    position: relative;
    min-height: 4.75rem;
    padding: 0.8rem 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.035);
    opacity: 0;
    transform: translateX(-22px);
    transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}
.dark .contact-method {
    border-color: #334155;
    background: rgba(30, 41, 59, 0.76);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
.contact-intro.active .contact-method {
    opacity: 1;
    transform: translateX(0);
    animation: contact-method-in 650ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.contact-intro.active .contact-method:nth-child(1) { animation-delay: 140ms; }
.contact-intro.active .contact-method:nth-child(2) { animation-delay: 230ms; }
.contact-intro.active .contact-method:nth-child(3) { animation-delay: 320ms; }
.contact-method::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #059669;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 300ms ease;
}
.contact-method:hover,
.contact-method:focus-within {
    border-color: rgba(5, 150, 105, 0.45);
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.08);
    transform: translateY(-2px);
}
.contact-method:hover::after,
.contact-method:focus-within::after { transform: scaleY(1); }

.contact-form-card {
    border-color: #e2e8f0;
    border-radius: 1.4rem;
    background: #ffffff;
    box-shadow: 0 22px 65px rgba(15, 23, 42, 0.1);
    transition: none;
}
.dark .contact-form-card {
    border-color: #334155;
    background: #1e293b;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.contact-form-card:hover {
    border-color: #e2e8f0;
    background: #ffffff;
    box-shadow: 0 22px 65px rgba(15, 23, 42, 0.1);
    transform: none;
}
.dark .contact-form-card:hover {
    border-color: #334155;
    background: #1e293b;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.contact-form-card > .absolute { display: none; }
.contact-form-header {
    background: transparent;
}
.dark .contact-form-header {
    background: transparent;
}
.contact-form-body .form-group {
    opacity: 0;
    transform: translateY(18px);
}
.contact-form-reveal.active .form-group {
    opacity: 1;
    transform: translateY(0);
    animation: contact-field-in 600ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.contact-form-reveal.active .form-group:nth-child(1) { animation-delay: 180ms; }
.contact-form-reveal.active .form-group:nth-child(2) { animation-delay: 260ms; }
.contact-form-reveal.active #contact-form > .form-group:nth-of-type(2) { animation-delay: 340ms; }
.contact-form-reveal.active #contact-form > .form-group:nth-of-type(3) { animation-delay: 420ms; }
.contact-form-card .form-input,
.contact-form-card .form-textarea {
    border-color: #dbe4e0;
    background: rgba(248, 250, 252, 0.86);
    transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease, transform 220ms ease;
}
.dark .contact-form-card .form-input,
.dark .contact-form-card .form-textarea {
    border-color: #3a4b45;
    background: rgba(15, 23, 42, 0.68);
}
.contact-form-card .form-input:focus,
.contact-form-card .form-textarea:focus {
    background: #fff;
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.11);
    transform: translateY(-1px);
}
.dark .contact-form-card .form-input:focus,
.dark .contact-form-card .form-textarea:focus { background: rgba(15, 23, 42, 0.95); }
.contact-submit {
    position: relative;
    overflow: hidden;
    background-image: none;
    background-color: #059669;
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.17);
}
.contact-submit:hover { background-color: #059669; }
.contact-submit::before {
    display: none;
}
#form-success:not(.hidden) {
    animation: contact-success-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes contact-method-in {
    from { opacity: 0; transform: translateX(-22px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes contact-field-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes contact-success-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 1023px) {
    .contact-intro { max-width: 44rem; }
    .contact-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .contact-method { align-items: flex-start; min-width: 0; }
    .contact-method > div:last-child { min-width: 0; }
}
@media (max-width: 767px) {
    .contact-methods { grid-template-columns: 1fr; }
    .contact-form-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .contact-method,
    .contact-form-body .form-group,
    #form-success:not(.hidden) {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .contact-submit::before { display: none; }
}

/* ===== Portfolio lower-half creative system ===== */
.creative-projects-section {
    padding-top: 7.5rem;
    padding-bottom: 8.5rem;
    overflow: hidden;
    isolation: isolate;
    background: #f8fafc;
}
.dark .creative-projects-section {
    background: #0b1220;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
    color: #059669;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}
.dark .section-eyebrow { color: #059669; }
.projects-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 5.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #dce5e2;
}
.dark .projects-heading { border-color: #243246; }
.projects-heading-copy {
    max-width: 43rem;
    color: #64748b;
    font-size: 1.02rem;
    line-height: 1.8;
}
.dark .projects-heading-copy { color: #94a3b8; }
.projects-count {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: none;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}
.projects-count strong {
    color: #0f172a;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.8rem;
    line-height: 0.8;
    letter-spacing: -0.08em;
}
.dark .projects-count strong { color: #f8fafc; }
#projects-container {
    display: grid;
    gap: 8rem;
}
.project-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5.5rem);
}
.project-showcase::after {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: -4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d9e3e0 18%, #d9e3e0 82%, transparent);
}
.dark .project-showcase::after {
    background: linear-gradient(90deg, transparent, #233145 18%, #233145 82%, transparent);
}
.project-showcase:last-child::after { display: none; }
.project-visual-wrap { position: relative; min-width: 0; }
.project-visual-wrap::before {
    content: "";
    position: absolute;
    inset: 1.25rem -1.25rem -1.25rem 1.25rem;
    border: 1px solid rgba(5, 150, 105, 0.28);
    border-radius: 1.65rem;
    pointer-events: none;
}
.project-visual {
    position: relative;
    overflow: hidden;
    border: 1px solid #243247;
    border-radius: 1.5rem;
    background: transparent;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
    transform: translateZ(0);
}
.dark .project-visual { box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38); }
.project-window-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0 1rem;
    border-bottom: 1px solid #263449;
    background: transparent;
    color: #7f8da3;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
}
.project-window-dots { display: flex; gap: 0.38rem; }
.project-window-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #475569; }
.project-window-dots i:first-child { background: #059669; }
.project-window-label { justify-self: center; }
.project-window-live { justify-self: end; display: flex; align-items: center; gap: 0.4rem; }
.project-window-live i { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #059669; box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12); }
.project-carousel { overflow: hidden; background: transparent; }
.project-carousel .carousel-slide { background: transparent; }
.project-carousel .carousel-slide img { transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1); }
.project-visual:hover .carousel-slide.active img { transform: scale(1.025); }
.project-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(7, 15, 28, 0.75);
    color: white;
    opacity: 0;
    transform: translateY(-25%);
    backdrop-filter: blur(10px);
    transition: opacity 220ms ease, transform 220ms ease, background 220ms ease;
}
.project-carousel-prev { left: 1rem; }
.project-carousel-next { right: 1rem; }
.project-visual:hover .project-carousel-arrow,
.project-carousel-arrow:focus-visible { opacity: 1; transform: translateY(-50%); }
.project-carousel-arrow:hover { background: #059669; }
.project-carousel-dots {
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(7, 15, 28, 0.72);
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
}
.project-play-link {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid #059669;
    border-radius: 1rem;
    background: #059669;
    color: #ffffff;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}
.project-play-link span { display: inline-flex; align-items: center; gap: 0.65rem; }
.project-play-link:hover,
.project-play-link:focus-visible {
    background: #059669;
    box-shadow: 0 19px 42px rgba(5, 150, 105, 0.32);
    transform: translateY(-2px);
    outline: none;
}
.project-play-link > i { transition: transform 220ms ease; }
.project-play-link:hover > i,
.project-play-link:focus-visible > i { transform: translate(0.18rem, -0.18rem); }
.carousel-dot {
    display: block;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #64748b;
    transition: width 240ms ease, background 240ms ease;
}
.carousel-dot.is-active { width: 1.35rem; background: #059669; }
.project-visual-index {
    position: absolute;
    right: -0.6rem;
    bottom: -3.4rem;
    z-index: -1;
    color: rgba(15, 23, 42, 0.07);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
}
.dark .project-visual-index { color: rgba(248, 250, 252, 0.045); }
.project-copy { position: relative; padding: clamp(1rem, 2vw, 2rem) 0; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.3rem; }
.project-type {
    padding: 0.42rem 0.7rem;
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.08);
    color: #059669;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.dark .project-type { color: #059669; background: rgba(5, 150, 105, 0.1); }
.project-date { display: inline-flex; align-items: center; gap: 0.45rem; color: #64748b; font-size: 0.75rem; font-weight: 600; }
.dark .project-date { color: #94a3b8; }
.project-title { color: #0f172a; font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.75rem, 3vw, 2.55rem); font-weight: 750; line-height: 1.15; letter-spacing: -0.035em; }
.dark .project-title { color: #f8fafc; }
.project-description { margin-top: 1.25rem; color: #475569; font-size: 1rem; line-height: 1.8; }
.dark .project-description { color: #a7b4c7; }
.project-highlights { display: grid; gap: 0.85rem; margin-top: 1.5rem; color: #64748b; font-size: 0.83rem; line-height: 1.65; }
.dark .project-highlights { color: #94a3b8; }
.project-highlights li { display: grid; grid-template-columns: 1.55rem 1fr; align-items: start; gap: 0.7rem; }
.project-highlight-icon { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; margin-top: 0.12rem; border-radius: 0.45rem; background: rgba(5, 150, 105, 0.1); color: #059669; font-size: 0.58rem; }
.project-tech-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.7rem; }
.project-tech-badge { padding: 0.4rem 0.68rem; border: 1px solid #dbe4e1; border-radius: 0.55rem; background: rgba(255,255,255,0.7); color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.67rem; font-weight: 700; }
.dark .project-tech-badge { border-color: #2c3b50; background: rgba(30, 41, 59, 0.7); color: #b6c2d2; }
.project-card-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.project-card-footer span:first-child { color: #059669; }
.project-card-footer i { margin-right: 0.35rem; }
.dark .project-card-footer { border-color: #263449; }
.dark .project-card-footer span:first-child { color: #059669; }

/* Resume CTA */
.resume-cta-section { padding-top: 6.5rem; padding-bottom: 6.5rem; background: #f8fafc; }
.dark .resume-cta-section { background: #0b1220; }
.resume-cta-card {
    position: relative;
    display: grid;
    grid-template-columns: 9rem 1fr auto;
    align-items: center;
    gap: clamp(2rem, 4vw, 4rem);
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.25rem);
    border: 1px solid #26364a;
    border-radius: 2rem;
    background:
        radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.17), transparent 23rem),
        linear-gradient(135deg, #0f172a, #111d30 70%, #0b1422);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.22);
}
.resume-cta-card::before { content: ""; position: absolute; inset: 0; width: auto; background-image: linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px); background-size: 38px 38px; pointer-events: none; }
.resume-document-art { position: relative; width: 8rem; height: 10rem; padding: 1.3rem 1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 1.1rem; background: rgba(255,255,255,.07); box-shadow: inset 0 1px rgba(255,255,255,.08); transform: rotate(-4deg); }
.resume-document-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; border-radius: .75rem; background: #059669; color: white; font-size: 1.15rem; }
.resume-document-line { display: block; width: 75%; height: .3rem; margin-top: .55rem; border-radius: 999px; background: #506077; }
.resume-document-line-long { width: 100%; }
.resume-document-line-short { width: 55%; }
.resume-document-stamp { position: absolute; right: .7rem; bottom: .7rem; color: #059669; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.resume-cta-copy { position: relative; z-index: 1; }
.resume-cta-kicker { color: #059669; }
.resume-cta-copy h2 { margin-top: .75rem; color: white; font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 750; line-height: 1.08; letter-spacing: -.045em; }
.resume-cta-copy p { max-width: 38rem; margin-top: 1rem; color: #aab7c9; font-size: 1rem; line-height: 1.75; }
.resume-cta-actions { position: relative; z-index: 1; align-items: stretch; }
.resume-download-button { min-width: 13.5rem; min-height: 3.6rem; border-color: #059669; border-radius: .9rem; background: #059669; box-shadow: 0 14px 34px rgba(5, 150, 105,.24); }
.resume-download-button:hover { border-color: #059669; background: #059669; box-shadow: 0 18px 42px rgba(5, 150, 105,.3); }
.resume-file-meta { color: #8290a4; text-align: center; }

/* Contact */
.contact-redesign { padding-top: 8rem; padding-bottom: 8rem; background: #f1f5f9; }
.dark .contact-redesign { background: #0f172a; }
.contact-grid-pattern { position: absolute; inset: 0; opacity: .45; pointer-events: none; background-image: radial-gradient(rgba(5,150,105,.18) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, black, transparent 72%); }
.dark .contact-grid-pattern { opacity: .24; }
.contact-section-heading { max-width: 50rem; margin-bottom: 4.5rem; }
.contact-section-heading .section-title { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.04; letter-spacing: -.05em; }
.contact-section-heading > p { max-width: 38rem; margin-top: 1.2rem; color: #64748b; font-size: 1.02rem; line-height: 1.75; }
.dark .contact-section-heading > p { color: #94a3b8; }
.contact-intro { align-self: stretch; padding: 2rem; border: 1px solid #26364a; border-radius: 1.6rem; background: linear-gradient(145deg, #0f172a, #142238); box-shadow: 0 24px 60px rgba(15,23,42,.2); }
.contact-availability { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .7rem; border: 1px solid rgba(5, 150, 105,.25); border-radius: 999px; background: rgba(5, 150, 105,.08); color: #059669; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.contact-availability span { width: .48rem; height: .48rem; border-radius: 50%; background: #059669; box-shadow: 0 0 0 .3rem rgba(5, 150, 105,.1); animation: availability-pulse 2s ease-in-out infinite; }
.contact-intro > h3 { margin-top: 1.6rem; color: #f8fafc; font-family: 'Space Grotesk', sans-serif; font-size: 1.65rem; font-weight: 700; line-height: 1.25; }
.contact-intro > p { margin-top: .75rem; margin-bottom: 1.8rem; color: #94a3b8; font-size: .9rem; line-height: 1.7; }
.contact-methods { gap: .65rem; }
.contact-method { min-height: 4.55rem; padding: .75rem; border-color: rgba(148,163,184,.15); border-radius: .9rem; background: rgba(255,255,255,.045); box-shadow: none; }
.dark .contact-method { border-color: rgba(148,163,184,.15); background: rgba(255,255,255,.045); box-shadow: none; }
.contact-method:hover, .contact-method:focus-within { border-color: rgba(5, 150, 105,.45); background: rgba(5, 150, 105,.07); box-shadow: none; }
.contact-method > div:first-child { width: 2.7rem !important; height: 2.7rem !important; border-radius: .75rem !important; background: rgba(5, 150, 105,.12) !important; color: #059669 !important; }
.contact-method p:first-child { color: #7d8ca1 !important; font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; }
.contact-method p:last-child, .contact-method a { color: #f1f5f9 !important; font-size: .84rem; }
.contact-form-card, .contact-form-card:hover { border: 1px solid #dce5e2; border-radius: 1.6rem; background: rgba(255,255,255,.94); box-shadow: 0 28px 70px rgba(15,23,42,.11); }
.dark .contact-form-card, .dark .contact-form-card:hover { border-color: #2b3a4f; background: #172236; box-shadow: 0 30px 75px rgba(0,0,0,.3); }
.contact-form-header { padding-top: 1.7rem !important; background: linear-gradient(90deg, rgba(5,150,105,.055), transparent) !important; }
.dark .contact-form-header { background: linear-gradient(90deg, rgba(5, 150, 105,.075), transparent) !important; }
.contact-form-card .form-input, .contact-form-card .form-textarea { border-color: #d9e3e0; border-radius: .8rem; background: #f8fafc; }
.dark .contact-form-card .form-input, .dark .contact-form-card .form-textarea { border-color: #34445a; background: #0f192a; }
.contact-form-card .form-textarea { min-height: 9.5rem; }
.contact-submit { min-height: 3.55rem; border-radius: .85rem; background: linear-gradient(135deg, #059669, #059669); box-shadow: 0 14px 32px rgba(5,150,105,.2); }
.contact-submit:hover { background: linear-gradient(135deg, #059669, #059669); }
@keyframes availability-pulse { 50% { opacity: .55; box-shadow: 0 0 0 .55rem rgba(5, 150, 105,0); } }

/* Footer */
.creative-footer { border-top: 1px solid #1e2c40; background: #08111f; }
.creative-footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; min-height: 8rem; }
.footer-brand { color: #f8fafc; font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; }
.footer-brand span { color: #059669; }
.creative-footer p { justify-self: center; color: #718096; font-size: .76rem; text-align: center; }
.footer-back-top { display: inline-flex; align-items: center; gap: .55rem; color: #a9b6c8; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; transition: color 200ms ease; }
.footer-back-top i { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #2b3a50; border-radius: 50%; transition: transform 200ms ease, border-color 200ms ease; }
.footer-back-top:hover { color: #059669; }
.footer-back-top:hover i { border-color: #059669; transform: translateY(-3px); }

@media (max-width: 1023px) {
    .creative-projects-section { padding-top: 6rem; padding-bottom: 6.5rem; }
    #projects-container { gap: 6.5rem; }
    .project-showcase { grid-template-columns: 1fr; gap: 3rem; }
    .project-copy { max-width: 48rem; }
    .project-carousel-arrow { opacity: .9; transform: translateY(-50%); }
    .resume-cta-card { grid-template-columns: 7rem 1fr; }
    .resume-document-art { width: 6.5rem; height: 8.5rem; }
    .resume-cta-actions { grid-column: 2; align-items: flex-start; }
    .contact-intro { max-width: none; }
    .contact-methods { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .creative-projects-section, .contact-redesign { padding-top: 5rem; padding-bottom: 5rem; }
    .projects-heading { align-items: flex-start; margin-bottom: 4rem; }
    .projects-count { display: none; }
    #projects-container { gap: 5.5rem; }
    .project-showcase { gap: 2.5rem; }
    .project-visual-wrap::before { inset: .75rem -.5rem -.75rem .5rem; }
    .project-window-live { display: none; }
    .project-window-bar { grid-template-columns: 1fr auto; }
    .project-window-label { justify-self: end; }
    .project-carousel-arrow { width: 2.3rem; height: 2.3rem; }
    .project-title { font-size: 1.7rem; }
    .project-card-footer { align-items: center; }
    .resume-cta-section { padding-top: 4rem; padding-bottom: 4rem; }
    .resume-cta-card { grid-template-columns: 1fr; gap: 1.75rem; padding: 2rem; border-radius: 1.4rem; }
    .resume-document-art { display: none; }
    .resume-cta-actions { grid-column: auto; align-items: stretch; }
    .resume-download-button { width: 100%; }
    .contact-section-heading { margin-bottom: 3rem; }
    .contact-methods { grid-template-columns: 1fr; }
    .contact-intro { padding: 1.4rem; }
    .creative-footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 1rem; padding: 2.5rem 0; }
    .creative-footer p { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
    .contact-availability span { animation: none; }
    .project-play-link, .project-play-link > i { transition: none; }
    .project-carousel .carousel-slide img, .footer-back-top i { transition: none; }
}

/* Lower panels follow the global light/dark theme. */
.resume-cta-card {
    border-color: #d8e3df;
    background:
        radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.09), transparent 23rem),
        #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
}
.resume-cta-card::before {
    background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}
.resume-document-art { border-color: #dbe5e1; background: #f1f5f9; box-shadow: inset 0 1px rgba(255,255,255,.8); }
.resume-document-line { background: #cbd5e1; }
.resume-document-stamp { color: #059669; }
.resume-cta-copy h2 { color: #0f172a; }
.resume-cta-copy p { color: #64748b; }
.resume-file-meta { color: #64748b; }
.dark .resume-cta-card {
    border-color: #26364a;
    background:
        radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.17), transparent 23rem),
        linear-gradient(135deg, #0f172a, #111d30 70%, #0b1422);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.3);
}
.dark .resume-cta-card::before {
    background-image: linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px);
}
.dark .resume-document-art { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.dark .resume-document-line { background: #506077; }
.dark .resume-document-stamp { color: #059669; }
.dark .resume-cta-copy h2 { color: #ffffff; }
.dark .resume-cta-copy p { color: #aab7c9; }
.dark .resume-file-meta { color: #8290a4; }

.contact-intro {
    border-color: #d8e3df;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
}
.contact-intro > h3 { color: #0f172a; }
.contact-intro > p { color: #64748b; }
.contact-method,
.dark .contact-method {
    border-color: #e2e8f0;
    background: #f8fafc;
    box-shadow: none;
}
.contact-method:hover,
.contact-method:focus-within { border-color: rgba(5,150,105,.38); background: rgba(5,150,105,.055); }
.contact-method p:first-child { color: #64748b !important; }
.contact-method p:last-child,
.contact-method a { color: #0f172a !important; }
.dark .contact-intro {
    border-color: #26364a;
    background: linear-gradient(145deg, #0f172a, #142238);
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.dark .contact-intro > h3 { color: #f8fafc; }
.dark .contact-intro > p { color: #94a3b8; }
.dark .contact-method { border-color: rgba(148,163,184,.15); background: rgba(255,255,255,.045); }
.dark .contact-method:hover,
.dark .contact-method:focus-within { border-color: rgba(5, 150, 105,.45); background: rgba(5, 150, 105,.07); }
.dark .contact-method p:first-child { color: #7d8ca1 !important; }
.dark .contact-method p:last-child,
.dark .contact-method a { color: #f1f5f9 !important; }

.creative-footer { border-color: #dbe4e1; background: #ffffff; }
.footer-brand { color: #0f172a; }
.creative-footer p { color: #64748b; }
.footer-back-top { color: #475569; }
.footer-back-top i { border-color: #cbd5e1; }
.dark .creative-footer { border-color: #1e2c40; background: #08111f; }
.dark .footer-brand { color: #f8fafc; }
.dark .creative-footer p { color: #718096; }
.dark .footer-back-top { color: #a9b6c8; }
.dark .footer-back-top i { border-color: #2b3a50; }

/* Pure portfolio canvas: white in light mode and black in dark mode. */
html,
body,
#navbar,
body > section,
.creative-footer {
    background: #ffffff !important;
    background-image: none !important;
}

.dark,
.dark body,
.dark #navbar,
.dark body > section,
.dark .creative-footer {
    background: #000000 !important;
    background-image: none !important;
}

/* Keep the contact content, but remove the tinted section backdrop. */
.contact-grid-pattern {
    display: none;
}

/* Contact panels use the portfolio's black / white / green palette. */
.contact-intro,
.contact-form-card,
.contact-form-card:hover {
    border-color: #e5e7eb;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.contact-form-card > .absolute {
    display: none;
}

.contact-form-header {
    border-color: #e5e7eb !important;
    background: #ffffff !important;
}

.contact-method,
.contact-method:hover,
.contact-method:focus-within,
.contact-form-card .form-input,
.contact-form-card .form-textarea {
    border-color: #e5e7eb;
    background: #f7f7f7;
}

.contact-method:hover,
.contact-method:focus-within,
.contact-form-card .form-input:focus,
.contact-form-card .form-textarea:focus {
    border-color: #059669;
}

.contact-submit,
.contact-submit:hover {
    background: #059669;
}

.dark .contact-intro,
.dark .contact-form-card,
.dark .contact-form-card:hover {
    border-color: #2a2a2a;
    background: #0a0a0a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.dark .contact-form-header {
    border-color: #2a2a2a !important;
    background: #0a0a0a !important;
}

.dark .contact-method,
.dark .contact-form-card .form-input,
.dark .contact-form-card .form-textarea {
    border-color: #2a2a2a;
    background: #141414;
}

.dark .contact-method:hover,
.dark .contact-method:focus-within {
    border-color: #059669;
    background: #141414;
}

.dark .contact-form-card .form-input:focus,
.dark .contact-form-card .form-textarea:focus {
    border-color: #059669;
    background: #141414;
}

.dark .contact-intro > p,
.dark .contact-form-header p,
.dark .contact-form-card .form-input::placeholder,
.dark .contact-form-card .form-textarea::placeholder {
    color: #a3a3a3;
}

/* One exact brand green and visually steady button hover states. */
.portfolio-button-primary,
.portfolio-button-primary:hover,
.resume-download-button,
.resume-download-button:hover,
.contact-submit,
.contact-submit:hover,
.project-play-link,
.project-play-link:hover {
    border-color: #059669 !important;
    background: #059669 !important;
    color: #ffffff !important;
}

button:hover,
.portfolio-button:hover,
.resume-download-button:hover,
.contact-submit:hover,
.project-play-link:hover,
.project-carousel-arrow:hover {
    box-shadow: none !important;
    filter: none !important;
}

.portfolio-button:hover,
.resume-download-button:hover,
.contact-submit:hover,
.project-play-link:hover {
    transform: none !important;
}

.portfolio-button-secondary:hover {
    border-color: #cbd5e1 !important;
    background: transparent !important;
    color: #1e293b !important;
}

.dark .portfolio-button-secondary:hover {
    border-color: #334155 !important;
    color: #ffffff !important;
}

#theme-toggle:hover,
#theme-toggle-mobile:hover {
    background: #e2e8f0 !important;
}

.dark #theme-toggle:hover,
.dark #theme-toggle-mobile:hover {
    background: #1e293b !important;
}

.project-carousel-arrow:hover {
    background: rgba(7, 15, 28, 0.75) !important;
    transform: translateY(-50%) !important;
}

.resume-download-button:hover .resume-download-icon,
.project-play-link:hover > i {
    transform: none !important;
}

/* Green-filled interface elements use the exact solid brand color. */
.project-type,
.dark .project-type,
.project-highlight-icon,
.contact-availability,
.contact-method > div:first-child {
    border-color: #059669 !important;
    background: #059669 !important;
    color: #ffffff !important;
}

.contact-method:hover,
.contact-method:focus-within {
    background: #f7f7f7;
    box-shadow: none !important;
    transform: none !important;
}

.dark .contact-method:hover,
.dark .contact-method:focus-within {
    background: #141414;
    box-shadow: none !important;
    transform: none !important;
}

/* Skills share the exact neutral surfaces used by the contact form card. */
.skill-category-header {
    border-color: #e5e7eb;
}

.skill-category-symbol,
.skill-tile {
    border-color: #e5e7eb;
    background: #ffffff;
    box-shadow: none;
}

.skill-tile-icon {
    border-color: #e5e7eb;
    background: #f7f7f7;
}

.skill-tile:hover,
.skill-tile:focus-visible {
    border-color: #e5e7eb;
    background: #ffffff;
    box-shadow: none;
}

.skill-tile:focus-visible {
    outline-color: rgba(5, 150, 105, 0.55);
}

.dark .skill-category-header {
    border-color: #2a2a2a;
}

.dark .skill-category-symbol,
.dark .skill-tile,
.dark .skill-tile:hover,
.dark .skill-tile:focus-visible {
    border-color: #2a2a2a;
    background: #0a0a0a;
    box-shadow: none;
}

.dark .skill-tile-icon {
    border-color: #2a2a2a;
    background: #141414;
}

.dark .skill-category-header span:not(.skill-category-symbol),
.dark .skill-tile-name {
    color: #d4d4d4;
}

.skill-category-symbol,
.dark .skill-category-symbol {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
}

.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding: 0.72rem 0.9rem;
    border: 1px solid #059669;
    border-radius: 0.65rem;
    background: #059669;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.project-github-link .fa-arrow-up-right-from-square {
    font-size: 0.58rem;
}

.project-github-link:hover {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.project-github-link:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.45);
    outline-offset: 3px;
}

.project-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.project-actions .project-github-link,
.project-actions .project-play-link {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    margin-top: 0;
    padding: 0.72rem 0.9rem;
    border-radius: 0.65rem;
    font-size: 0.68rem;
}

/* Eye-friendly light theme: soft neutrals replace high-glare pure white. */
html:not(.dark),
html:not(.dark) body,
html:not(.dark) body > section {
    background: #f3f4f4 !important;
    background-image: none !important;
}

html:not(.dark) body {
    color: #171717;
}

html:not(.dark) #navbar,
html:not(.dark) .creative-footer {
    background: #fafafa !important;
    background-image: none !important;
}

html:not(.dark) .card-base,
html:not(.dark) .resume-cta-card,
html:not(.dark) .contact-intro,
html:not(.dark) .contact-form-card,
html:not(.dark) .contact-form-card:hover,
html:not(.dark) .skill-tile,
html:not(.dark) .skill-tile:hover,
html:not(.dark) .skill-tile:focus-visible {
    border-color: #d9dddc;
    background: #fafafa;
}

html:not(.dark) .contact-form-header {
    border-color: #d9dddc !important;
    background: #fafafa !important;
}

html:not(.dark) .contact-method,
html:not(.dark) .contact-method:hover,
html:not(.dark) .contact-method:focus-within,
html:not(.dark) .contact-form-card .form-input,
html:not(.dark) .contact-form-card .form-textarea,
html:not(.dark) .skill-tile-icon,
html:not(.dark) .project-tech-badge {
    border-color: #d9dddc;
    background: #f0f1f1;
}

html:not(.dark) .contact-form-card .form-input:focus,
html:not(.dark) .contact-form-card .form-textarea:focus {
    border-color: #059669;
    background: #f0f1f1;
}

html:not(.dark) .skill-category-header,
html:not(.dark) .creative-footer {
    border-color: #d9dddc;
}

html:not(.dark) #theme-toggle,
html:not(.dark) #theme-toggle:hover,
html:not(.dark) #theme-toggle-mobile,
html:not(.dark) #theme-toggle-mobile:hover {
    background: #f0f1f1 !important;
}

html:not(.dark) .portfolio-button-secondary:hover {
    border-color: #d9dddc !important;
    color: #171717 !important;
}

.nav-resume-button,
.mobile-nav-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid #059669;
    background: #059669 !important;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
}

.nav-resume-button {
    padding: 0.62rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.78rem;
}

.mobile-nav-resume {
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
}

.nav-resume-button:hover,
.mobile-nav-resume:hover {
    border-color: #059669;
    background: #059669 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-resume-button:focus-visible,
.mobile-nav-resume:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.45);
    outline-offset: 3px;
}

.nav-resume-button,
.nav-resume-button:hover,
.mobile-nav-resume,
.mobile-nav-resume:hover {
    border-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
}

.dark .nav-resume-button,
.dark .nav-resume-button:hover,
.dark .mobile-nav-resume,
.dark .mobile-nav-resume:hover {
    border-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important;
}

#theme-toggle,
#theme-toggle:hover,
#theme-toggle-mobile,
#theme-toggle-mobile:hover {
    border: 1px solid #d9dddc !important;
    background: #fafafa !important;
    color: #171717 !important;
    box-shadow: none !important;
    filter: none !important;
    outline: none;
}

.dark #theme-toggle,
.dark #theme-toggle:hover,
.dark #theme-toggle-mobile,
.dark #theme-toggle-mobile:hover {
    border-color: #2a2a2a !important;
    background: #0a0a0a !important;
    color: #ffffff !important;
}

#theme-toggle:focus-visible,
#theme-toggle-mobile:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 3px;
}

#theme-icon,
#theme-icon-mobile {
    color: inherit !important;
}

/* Technical Arsenal: three categories and three skills per category row. */
@media (min-width: 1024px) {
    .skills-showcase {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 2.5rem 2rem;
        max-width: 100%;
    }

    .skill-category,
    .skill-category:last-child {
        min-width: 0;
        margin-bottom: 0;
    }

    .skill-tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .skill-tile {
        min-height: 3.25rem;
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.4rem;
        padding: 0.45rem;
        text-align: left;
    }

    .skill-tile-icon {
        width: 1.85rem;
        height: 1.85rem;
        flex-basis: 1.85rem;
        border-radius: 0.5rem;
        font-size: 1rem;
    }

    .skill-tile-name {
        font-size: 0.6rem;
        line-height: 1.2;
        text-align: left;
        overflow-wrap: anywhere;
    }
}

/* Contact content stays visible without the removed scroll-reveal animation. */
.contact-method,
.contact-form-body .form-group {
    opacity: 1;
    transform: none;
    animation: none;
}

/* Keep theme changes in the navigation synchronized with the page. */
#navbar {
    transition-property: padding, box-shadow !important;
    transition-duration: 300ms !important;
}

#navbar a,
#navbar button,
#navbar span,
#navbar i {
    transition-property: none !important;
}

/* Reserve green for actions and small functional accents, not decorative copy. */
#navbar > .flex > a .text-brand,
#hero h1 .text-brand,
#typewriter,
.section-title .text-brand,
#about h4.text-brand {
    color: inherit !important;
}

#typewriter {
    border-color: currentColor !important;
}

/* Additional projects dialog */
.more-projects-action {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.more-projects-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0;
    padding: 0.7rem 0.95rem;
    border: 1px solid #d9dddc;
    border-radius: 0.65rem;
    background: #fafafa;
    color: #171717;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.more-projects-button i {
    color: #059669;
}

.more-projects-button:hover,
.more-projects-button:focus-visible {
    border-color: #737373;
    background: #f0f1f1;
    box-shadow: none;
    outline: none;
}

.more-projects-button:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 3px;
}

.dark .more-projects-button {
    border-color: #2a2a2a;
    background: #0a0a0a;
    color: #f5f5f5;
}

.dark .more-projects-button:hover,
.dark .more-projects-button:focus-visible {
    border-color: #737373;
    background: #141414;
}

html.modal-open,
body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.additional-projects-modal {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.72);
}

.additional-projects-modal.hidden {
    display: none;
}

.additional-projects-panel {
    width: min(78rem, 100%);
    max-height: 88vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #d9dddc;
    border-radius: 1.25rem;
    background: #f3f4f4;
    color: #171717;
}

.dark .additional-projects-panel {
    border-color: #2a2a2a;
    background: #000000;
    color: #f5f5f5;
}

.additional-projects-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid #d9dddc;
    background: #fafafa;
}

.dark .additional-projects-header {
    border-color: #2a2a2a;
    background: #0a0a0a;
}

.additional-projects-header p,
.additional-project-type {
    color: #059669;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.additional-projects-header h2 {
    margin-top: 0.2rem;
    font-family: Poppins, sans-serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
}

.additional-projects-header button {
    display: grid;
    place-items: center;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d9dddc;
    border-radius: 50%;
    background: #f0f1f1;
    color: #171717;
}

.dark .additional-projects-header button {
    border-color: #2a2a2a;
    background: #141414;
    color: #f5f5f5;
}

.additional-projects-header button:hover,
.additional-projects-header button:focus-visible {
    border-color: #737373;
    box-shadow: none;
    outline: none;
}

.additional-projects-header button:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 3px;
}

.additional-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.additional-project-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9dddc;
    border-radius: 1rem;
    background: #fafafa;
}

.dark .additional-project-card {
    border-color: #2a2a2a;
    background: #0a0a0a;
}

.additional-project-image {
    position: relative;
    height: 13rem;
    overflow: hidden;
    border-bottom: 1px solid #d9dddc;
    background: #f0f1f1;
}

.dark .additional-project-image {
    border-color: #2a2a2a;
    background: #141414;
}

.additional-carousel-slide {
    position: absolute;
    inset: 0.75rem;
    display: none;
    place-items: center;
    min-width: 0;
    min-height: 0;
}

.additional-carousel-slide.is-active {
    display: grid;
}

.additional-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
}

.additional-carousel-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    transform: translateY(-50%);
}

.additional-carousel-arrow:hover,
.additional-carousel-arrow:focus-visible {
    border-color: #ffffff;
    background: #000000;
    box-shadow: none;
    outline: none;
    transform: translateY(-50%);
}

.additional-carousel-arrow:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.additional-carousel-prev {
    left: 0.65rem;
}

.additional-carousel-next {
    right: 0.65rem;
}

.additional-carousel-dots {
    position: absolute;
    z-index: 3;
    bottom: 0.55rem;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    transform: translateX(-50%);
}

.additional-carousel-dot {
    width: 0.42rem;
    height: 0.42rem;
    border: 0;
    border-radius: 999px;
    background: #737373;
}

.additional-carousel-dot.is-active {
    width: 1.1rem;
    background: #059669;
}

.additional-carousel-dot:hover,
.additional-carousel-dot:focus-visible {
    background: #a3a3a3;
    box-shadow: none;
    outline: none;
}

.additional-carousel-dot.is-active:hover,
.additional-carousel-dot.is-active:focus-visible {
    background: #059669;
}

.additional-project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem;
}

.additional-project-content h3 {
    margin-top: 0.55rem;
    color: inherit;
    font-family: Poppins, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.additional-project-description {
    margin-top: 0.8rem;
    color: #525252;
    font-size: 0.8rem;
    line-height: 1.65;
}

.dark .additional-project-description {
    color: #a3a3a3;
}

.additional-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    margin-bottom: 1.1rem;
}

.additional-project-tech span {
    padding: 0.35rem 0.5rem;
    border: 1px solid #d9dddc;
    border-radius: 0.45rem;
    background: #f0f1f1;
    color: #404040;
    font-size: 0.62rem;
    font-weight: 700;
}

.dark .additional-project-tech span {
    border-color: #2a2a2a;
    background: #141414;
    color: #d4d4d4;
}

.additional-project-github {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.55rem;
    min-height: 2.55rem;
    margin-top: auto;
    padding: 0.65rem 0.8rem;
    border: 1px solid #059669;
    border-radius: 0.6rem;
    background: #059669;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
}

.additional-project-tech + .additional-project-github {
    margin-top: auto;
}

.additional-project-github:hover,
.additional-project-github:focus-visible {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
    box-shadow: none;
    outline: none;
}

.additional-project-github:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 3px;
}

.additional-project-github .fa-arrow-up-right-from-square {
    font-size: 0.55rem;
}

@media (max-width: 900px) {
    .additional-projects-grid {
        grid-template-columns: 1fr;
    }

    .additional-project-image {
        height: 16rem;
    }
}

@media (max-width: 600px) {
    .additional-projects-modal {
        padding: 0.75rem;
    }

    .additional-projects-header,
    .additional-projects-grid {
        padding: 1rem;
    }

    .additional-project-image {
        height: 12rem;
    }

    .more-projects-action {
        margin-top: 2rem;
    }

}

/* Consistent, tighter spacing between the main portfolio sections. */
#about,
#skills,
.creative-projects-section,
.contact-redesign {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

@media (max-width: 1023px) {
    #about,
    #skills,
    .creative-projects-section,
    .contact-redesign {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }
}

@media (max-width: 767px) {
    #about,
    #skills,
    .creative-projects-section,
    .contact-redesign {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}
