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

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

: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;
}

/* ═══════════════════════════════════════════════════════════════
   CUTE THEME - Pastel Palette (toggled via body.cute-theme)
   ═══════════════════════════════════════════════════════════════ */

body.cute-theme {
    --bg-primary: #fff0f5;
    --bg-secondary: #ffe4ec;
    --ascii-dim: #ffd6e0;
    --ascii-mid: #ffb6c1;
    --ascii-bright: #ff69b4;
    --text-primary: #4a4a4a;
    --text-secondary: #888888;
    --accent: #ff69b4;
    --loading-bg: #fff0f5;
    --glow-color: rgba(255, 105, 180, 0.4);
    --font-mono: 'Segoe UI', 'Arial Rounded MT Bold', 'Nunito', sans-serif;
    --font-display: 'Segoe UI', 'Arial Rounded MT Bold', 'Nunito', sans-serif;
}

body.cute-theme .card {
    background: rgba(255, 240, 245, 0.9);
    border-color: rgba(255, 182, 193, 0.5);
}

body.cute-theme .card:hover {
    box-shadow: 0 20px 40px rgba(255, 105, 180, 0.2),
        0 0 60px rgba(255, 182, 193, 0.15);
}

body.cute-theme #edge-glow {
    box-shadow: inset 0 0 60px 20px var(--glow-color);
}

body.cute-theme .tag,
body.cute-theme .skill-pill {
    background: rgba(255, 182, 193, 0.3);
    border-color: rgba(255, 105, 180, 0.4);
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 0.3px;
}

body.cute-theme #password-modal-content {
    background: #fff0f5;
    border-color: #ffb6c1;
}

body.cute-theme #password-input {
    background: #ffe4ec;
    border-color: #ffb6c1;
}

body.cute-theme #password-error {
    color: #ff69b4;
}

body.cute-theme .scrolling-banner-text {
    fill: #d4a5b5 !important;
}

body.cute-theme #brand-text {
    color: #d4a5b5;
    font-weight: 600;
    text-shadow: 0 0 40px rgba(255, 182, 193, 0.3);
}

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);
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
}

#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;
}

/* ═══════════════════════════════════════════════════════════════
   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: none;
    user-select: none;
    z-index: 5;
    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;
    }
}

/* ═══════════════════════════════════════════════════════════════
   EDGE GLOW EFFECT - Dark gray transition glow
   ═══════════════════════════════════════════════════════════════ */

#edge-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

#edge-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    /* Tighter glow (creep less into screen) */
    box-shadow: inset 0 0 60px 20px rgba(120, 120, 120, 0.3);
    /* Fast fade in default, overridden by classes */
    transition: opacity 0.3s ease-out;
}

#edge-glow.active {
    opacity: 1;
    /* Static glow or very subtle pulse */
    animation: none;
}

#edge-glow.fade-out {
    opacity: 0;
    /* Slow fade out (2s) */
    transition: opacity 2s ease-out;
}

/* Optional subtle breathing if user wants "glowing", but static matches "stay glowing" better */
@keyframes glowPulse {
    0% {
        transform: scale(0.99);
        opacity: 0.8;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.99);
        opacity: 0.8;
    }
}

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

#portfolio-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120vh 40px 100px 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: 12px;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
}

body.cute-theme .section-header {
    color: #666;
    font-weight: 800;
    border-bottom-color: rgba(255, 182, 193, 0.5);
}

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

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

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

.card {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(60, 60, 60, 0.4);
    border-radius: 4px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card:hover {
    border-color: rgba(80, 80, 80, 0.6);
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(40, 40, 40, 0.1);
}

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

.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(50, 50, 50, 0.6);
    border-color: rgba(90, 90, 90, 0.5);
    transform: translateY(-2px);
}

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

.contact-card {
    padding: 40px;
}

.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: 10px;
    border-color: rgba(70, 70, 70, 0.5);
}

.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);
}

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

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

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

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

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

/* ═══════════════════════════════════════════════════════════════
   PASSWORD MODAL
   ═══════════════════════════════════════════════════════════════ */

#password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#password-modal-content {
    background: #050505;
    border: 1px solid #333;
    padding: 40px 50px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

#password-modal-header {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

#password-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 2px;
    padding: 12px 16px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

#password-input:focus {
    border-color: #555;
}

#password-input::placeholder {
    color: #555;
    letter-spacing: 1px;
}

#password-error {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: #ff3333;
    margin-bottom: 16px;
}

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

#password-buttons button {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 10px 24px;
    border: 1px solid #333;
    background: #0a0a0a;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

#password-buttons button:hover {
    border-color: #555;
    color: var(--text-primary);
}

#password-submit {
    color: var(--text-primary) !important;
}