@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg: #0a0a0c;
    --fg: #ffffff;
    --fg-muted: #88888e;
    --accent: #d2ff2d;
    /* Electric Lime */
    --accent-dark: #b8e622;
    --surface: #141417;
    --surface-light: #1c1c21;
    --border: rgba(255, 255, 255, 0.08);
    --transition-smooth: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --selection: rgba(210, 255, 45, 0.3);
    --hero-opacity: 0.7;
    --card-img-opacity: 0.4;
}

body.light-mode {
    --bg: #f5f5f7;
    --fg: #000000;
    --fg-muted: #45454a;
    --accent: #57ac01;
    --accent-dark: #59b201;
    --surface: #ffffff;
    --surface-light: #f2f2f7;
    --border: rgba(0, 0, 0, 0.1);
    --hero-opacity: 0.7;
    --card-img-opacity: 0.8;
}

/* FULL-WIDTH SECTION BACKGROUND TRICK (APPLIES TO BOTH MODES) */
section.container,
footer.container,
main.legal-container {
    position: relative;
    z-index: 1;
}

section.container::before,
footer.container::before,
main.legal-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    z-index: -2;
    background-color: inherit;
}

/* DARK MODE (DEFAULT) ALTERNATING BACKGROUNDS */
#about {
    background-color: var(--bg);
}

#skills {
    background-color: var(--surface);
}

#projects {
    background-color: var(--bg);
    padding-top: 100px;
    padding-bottom: 80px;
}

#contact {
    background-color: var(--surface);
    padding-top: 80px;
    padding-bottom: 80px;
}

.contact-wrapper {
    margin-top: 20px;
    padding-top: 0;
}

footer.container {
    background-color: var(--surface-light);
    margin-top: 0;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-top {
    padding-top: 0;
}

main.legal-container {
    background-color: var(--bg);
}

body.light-mode #about {
    background-color: #ffffff;
    /* white hero, full-width via ::before trick */
}

body.light-mode #skills {
    background-color: #f2f2f7;
}

body.light-mode #projects {
    background-color: #ffffff;
    padding-top: 100px;
    padding-bottom: 80px;
}

body.light-mode #contact {
    background-color: #f2f2f7;
    padding-top: 80px;
    padding-bottom: 80px;
}

body.light-mode .contact-wrapper {
    margin-top: 20px;
    padding-top: 0;
}

body.light-mode footer.container {
    background-color: #ffffff;
    margin-top: 0;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

body.light-mode .footer-top {
    padding-top: 0;
}

body.light-mode main.legal-container {
    background-color: #ffffff;
}

/* FIX FOR PROJECT CARDS IN LIGHT MODE */
body.light-mode .project-card-unique {
    --fg: #ffffff;
    --fg-muted: rgba(255, 255, 255, 0.9);
    color: var(--fg);
}

body.light-mode .hero-bg-wrapper img {
    mix-blend-mode: multiply;
    filter: invert(1) grayscale(100%) contrast(1.2);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9);
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.italics {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Navigation - StandardFleet Style */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(20px);
    padding: 15px 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    color: var(--fg);
    text-decoration: none;
}

.nav-brand svg,
.nav-brand .brand-icon {
    color: var(--accent);
    margin-right: 8px;
    flex-shrink: 0;
}

.nav-brand .brand-logo-img {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-brand:hover .brand-logo-img {
    transform: scale(1.08);
}

/* Dual-Theme Adaptive Logo */
.nav-brand .brand-logo-img.logo-light {
    display: none;
}
.nav-brand .brand-logo-img.logo-dark {
    display: inline-block;
}

body.light-mode .nav-brand .brand-logo-img.logo-light {
    display: inline-block;
}
body.light-mode .nav-brand .brand-logo-img.logo-dark {
    display: none;
}

.nav-brand span,
.nav-brand .brand-text {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--fg);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--fg);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--border);
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Hero Section - Asymmetric & Immersive */
.hero {
    /* Override .container max-width so the section background fills 100vw */
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    /* Layout: text left, image right — closer together with left indent */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 40px 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 65%;
    height: 90%;
    z-index: 0;
    pointer-events: none; /* Never intercept touches or clicks */
    user-select: none;
    -webkit-user-drag: none;
    opacity: var(--hero-opacity);
    filter: saturate(1.2);
    /* Start fading later so the image's left edge is more solid
       — this lets "Architecture" visually overlap the image */
    mask-image: linear-gradient(to left, black 45%, transparent 90%);
    mix-blend-mode: screen;
    transition: opacity 0.6s ease;
}

.hero-bg-wrapper img,
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.light-mode .hero-bg-wrapper img {
    mix-blend-mode: multiply;
    filter: invert(1) grayscale(100%) contrast(1.2);
}

/* Interactive Forge 3D Canvas & HUD */
#hero-forge-container {
    top: 50%;
    transform: translateY(-50%);
    width: 65%;
    height: 90%;
    opacity: 1;
    filter: none;
    -webkit-filter: none;
    mix-blend-mode: normal;
    mask-image: none;
    -webkit-mask-image: none;
}

body.light-mode #hero-forge-container {
    filter: none;
    -webkit-filter: none;
    mix-blend-mode: normal;
    opacity: 1;
}

.forge-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
    pointer-events: auto;
    animation: forge-fade 1.4s 0.1s ease both;
}

.forge-canvas:active {
    cursor: grabbing;
}

.forge-canvas:focus-visible {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.forge-hud {
    position: absolute;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    z-index: 2;
    user-select: none;
    color: rgba(255, 255, 255, 0.72);
}

.forge-hud span {
    display: inline-block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: inherit;
}

body.light-mode .forge-hud {
    color: rgba(18, 18, 22, 0.75);
    font-weight: 600;
}

body.light-mode .forge-hud span {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: inherit;
}

.forge-hud-top {
    top: 36px;
}

.forge-hud-bottom {
    bottom: 24px;
}

@keyframes forge-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .forge-canvas {
        animation: none;
    }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    /* Wide enough that "Architecture" extends into the image area */
    max-width: 800px;
    position: relative;
    z-index: 2;
    /* sits above .hero-bg-wrapper (z-index: 0) */
}

.hero p {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: var(--fg-muted);
    max-width: 500px;
    margin-top: 20px;
    z-index: 2;
    position: relative;
}

.hero .btn-learn-more {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Interactive Bento Section */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 350px);
    gap: 20px;
    padding: 100px 0;
}

.bento-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.bento-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.item-1 {
    grid-column: span 2;
    grid-row: span 1;
}

.item-2 {
    grid-column: span 1;
    grid-row: span 1;
}

.item-3 {
    grid-column: span 1;
    grid-row: span 2;
}

/* Vertical card */
.item-4 {
    grid-column: span 1;
    grid-row: span 1;
}

