/* ═══════════════════════════════════════════════════════════════
    RSHI - Elegant ASCII Landing Page
    Sharp, Edgy, Minimal Design
    ═══════════════════════════════════════════════════════════════ */

/* CSS Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility: hide element and remove from layout */
.hidden {
    display: none !important;
}

.user-hidden,
body.shader-mode-active #scrolling-banner.user-hidden,
body.shader-mode-active #brand-container.user-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.5s ease !important;
}

:root {
    /* Sharp monochromatic palette */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --ascii-dim: #151515;
    --ascii-mid: #252525;
    --ascii-bright: #353535;
    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --accent: #ffffff;
    --loading-bg: #000000;
    --glow-color: rgba(120, 120, 120, 0.3);

    /* Typography */
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    --font-display: 'Segoe UI', 'Arial', sans-serif;
}

/* Extended theme variant */

body.diary-mode {
    --bg-primary: #0a1f0a;
    --bg-secondary: #0d2b0d;
    --ascii-dim: #1a3a1a;
    --ascii-mid: #2a5a2a;
    --ascii-bright: #3a7a3a;
    --text-primary: #90ee90;
    --text-secondary: #6b8e6b;
    --accent: #228b22;
    --glow-color: rgba(34, 139, 34, 0.4);
}

/* Diary Mode Container */
#diary-mode-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* Diary Taskbar */
#diary-taskbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: rgba(10, 31, 10, 0.95);
    border-right: 1px solid #228b22;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
    z-index: 10001;
}

#diary-taskbar-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 5px;
}

.diary-taskbar-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 139, 34, 0.3);
    border: 1px solid #228b22;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.diary-taskbar-item:hover {
    background: rgba(34, 139, 34, 0.6);
}

.diary-taskbar-item.minimized {
    opacity: 0.5;
}

#diary-exit-btn {
    width: 40px;
    height: 40px;
    margin: 10px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 34, 34, 0.3);
    border: 1px solid #8b2222;
    border-radius: 4px;
    cursor: pointer;
    color: #ff6347;
    font-size: 18px;
    transition: all 0.2s ease;
}

#diary-exit-btn:hover {
    background: rgba(139, 34, 34, 0.6);
}

/* Settings Button */
#diary-settings-btn {
    width: 40px;
    height: 40px;
    margin: 10px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 139, 34, 0.3);
    border: 1px solid #228b22;
    border-radius: 4px;
    cursor: pointer;
    color: #90ee90;
    font-size: 18px;
    transition: all 0.2s ease;
}

#diary-settings-btn:hover {
    background: rgba(34, 139, 34, 0.6);
}

/* Settings Window */
#diary-settings-window {
    position: fixed;
    left: 60px;
    top: 10px;
    width: 200px;
    background: rgba(10, 31, 10, 0.98);
    border: 1px solid #228b22;
    z-index: 10002;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

#diary-settings-window.diary-settings-hidden {
    display: none;
}

.diary-settings-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, #1a3a1a 0%, #0d2b0d 100%);
    border-bottom: 1px solid #228b22;
}

.diary-settings-titlebar span {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #90ee90;
}

.diary-settings-close {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(144, 238, 144, 0.3);
    background: transparent;
    color: #90ee90;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diary-settings-close:hover {
    background: rgba(139, 34, 34, 0.5);
    border-color: #ff6347;
}

.diary-settings-content {
    padding: 10px;
}

.diary-settings-hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.diary-pattern-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.diary-pattern-item {
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #90ee90;
    background: rgba(13, 43, 13, 0.5);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.diary-pattern-item:hover {
    background: #228b22;
    color: #0a1f0a;
}

.diary-pattern-item.selected {
    border-color: #90ee90;
    background: rgba(34, 139, 34, 0.4);
}

.diary-pattern-item.diary-exclusive {
    border-left: 3px solid #228b22;
    font-style: italic;
}

/* Diary Desktop */
#diary-desktop {
    position: fixed;
    top: 0;
    left: 50px;
    width: calc(100% - 50px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Diary Toolbar */
#diary-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(10, 31, 10, 0.9);
    border-bottom: 1px solid rgba(34, 139, 34, 0.3);
    flex-shrink: 0;
}

.diary-toolbar-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Custom Dropdown */
.diary-dropdown {
    position: relative;
    min-width: 130px;
    user-select: none;
}

.diary-dropdown-selected {
    padding: 8px 30px 8px 12px;
    background: #0a1f0a;
    border: 1px solid #228b22;
    color: #90ee90;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    position: relative;
}

.diary-dropdown-selected::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: #228b22;
}

