:root {
    --bg-hero-light: #FFFFFF;
    --bg-canvas-grey: #DCDCDC;
    --bg-surface-muted: #D2D2D2;
    --bg-surface-dark: #111111;
    --bg-accent-amber: #F5B82E;
    
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #8A8A8A;
    --text-on-dark: #FFFFFF;
    --text-accent: #F5B82E;
    
    --border-dashed-dark: 1px dashed #9E9E9E;
    --border-dashed-light: 1px dashed rgba(255, 255, 255, 0.25);
    --border-solid-subtle: 1px solid rgba(17, 17, 17, 0.15);

    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-canvas-grey);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Floating Right Quick-Jump Dock */
.quick-dock {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    padding: 14px 0;
    border-radius: 9999px !important;
    background: var(--bg-accent-amber);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 900;
}
.quick-dock a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: transform 0.15s ease;
}
.quick-dock a:hover {
    transform: scale(1.2);
}
.quick-dock svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Container Layout for Inner Views */
.app-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

/* Left Editorial Sidebar */
.sidebar {
    background: var(--bg-accent-amber);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(17, 17, 17, 0.1);
    position: sticky;
    top: 0;
    height: 100vh;
}
.avatar-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    overflow: hidden;
}
.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 75%;
    filter: grayscale(100%) contrast(115%);
    display: block;
}
.side-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;
}
.nav-item {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    padding: 10px 14px;
    cursor: pointer;
    display: block;
    text-align: center;
    transition: color 0.15s ease;
    position: relative;
}
.nav-item.active {
    color: var(--text-on-dark);
}
.nav-item:hover {
    color: #000;
}
.nav-divider {
    width: 1px;
    height: 12px;
    background: rgba(17, 17, 17, 0.35);
    margin: 2px 0;
}

/* Main Canvas */
.main-canvas {
    background: var(--bg-canvas-grey);
    padding: 24px 40px 48px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
}
.canvas-container {
    width: 100%;
    max-width: 960px;
}

/* ========================================================
   HERO VIEW (50/50 ASYMMETRIC SPLIT SCREEN)
   ======================================================== */
.hero-view-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: #fff;
}
.hero-left {
    background: var(--bg-hero-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    height: 100%;
}
.hero-greeting {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.hero-title .name-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--bg-accent-amber);
    display: block;
}
.role-strip {
    display: inline-block;
    align-self: flex-start;
    background: var(--bg-accent-amber);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    margin-bottom: 20px;
}
.hero-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 440px;
}
.btn-capsule {
    display: inline-block;
    align-self: flex-start;
    background: var(--bg-accent-amber);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 22px;
    border-radius: 9999px !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-capsule:hover {
    background: #e5a720;
}
.hero-right {
    background: #111;
    position: relative;
    height: 100%;
    overflow: hidden;
}
.hero-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 65%;
    filter: grayscale(100%) contrast(115%);
    display: block;
}

/* ========================================================
   SECTION HEADER & LEAD STATEMENT
   ======================================================== */
.section-header-banner {
    width: 100%;
    padding: 14px 24px;
    border: var(--border-dashed-dark);
    margin-bottom: 24px;
    text-align: center;
}
.section-title {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.1;
}
.lead-statement {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}
.lead-statement .light { font-weight: 300; }
.lead-statement .bold { font-weight: 700; }

/* ========================================================
   ABOUT ME SECTION
   ======================================================== */
.about-grid-content {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    align-items: start;
}
.stat-matrix-2x2 {
    background: var(--bg-surface-dark);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    position: relative;
}
.stat-cell {
    padding: 24px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
.stat-cell:nth-child(1) {
    border-right: var(--border-dashed-light);
    border-bottom: var(--border-dashed-light);
}
.stat-cell:nth-child(2) {
    border-bottom: var(--border-dashed-light);
}
.stat-cell:nth-child(3) {
    border-right: var(--border-dashed-light);
}
.stat-number {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 900;
    color: var(--text-accent);
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-on-dark);
}

