/* ==========================================================================
   X_nini — High-End Swiss Minimalist Design (jckhlry.com Inspired)
   ========================================================================== */

/* Local High-Performance Fonts (Zero External Dependencies, Instant Render) */
@font-face {
    font-family: 'Rock Salt';
    src: url('fonts/rock-salt.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}


@font-face {
    font-family: 'Geist';
    src: url('fonts/geist-latin.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('fonts/geist-mono-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --bg-page: #FFFFFF;
    
    --text-primary: #000000;
    --text-secondary: #262626;
    --text-muted: #737373;
    
    --border-box: #000000;
    --hatch-box: #000000;
    
    --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Geist Mono', 'Fragment Mono', 'IBM Plex Mono', monospace;
    
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #0C0C0C;
        
        --text-primary: #FFFFFF;
        --text-secondary: #D4D4D4;
        --text-muted: #808080;
        
        --border-box: #FFFFFF;
        --hatch-box: #FFFFFF;
    }
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Viewport & Centering - Shifted upward to optical center, no scrolling */
.viewport-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 20px 12vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    animation: fadeIn 0.6s var(--transition-smooth) forwards;
}

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

/* Profile Card - Fixed width column centered in viewport, content left-aligned */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 250px;
}



/* Author Name - Modern Swiss Minimalist (Geist Bold) */
.author-name {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 8px;
    text-align: left;
}

/* Bio Content - Left Aligned */
.bio-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
    text-align: left;
    width: 100%;
}

.bio-paragraph {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    text-align: left;
}

.disciplines {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
    text-align: left;
}

/* Portals / Links Section - Reading left-aligned, boxes centered */
.portals-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.section-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    text-align: left;
    width: 100%;
}

.portals-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/* Minimalist Portal Box - Clickable Link Left-Aligned */
.portal-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10px;
    width: 110px;
    height: 28px;
    border: 1px solid var(--border-box);
    background-color: transparent;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s var(--transition-smooth), border-color 0.2s ease;
}

/* Box Text Label (note_1 / note_2) - Handcrafted Rock Salt Style */
.portal-box .box-label {
    position: relative;
    z-index: 2;
    font-family: 'Rock Salt', cursive, sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    user-select: none;
    pointer-events: none;
    text-shadow: 0 0 6px var(--bg-page), 0 0 3px var(--bg-page);
    transition: color 0.2s ease;
}

/* Diagonal Hatched Line Pattern Fill - Reversed direction (-45deg) and wipes left-to-right */
.portal-box .hatch-fill {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: repeating-linear-gradient(
        -45deg,
        var(--hatch-box) 0,
        var(--hatch-box) 1px,
        transparent 1px,
        transparent 7px
    );
    clip-path: inset(0 100% 0 0); /* Hidden to the left */
    transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Hover Interaction: ONLY triggers when mouse is inside .portal-box */
.portal-box:hover .hatch-fill,
.portal-box.touch-active .hatch-fill {
    clip-path: inset(0 0 0 0); /* Gradually fills from left to right at a deliberate, slow pace */
    transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-box:active {
    transform: scale(0.98);
}

.portal-box:focus-visible {
    outline: 2px dashed var(--border-box);
    outline-offset: 4px;
}

.portal-box:focus-visible .hatch-fill {
    clip-path: inset(0 0 0 0);
}

/* Mobile responsive */
@media (max-width: 560px) {
    .portal-box {
        width: 110px;
        height: 26px;
    }
}