.diary-dropdown-selected:hover {
    background: rgba(34, 139, 34, 0.2);
}

.diary-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a1f0a;
    border: 1px solid #228b22;
    border-top: none;
    z-index: 10003;
    max-height: 200px;
    overflow-y: auto;
}

.diary-dropdown-options.open {
    display: block;
}

.diary-dropdown-option {
    padding: 8px 12px;
    color: #90ee90;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.diary-dropdown-option:hover {
    background: #228b22;
    color: #0a1f0a;
}

/* Diary Posts Scroll Container */
#diary-posts-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

#diary-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.diary-post-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(13, 43, 13, 0.5);
    border: 1px solid rgba(34, 139, 34, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diary-post-item:hover {
    background: rgba(34, 139, 34, 0.3);
    border-color: #228b22;
    transform: translateY(-2px);
}

.diary-post-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.diary-post-title {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 5px;
}

.diary-post-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    min-height: 16px;
}

.diary-post-size {
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(144, 238, 144, 0.5);
    text-align: center;
    margin-top: 5px;
}

.diary-post-title.encrypted,
.diary-post-date.encrypted {
    color: #228b22;
    text-shadow: 0 0 8px rgba(34, 139, 34, 0.6);
    letter-spacing: 1px;
}

/* Diary Windows */
.diary-window {
    position: fixed;
    min-width: 400px;
    min-height: 300px;
    max-width: 90%;
    max-height: 90%;
    background: rgba(10, 31, 10, 0.98);
    border: 1px solid #228b22;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.diary-window-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, #1a3a1a 0%, #0d2b0d 100%);
    border-bottom: 1px solid #228b22;
    cursor: move;
    user-select: none;
}

.diary-window-title {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.diary-window-controls {
    display: flex;
    gap: 5px;
}

.diary-win-btn {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(144, 238, 144, 0.3);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.diary-win-btn:hover {
    background: rgba(34, 139, 34, 0.5);
}

.diary-win-close:hover {
    background: rgba(139, 34, 34, 0.5);
    border-color: #ff6347;
}

.diary-window-content {
    padding: 20px;
    overflow: auto;
    flex: 1;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.8;
}

.diary-window-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(34, 139, 34, 0.3);
}

.diary-window-body h2 {
    color: #90ee90;
    margin-bottom: 15px;
}

.diary-window-body p {
    margin-bottom: 15px;
}

.diary-window-body hr {
    border: none;
    border-top: 1px solid rgba(34, 139, 34, 0.3);
    margin: 20px 0;
}

/* Diary Password Modal */
#diary-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

#diary-password-modal.diary-modal-hidden {
    display: none;
}

#diary-password-content {
    background: #0d2b0d;
    border: 1px solid #228b22;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

#diary-password-content h3 {
    font-family: var(--font-mono);
    font-size: 18px;
    color: #90ee90;
    margin-bottom: 10px;
}

#diary-password-content p {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #6b8e6b;
    margin-bottom: 20px;
}

#diary-password-input {
    width: 100%;
    padding: 12px;
    background: #0a1f0a;
    border: 1px solid #228b22;
    color: #90ee90;
    font-family: var(--font-mono);
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
}

#diary-password-input::placeholder {
    color: #6b8e6b;
}

#diary-password-error {
    display: none;
    color: #ff6347;
    font-family: var(--font-mono);
    font-size: 12px;
    margin-bottom: 15px;
}

#diary-password-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#diary-password-buttons button {
    padding: 10px 25px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #228b22;
    background: transparent;
    color: #90ee90;
    transition: all 0.2s ease;
}

#diary-password-buttons button:hover {
    background: rgba(34, 139, 34, 0.3);
}