.services-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.service-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.service-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.service-icon-box svg {
    width: 18px;
    height: 18px;
    stroke: #111;
}
.service-info h5 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.service-info p {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================================
   RESUME / EXPERIENCE SECTION
   ======================================================== */
.resume-group-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin: 16px 0 12px;
    border-bottom: 1px solid rgba(17,17,17,0.2);
    padding-bottom: 4px;
}
.resume-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.resume-card {
    background: #E5E5E5;
    padding: 16px;
    border: 1px solid #CACACA;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.period-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--bg-accent-amber);
    color: var(--text-primary);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.resume-role {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.resume-org {
    font-size: 10px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.resume-desc {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.resume-desc ul {
    padding-left: 14px;
    margin-top: 4px;
}
.resume-desc li {
    margin-bottom: 2px;
}

/* ========================================================
   PORTFOLIO SECTION
   ======================================================== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    background: transparent;
    border: none;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    padding-bottom: 3px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.filter-btn.active, .filter-btn:hover {
    color: var(--text-primary);
    border-bottom: 2px solid var(--bg-accent-amber);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.project-card {
    background: #fff;
    border: 1px solid #CCC;
    display: flex;
    flex-direction: column;
}
.project-thumb {
    width: 100%;
    height: 140px;
    background: #222;
    overflow: hidden;
}
.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.project-cat {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #c9880e;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.project-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}
.project-desc {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
}
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 8px;
}
.tag-pill {
    font-size: 8px;
    font-weight: 600;
    background: #EFEFEF;
    padding: 2px 6px;
    color: #444;
    margin-right: 4px;
}
.project-link {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
}
.project-link:hover {
    color: #c9880e;
}

/* ========================================================
   CONTACT SECTION
   ======================================================== */
.contact-content {
    margin: 20px 0 32px;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.contact-item-box {
    background: #E5E5E5;
    border: 1px solid #CCC;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.contact-icon-box {
    width: 42px;
    height: 42px;
    border: 1.25px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
}
.contact-icon-box img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: grayscale(100%);
}
.contact-details h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.contact-details a, .contact-details span {
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
}
.contact-details a:hover {
    color: #000;
    text-decoration: underline;
}
.sign-off-banner {
    text-align: center;
    padding: 20px 0;
    border-top: 1px dashed #9E9E9E;
    margin-top: 20px;
}
.sign-off-text {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

/* ========================================================
   RESPONSIVE MOBILE BREAKPOINTS
   ======================================================== */
@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-right: none;
        border-bottom: 2px solid #111;
        position: static;
        height: auto;
    }
    .avatar-box {
        display: none;
    }
    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 4px;
    }
    .nav-divider {
        display: none;
    }
    .nav-item {
        padding: 6px 10px;
        font-size: 10px;
    }
    .main-canvas {
        padding: 16px 14px 48px;
        display: block;
    }
    .canvas-container {
        max-width: 100%;
    }
    .section-header-banner {
        margin-bottom: 16px;
        padding: 10px 16px;
    }
    .section-title {
        font-size: 26px;
    }
    .portfolio-filters {
        gap: 8px;
        margin-bottom: 16px;
    }
    .hero-view-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .hero-right {
        height: 340px;
    }
    .hero-right img {
        object-position: center 65%;
    }
    .hero-left {
        padding: 32px 20px;
    }
    .hero-title {
        font-size: 34px;
    }
    .about-grid-content {
        grid-template-columns: 1fr;
    }
    .resume-grid-3 {
        grid-template-columns: 1fr;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .quick-dock {
        display: none;
    }
}


/* ========================================================
   INTERACTIVE & TRANSITION ENHANCEMENTS (JS-POWERED)
   ======================================================== */

/* Native View Transitions API (Modern Chromium & Safari 18+) */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.2s;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

::view-transition-old(root) {
    animation-name: pageFadeOut;
}

::view-transition-new(root) {
    animation-name: pageFadeIn;
}

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

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fallback Transitions for browsers without View Transitions */
.page-transitioning-out {
    opacity: 0 !important;
    transform: translateY(6px) !important;
    transition: opacity 0.16s cubic-bezier(0.4, 0, 0.2, 1), transform 0.16s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.page-transitioning-in {
    opacity: 0 !important;
    transform: translateY(-6px) !important;
}

.canvas-container {
    transition: opacity 0.18s cubic-bezier(0.2, 0, 0, 1), transform 0.18s cubic-bezier(0.2, 0, 0, 1);
    will-change: opacity, transform;
}

/* Card Hover Micro-Interactions */
.project-card {
    transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.22s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease;
    will-change: transform, opacity;
    cursor: pointer;
}
.project-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Filter Animations (Class-based, no inline style conflict) */
.project-card.is-filtered-out {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.project-card.is-filtering-out {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.project-card.is-filtering-in {
    animation: cardReveal 0.24s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.resume-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.resume-card:hover {
    transform: translateY(-2px);
    border-color: #888;
}

.contact-item-box {
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.15s ease;
}
.contact-item-box:hover {
    transform: translateY(-2px);
    border-color: #666;
    background: #DDDDDD;
}

/* Project Detail Modal */
#project-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#project-modal.is-open {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.modal-content {
    position: relative;
    background: #FFFFFF;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #111111;
    z-index: 10;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.22s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #E5E5E5;
    background: #FAFAFA;
}
.modal-category {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #c9880e;
    text-transform: uppercase;
}
.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    color: #111;
    padding: 4px 8px;
    line-height: 1;
}
.modal-close-btn:hover {
    color: #e5a720;
}
.modal-image-wrap {
    width: 100%;
    height: 220px;
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.modal-body {
    padding: 20px;
}
.modal-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.25;
}
.modal-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #EEE;
    padding-top: 14px;
}
.modal-link-btn {
    display: inline-block;
    background: var(--bg-accent-amber);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 9999px !important;
    transition: background 0.15s ease;
}
.modal-link-btn:hover {
    background: #e5a720;
}

/* Floating Toast Notification */
.app-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #111111;
    color: #FFFFFF;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1100;
    border-left: 3px solid var(--bg-accent-amber);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.24s cubic-bezier(0.2, 0, 0, 1), opacity 0.24s ease;
    pointer-events: none;
}
.app-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.toast-icon {
    color: var(--bg-accent-amber);
    font-weight: 900;
    font-size: 13px;
}

/* Quick Dock active state */
.quick-dock a {
    transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), background 0.18s ease, color 0.18s ease;
}
.quick-dock a.active {
    background: #111111;
    color: var(--bg-accent-amber);
    border-radius: 50% !important;
}
