:root {
    /* Base Palette - Defined as semantic variables */
    --color-bg: #E4E5DF;
    --color-card: #ECEEE7;
    --color-text: #2C2C2C;
    --color-text-dim: #6B6B6B;
    --color-border: rgba(0, 0, 0, 0.3);
    --color-header-gradient: #003366;
    --color-accent-blue: #003366;
    /* Unified Branding Blue */
    /* Soft light blue in light mode */
    /* Branding blue */
    --footer-bg: #EAECE4;
    /* Light footer */
    --footer-text: var(--color-text);
    --contact-text: #FFFFFF;
    /* White text for contrast on dark blue */

    /* Overlay effects */
    --overlay-bg: rgba(44, 44, 44, 0.4);
    --noise-opacity: 0.2;

    /* Accents (Shared) */
    --color-orange: #EFAD64;
    --color-lavender: #C1B4D2;
    --color-blue: #94AFC5;

    /* Spacing & Style */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);

    /* Glassmorphism Defaults */
    --glass-bg: rgba(236, 238, 231, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(12px);

    /* Transition */
    --theme-transition: background-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-theme='dark'] {
    --color-bg: #121414;
    --color-card: #1C1E1F;
    --color-text: #F0F3F3;
    --color-text-dim: #A1A5A5;
    --color-border: rgba(255, 255, 255, 0.3);
    --color-header-gradient: #0A111A;
    --color-header-gradient: #0A111A;
    --color-accent-blue: #64B5F6;
    /* Branding blue in dark mode */
    --footer-bg: #111;
    /* Dark footer */
    --footer-text: #FFFFFF;
    --contact-text: #FFFFFF;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --noise-opacity: 0.05;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(28, 30, 31, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] body {
    background-image: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--theme-transition);
    font-family: inherit;
}

body {
    background-color: var(--color-bg);
    /* Subtle noise texture */
    background-image:
        radial-gradient(var(--color-border) 0.5px, transparent 0.5px),
        linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 20px 20px, 100% 100px;
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    cursor: none;
    /* Custom cursor used */
}

/* Ensure native cursor is also hidden on interactive parts of header if custom cursor is glitchy there */
.status-panel__header,
.status-panel__header * {
    cursor: none !important;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-text);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, width 0.2s, height 0.2s;
    mix-blend-mode: difference;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
}

.custom-cursor::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-text);
    border-radius: 50%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Typography Refinement */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Dashboard Header / Status Panel */
.status-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 10;
}

/* Full Width Hero Experience */
.hero-immersive {
    width: 100%;
    height: 80vh;
    /* Increased height for better framing */
    position: relative;
    overflow: hidden;
    margin-bottom: -150px;
    /* Adjusted overlap for the taller hero */
    z-index: 0;
}

.hero-immersive__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Landscape image new.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    z-index: 1;
    /* Fallback layer */
}

.hero-immersive__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    /* Primary layer */
    opacity: 1;
    /* Fully visible */
    /* mix-blend-mode removed so it's not 'mashed' */
}

.hero-immersive__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            transparent 50%,
            var(--color-bg) 100%);
    pointer-events: none;
    z-index: 3;
}

.status-badge {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 12px;
}

/* Removed .status-panel__header and its related styles */

.hero-headline {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 100%;
    padding: 0 var(--spacing-md);
    pointer-events: none;
}

.header-marker {
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: monospace;
    z-index: 2;
}

.marker--tl {
    top: 20px;
    left: 20px;
}

.marker--tr {
    top: 20px;
    right: 20px;
}

.marker--bl {
    bottom: 20px;
    left: 20px;
}

.marker--br {
    bottom: 20px;
    right: 20px;
}

.header-status {
    z-index: 2;
    position: relative;
    color: white;
    opacity: 0.8;
}

.hero-headline h2 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.hero-headline p {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .hero-headline h2 {
        font-size: 2.2rem;
    }

    .hero-headline p {
        font-size: 1rem;
    }
}