#diary-password-cancel {
    border-color: #6b8e6b !important;
    color: #6b8e6b !important;
}

#diary-password-cancel:hover {
    background: rgba(107, 142, 107, 0.2) !important;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: var(--bg-primary);
    font-family: var(--font-display);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING OVERLAY - Hard blur, impenetrable
   ═══════════════════════════════════════════════════════════════ */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

#loading-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loading-bg);
    /* opacity bg is solid - backdrop-filter here is invisible and was wasted GPU */
}

#loading-content {
    position: relative;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#loading-text {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 1;
}

#loading-line {
    width: 0;
    height: 1px;
    background: var(--accent);
    animation: loadLineExpand 0.4s ease-out 0.2s forwards;
}

@keyframes loadTextReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loadLineExpand {
    0% {
        width: 0;
    }

    100% {
        width: 120px;
    }
}

#loading-overlay.fade-out {
    animation: overlayFadeOut 0.6s ease-in-out forwards;
}

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

    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ASCII CANVAS
   ═══════════════════════════════════════════════════════════════ */

#ascii-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    transition: opacity 1s ease;
}

#shader-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    /* Behind ASCII (z-index 1) */
    opacity: 0;
    /* Hidden by default */
    transition: opacity 1s ease;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   BRAND TEXT - Sharp floating animation with scroll states
   ═══════════════════════════════════════════════════════════════ */

#brand-container {
    position: fixed;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Centered state (default) */
#brand-container:not(.minimized) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Minimized state - bottom right, smaller */
#brand-container.minimized {
    top: auto;
    bottom: 20px;
    left: auto;
    right: 24px;
    transform: translate(0, 0) scale(0.5);
    transform-origin: right bottom;
    opacity: 1;
}

/* Fade out during transition */
#brand-container.transitioning {
    opacity: 0 !important;
}

#brand-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text-primary);
    white-space: nowrap;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

/* Floating animation only when centered */
#brand-container:not(.minimized) #brand-text {
    animation: floatSharp 6s ease-in-out infinite;
}

#brand-container.minimized #brand-text {
    animation: none;
}

#copyright {
    font-size: 14px;
    vertical-align: middle;
    opacity: 0.7;
}

@keyframes floatSharp {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(8px);
    }
}

/* Bottom bar container for minimized brand */
#brand-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95), transparent);
    z-index: 99;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#brand-bar.visible {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL INDICATOR
   ═══════════════════════════════════════════════════════════════ */

#scroll-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 5s ease-out;
}

#scroll-indicator.visible {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

#scroll-indicator.fading {
    opacity: 0;
    transition: opacity 5s ease-out;
}

.scroll-arrow {
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--text-secondary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#scroll-indicator.animating .scroll-arrow {
    animation: scrollBounce 1.5s ease-in-out;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    20% {
        transform: translateY(10px);
        opacity: 1;
    }

    40% {
        transform: translateY(0);
        opacity: 0.7;
    }

    60% {
        transform: translateY(10px);
        opacity: 1;
    }

    80% {
        transform: translateY(0);
        opacity: 0.7;
    }
}

/* ═══════════════════════════════════════════════════════════════
   GEO BLOCK SCREEN
   ═══════════════════════════════════════════════════════════════ */

#geo-block {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#geo-block-content {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   SHARP DESIGN UTILITIES
   ═══════════════════════════════════════════════════════════════ */

/* No border-radius anywhere - sharp edges only */
* {
    border-radius: 0 !important;
}

/* Disable all smooth scrolling for sharp feel */
html {
    scroll-behavior: auto;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLING BANNER - Curved SVG Marquee
   ═══════════════════════════════════════════════════════════════ */

#scrolling-banner {
    position: fixed;
    bottom: 12%;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    pointer-events: auto;
    user-select: none;
    z-index: 1000;
    opacity: 0;
    animation: bannerFadeIn 1s ease-out 2s forwards;
}

@keyframes bannerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scrolling-banner-svg {
    width: 100%;
    height: 100%;
}