.item-5 {
    grid-column: span 2;
    grid-row: span 1;
}

.skill-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface-light);
    border-radius: 100px;
    font-size: 0.8rem;
    margin: 4px;
    border: 1px solid var(--border);
}

/* Projects - Horizontal Reveal */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
}

.scroll-arrow {
    animation: bounceRight 1.5s infinite;
}

@keyframes bounceRight {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(5px);
    }
}

.project-slide {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
    min-height: 420px;
}

.project-slide::-webkit-scrollbar {
    display: none;
}

.projects-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 40px;
}

.projects-actions .btn-learn-more {
    margin-top: 0;
}

.project-card-unique {
    min-width: 620px;
    height: 420px;
    background: var(--surface);
    border-radius: 36px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.project-card-unique img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--card-img-opacity);
    transition: var(--transition-smooth);
}

.project-card-unique:hover img {
    opacity: 0.85;
    transform: scale(1.03);
}

/* Universal high-contrast protection scrim */
.project-card-unique::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 12, 0.2) 0%,
            rgba(10, 10, 12, 0.5) 30%,
            rgba(10, 10, 12, 0.88) 65%,
            rgba(10, 10, 12, 0.98) 100%);
    pointer-events: none;
    z-index: 1;
    transition: var(--transition-smooth);
}

.project-card-unique:hover::after {
    background: linear-gradient(180deg,
            rgba(10, 10, 12, 0.15) 0%,
            rgba(10, 10, 12, 0.55) 28%,
            rgba(10, 10, 12, 0.9) 62%,
            rgba(10, 10, 12, 0.98) 100%);
}

.project-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 40px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 650px;
}

.project-category-badge {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 6px;
    display: inline-block;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.project-card-title {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.project-card-desc {
    color: #e5e5ea !important;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 520px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    margin-bottom: 4px;
}

.project-tags-wrap {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag-pill {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    color: #e0e0e0;
}

.project-card-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.project-btn-primary,
.project-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 24px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    line-height: 1;
    margin: 0;
    vertical-align: middle;
    transition: var(--transition-smooth);
    white-space: nowrap;
    box-sizing: border-box;
}

.project-btn-primary {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
}

.project-btn-primary:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    transform: translateY(-2px);
}

.project-btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.project-btn-secondary:visited {
    color: var(--accent);
}

.project-btn-secondary:hover,
.project-btn-secondary:focus-visible,
.project-btn-secondary:active,
.project-btn-secondary:visited:hover,
.project-btn-secondary:visited:focus-visible,
.project-btn-secondary:visited:active {
    background: var(--accent);
    color: #0a0a0c !important;
    border-color: var(--accent);
    transform: translateY(-2px);
}

body.light-mode .project-btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

body.light-mode .project-btn-primary:hover,
body.light-mode .project-btn-primary:focus-visible,
body.light-mode .project-btn-primary:active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

body.light-mode .project-btn-secondary {
    background: rgba(87, 172, 1, 0.08);
    border: 1px solid var(--accent);
    color: var(--accent);
}

body.light-mode .project-btn-secondary:visited {
    color: var(--accent);
}

body.light-mode .project-btn-secondary:hover,
body.light-mode .project-btn-secondary:focus-visible,
body.light-mode .project-btn-secondary:active,
body.light-mode .project-btn-secondary:visited:hover,
body.light-mode .project-btn-secondary:visited:focus-visible,
body.light-mode .project-btn-secondary:visited:active {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
}

/* Live Terminal Component */
/* Contact Section Improvements */
#contact {
    padding-top: 150px;
    padding-bottom: 150px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 100px;
    /* Increased gap */
    text-align: left;
    margin-top: -30px;
    max-width: 1200px;
    /* Constrain for better centering */
    margin-left: auto;
    margin-right: auto;
}

.contact-info h2 {
    font-size: 5rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--fg-muted);
    font-size: 1.2rem;
    max-width: 400px;
    margin-bottom: 40px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 60px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.8rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-group input,
.input-group textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 12px;
    color: var(--fg);
    font-family: inherit;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    transition: var(--transition-smooth);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(210, 255, 45, 0.1);
}

.btn-submit {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--fg);
    color: var(--bg);
    transform: translateY(-2px);
}


/* Footer Styling Expand */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    margin-top: 150px;
    color: var(--fg-muted);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    padding-top: 0px;
    gap: 80px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 350px;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--fg);
    letter-spacing: -0.04em;
    text-transform: none;
}

.footer-brand p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.footer-links-group {
    display: flex;
    gap: 80px;
    flex: 1;
    justify-content: flex-end;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-col h4 {
    color: var(--fg);
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-col a {
    color: var(--fg-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
    display: inline-block;
    width: fit-content;
}

.footer-col a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-socials {
    display: flex;
    gap: 30px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-socials a {
    color: var(--fg);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    padding-bottom: 4px;
}

.footer-socials a:hover {
    color: var(--accent);
}

.footer-socials a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition-smooth);
}

.footer-socials a:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 15px;
    /*border-top: 1px solid var(--border);*/
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* Proficiency Progress Bars */
.progress-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.progress-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg);
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    box-shadow: 0 0 10px rgba(210, 255, 45, 0.4);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1) calc(var(--delay, 0s));
}

body.light-mode .progress-bar-fill {
    box-shadow: 0 0 10px rgba(87, 172, 1, 0.3);
}

.item-5.active .progress-bar-fill {
    width: var(--target-width);
}


/* Legal Pages Layout */
.legal-container {
    padding: 150px 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    min-height: 80vh;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 1px solid var(--border);
    padding-right: 30px;
}

.legal-sidebar-title {
    font-size: 0.8rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

.legal-sidebar a {
    color: var(--fg);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-smooth);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.legal-sidebar a:hover,
.legal-sidebar a.active {
    background: var(--surface);
    border-color: var(--border);
    color: var(--accent);
}

.legal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 60px;
}

