/* ==========================================================================
   ZN9IK — Monochrome Link Hub
   Palette: pure black/white/grayscale only. No color accents.
   Signature: glitch/scanline letter treatment on the wordmark.
   ========================================================================== */

:root {
    --black: #000000;
    --near-black: #0a0a0a;
    --panel: #121212;
    --line: #2a2a2a;
    --line-soft: #1c1c1c;
    --gray-500: #6b6b6b;
    --gray-300: #a8a8a8;
    --white: #f5f5f5;
    --pure-white: #ffffff;

    --font-display: 'Archivo Black', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================== RAIN BACKGROUND ===================== */

.rain-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* ===================== TEXTURE OVERLAYS ===================== */

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.018) 0px,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* ===================== HERO ===================== */

.hero-section {
    padding: 88px 0 56px;
    position: relative;
    z-index: 1;
}

.profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 56px;
}

.profile-frame {
    position: relative;
    width: 132px;
    height: 132px;
    margin-bottom: 28px;
}

.profile-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--white);
    letter-spacing: 1px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) contrast(1.05);
    display: block;
}

.frame-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--pure-white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.frame-corner.tl { top: -6px; left: -6px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: -6px; right: -6px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: -6px; left: -6px; border-right: none; border-top: none; }
.frame-corner.br { bottom: -6px; right: -6px; border-left: none; border-top: none; }

.profile-name {
    font-family: var(--font-display);
    font-size: clamp(48px, 13vw, 72px);
    letter-spacing: 2px;
    line-height: 1;
    color: var(--pure-white);
    display: flex;
    gap: 2px;
    position: relative;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.45), 0 0 28px rgba(255, 255, 255, 0.2);
}

.glitch-letter {
    display: inline-block;
    position: relative;
    transition: transform 0.15s ease;
}

.glitch-letter:hover {
    animation: glitch-jitter 0.35s steps(2, end) infinite;
    color: var(--pure-white);
}

.glitch-letter:hover::before,
.glitch-letter:hover::after {
    content: attr(data-char);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes glitch-jitter {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-2px, 1px); }
    40%  { transform: translate(2px, -1px); }
    60%  { transform: translate(-1px, -1px); }
    80%  { transform: translate(1px, 2px); }
    100% { transform: translate(0, 0); }
}

.profile-title {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.profile-title .dot {
    color: var(--gray-500);
}

/* ===================== LINKS GRID ===================== */

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--near-black);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--white);
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.link-card:hover {
    border-color: var(--pure-white);
    background: var(--panel);
    transform: translateX(4px);
}

.link-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    font-size: 16px;
    color: var(--white);
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.link-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.link-subtitle {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--gray-500);
}

.link-arrow {
    color: var(--gray-500);
    font-size: 13px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .link-arrow {
    transform: translateX(3px);
    color: var(--pure-white);
}

/* ===================== CONTACT SECTION ===================== */

.contact-section {
    padding: 24px 0 64px;
    position: relative;
    z-index: 1;
}

.contact-card {
    border: 1px solid var(--line);
    padding: 40px 28px;
    text-align: center;
    background: var(--near-black);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 16px;
}

.contact-title {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--pure-white);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.contact-text {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--pure-white);
    color: var(--black);
    border: 1px solid var(--pure-white);
    padding: 14px 28px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.contact-btn:hover {
    background: transparent;
    color: var(--pure-white);
}

/* ===================== PROFILES SECTION ===================== */

.profiles-section {
    padding: 0 0 64px;
    position: relative;
    z-index: 1;
}

.profiles-card {
    background: var(--pure-white);
    border: 1px solid var(--pure-white);
    padding: 32px 24px;
}

.profiles-label {
    color: var(--gray-500);
    margin-bottom: 18px;
    text-align: center;
}

.profiles-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: var(--black);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    flex: 1 1 auto;
}

.profile-chip:hover {
    border-color: var(--black);
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.profile-chip-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.18);
    font-size: 12.5px;
    color: var(--black);
}

.profile-chip-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: 0.2px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.profile-chip-platform {
    display: none;
}

/* ===================== FOOTER ===================== */

.footer {
    border-top: 1px solid var(--line-soft);
    padding: 32px 0;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--gray-300);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.copyright {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-500);
}

/* ===================== MODAL ===================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--near-black);
    border: 1px solid var(--line);
    padding: 36px 28px;
    max-width: 380px;
    width: 100%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--gray-300);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    border-color: var(--pure-white);
    color: var(--pure-white);
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--pure-white);
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.contact-modal-subtitle {
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 24px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--white);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-option:hover {
    border-color: var(--pure-white);
    background: var(--panel);
}

.contact-option-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.contact-option-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    text-align: left;
}

.contact-option-label {
    font-size: 14px;
    font-weight: 600;
}

.contact-option-sublabel {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--gray-500);
}

.contact-option-arrow {
    font-size: 12px;
    color: var(--gray-500);
}

/* ===================== SCROLL REVEAL ===================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== ACCESSIBILITY ===================== */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--pure-white);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 480px) {
    .hero-section {
        padding: 64px 0 40px;
    }
    .profile-name {
        font-size: 52px;
    }
    .contact-card {
        padding: 32px 20px;
    }
    .profiles-card {
        padding: 28px 18px;
    }
    .profile-chip {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }
}