.scrolling-banner-text {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Twemoji adjustments */
img.emoji,
svg.emoji {
    height: 1.25em;
    width: 1.25em;
    margin: 0 .1em;
    vertical-align: -0.25em;
    opacity: 1 !important;
    /* Force visibility */
    display: inline-block !important;
    /* Ensure display */
}

/* ═══════════════════════════════════════════════════════════════

/* ═══════════════════════════════════════════════════════════════
   GLITCH TEXT EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.glitch-text-content {
    position: relative;
    z-index: 1;
}

.glitch-cursor {
    animation: cursorBlink 500ms linear infinite alternate;
    color: var(--accent);
}

@keyframes cursorBlink {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Glitch elements with password protection - make children pass-through */
#glitch-ai,
#glitch-github,
#glitch-linkedin {
    cursor: pointer;
    /* Prevent layout shift from varying character heights */
    display: inline-block;
    min-height: 1.5em;
    line-height: 1.5;
    vertical-align: middle;
    overflow: hidden;
}

#glitch-ai *,
#glitch-github *,
#glitch-linkedin * {
    pointer-events: none;
}

.glitch-r {
    color: #ff0000;
    opacity: 0.5;
}

.glitch-g {
    color: #00ff00;
    opacity: 0.5;
}

/* Glitch animation for chromatic effect */
@keyframes glitchShift {

    0%,
    100% {
        transform: translate(0);
        opacity: 0;
    }

    20% {
        transform: translate(-2px, 1px);
        opacity: 0.5;
    }

    40% {
        transform: translate(2px, -1px);
        opacity: 0.3;
    }

    60% {
        transform: translate(-1px, 2px);
        opacity: 0.5;
    }

    80% {
        transform: translate(1px, -2px);
        opacity: 0.3;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO SECTIONS
   ═══════════════════════════════════════════════════════════════ */

#portfolio-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120vh 40px 250px 40px;
    /* Start well below visible area */
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#portfolio-content.visible {
    opacity: 1;
}

.portfolio-section {
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(30px);
    animation: sectionFadeIn 0.8s ease-out forwards;
}

.portfolio-section:nth-child(1) {
    animation-delay: 0.1s;
}

/* Text Reveal Effect */
.reveal-text {
    opacity: 0;
}

.reveal-text.visible {
    opacity: 1;
}

.portfolio-section:nth-child(2) {
    animation-delay: 0.2s;
}

.portfolio-section:nth-child(3) {
    animation-delay: 0.3s;
}

.portfolio-section:nth-child(4) {
    animation-delay: 0.4s;
}

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

.section-header {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 40px;
    padding-bottom: 16px;
    padding-left: 14px;
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
    border-left: 2px solid rgba(80, 80, 80, 0.5);
    position: relative;
}

.section-header::before {
    content: '// ';
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 400;
    color: rgba(65, 65, 65, 0.7);
    letter-spacing: 0;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM CARDS
   ═══════════════════════════════════════════════════════════════ */

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

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

.card-media {
    width: calc(100% + 64px);
    margin: -32px -32px 24px -32px;
    aspect-ratio: 16 / 9;
    background: rgba(20, 20, 20, 0.5);
    border-bottom: 1px solid rgba(60, 60, 60, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 10000;
}

.card-media img,
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-media img,
.card:hover .card-media video {
    transform: scale(1.05);
}

.media-placeholder {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

.card {
    background: rgba(12, 12, 12, 0.97);
    border: 1px solid rgba(60, 60, 60, 0.4);
    border-radius: 4px;
    padding: 32px;
    /* backdrop-filter removed: perf */
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
    contain: layout style;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(180, 180, 180, 0.45), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Corner bracket accent */
.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-bottom: 1px solid rgba(60, 60, 60, 0.5);
    border-right: 1px solid rgba(60, 60, 60, 0.5);
    pointer-events: none;
    transition: border-color 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.card:hover {
    border-color: rgba(100, 100, 100, 0.65);
    transform: translateY(-6px);
    box-shadow:
        0 28px 56px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(80, 80, 80, 0.12),
        inset 0 1px 0 rgba(60, 60, 60, 0.08);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    width: 28px;
    height: 28px;
    border-color: rgba(100, 100, 100, 0.6);
}

.card-icon {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    color: rgba(60, 60, 60, 0.6);
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.card-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card-text {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid rgba(60, 60, 60, 0.3);
    padding: 4px 10px;
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   SKILLS SECTION
   ═══════════════════════════════════════════════════════════════ */

.skills-card {
    padding: 40px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-pill {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(70, 70, 70, 0.4);
    padding: 10px 20px;
    border-radius: 3px;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-pill:hover {
    background: rgba(55, 55, 55, 0.85);
    border-color: rgba(110, 110, 110, 0.6);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════════ */

.contact-card {
    padding: 40px;
}

#contact.portfolio-section {
    margin-bottom: 0;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(40, 40, 40, 0.4);
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-link:hover {
    padding-left: 14px;
    border-color: rgba(90, 90, 90, 0.6);
}

.contact-link:hover .contact-label {
    color: var(--text-primary);
    letter-spacing: 4px;
    transition: all 0.2s ease;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.contact-value {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.contact-link:hover .contact-value {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT SHOWCASE
   ═══════════════════════════════════════════════════════════════ */

.project-showcase-grid {
    gap: 20px;
}

.showcase-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}

.project-video-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(90, 90, 90, 0.5);
    background: rgba(25, 25, 25, 0.75);
    padding: 8px 12px;
    width: fit-content;
    transition: all 0.2s ease;
}

.project-video-link:hover {
    border-color: rgba(150, 150, 150, 0.7);
    background: rgba(40, 40, 40, 0.95);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

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

    #brand-text {
        font-size: 16px;
        letter-spacing: 6px;
    }
}

@media (max-width: 768px) {
    #portfolio-content {
        padding: 100vh 20px 150px 20px;
    }

    .card-grid,
    .card-grid-3 {
        grid-template-columns: 1fr;
    }

    .portfolio-section {
        margin-bottom: 80px;
    }

    #brand-text {
        font-size: 14px;
        letter-spacing: 4px;
    }

    #scrolling-banner {
        bottom: 8%;
        height: 80px;
    }

    .scrolling-banner-text {
        font-size: 30px !important;
    }

    #brand-container.minimized {
        right: 16px;
        bottom: 16px;
        transform: scale(0.6);
    }

    .card {
        padding: 24px;
    }

    .section-header {
        font-size: 10px;
        letter-spacing: 4px;
        margin-bottom: 30px;
    }
}

/* Fix for very small screens */
@media (max-width: 480px) {
    #brand-text {
        font-size: 12px;
        letter-spacing: 3px;
    }

    .contact-value {
        font-size: 11px;
    }

    .skill-pill {
        font-size: 10px;
        padding: 8px 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   VISUAL MODE CONTROLS
   ═══════════════════════════════════════════════════════════════ */

#visual-mode-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

#mode-toggle-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    opacity: 0.4;
    border-radius: 2px;
}

#mode-toggle-btn:hover {
    opacity: 1;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Minimized visual controls state via long press */
#visual-mode-controls.minimized-controls #shader-selector-container {
    display: none !important;
}

#visual-mode-controls.minimized-controls #mode-toggle-btn {
    opacity: 0.2;
    border-color: transparent !important;
}

#visual-mode-controls.minimized-controls #mode-toggle-btn:hover {
    opacity: 0.5;
}

#shader-dropdown {
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#shader-dropdown:hover {
    border-color: var(--accent);
}

/* Shader Mode active overrides */
body.shader-mode-active #scrolling-banner {
    opacity: 0.95 !important;
    bottom: 5% !important;
}

body.shader-mode-active #brand-container {
    top: auto !important;
    bottom: 24px !important;
    left: auto !important;
    right: 32px !important;
    transform: translate(0, 0) scale(0.65) !important;
    transform-origin: bottom right;
    pointer-events: auto;
    opacity: 1 !important;
}

