/*###################################
#####################################
########## DEFAULT STYLING ##########
#####################################
###################################*/

/* slight browser overrides */
html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
}

:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid #4c9ffe;
    outline-offset: 4px;
    border-radius: 5px;
}

/* general color scheme */
:root {
    --bg: #f3f4f6;
    --text: #1f2937;
    --card: #ffffff;
    --accent: #1e3a8a;

    --border: #e5e7eb;
    --nav-bg: #f3f4f6;
    --section-alt: #ffffff;

    --overlay: rgba(0, 0, 0, 0.6);
    --modal-bg: #ffffff;

    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.25);

    --top-arrow-bg: #1f2937;
}

.dark-mode {
    --bg: #121212;
    --text: #e5e7eb;
    --card: #1e1e1e;
    --accent: #3b82f6;

    --border: #334155;
    --nav-bg: #121212;
    --section-alt: #1e1e1e;

    --overlay: rgba(0, 0, 0, 0.75);
    --modal-bg: #1e1e1e;

    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-strong: rgba(0, 0, 0, 0.7);

    --top-arrow-bg: #334155;
}

.dark-mode .invertible {
    filter: invert(1);
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-family: 'Open Sans', 'Noto Sans', Helvetica, sans-serif;
}

section:nth-of-type(even) {
    background-color: var(--section-alt);
}

/* accent */
a, h1, h2 {
    color: var(--accent);
}

/* image reactivity */
img {
    transition: transform 0.2s ease;
}

img:hover:not(#modal-img):not(#theme-icon) {
    transform: scale(1.1) translateY(-5px);
    opacity: 0.85;
}

button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}

.skip-link {
    position: absolute;
    top: 65px;
    left: 1rem;

    transform: translateY(-120%);
    opacity: 0;

    background: #1e3a8a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;

    text-decoration: none;
    font-weight: 600;

    transition: transform 0.35s ease-out, opacity 0.25s ease-out;
    z-index: 1001;

    pointer-events: none;
}

.skip-link:focus {
    transform: translateY(10%);
    opacity: 1;
    pointer-events: auto;
}

body, header, .modal-content, .project-card {
    transition: background 0.3s ease, color 0.3s ease;
}

/* nature image for hero + visibility fixes */
#intro {
    position: relative;
    background-image: url('../img/other/walkway.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 120px 16px 80px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#intro::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    z-index: 0;
}

#intro .container {
    position: relative;
    z-index: 1;
}

#intro h1, #intro h2, #intro h3 {
    color: white;
    margin: 8px 0;
}

/* general spacing */
section:not(#intro) {
    padding: 32px 16px;
}

/* letting the body text breathe a little */
.container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 24px;
}

/* center headers */
.container > h1, .container > h2, .container > h3{
    text-align: center;
}

/* footer images */
footer {
    padding: 32px 16px;
    background-color: var(--section-alt);
    text-align: center;
}

footer img {
    width: 50px;
    height: auto;
    margin: 0 8px;
}

/* scroll to top */
#top-arrow {
    /* sticky */
    position: fixed;
    bottom: 24px;
    right: 24px;

    width: 44px;
    height: 44px;

    /* correct spot */
    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    font-size: 1.2rem;

    background: var(--top-arrow-bg);
    color: white;
    border-radius: 50%;

    /* visibility */
    opacity: 0;
    pointer-events: none;

    /* shading */
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#top-arrow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px var(--shadow-strong);
}