/* ==========================================================================
   WHOAMI — style.css

   1.  Settings ........ colors, font and spacing (change the look here)
   2.  Base
   3.  Particle background
   4.  Layout
   5.  Page header
   6.  Cards and titles
   7.  Profile card .... photo, bio, badge, QR code
   8.  Info card ....... details, influences, affiliates
   9.  Networks
   10. Footer
   11. Animations
   12. Small screens
   13. Reduced motion
   ========================================================================== */


/* 1. SETTINGS
   ========================================================================== */

:root {
    /* Colors */
    --primary: #00FAB3;
    --primary-dark: #00C999;
    --background: #000000;
    --card-bg: rgba(0, 0, 0, 0.88);

    --text: #00FAB3;
    --text-secondary: rgba(0, 250, 179, 0.7);
    --text-faint: rgba(0, 250, 179, 0.4);

    --border: rgba(0, 250, 179, 0.3);
    --border-light: rgba(0, 250, 179, 0.18);
    --border-strong: rgba(0, 250, 179, 0.6);

    --fill: rgba(0, 250, 179, 0.05);
    --fill-hover: rgba(0, 250, 179, 0.1);
    --fill-strong: rgba(0, 250, 179, 0.2);

    --glow: 0 0 30px rgba(0, 250, 179, 0.08);
    --glow-hover: 0 0 40px rgba(0, 250, 179, 0.18);

    /* Font. Put 'Courier New' first instead to get the old look back. */
    --font: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;

    /* Spacing */
    --gap: 1.5rem;            /* space between cards */
    --card-padding: 1.75rem;  /* space inside cards  */

    --speed: 0.2s ease;
}


/* 2. BASE
   ========================================================================== */

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    scrollbar-color: var(--primary) var(--background);  /* Firefox */
    scrollbar-width: thin;                              /* Firefox */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

ul {
    list-style: none;
}

button,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--primary);
    color: var(--background);
}

:focus-visible {
    outline: 1px solid var(--primary);
    outline-offset: 3px;
}

/* Text that only screen readers announce */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Scrollbar (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}


/* 3. PARTICLE BACKGROUND
   ========================================================================== */

#particles-js {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--background);
}


/* 4. LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(0.75rem, 3vw, 2rem);
}

.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap);
    margin-bottom: var(--gap);
}

/* Two columns once there is room: profile on the left, info on the right */
@media (min-width: 1250px) {
    .main-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }
}


/* 5. PAGE HEADER
   ========================================================================== */

.page-header {
    position: relative;
    margin-bottom: var(--gap);
    padding: clamp(1rem, 2.5vw, 1.5rem) 1rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
    box-shadow: var(--glow);
}

/* Glowing lines along the top and bottom edges */
.page-header::before,
.page-header::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.page-header::before { top: 0; }
.page-header::after  { bottom: 0; }

.page-title {
    font-size: clamp(1.35rem, 3.2vw, 2.1rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 250, 179, 0.4);
}

/* Blinking terminal cursor right after the title */
.page-title::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 0.95em;
    vertical-align: -0.1em;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    animation: blink 1.1s step-end infinite;
}


/* 6. CARDS AND TITLES
   ========================================================================== */

.card {
    position: relative;
    overflow: hidden;
    padding: var(--card-padding);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 2px solid var(--primary);
    box-shadow: var(--glow);
    transition: border-color var(--speed), box-shadow var(--speed);
}

.card:hover {
    border-color: var(--border-strong);
    border-left-color: var(--primary);
    box-shadow: var(--glow-hover);
}

/* Light that sweeps across the top edge when you hover a card */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    pointer-events: none;
}

.card:hover::before {
    transform: translateX(100%);
    transition: transform 0.7s ease;
}

/* Card titles, e.g. ⌬|⌜INFO⌟|⌬ */
.section-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary);
}

/* Typing effect: the letters still to come stay invisible but keep their
   space, so the title doesn't shift while it types out. */
.typed-ghost {
    visibility: hidden;
}