body.shader-mode-active #brand-container #brand-text {
    animation: none !important;
    letter-spacing: 4px !important;
}

/* Shader Credits */
#shader-credits {
    position: fixed;
    bottom: 24px;
    left: 32px;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    letter-spacing: 2px;
    text-transform: lowercase;
}

body.shader-mode-active #shader-credits {
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════
   SCANLINE OVERLAY - subtle CRT aesthetic
   ═══════════════════════════════════════════════════════════════ */

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    z-index: 9999;
    will-change: auto;
}

body.cute-theme::after {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 182, 193, 0.03) 2px,
        rgba(255, 182, 193, 0.03) 4px
    );
}

/* ═══════════════════════════════════════════════════════════════
   SECTION PERFORMANCE CONTAINMENT
   ═══════════════════════════════════════════════════════════════ */

.portfolio-section {
    contain: layout style;
}

/* ═══════════════════════════════════════════════════════════════
   TAG ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════ */

.tag {
    transition: border-color 0.2s ease, color 0.2s ease;
}

.tag:hover {
    border-color: rgba(100, 100, 100, 0.5);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   CARD ICON ENHANCEMENT
   ═══════════════════════════════════════════════════════════════ */

.card-icon {
    transition: color 0.25s ease;
}

.card:hover .card-icon {
    color: rgba(100, 100, 100, 0.9);
}

/* ═══════════════════════════════════════════════════════════════
   BRAND TEXT ENHANCEMENT
   ═══════════════════════════════════════════════════════════════ */

#brand-text {
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.06), 0 0 120px rgba(255, 255, 255, 0.03);
}

