/* =============================================================================
   ADX — Amplified Developer Experience
   Original stylesheet from the old x10s.io/adx.css, kept verbatim below.

   Two changes for this site:
     1. JetBrains Mono is self-hosted (@font-face block below) instead of being
        pulled from fonts.googleapis.com — the site makes no third-party
        requests, and its Content-Security-Policy is default-src 'self'.
     2. A .back-link rule at the end, for the return link to x10s.io.
   ========================================================================== */

/* ------------------------------------------------- JetBrains Mono (SIL OFL) */
/* One variable file per subset, covering the full 100–800 weight range. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
                 U+03A3-03FF;
}

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

body {
    background: #000;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

/* Slides */
.slide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Intro slide */
#intro .container {
    text-align: center;
}

.formula {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
}

.formula.large {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #0f0;
}

.main-text {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.3;
}

#scramble {
    color: #0f0;
    display: block;
}

.static {
    display: block;
    color: #fff;
}

.explainer {
    margin-top: 2rem;
    font-size: 1rem;
    color: #666;
    min-height: 1.5em;
    transition: opacity 0.2s;
}

.abstract {
    margin-top: 3rem;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.abstract.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Content slides */
.slide-content {
    max-width: 900px;
    padding: 2rem;
    text-align: left;
}

.slide-content .slide-formula {
    text-align: center;
}

.slide-formula {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #666;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    position: relative;
    cursor: help;
    display: inline-block;
}

.slide-formula::after {
    content: attr(data-explain);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #111;
    border: 1px solid #333;
    color: #aaa;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    white-space: normal;
    width: max-content;
    max-width: 400px;
    text-align: center;
    letter-spacing: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    line-height: 1.5;
}

.slide-formula:hover::after {
    opacity: 1;
    visibility: visible;
}

.slide-content h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    color: #0f0;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.slide-content .tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #888;
    margin-bottom: 3rem;
}

.slide-content ul {
    list-style: none;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 2;
}

.slide-content li {
    color: #ccc;
    padding-left: 1.5em;
    position: relative;
}

.slide-content li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #0f0;
}

/* Closing slide */
.slide-content.closing {
    text-align: center;
}

.slide-content.closing h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #222;
}

.progress-fill {
    height: 100%;
    background: #0f0;
    width: 0%;
    transition: width 0.3s ease;
}

/* Navigation hints */
.nav-hint {
    position: fixed;
    bottom: 1.5rem;
    font-size: 0.8rem;
    color: #444;
    transition: opacity 0.3s;
}

.nav-hint-left {
    left: 2rem;
}

.nav-hint-right {
    right: 2rem;
}

.nav-hint.hidden {
    opacity: 0;
}

/* Copyright */
.copyright {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #333;
    letter-spacing: 0.05em;
}

kbd {
    background: #111;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 0.15em 0.5em;
    font-family: inherit;
    margin: 0 0.2em;
}

/* ------------------------------------------------ added: return to the site */
.back-link {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    z-index: 200;
    color: #444;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover,
.back-link:focus-visible {
    color: #0f0;
}

@media (max-width: 600px) {
    .back-link { left: 1rem; top: 1rem; }
    .nav-hint-left { left: 1rem; }
    .nav-hint-right { right: 1rem; }
    .copyright { font-size: 0.6rem; }
}