.status-panel__dots {
    display: flex;
    gap: 8px;
    z-index: 2;
    position: relative;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot--orange {
    background: var(--color-orange);
}

.dot--lavender {
    background: var(--color-lavender);
}

.dot--blue {
    background: var(--color-blue);
}

.status-panel__content {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.status-panel__info h1 {
    font-size: 3.5rem;
    /* Larger, more impactful name */
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.skill-pills-hero {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.skill-pill {
    padding: 0.3rem 0.8rem;
    background: var(--color-accent-blue);
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
}

[data-theme='dark'] .skill-pill {
    color: #000000;
}

.status-panel__info p {
    color: var(--color-text-dim);
    font-size: 1.1rem;
    max-width: 500px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    border-left: 1px solid var(--color-border);
    padding-left: var(--spacing-md);
    align-content: start;
}

.status-badge {
    grid-column: span 2;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
}

.stat-item--featured {
    grid-column: span 2;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.stat-item--featured .metric-value-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Reduced gap */
    margin-top: 0.5rem;
}

.stat-item--featured .metric-value {
    font-size: 4.8rem;
    /* 20% bigger than 4rem */
    font-weight: 800;
    line-height: 1;
    color: var(--color-text);
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(20, 5px);
    /* Slightly smaller dots */
    grid-template-rows: repeat(3, 5px);
    gap: 3px;
    min-width: 160px;
}

.progress-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-text);
    opacity: 0.25;
    /* More visible when inactive */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-dot.active {
    opacity: 1;
    box-shadow: 0 0 8px rgba(0, 51, 102, 0.4);
    transform: scale(1.3);
}

.stat-item .label {
    font-size: 0.7rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-item .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Navigation & Controls */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-field {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 12px;
    width: 200px;
    outline: none;
    color: var(--color-text);
    transition: width 0.3s ease;
}

.search-field:focus {
    width: 300px;
    border-color: var(--color-text-dim);
}

.filter-pills {
    display: flex;
    gap: 8px;
    align-items: center;
}

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.theme-toggle:hover {
    transform: scale(1.1) translateY(-2px);
    background: var(--color-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.pill {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill.active {
    background: var(--color-text);
    color: var(--color-bg);
    /* Inverse of text/bg for high contrast */
    border-color: var(--color-text);
}

.pill:hover:not(.active) {
    background: rgba(127, 127, 127, 0.1);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        border-color 0.4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-text);
}

.project-card__visual {
    aspect-ratio: 4/5;
    background: #D1D3CA;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background-image: var(--color-header-gradient);
    opacity: 1;
}

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

.project-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 4px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid var(--color-border);
}

.meta-row .val {
    font-weight: 600;
    font-size: 12px;
}

/* Modal UI */
/* macOS Window System */
#desktop-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}

.os-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 1000px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    transition: opacity 0.3s ease, filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    filter: brightness(0.9) saturate(0.8);
    will-change: transform;
}

/* Focused Window */
.os-window--active {
    z-index: 2000;
    /* Base for active, but JS will override with incrementing values */
    filter: brightness(1) saturate(1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.os-window--dragging,
.os-window--resizing {
    transition: none !important;
    box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6) !important;
    opacity: 0.98;
    z-index: 9999 !important;
    border-color: var(--color-accent-blue);
}

.os-window--dragging {
    cursor: grabbing !important;
}

/* Resize Handles */
.os-window__handle {
    position: absolute;
    z-index: 1000;
    /* Invisible but clickable interaction zones */
    background: transparent;
}

.os-handle-t,
.os-handle-b {
    height: 12px;
    left: 12px;
    right: 12px;
}

.os-handle-l,
.os-handle-r {
    width: 12px;
    top: 12px;
    bottom: 12px;
}

.os-handle-t {
    top: -6px;
    cursor: n-resize;
}

.os-handle-b {
    bottom: -6px;
    cursor: s-resize;
}

.os-handle-l {
    left: -6px;
    cursor: w-resize;
}

.os-handle-r {
    right: -6px;
    cursor: e-resize;
}

.os-handle-tl,
.os-handle-tr,
.os-handle-bl,
.os-handle-br {
    width: 20px;
    height: 20px;
}

.os-handle-tl {
    top: -10px;
    left: -10px;
    cursor: nw-resize;
}

.os-handle-tr {
    top: -10px;
    right: -10px;
    cursor: ne-resize;
}

.os-handle-bl {
    bottom: -10px;
    left: -10px;
    cursor: sw-resize;
}

.os-handle-br {
    bottom: -10px;
    right: -10px;
    cursor: se-resize;
}

[data-theme='dark'] .os-window {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.os-window--maximized {
    transform: translate3d(0, 0, 0) !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border-radius: 0 !important;
    z-index: 9999 !important;
    margin: 0 !important;
}

/* Remove or repurpose legacy minimize if needed */
.os-window--minimized {
    display: none;
}

.os-window__header {
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.os-window__header:active {
    cursor: grabbing;
}

.os-window__controls {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.5);
}

.control-dot--close {
    background: #FF5F56;
}

.control-dot--min {
    background: #FFBD2E;
}

.control-dot--max {
    background: #27C93F;
}

.control-dot::after {
    content: '';
    opacity: 0;
    transition: opacity 0.1s ease;
}

.os-window__header:hover .control-dot::after {
    opacity: 1;
}

.control-dot--close::after {
    content: '×';
}

.control-dot--min::after {
    content: '−';
}

.control-dot--max::after {
    content: '+';
}

.os-window__title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-right: 48px;
}

.os-window__title-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 650;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.15s ease;
}

.os-window__title-btn {
    color: var(--color-text);
}

[data-theme='light'] .os-window__title-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0c1320;
}

.os-window__title-btn:hover {
    border-color: var(--color-accent-blue);
    color: var(--color-accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.os-window__chevron {
    font-size: 0.8rem;
    opacity: 0.8;
    transform: translateY(1px);
}

.os-window__dropdown {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(12, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 0.35rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 240px;
    max-height: 55vh;
    overflow-y: auto;
    z-index: 10;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme='light'] .os-window__dropdown {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.os-window__dropdown.open {
    display: flex;
}

.os-window__dropdown-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text);
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.os-window__dropdown-item:hover {
    border-color: var(--color-accent-blue);
    color: var(--color-accent-blue);
    background: rgba(255, 255, 255, 0.06);
}

[data-theme='light'] .os-window__dropdown-item {
    color: #0c1320;
}

[data-theme='light'] .os-window__dropdown-item:hover {
    background: rgba(12, 19, 32, 0.05);
    color: #0c1320;
}

.os-window__dropdown-item.active {
    background: var(--color-accent-blue);
    color: #0a0f1c;
}

[data-theme='light'] .os-window__dropdown-item.active {
    color: #ffffff;
}

.os-window__body {
    flex: 1;
    display: flex;
    /* Side-by-side layout */
    overflow: hidden;
    /* Contain columns */
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
}

.os-window__sidebar {
    width: 350px;
    flex-shrink: 0;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    /* Firefox */
}

.os-window__sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.os-window__media {
    width: 100%;
    aspect-ratio: 4/5;
    flex-shrink: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.os-window__sidebar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: saturate(1.1);
}

.os-window__meta {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.meta-item {
    margin-bottom: 0;
}

.meta-item .label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent-blue);
    margin-bottom: 0.6rem;
    font-weight: 800;
    opacity: 0.8;
}

.meta-item .val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.window-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.window-link:hover {
    background: var(--color-accent-blue);
    color: white !important;
    border-color: var(--color-accent-blue);
    transform: translateY(-1px);
}

[data-theme='light'] .os-window__main {
    scrollbar-color: var(--color-accent-blue) rgba(0, 0, 0, 0.05);
}

.os-window__main {
    flex: 1;
    overflow-y: auto;
    /* Internal scrolling! */
    padding: 3rem 4rem 6rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-blue) transparent;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: none;
}

.os-window__main::-webkit-scrollbar {
    width: 6px;
}

.os-window__main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.os-window__main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.case-study {
    max-width: 720px;
    /* Narrower for better reading line length */
    margin: 0 auto;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: none;
}

.case-study__header {
    font-size: 3.2rem;
    font-weight: 850;
    margin-bottom: 3.5rem;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--color-text);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cs-section {
    margin-bottom: 5rem;
    position: relative;
}

.cs-section__title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-accent-blue);
    margin-bottom: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    opacity: 0.9;
}

.cs-section__content {
    font-size: 1.1rem;
    line-height: 1.85;
    font-weight: 400;
    color: var(--color-text);
    opacity: 0.9;
}

.cs-section__content ul {
    list-style: none;
    padding-left: 0.5rem;
    margin: 2rem 0;
}

.cs-section__content li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1.2rem;
}

.cs-section__content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-blue);
    box-shadow: 0 0 10px var(--color-accent-blue);
}