/* ═══════════════════════════════════════════════════════════════
   MINIGAME OVERLAY
   ═══════════════════════════════════════════════════════════════ */

#minigame-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#minigame-overlay.mg-visible {
    opacity: 1;
    pointer-events: all;
}

#minigame-overlay.mg-hidden {
    opacity: 0;
    pointer-events: none;
}

#minigame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    border: 1px solid #333;
    background: #020202;
    box-shadow: 0 0 0 1px #111, 0 40px 80px rgba(0, 0, 0, 0.8);
    max-width: 95vw;
}

#minigame-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid #1a1a1a;
    background: #060606;
    gap: 20px;
}

#minigame-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: #666;
    text-transform: uppercase;
    white-space: nowrap;
}

#minigame-score {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: #e8e8e8;
    text-transform: uppercase;
    flex: 1;
    text-align: center;
}

#minigame-hiscore {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: #555;
    text-transform: uppercase;
    text-align: center;
    margin-top: 0;
}

#minigame-close {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    font-size: 13px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-family: var(--font-mono);
    padding: 0;
}

#minigame-close:hover {
    background: rgba(180, 40, 40, 0.3);
    border-color: #aa3333;
    color: #e8e8e8;
}

#minigame-canvas {
    display: block;
    image-rendering: pixelated;
}

#minigame-controls {
    width: 100%;
    text-align: center;
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    border-top: 1px solid #1a1a1a;
    background: #060606;
}

/* Mobile D-pad */
#minigame-dpad {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    border-top: 1px solid #1a1a1a;
    width: 100%;
    background: #060606;
}

.dpad-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.dpad-row button {
    width: 44px;
    height: 44px;
    background: #111;
    border: 1px solid #2a2a2a;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.dpad-row button:active {
    background: #222;
    color: #e8e8e8;
    border-color: #555;
}

@media (max-width: 680px) {
    #minigame-canvas {
        width: min(95vw, 608px);
        height: auto;
    }
    #minigame-dpad {
        display: flex;
    }
    #minigame-controls span {
        display: none;
    }
}

@media (pointer: coarse) {
    #minigame-dpad {
        display: flex;
    }
}
.card-media .media-primary { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease; }
.card-media .media-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease; z-index: 2; }
.card:hover .card-media .media-hover { opacity: 1; }
@keyframes foodhack-carousel { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } } .foodhack-media:hover .food-img-1 { animation: foodhack-carousel 5s infinite; } .foodhack-media:hover .food-img-2 { animation: foodhack-carousel 5s infinite reverse; }
.foodhack-media .food-img-1, .foodhack-media .food-img-2 { position: absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; transition: opacity 0.5s; } .foodhack-media:hover .food-img-2 { animation: hover-carousel 5s infinite; } @keyframes hover-carousel { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