/* Hide the title text until script.js is ready to type it.
   If the script never runs, the text shows anyway after 1.5 seconds. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-typed]:not(.is-ready) {
        color: transparent;
        animation: reveal-title 0s 1.5s forwards;
    }
}

/* Small headings inside cards, e.g. INFLUENCES ——————— */
.subhead {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.subhead i {
    font-size: 0.8rem;
    color: var(--primary);
}

.subhead::after,
.subhead--center::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* A group of content inside a card */
.block {
    width: 100%;
    margin-top: 2rem;
}


/* 7. PROFILE CARD
   ========================================================================== */

.profile {
    container-type: inline-size;   /* lets the inside rearrange based on the card's width */
    text-align: center;
}

.profile-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* When the profile card is wide (one-column layout on mid-size screens),
   put the photo, badge and QR code side by side instead of stacking them. */
@container (min-width: 640px) {
    .profile-body {
        display: grid;
        grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        gap: 2rem;
    }

    .profile-body .block {
        margin-top: 0;
    }
}

.avatar {
    width: min(100%, 220px);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 250, 179, 0.2);
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.avatar:hover img {
    transform: scale(1.03);
}

.bio {
    padding: 1rem 1.1rem;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.75;
    background: var(--fill);
    border: 1px solid var(--border-light);
}

/* Badge and QR code, each with its copyable HTML */
.embed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.embed a {
    display: inline-block;
    line-height: 0;
    transition: filter var(--speed);
}

.embed a:hover {
    filter: drop-shadow(0 0 8px rgba(0, 250, 179, 0.45));
}

.badge {
    display: block;
    width: 88px;
    height: 31px;
}

.qr-code {
    display: block;
    width: 150px;
    height: 150px;
}

.code-box {
    width: 100%;
    text-align: left;
    background: var(--background);
    border: 1px solid var(--border);
    transition: border-color var(--speed);
}

.code-box:focus-within {
    border-color: var(--border-strong);
}

.code-box textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 0.85rem;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.code-box textarea:focus {
    color: var(--primary);
}

/* COPY CODE button (only shown when JavaScript is on, since it needs it) */
.copy-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 0;
    border-top: 1px solid var(--border);
    background: var(--fill);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--speed), color var(--speed);
}

.js .copy-btn {
    display: flex;
}

.copy-btn:hover,
.copy-btn.is-copied {
    background: var(--primary);
    color: var(--background);
}


/* 8. INFO CARD
   ========================================================================== */

/* Lets the details grid react to the card's own width */
.info {
    container-type: inline-size;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

/* All four details in one row when the card is wide enough */
@container (min-width: 620px) {
    .info-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.info-item {
    padding: 0.9rem 1rem;
    background: var(--fill);
    border: 1px solid var(--border-light);
    transition: background var(--speed), border-color var(--speed);
}

.info-item:hover {
    background: var(--fill-hover);
    border-color: var(--border-strong);
}

.info-item dt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.info-item dt i {
    width: 1.25em;
    text-align: center;
    color: var(--primary);
}

.info-item dd {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--primary);
    overflow-wrap: anywhere;
}

.info-item dd::before {
    content: '/// ';
    content: '/// ' / '';   /* same, but screen readers skip it */
    font-weight: 400;
    color: var(--text-faint);
}

/* Influences */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-list li {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.4;
    letter-spacing: 0.05em;
    background: var(--fill-hover);
    border: 1px solid var(--border);
    cursor: default;
    transition: background var(--speed), border-color var(--speed);
}

.tag-list li:hover {
    background: var(--fill-strong);
    border-color: var(--border-strong);
}

/* Affiliate logos */
.affiliates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 2.25rem;
    padding: 0.5rem 0;
}

.affiliates img {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 72px;
    filter: brightness(1.5);
    transition: filter var(--speed);
}

.affiliates img:hover {
    filter: brightness(1.5) drop-shadow(0 0 8px rgba(0, 250, 179, 0.45));
}


/* 9. NETWORKS
   ========================================================================== */

.network-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
    gap: 0.75rem;
}

.network-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 4.25rem;
    padding: 0.75rem 0.9rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--primary);
    background: var(--fill);
    border: 1px solid var(--border-light);
    overflow-wrap: anywhere;
    transition: background var(--speed), border-color var(--speed);
}

.network-list li::before {
    content: '///';
    content: '///' / '';   /* same, but screen readers skip it */
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}

.network-list li:hover {
    background: var(--fill-hover);
    border-color: var(--border-strong);
}


/* 10. FOOTER
   ========================================================================== */

.site-footer {
    margin-top: var(--gap);
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
}

.site-footer p + p {
    margin-top: 0.5rem;
}

.license a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: color var(--speed);
}

.license a:hover {
    color: var(--primary);
}

.cc-icons {
    display: inline-flex;
    gap: 0.2rem;
    font-size: 0.95rem;
}


/* 11. ANIMATIONS
   ========================================================================== */

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes reveal-title {
    to { color: var(--primary); }
}


/* 12. SMALL SCREENS
   ========================================================================== */

@media (max-width: 600px) {
    :root {
        --gap: 1rem;
        --card-padding: 1.1rem;
    }

    .page-title {
        letter-spacing: 0.12em;
    }

    .section-title {
        margin-bottom: 1.1rem;
        font-size: 0.95rem;
    }

    .block {
        margin-top: 1.5rem;
    }

    .avatar {
        width: min(100%, 170px);
    }

    .qr-code {
        width: 120px;
        height: 120px;
    }

    .info-item {
        padding: 0.75rem;
    }

    .info-item dd {
        font-size: 0.9rem;
    }

    .network-list li {
        font-size: 0.8rem;
    }
}


/* 13. REDUCED MOTION
   For people who turn off animations in their device settings.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