.cs-section__content strong {
    display: block;
    margin: 2rem 0 1rem;
    color: var(--color-text);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cs-divider {
    height: 1px;
    background: linear-gradient(to right, var(--color-border), transparent);
    border: none;
    margin: 4rem 0;
    opacity: 0.5;
}

.cs-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.cs-media-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cs-media-placeholder {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    border: 1px dashed var(--color-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--color-text);
    text-align: center;
    padding: 1.2rem;
}

.cs-media-placeholder--wide {
    grid-column: span 2;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    box-shadow: none;
    max-height: 550px;
    min-height: 400px;
}

.cs-media-placeholder__label {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.cs-media-placeholder__hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

.cs-media-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    border: none;
    background: transparent;
}

.cs-caption {
    font-size: 0.95rem;
    opacity: 0.65;
    margin-top: 0.5rem;
}

.cs-carousel {
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.cs-carousel::-webkit-scrollbar {
    height: 8px;
}

.cs-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
}

.cs-carousel__track {
    display: grid;
    grid-auto-flow: column;
    gap: 1rem;
    align-items: center;
    width: max-content;
}

.cs-carousel__item {
    width: 260px;
    height: 520px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-carousel__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: transparent;
}

/* Wide landscape items (e.g., GENEFIT report pages) */
.cs-carousel__item.landscape {
    width: 360px;
    height: 240px;
}

.cs-carousel__img.landscape {
    object-fit: cover;
    border-radius: 16px;
}

.cs-media-video {
    height: 100%;
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
    border: none;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

@media (max-width: 768px) {
    .os-window {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        left: 0 !important;
        top: 0 !important;
    }

    .os-window__header {
        padding: 0 12px;
    }

    .control-dot {
        width: 18px;
        height: 18px;
    }

    .os-window__body {
        flex-direction: column;
    }

    .os-window__sidebar {
        display: none;
    }

    .os-window__main {
        padding: 1.5rem 1.25rem 3rem;
    }

    .case-study {
        max-width: 100%;
    }
}

/* Remove old modal styles */
.modal {
    display: none;
}

/* About & Contact */
.section-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.about-list {
    list-style: none;
    margin-top: 1rem;
}

.about-list li {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 1.5rem;
}

.about-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #FFFFFF;
    font-weight: 900;
}

.contact-cta {
    font-size: 3rem;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.holo-card {
    width: 100%;
    height: 320px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: transparent;
    perspective: 1200px;
    cursor: pointer;
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
}

.holo-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    transform: translateZ(20px);
    transition: transform 0.1s ease;
}

.holo-card__shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Smoother Spectral Shine */
    background: linear-gradient(115deg,
            transparent 0%,
            rgba(200, 200, 255, 0) 20%,
            rgba(180, 255, 255, 0.25) 40%,
            rgba(255, 180, 255, 0.25) 50%,
            rgba(255, 255, 180, 0.25) 60%,
            rgba(200, 200, 255, 0) 80%,
            transparent 100%);
    background-size: 250% 250%;
    /* Larger size for softer transition */
    background-position: var(--shine-x, 50%) var(--shine-y, 50%);
    mix-blend-mode: color-dodge;
    opacity: 0;
    filter: blur(4px);
    /* Soften the edges of the light */
    transition: opacity 0.5s ease;
}

