/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

/* ==========================================
   PAGE LAYOUT
========================================== */

body {
    font-family: "Source Sans 3", sans-serif;
    color: white;

    /* Background Image */
    background-image:
        linear-gradient(
            rgba(0,0,0,.45),
            rgba(0,0,0,.45)
        ),
        url("images/bg.JPG");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.homepage {
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

body.article-page {
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
}

/* ==========================================
   HEADER
========================================== */

header {
    background: rgba(0, 0, 0, 0.85);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    font-family: "Rubik", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header h2 {
    color: #f8d240;
    font-size: 2rem;
    font-weight: 600;
    font-family: "Rubik", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header a:link {
    text-decoration: none;
}

/* ==========================================
   MAIN CONTENT
========================================== */

main {
    display: grid;
    place-items: center;

    padding: 2rem;
    text-align: center;
}

.article-page main {
    display: block;
    padding: 2rem 0 4rem;
}

.content {
    width: min(900px, 100%);
}

section {
    margin-bottom: .5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Rubik", Arial, sans-serif;
    font-weight: 700;
}

.article-page header {

    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,.9);
}

.content h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 1rem;
}

.content p {
    font-size: clamp(1rem, 2vw, 1rem);
    line-height: 1.6;

    max-width: 700px;
    margin: 0 auto 1rem auto;
}

/* ==========================================
   SITE LINKS
========================================== */

a,
a:link {
     color: inherit;

    text-decoration-line: underline;
    text-decoration-color: rgba(248,210,64,.25);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:visited {
    color: #e0e0e0;

    text-decoration-line: underline;
    text-decoration-color: #f8d240;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: #ffe777;
}

a:active {
    color: #ffffff;
}

/* ==========================================
   READING PANEL
========================================== */

.reading-panel {

    background: rgba(10,10,10,.88);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 18px;
    box-shadow:
    0 12px 40px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.03);
    backdrop-filter: blur(3px);
    padding: 2rem;
    text-align: left;
}


.reading-panel h1,
.reading-panel h2,
.reading-panel h3,
.reading-panel h4 {
    text-align: left;

    font-family: "Rubik", sans-serif;

    margin-top: 2rem;
    margin-bottom: .75rem;

    line-height: 1.15;
}

.reading-panel h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);

    margin-top: 0;
}

.reading-panel h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.reading-panel p {
    text-align: left;

    max-width: 90ch;

    margin-bottom: 1.2rem;

    line-height: 1.8;

    font-size: 1.1rem;
}

.reading-layout {
    width: min(1100px, 95vw);
    margin: 0 auto 3rem;
}

.page-title {
    font-family: "Rubik", sans-serif;
    font-weight: 700;

    font-size: clamp(2rem, 4vw, 3.5rem);

    text-align: left;

    color: white;

    margin-bottom: 1rem;

    letter-spacing: -0.03em;

    text-shadow:
        0 2px 12px rgba(0,0,0,.6);
}

/* ==========================================
   ARTICLE IMAGES
========================================== */

.article-image {

    max-width: 350px;
    width: 35%;
    height: auto;
    padding: 6px;
    background: rgba(255,255,255,.03);
    border: 1px solid #f8d240;;
    border-radius: 10px;
    box-shadow:
        0 4px 16px rgba(0,0,0,.35);
    margin-bottom: 1rem;
}

.article-image.left {
    float: left;
    margin-right: 1.5rem;
}

.article-image.right {
    float: right;
    margin-left: 1.5rem;
}

.article-figure {
    max-width: 320px;
    padding: 6px;
    border: 1px solid rgba(248,210,64,.7);
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    box-shadow:
        0 4px 16px rgba(0,0,0,.35);
}

.article-figure.left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.article-figure.right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-figure img {
    display: block;
    width: 100%;
    border-radius: 6px;
}

.article-figure a {
    display: block;
    text-decoration: none;
}

.article-figure a img {

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.article-figure a:hover img {
    transform: scale(1.02);

    box-shadow:
        0 0 20px rgba(248,210,64,.25);
}

.article-figure figcaption {

    margin-top: .5rem;

    font-size: .85rem;
    color: #c7c7c7;

    text-align: center;
    line-height: 1.4;

    font-style: italic;
}


/* ==========================================
   BUTTON & TOOLTIPS
========================================== */

.button {
    display: inline-block;

    background: #ff820d;
    color: #ffffff;

    padding: 0.9rem 1.8rem;
    border-radius: 6px;

    text-decoration: none;
    font-weight: bold;

    transition: 0.25s ease;
}

.button:hover {
    background: #ee0909;
}

/* Tooltips */

.tooltip {
    position: relative;
    cursor: pointer;
}


/* Tooltip box */
.tooltip::after {
    content: attr(data-tooltip);

    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);

    transform: translateX(-50%);

    background: rgba(0,0,0,.92);
    color: white;

    padding: .5rem .75rem;
    border-radius: 6px;

    font-size: .85rem;
    line-height: 1.3;

    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity .2s ease;

    z-index: 1000;
}

/* Little arrow */
.tooltip::before {
    content: "";

    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);

    transform: translateX(-50%);

    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0,0,0,.92);

    opacity: 0;

    transition: opacity .2s ease;

    z-index: 1000;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
}

/* ==========================================
   FOOTER
========================================== */

footer {
    background: rgba(0, 0, 0, 0.75);

    text-align: center;
    padding: 1rem;

    font-size: 0.9rem;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .article-image,
    .article-figure {

        float: none !important;

        display: block;

        width: 100%;
        max-width: 100%;

        margin: 0 auto 1rem auto;
    }
}

/* ==========================================
   GALLERY
========================================== */

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.gallery a {
    flex: 0 0 110px;
}

.gallery img {
    width: 110px;
    height: 110px;

    object-fit: cover;

    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.4);

    box-shadow: 0 4px 12px rgba(0,0,0,.35);

    transition: 0.25s ease;
}

.gallery img:hover {
    transform: scale(1.08);

    border-color: white;
}

/* ==========================================
   LIGHTBOX
========================================== */

.lightbox {
    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.9);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: opacity .3s ease;

    z-index: 9999;
}

.lightbox:target {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;

    border-radius: 10px;

    box-shadow: 0 0 40px rgba(0,0,0,.8);
}

/* clicking anywhere closes */
.lightbox .close {
    position: absolute;
    inset: 0;
    cursor: default;
}

/* keep image above close overlay */
.lightbox img {
    position: relative;
    z-index: 2;
}