.legal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.legal-header h1 {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.legal-header p {
    color: var(--fg-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.legal-body {
    color: var(--fg-muted);
    line-height: 1.8;
    font-size: 1.1rem;
}

.legal-body h2 {
    color: var(--fg);
    font-size: 1.8rem;
    margin: 40px 0 20px;
    letter-spacing: -0.02em;
}

.legal-body p {
    margin-bottom: 20px;
}

.legal-body a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.legal-body a:hover {
    color: var(--fg);
}

.legal-storage-list {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-storage-card {
    padding: 18px 22px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.legal-storage-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--fg);
}

.legal-storage-card p {
    font-size: 0.9rem;
    color: var(--fg-muted);
    margin: 0;
    line-height: 1.6;
}

.legal-sidebar-back {
    margin-top: 20px;
    color: var(--fg-muted);
    font-size: 0.8rem;
}

.legal-bullet-list {
    margin-left: 20px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.nav-theme-icon {
    margin-right: 6px;
}

.brand-accent-text {
    color: var(--accent);
}

.admin-project-role {
    color: var(--fg);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

/* =========================================================
   RESPONSIVE DESIGN & UNIQUE LAYOUT ADAPTATION
   ========================================================= */

@media (max-width: 1024px) {

    /* Tablet & Smaller Laptops */
    .hero h1 {
        font-size: clamp(3.5rem, 8vw, 6rem);
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .item-1,
    .item-5 {
        grid-column: span 2;
    }

    .item-2,
    .item-3,
    .item-4 {
        grid-column: span 1;
        padding: 30px;
    }

    .item-3 {
        grid-row: span 1;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .legal-container {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: relative;
        top: 0;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 20px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {

    /* Mobile Devices - Unique Interactive Layout */
    .container {
        padding: 0 25px;
    }

    /* Navigation Adjustments for Mobile */
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        /* Hide standard links on mobile */
    }

    .nav-brand span {
        display: none;
        /* Hide text, keep icon */
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    /* Hero Adjustments */
    .hero {
        text-align: center;
        align-items: center;
        justify-content: center;
        padding: 120px 20px 40px 20px;
        height: auto;
        min-height: 60vh;
    }

    .hero-bg-wrapper {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 120%;
        opacity: 0.2;
        mask-image: radial-gradient(circle, black 30%, transparent 70%);
        pointer-events: none;
    }

    .hero-bg-wrapper img {
        pointer-events: none;
    }

    #hero-forge-container {
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: 500px;
        height: 100%;
        opacity: 0.32;
        mask-image: radial-gradient(circle, black 35%, transparent 82%);
        -webkit-mask-image: radial-gradient(circle, black 35%, transparent 82%);
        pointer-events: none;
    }

    body.light-mode #hero-forge-container {
        opacity: 0.22;
        mask-image: radial-gradient(circle, black 30%, transparent 80%);
        -webkit-mask-image: radial-gradient(circle, black 30%, transparent 80%);
    }

    #hero-forge-container .forge-canvas {
        pointer-events: none;
    }

    .forge-hud {
        display: none;
    }

    .hero h1 {
        font-size: clamp(2.4rem, 8vw, 3rem);
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }

    .hero p {
        margin: 20px auto 0;
        font-size: 1.1rem;
        position: relative;
        z-index: 2;
    }

    .hero .btn-learn-more {
        align-self: center;
        margin: 28px auto 0;
        position: relative;
        z-index: 10;
        pointer-events: auto;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
    }

    /* Bento Grid - Diagonal Stagger Layout */
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 60px 0;
    }

    .bento-item {
        border-radius: 20px;
        padding: 30px 25px;
    }

    .bento-item:nth-child(odd) {
        transform: translateX(-10px);
        border-left: 3px solid var(--accent);
    }

    .bento-item:nth-child(even) {
        transform: translateX(10px);
        border-right: 3px solid var(--accent);
    }

    .bento-item:hover {
        transform: none;
        /* remove hover scaling to keep stable on tap */
    }

    /* Proficiency Progress Wrap */
    .progress-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Projects - Horizontal Snap Scroll */
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .project-slide {
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        gap: 15px;
        margin: 0 -25px;
        /* break out of container for full width swipe */
        padding: 20px 25px;
    }

    .project-card-unique {
        min-width: 85vw;
        height: 430px;
        scroll-snap-align: center;
        border-radius: 24px;
        opacity: 1 !important;
        transform: none !important;
    }

    .project-content-overlay {
        padding: 24px 20px;
        max-width: 100%;
    }

    .project-card-desc {
        font-size: 0.88rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .project-card-actions {
        margin-top: 14px;
        gap: 10px;
    }

    .project-btn-primary,
    .project-btn-secondary {
        height: 38px;
        padding: 0 18px;
        font-size: 0.75rem;
    }

    .projects-actions {
        margin-top: 24px;
    }

    /* Contact Details */
    #contact {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .contact-wrapper {
        margin-top: 20px;
    }

    .contact-info h2 {
        font-size: 3.5rem;
        text-align: left;
    }

    .contact-info p {
        max-width: 100%;
    }

    .contact-form {
        padding: 40px 25px;
        border-radius: 24px;
    }

    /* Footer */
    footer {
        padding: 60px 0 60px;
        margin-top: 60px;
        text-align: center;
    }

    .footer-top {
        flex-direction: column;
        gap: 50px;
    }

    .footer-brand {
        margin: 0 auto;
    }

    .footer-links-group {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .footer-col {
        align-items: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .legal-content {
        padding: 30px 20px;
    }

    .legal-header h1 {
        font-size: 2.5rem;
    }

    .legal-container {
        padding: 100px 25px 60px;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .legal-sidebar {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 10px;
        margin-bottom: 20px;
        border-bottom: none;
    }

    .legal-sidebar-title {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }

    .legal-sidebar a[style] {
        margin-top: 10px !important;
    }

    .legal-body p,
    .legal-header p {
        word-break: break-word;
    }

    /* Mobile Reveal on Scroll */
    .reveal-mobile {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }

    .reveal-mobile.active {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {

    /* Micro Devices */
    .hero h1 {
        font-size: 2.4rem;
    }

    nav {
        width: 95%;
        padding: 12px 20px;
    }

    nav a {
        font-size: 0.75rem;
    }

    .bento-item:nth-child(odd),
    .bento-item:nth-child(even) {
        transform: none;
        /* No stagger to save horizontal space on very small screens */
        border: 1px solid var(--border);
    }

    .project-card-unique {
        min-width: 90vw;
        height: 380px;
        opacity: 1 !important;
        transform: none !important;
    }

    .contact-info h2 {
        font-size: 2.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT PAGE ARCHITECTURE & ALTERNATING SECTION PALETTE
   Governed by Rule 0 (SSOT) & Development Rules.
   Strict Alternating Palette:
   1. Hero Section:                      #F5F5F5 (Light) / var(--bg) (Dark)
   2. Story Section:                     #FFFFFF (Light) / var(--surface) (Dark)
   3. Philosophy Section:                #F5F5F5 (Light) / var(--bg) (Dark)
   4. What I Build (Services) Section:   #FFFFFF (Light) / var(--surface) (Dark)
   5. Featured Work (Teaser) Section:    #F5F5F5 (Light) / var(--bg) (Dark)
   6. CTA Section:                       #FFFFFF (Light) / var(--surface) (Dark)
   7. Core Engineering Principles:       #F5F5F5 (Light) / var(--bg) (Dark)
   8. Footer:                            #FFFFFF (Light) / var(--surface-light) (Dark)
   ═══════════════════════════════════════════════════════════════════ */

.about-page {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100vh;
}

/* Base Dark Mode Section Backgrounds */
.about-hero-section {
    background-color: var(--bg);
    padding-top: 140px;
    padding-bottom: 90px;
    margin: 0 auto;
}

.about-story-section {
    background-color: var(--surface);
    margin: 0 auto;
}

.about-philosophy-section {
    background-color: var(--bg);
    margin: 0 auto;
}

.about-services-section {
    background-color: var(--surface);
    margin: 0 auto;
}

.about-teaser-section {
    background-color: var(--bg);
    margin: 0 auto;
}

.about-cta-section {
    background-color: var(--surface);
    margin: 0 auto;
}

/* Light Mode Overrides — Exact Alternating Palette */
body.light-mode .about-hero-section {
    background-color: #f5f5f5;
}

body.light-mode .about-story-section {
    background-color: #ffffff;
}

body.light-mode .about-philosophy-section {
    background-color: #f5f5f5;
}

body.light-mode .about-services-section {
    background-color: #ffffff;
}

body.light-mode .about-teaser-section {
    background-color: #f5f5f5;
}

body.light-mode .about-cta-section {
    background-color: #ffffff;
}

/* Hero Section Components */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-photo-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.about-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.about-photo:hover {
    transform: scale(1.02);
}

.about-photo-backdrop {
    position: absolute;
    top: 15px;
    left: -15px;
    right: 15px;
    bottom: -15px;
    background: var(--surface-light);
    border-radius: 50%;
    z-index: 1;
    border: 1px dashed var(--border);
}

body.light-mode .about-photo-backdrop {
    background: #ffffff;
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.about-badge {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.about-content h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    margin-top: 16px;
    margin-bottom: 24px;
    color: var(--fg);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.about-lead {
    font-size: 1.35rem;
    color: var(--fg-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 40px;
}

.about-section h3 {
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.about-section p {
    font-size: 1.05rem;
    color: var(--fg-muted);
    line-height: 1.7;
}

.about-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.about-hero-actions .btn-submit {
    text-decoration: none;
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
}

/* Story Section */
.story-section {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 80px;
    padding: 100px 0;
    align-items: start;
}

.story-label {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    font-weight: 600;
}

.story-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.story-body p {
    font-size: 1.15rem;
    color: var(--fg-muted);
    line-height: 1.8;
    margin-bottom: 24px;
}

.story-body p:last-child {
    margin-bottom: 0;
}

.story-body p span {
    color: var(--fg);
    font-weight: 600;
}

/* Philosophy Section */
.philosophy-block {
    padding: 100px 0;
    text-align: center;
}

.philosophy-label {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 32px;
    font-weight: 600;
}

.philosophy-block blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: var(--fg);
    max-width: 950px;
    margin: 0 auto;
    line-height: 1.45;
}

.philosophy-block blockquote span {
    color: var(--accent);
    font-weight: 700;
}

/* Services / What I Build Section */
.services-section {
    padding: 100px 0;
}

.services-heading {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 50px;
    letter-spacing: -0.04em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px 30px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

body.light-mode .service-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 22px;
}

.service-card h3 {
    font-size: 1.18rem;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--fg-muted);
    line-height: 1.65;
}

/* Projects Teaser Section */
.projects-teaser {
    padding: 100px 0 110px;
}

.teaser-label {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    font-weight: 600;
}

.teaser-heading {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.04em;
}

.projects-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.project-teaser-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

body.light-mode .project-teaser-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.project-teaser-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.project-teaser-card > a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-teaser-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.project-teaser-card:hover img {
    opacity: 1;
}

.project-teaser-info {
    padding: 26px;
}

.project-teaser-tag {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.project-teaser-info h3 {
    font-size: 1.15rem;
    margin: 8px 0 10px;
    letter-spacing: -0.02em;
}

.project-teaser-info p {
    font-size: 0.92rem;
    color: var(--fg-muted);
    line-height: 1.55;
}

.teaser-actions {
    text-align: center;
    margin-top: 48px;
}

/* CTA Section */
.about-cta {
    padding: 110px 0;
    text-align: center;
}

.about-cta h2 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    line-height: 1.1;
}

.about-cta p {
    color: var(--fg-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.about-cta-btns .btn-submit {
    text-decoration: none;
    display: inline-block;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

/* Shared Utility Classes */
.brand-accent {
    color: var(--accent);
}

.nav-btn svg {
    margin-right: 6px;
    flex-shrink: 0;
}

/* Responsive Rules for About Page */
@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-photo-backdrop {
        display: none;
    }

    .about-photo-wrapper {
        margin: 0 auto;
    }

    .story-section {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 70px 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-teaser-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-hero-section {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .about-content h1 {
        font-size: 3.2rem;
    }

    .philosophy-block {
        padding: 70px 0;
    }

    .services-section {
        padding: 70px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-teaser {
        padding: 70px 0 80px;
    }

    .projects-teaser-grid {
        grid-template-columns: 1fr;
    }

    .about-cta {
        padding: 80px 0;
    }

    .about-cta h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .about-hero-section {
        padding-top: 105px;
        padding-bottom: 50px;
    }

    .about-photo-wrapper {
        max-width: 280px;
    }

    .about-content h1 {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
    }

    .about-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .about-hero-actions .btn-submit,
    .about-hero-actions .btn-outline-hover {
        width: 100%;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .about-cta-btns {
        flex-direction: column;
    }
}

/* =========================================================
   PROJECT DETAIL / CASE STUDY VIEW STYLES
   ========================================================= */

.project-detail-container {
    padding-top: 140px;
    padding-bottom: 120px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    min-height: 85vh;
}

.project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 30px;
}

.project-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.project-breadcrumb a:hover {
    color: var(--fg);
}

.project-hero-header {
    margin-bottom: 40px;
}

.project-meta-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.badge-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-tag.accent {
    background: var(--accent);
    color: var(--bg);
}

.badge-tag.outline {
    border: 1px solid var(--border);
    color: var(--fg-muted);
}

.badge-tag.status-live {
    background: rgba(210, 255, 45, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
}

body.light-mode .badge-tag.status-live {
    background: rgba(87, 172, 1, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.badge-tag.status-archived {
    background: rgba(150, 150, 150, 0.15);
    border: 1px solid rgba(150, 150, 150, 0.35);
    color: var(--fg-muted);
}

.badge-tag.status-in-dev {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.project-hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--fg);
}

.project-hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--fg-muted);
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 35px;
}

.project-action-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 50px;
}

.project-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.project-action-btn.primary {
    background: var(--accent);
    color: #0a0a0c !important;
    border: 1px solid var(--accent);
}

.project-action-btn.primary:visited {
    color: #0a0a0c !important;
}

.project-action-btn.primary:hover,
.project-action-btn.primary:focus-visible,
.project-action-btn.primary:active {
    background: var(--fg);
    color: var(--bg) !important;
    transform: translateY(-2px);
}

.project-action-btn.secondary {
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
}

.project-action-btn.secondary:hover,
.project-action-btn.secondary:focus-visible,
.project-action-btn.secondary:active {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

body.light-mode .project-action-btn.primary {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
}

body.light-mode .project-action-btn.primary:visited {
    color: #ffffff !important;
}

body.light-mode .project-action-btn.primary:hover,
body.light-mode .project-action-btn.primary:focus-visible,
body.light-mode .project-action-btn.primary:active {
    background: #000000;
    color: #ffffff !important;
    border-color: #000000;
}

.project-showcase-media {
    width: 100%;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 60px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-showcase-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition-smooth);
}

/* Specs Bar */
.project-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px 40px;
    margin-bottom: 70px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.spec-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fg);
}

.spec-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spec-chip {
    font-size: 0.7rem;
    padding: 4px 8px;
    background: var(--surface-light);
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--accent);
}

/* Case Study Section Blocks */
.case-study-grid {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-bottom: 80px;
}

.case-study-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 45px;
    position: relative;
    overflow: hidden;
}

.case-study-step-num {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin-bottom: 12px;
}

.case-study-card h3 {
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--fg);
}

.case-study-card p {
    font-size: 1.15rem;
    color: var(--fg-muted);
    line-height: 1.8;
}

/* Feature Checklist */
.case-features-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface-light);
    padding: 18px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.5;
}

.feature-bullet {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}

/* Project Navigator Footer */
.project-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
    gap: 20px;
}

.project-nav-btn {
    color: var(--fg);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.project-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =========================================================
   CONTENT MANAGEMENT SYSTEM (CMS) STYLES
   ========================================================= */

.admin-body {
    background-color: var(--bg);
    min-height: 100vh;
}

/* PIN Security Gate */
.admin-pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

body.light-mode .admin-pin-overlay {
    background: rgba(245, 245, 247, 0.95);
}

.admin-pin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 50px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.admin-pin-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.admin-pin-card h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--fg);
}

.admin-pin-card p {
    color: var(--fg-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.admin-pin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-pin-form input {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    color: var(--fg);
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.3em;
    font-family: monospace;
    font-weight: 700;
}

.admin-pin-form input::placeholder {
    font-size: 1rem;
    letter-spacing: 0.15em;
    font-family: inherit;
    font-weight: 600;
    opacity: 0.6;
}

.admin-pin-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(210, 255, 45, 0.2);
}

.admin-pin-btn {
    width: 100%;
    margin-top: 5px;
}

.admin-pin-error {
    color: #ff5555;
    font-size: 0.85rem;
    margin-top: 15px;
    font-weight: 600;
}

.admin-pin-hint {
    margin-top: 25px;
    font-size: 0.8rem;
    color: var(--fg-muted);
}

.admin-pin-hint code {
    background: var(--surface-light);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent);
}

/* CMS Dashboard Layout */
.admin-dashboard-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-brand-label {
    font-size: 1.1rem;
    color: var(--fg);
    letter-spacing: -0.02em;
}

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fg-muted);
    letter-spacing: 0.05em;
}

.admin-session-pill {
    background: rgba(210, 255, 45, 0.08);
    border: 1px solid rgba(210, 255, 45, 0.25);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
}

body.light-mode .admin-session-pill {
    background: rgba(87, 172, 1, 0.08);
    border: 1px solid rgba(87, 172, 1, 0.25);
    color: var(--accent);
}

.admin-session-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-action-btn {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
    border: none;
}

/* Workspace and Tabs */
.admin-workspace {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 40px 100px;
    flex: 1;
}

.admin-nav-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.admin-nav-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.admin-tab-btn:hover {
    color: var(--fg);
    background: var(--surface);
}

.admin-tab-btn.active {
    background: var(--surface);
    border-color: var(--border);
    color: var(--accent);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section-header {
    margin-bottom: 35px;
}

.admin-section-header h2 {
    font-size: 2.2rem;
    letter-spacing: -0.03em;
    color: var(--fg);
    margin-bottom: 8px;
}

.admin-section-header p {
    color: var(--fg-muted);
    font-size: 1rem;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

/* Admin Cards */
.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.admin-card-grid-sub {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 35px;
    position: relative;
}

.admin-card.full-span {
    grid-column: span 2;
}

.admin-card h3 {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--fg-muted);
    line-height: 1.5;
    margin-bottom: 25px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-form-group:last-child {
    margin-bottom: 0;
}

.admin-form-group label {
    font-size: 0.8rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--fg);
    font-family: inherit;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    transition: var(--transition-smooth);
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(210, 255, 45, 0.1);
}

.story-paragraph-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    width: 100%;
}

.story-p-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-divider {
    height: 1px;
    background: var(--border);
    margin: 30px 0;
}

/* Chips and Inline Add */
.add-skill-inline {
    display: flex;
    gap: 10px;
}

.add-skill-inline input {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 100px;
    color: var(--fg);
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.admin-btn-accent {
    background: var(--accent);
    color: var(--bg);
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.admin-btn-accent:hover {
    background: var(--fg);
    color: var(--bg);
    transform: translateY(-1px);
}

.admin-btn-secondary-sm {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-btn-secondary-sm:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 60px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 20px;
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
}

.chip-remove-btn {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 2px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.chip-remove-btn:hover {
    color: #ff5555;
}

/* Proficiency & Stack Lists */
.admin-stack-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.proficiency-row-item,
.stat-row-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    background: var(--bg);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-row-item {
    grid-template-columns: 1fr 2fr auto;
}

.delete-row-btn {
    background: none;
    border: none;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.delete-row-btn:hover {
    color: #ff5555;
}

/* Projects Admin Grid */
.admin-projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.admin-project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.admin-project-card:hover {
    border-color: var(--accent);
}

.admin-project-thumb {
    height: 180px;
    width: 100%;
    background: var(--surface-light);
    position: relative;
    overflow: hidden;
}

.admin-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-project-thumb-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    backdrop-filter: blur(8px);
}

.admin-project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.admin-project-category {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.admin-project-title {
    font-size: 1.3rem;
    color: var(--fg);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.admin-project-desc {
    font-size: 0.9rem;
    color: var(--fg-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.admin-project-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.admin-project-actions button {
    flex: 1;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--fg);
    transition: var(--transition-smooth);
}

.admin-project-actions button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-project-actions button.btn-delete:hover {
    border-color: #ff5555;
    color: #ff5555;
}

/* Modal Dialogs */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    overflow-y: auto;
}

.admin-modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.admin-modal-header {
    padding: 25px 35px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-modal-header h2 {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.admin-modal-close {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-modal-close:hover {
    color: var(--fg);
}

.admin-modal-body {
    padding: 30px 35px;
    overflow-y: auto;
    flex: 1;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.admin-btn-secondary {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-btn-danger {
    background: rgba(255, 85, 85, 0.15);
    border: 1px solid #ff5555;
    color: #ff5555;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-btn-danger:hover {
    background: #ff5555;
    color: #fff;
}

/* Toast Notifications */
.admin-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--surface);
    border: 1px solid var(--accent);
    color: var(--fg);
    padding: 16px 28px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 10001;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: toastSlideIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-code-editor {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--accent);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.85rem;
    padding: 20px;
    line-height: 1.6;
    resize: vertical;
}

.admin-code-editor:focus {
    outline: none;
    border-color: var(--accent);
}

/* CMS Security Tab & Authorization Styling */
.admin-pin-success {
    color: #22c55e;
    font-size: 0.85rem;
    margin-top: 15px;
    font-weight: 600;
}

.admin-profile-security-hint {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-profile-security-hint span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg-muted);
}

.admin-security-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

.security-info-box {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
}

.security-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.security-info-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.security-info-value.status-active {
    color: #22c55e;
}

.security-info-text {
    font-size: 0.88rem;
    color: var(--fg-muted);
    line-height: 1.6;
    margin: 0;
}

.security-info-text strong {
    color: var(--fg);
}

.security-lock-action {
    margin-top: 8px;
}

/* Form Anti-Spam Security */
.form-honeypot {
    display: none !important;
    position: absolute;
    left: -9999px;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Brand & Icon Utility Classes */
.brand-accent-color {
    color: var(--accent);
}

.brand-accent-text {
    color: var(--accent);
}

.nav-cms-link {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 100px;
    color: var(--accent) !important;
}

.nav-cms-link:hover {
    border-color: var(--accent);
}

/* Mobile adjustments for CMS & Project Detail */
@media (max-width: 1024px) {

    .admin-card-grid,
    .admin-card-grid-sub,
    .admin-projects-list {
        grid-template-columns: 1fr;
    }

    .admin-card.full-span {
        grid-column: span 1;
    }

    .project-specs-grid {
        grid-template-columns: 1fr 1fr;
        padding: 25px;
    }

    .case-features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .project-detail-container {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .project-showcase-media {
        border-radius: 20px;
        margin-bottom: 40px;
    }

    .admin-topbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .admin-topbar-brand {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .admin-topbar-actions {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        width: 100%;
    }

    .admin-topbar-actions .admin-action-btn,
    .admin-topbar-actions .nav-btn {
        padding: 9px 4px;
        font-size: 0.72rem;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    .admin-workspace {
        padding: 18px 14px 60px;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .admin-nav-tabs {
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 25px;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .admin-section-header h2 {
        font-size: 1.6rem;
    }

    .admin-section-header p {
        font-size: 0.9rem;
    }

    .admin-card {
        padding: 20px 16px;
        border-radius: 20px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-card-grid-sub {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .proficiency-row-item,
    .stat-row-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .admin-form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-specs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .admin-topbar-brand {
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-topbar-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .admin-topbar-actions .admin-action-btn,
    .admin-topbar-actions .nav-btn {
        padding: 8px 6px;
        font-size: 0.72rem;
    }

    .admin-card {
        padding: 16px 14px;
    }

    .admin-section-header h2 {
        font-size: 1.35rem;
    }
}

.btn-learn-more,
#view-all-projects-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    /* stays left under the hero text */
    gap: 8px;
    margin-top: 28px;
    padding: 14px 28px;
    min-height: 48px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    background: transparent;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-learn-more:visited,
#view-all-projects-btn:visited {
    color: var(--accent);
}

.btn-learn-more:hover,
.btn-learn-more:focus,
.btn-learn-more:focus-visible,
.btn-learn-more:active,
.btn-learn-more:visited:hover,
.btn-learn-more:visited:focus,
.btn-learn-more:visited:focus-visible,
.btn-learn-more:visited:active,
#view-all-projects-btn:hover,
#view-all-projects-btn:focus,
#view-all-projects-btn:focus-visible,
#view-all-projects-btn:active,
#view-all-projects-btn:visited:hover,
#view-all-projects-btn:visited:focus,
#view-all-projects-btn:visited:focus-visible,
#view-all-projects-btn:visited:active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #0a0a0c !important;
    box-shadow: 0 4px 20px rgba(210, 255, 45, 0.25);
}

.btn-learn-more:active,
#view-all-projects-btn:active {
    transform: scale(0.97);
}

body.light-mode .btn-learn-more,
body.light-mode #view-all-projects-btn {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

body.light-mode .btn-learn-more:visited,
body.light-mode #view-all-projects-btn:visited {
    color: var(--accent);
}

body.light-mode .btn-learn-more:hover,
body.light-mode .btn-learn-more:focus,
body.light-mode .btn-learn-more:focus-visible,
body.light-mode .btn-learn-more:active,
body.light-mode .btn-learn-more:visited:hover,
body.light-mode .btn-learn-more:visited:focus,
body.light-mode .btn-learn-more:visited:focus-visible,
body.light-mode .btn-learn-more:visited:active,
body.light-mode #view-all-projects-btn:hover,
body.light-mode #view-all-projects-btn:focus,
body.light-mode #view-all-projects-btn:focus-visible,
body.light-mode #view-all-projects-btn:active,
body.light-mode #view-all-projects-btn:visited:hover,
body.light-mode #view-all-projects-btn:visited:focus,
body.light-mode #view-all-projects-btn:visited:focus-visible,
body.light-mode #view-all-projects-btn:visited:active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(87, 172, 1, 0.25);
}

.btn-outline-hover {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--fg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    background: transparent;
}

.btn-outline-hover:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════
   ALL PROJECTS CATALOG PAGE (projects.html)
   ═══════════════════════════════════════════════════════════════════ */

.projects-catalog-container {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 80vh;
}

/* Projects Catalog Section — Light Mode #F5F5F5 */
.projects-catalog-section {
    background-color: var(--bg);
    padding-top: 140px;
    padding-bottom: 90px;
    margin: 0 auto;
}

body.light-mode .projects-catalog-section {
    background-color: #f5f5f5;
}

.projects-catalog-hero {
    margin-bottom: 40px;
    max-width: 850px;
}

.catalog-hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--fg);
}

.catalog-hero-desc {
    color: var(--fg-muted);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.6;
    max-width: 680px;
    margin-bottom: 20px;
}

/* Projects & General CTA Section — Light Mode #FFFFFF */
.projects-cta-section {
    background-color: var(--surface);
    position: relative;
    z-index: 1;
    margin-top: 0;
    margin-bottom: 0;
    border-top: 1px solid var(--border);
}

body.light-mode .projects-cta-section {
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.projects-cta-section .about-cta {
    border-top: none;
}

.about-cta {
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.about-cta h2 {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    color: var(--fg);
    line-height: 1.15;
}

.about-cta p {
    color: var(--fg-muted);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}

.about-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.about-cta-btns .btn-submit {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
}

/* Category Filter Bar */
.catalog-controls-wrap {
    margin-bottom: 36px;
}

.projects-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    padding: 10px 20px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--surface);
    color: var(--fg-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
}

.filter-pill:hover {
    color: var(--fg);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.filter-pill.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 700;
}

body.light-mode .filter-pill.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.filter-pill .filter-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* All Projects Grid */
.all-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.catalog-card {
    background: var(--surface);
    border-radius: 28px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.catalog-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

body.light-mode .catalog-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.catalog-card-media {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--surface-light);
}

.catalog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.catalog-card:hover .catalog-card-media img {
    opacity: 1;
    transform: scale(1.05);
}

.catalog-card-media::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.2) 0%, rgba(10, 10, 12, 0.6) 100%);
    pointer-events: none;
}

.card-badges-wrap {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.card-category-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-status-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(8px);
}

.card-status-badge.live {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.card-status-badge.archived {
    color: var(--fg-muted);
    background: rgba(150, 150, 150, 0.15);
    border: 1px solid rgba(150, 150, 150, 0.35);
}

.card-status-badge.in-dev {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.card-status-badge.coming-soon {
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.35);
}

.card-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.catalog-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.catalog-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 12px;
}

.catalog-card-desc {
    color: var(--fg-muted);
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 22px;
    flex-grow: 1;
}

.catalog-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.catalog-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--surface-light);
    color: var(--fg-muted);
    border: 1px solid var(--border);
}

.catalog-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.catalog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border-radius: 24px;
    border: 1px dashed var(--border);
}

.catalog-empty-state h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--fg);
}

.catalog-empty-state p {
    color: var(--fg-muted);
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   ENGINEERING & COLLABORATION FAQ SECTION (projects.html)
   ═══════════════════════════════════════════════════════════════════ */

.projects-faq-section {
    background-color: var(--bg);
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 100px 40px 110px 40px;
    box-sizing: border-box;
    width: 100%;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.light-mode .projects-faq-section {
    background-color: #f5f5f5;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-container-inner {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.faq-header-wrap {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 52px auto;
}

.faq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(226, 253, 91, 0.08);
    border: 1px solid rgba(226, 253, 91, 0.25);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

body.light-mode .faq-badge {
    background: rgba(142, 179, 0, 0.08);
    border-color: rgba(142, 179, 0, 0.25);
    color: #6d8800;
}

.faq-title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 18px;
    color: var(--fg);
}

.faq-subtitle {
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    line-height: 1.65;
    color: var(--fg-muted);
    margin: 0 auto;
    max-width: 640px;
}

/* FAQ Accordion List */
.faq-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

body.light-mode .faq-item {
    background: #ffffff;
    border-color: var(--border);
}

.faq-item:hover {
    border-color: rgba(226, 253, 91, 0.35);
    transform: translateY(-2px);
}

body.light-mode .faq-item:hover {
    border-color: rgba(142, 179, 0, 0.35);
    transform: translateY(-2px);
}

.faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode .faq-item[open] {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.faq-summary {
    padding: 24px 28px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    user-select: none;
    list-style: none;
    font-family: inherit;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-question {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.45;
    letter-spacing: -0.01em;
    transition: var(--transition-smooth);
}

.faq-item[open] .faq-question {
    color: var(--accent);
}

body.light-mode .faq-item[open] .faq-question {
    color: #6d8800;
}

.faq-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-muted);
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.faq-item:hover .faq-icon {
    color: var(--fg);
}

.faq-item[open] .faq-icon {
    background: var(--accent);
    color: var(--bg);
    transform: rotate(45deg);
}

body.light-mode .faq-item[open] .faq-icon {
    color: #ffffff;
}

.faq-content {
    padding: 0 28px 26px 28px;
}

.faq-answer {
    color: var(--fg-muted);
    font-size: 0.98rem;
    line-height: 1.75;
    margin: 0;
}

/* FAQ Bottom Action Prompt */
.faq-bottom-note {
    margin-top: 44px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.faq-bottom-note p {
    font-size: 0.95rem;
    color: var(--fg-muted);
    margin: 0;
}

.faq-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.faq-contact-link:hover {
    transform: translateX(4px);
    opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════
   PROJECTS PAGE FOOTER (ALTERNATING WITH WHITE FAQ SECTION)
   ═══════════════════════════════════════════════════════════════════ */
.projects-footer {
    background-color: var(--surface-light);
    border-top: 1px solid var(--border);
}

body.light-mode .projects-footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .projects-catalog-section {
        padding-top: 110px;
        padding-bottom: 60px;
    }

    /* FAQ Section Mobile — Enforce 20px side margins so cards and text never touch the screen */
    .projects-faq-section {
        padding: 56px 20px 64px 20px;
        box-sizing: border-box;
        width: 100%;
    }

    .faq-container-inner {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .faq-header-wrap {
        margin-bottom: 28px;
        width: 100%;
        padding: 0 4px;
        box-sizing: border-box;
    }

    .faq-title {
        font-size: clamp(1.8rem, 6vw, 2.3rem);
        line-height: 1.2;
        margin-bottom: 12px;
    }

    .faq-subtitle {
        font-size: 0.92rem;
        line-height: 1.55;
        padding: 0 4px;
        box-sizing: border-box;
    }

    .faq-accordion-list {
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .faq-item {
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .faq-summary {
        padding: 18px 16px;
        gap: 12px;
        min-height: 48px;
        box-sizing: border-box;
    }

    .faq-question {
        font-size: 0.96rem;
        line-height: 1.4;
    }

    .faq-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .faq-icon svg {
        width: 18px;
        height: 18px;
    }

    .faq-content {
        padding: 0 16px 20px 16px;
        box-sizing: border-box;
    }

    .faq-answer {
        font-size: 0.9rem;
        line-height: 1.65;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .faq-bottom-note {
        margin-top: 32px;
        flex-direction: column;
        gap: 8px;
        box-sizing: border-box;
    }

    .faq-bottom-note p {
        font-size: 0.88rem;
    }

    .faq-contact-link {
        font-size: 0.9rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .all-projects-grid {
        grid-template-columns: 1fr;
    }

    .catalog-card-media {
        height: 200px;
    }

    .catalog-card-body {
        padding: 24px 20px;
    }

    .about-cta {
        padding: 60px 0;
    }

    .about-cta h2 {
        font-size: 2.2rem;
    }

    .about-cta-btns {
        flex-direction: column;
        width: 100%;
    }

    .about-cta-btns .btn-submit,
    .about-cta-btns .btn-outline-hover {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FAQ SECTION MICRO-DEVICES (≤480px & 320px STRESS-TEST COMPLIANCE)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .projects-faq-section {
        padding: 44px 16px 52px 16px;
        box-sizing: border-box;
    }

    .faq-header-wrap {
        margin-bottom: 22px;
        padding: 0;
    }

    .faq-title {
        font-size: clamp(1.55rem, 6.5vw, 1.85rem);
        line-height: 1.22;
        margin-bottom: 10px;
    }

    .faq-subtitle {
        font-size: 0.86rem;
        line-height: 1.5;
        padding: 0;
    }

    .faq-item {
        border-radius: 14px;
    }

    .faq-summary {
        padding: 15px 14px;
        gap: 10px;
        min-height: 48px;
    }

    .faq-question {
        font-size: 0.92rem;
        line-height: 1.38;
    }

    .faq-icon {
        width: 28px;
        height: 28px;
    }

    .faq-icon svg {
        width: 15px;
        height: 15px;
    }

    .faq-content {
        padding: 0 14px 16px 14px;
    }

    .faq-answer {
        font-size: 0.85rem;
        line-height: 1.55;
    }

    .faq-bottom-note {
        margin-top: 24px;
    }

    .faq-bottom-note p {
        font-size: 0.84rem;
    }

    .faq-contact-link {
        font-size: 0.86rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   CORE ENGINEERING PRINCIPLES SECTION (about.html)
   ═══════════════════════════════════════════════════════════════════ */

.about-principles-section {
    background-color: var(--bg);
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 100px 40px 110px 40px;
    box-sizing: border-box;
    width: 100%;
    border-top: 1px solid var(--border);
}

body.light-mode .about-principles-section {
    background-color: #f5f5f5;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.principles-header-wrap {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px auto;
}

.principles-heading {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 18px;
    color: var(--fg);
}

.principles-subtitle {
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    line-height: 1.65;
    color: var(--fg-muted);
    margin: 0 auto;
    max-width: 640px;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.principle-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 38px 34px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

body.light-mode .principle-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
}

.principle-card:hover {
    border-color: rgba(226, 253, 91, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

body.light-mode .principle-card:hover {
    border-color: rgba(87, 172, 1, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.principle-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.principle-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
}

body.light-mode .principle-num {
    color: #57ac01;
}

.principle-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

body.light-mode .principle-tag {
    background: #f2f2f7;
    color: var(--fg-muted);
    border-color: rgba(0, 0, 0, 0.06);
}

.principle-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.principle-card p {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--fg-muted);
    margin: 0;
}

@media (max-width: 900px) {
    .principles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .about-principles-section {
        padding: 60px 20px 70px 20px;
    }

    .principles-header-wrap {
        margin-bottom: 36px;
    }

    .principles-heading {
        font-size: clamp(1.8rem, 6vw, 2.3rem);
    }

    .principle-card {
        padding: 26px 22px;
        border-radius: 18px;
    }

    .principle-card h3 {
        font-size: 1.2rem;
    }

    .principle-card p {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .about-principles-section {
        padding: 48px 16px 56px 16px;
    }

    .principle-card {
        padding: 22px 18px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   UNIVERSAL MOBILE AUTO-ZOOM PREVENTION PROTOCOL (iOS / Android)
   Prevents mobile Safari and mobile WebViews from auto-zooming
   the viewport when any input, textarea, or select field is focused.
   ═══════════════════════════════════════════════════════════════════ */
input,
textarea,
select {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
}

@media screen and (max-width: 768px) {
    input,
    textarea,
    select,
    .input-group input,
    .input-group textarea,
    .admin-form-group input,
    .admin-form-group textarea,
    .admin-form-group select,
    .admin-pin-form input,
    .add-skill-inline input,
    .story-p-input,
    .srv-icon-input,
    .srv-title-input,
    .srv-desc-input,
    #admin-pin-input,
    #current-pin-input,
    #new-pin-input,
    #confirm-pin-input,
    #name,
    #email,
    #message {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100% !important;
        touch-action: manipulation;
    }
}

/* ==============================================================================
   ADMIN TRAFFIC & VISITOR ANALYTICS + SUPABASE KEEP-ALIVE STYLES
   ============================================================================== */

.analytics-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.analytics-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Supabase Keep-Alive Card */
.admin-keepalive-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.keepalive-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.keepalive-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 2s infinite ease-in-out;
}

.status-pulse-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.status-pulse-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.3);
    }
}

.keepalive-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--fg-muted);
}

.keepalive-meta strong {
    color: var(--fg);
}

.keepalive-info-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--fg-muted);
    line-height: 1.5;
}

.keepalive-info-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}

/* KPI Grid */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition-smooth);
}

.admin-kpi-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-wrap.accent-tint {
    background: rgba(109, 170, 50, 0.12);
    color: var(--accent);
}

.kpi-icon-wrap.primary-tint {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.kpi-icon-wrap.success-tint {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.kpi-icon-wrap.info-tint {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fg);
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-value.kpi-small {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: var(--fg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Analytics Breakdown Bar Lists */
.analytics-bar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.analytics-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analytics-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.analytics-bar-title {
    color: var(--fg);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 75%;
}

.analytics-bar-count {
    color: var(--fg-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.analytics-bar-track {
    width: 100%;
    height: 8px;
    background: var(--surface-light, rgba(255, 255, 255, 0.05));
    border-radius: 100px;
    overflow: hidden;
}

body.light-mode .analytics-bar-track {
    background: rgba(0, 0, 0, 0.06);
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent);
    width: var(--bar-width, 0%);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Recent Visits Feed */
.analytics-recent-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
}

.analytics-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface-light, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.82rem;
}

body.light-mode .analytics-recent-item {
    background: #f8fafc;
}

.recent-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.recent-page-label {
    font-weight: 600;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-time-label {
    font-size: 0.72rem;
    color: var(--fg-muted);
}

.recent-item-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.recent-chip {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg-muted);
    border: 1px solid var(--border);
}

body.light-mode .recent-chip {
    background: #ffffff;
}

.recent-chip.device {
    color: var(--accent);
    border-color: rgba(109, 170, 50, 0.3);
}

.empty-list-placeholder {
    color: var(--fg-muted);
    font-size: 0.88rem;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

@media screen and (max-width: 1024px) {
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
    .keepalive-status-row {
        flex-direction: column;
        align-items: stretch;
    }
    .keepalive-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}