/* Glitter / Sparkle foil layer */
.holo-card__glitter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    /* Softer radial light */
    background-image: radial-gradient(circle at var(--shine-x) var(--shine-y),
            rgba(255, 255, 255, 0.25) 0%,
            rgba(255, 255, 255, 0.1) 30%,
            transparent 70%);
    background-size: 100% 100%;
    mix-blend-mode: overlay;
    opacity: 0;
    filter: blur(8px);
    /* Diffuse the hot-spot */
    transition: opacity 0.5s ease;
}

.holo-card:hover .holo-card__shine,
.holo-card:hover .holo-card__glitter {
    opacity: 0.8;
    /* Slightly less intense for a smoother look */
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-panel__content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .status-panel__info {
        order: 1;
    }

    .stats-grid {
        order: 2;
        border-left: none;
        padding-left: 0;
        padding-top: var(--spacing-md);
    }
}

#contact {
    background: var(--color-accent-blue);
    color: var(--contact-text);
}

#contact .label,
#contact .contact-cta,
#contact a,
#contact div {
    color: var(--contact-text) !important;
}

.contact-links {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    gap: 1rem;
}

.contact-email {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.contact-social {
    display: flex;
    gap: 1rem;
}

.contact-social a {
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

footer {
    background: var(--footer-bg);
    margin-top: 4rem;
    padding: 4rem 2rem;
    color: var(--color-text);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    transition: var(--theme-transition);
}

footer .label {
    color: var(--color-text-dim);
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-field {
        width: 100%;
    }

    .contact-cta {
        font-size: 2.2rem;
        line-height: 1.15;
    }

    .filter-pills {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .section-card {
        padding: 1.25rem;
    }

    #about .label {
        margin-bottom: 0.75rem;
    }

    #about>div {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .about-list {
        margin-top: 0.5rem;
        padding-left: 1rem;
    }

    .holo-card {
        height: 220px;
        margin: 0;
    }

    #contact {
        border-radius: var(--radius-sm);
        padding: 1.5rem;
        text-align: left;
    }

    #contact a {
        display: inline-block;
        margin-top: 0.5rem;
    }

    #contact .contact-cta {
        font-size: 1.8rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }

    #contact a:last-of-type {
        display: block;
        margin-top: 1rem;
        text-align: left;
    }

    .contact-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-email {
        font-size: 1.3rem;
    }

    .contact-social {
        width: 100%;
    }

    #about>div {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    #about>div> :first-child {
        order: 1;
    }

    #about>div> :nth-child(2) {
        order: 2;
    }

    .about-list li {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .holo-card {
        height: 220px;
    }

    #about p {
        margin-top: 0.5rem;
    }

    .os-window__body {
        flex-direction: column;
    }

    .os-window__sidebar {
        display: none;
    }

    .os-window__main {
        padding: 1.5rem 1.25rem 3rem;
    }

    .case-study {
        max-width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}