/* ───────────────── Base ───────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 250;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ───────────────── Splash title page ───────────────── */
.title {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-1rem);
}

/* header & footer on the splash */
.header,
.footer {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    left: 0;
    right: 0;
    z-index: 100;
}
.header { position: fixed; top: 0; }
.footer { position: fixed; bottom: 0; }

/* central blurb */
.main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    max-width: 700px;
    padding: 20px;
    text-align: left;
}

/* ───────────────── About ───────────────── */
.about {
    width: 60vh;
    max-width: 700px;
    padding: 20px;
    margin: 40px auto;
}

.about-title   { margin: 0 0 10px 0; }
.about-desc    { margin: 0; line-height: 1.4; }
.fun-fact img  { vertical-align: middle; }

/* ───────────────── Work ───────────────── */
/* 2-column grid keeps date column perfectly aligned */
.work {
    width: 60vh;
    max-width: 700px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 1fr auto; /* job | date */
    row-gap: 10px;                      /* no vertical gaps */
}

.section-heading {
    grid-column: 1 / -1;             /* span both columns */
    margin: 0 0 6px 0;
}

.work-entry   { display: contents; } /* let children join the grid */

.role,
.date         { margin: 0; line-height: 1.1; }

.date {
    color: grey;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ───────────────── Links ───────────────── */
.underlined-link {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    color: inherit;
}
.underlined-link:hover { text-decoration: none; }

/* ───────────────── Spinner ───────────────── */
.spin {
    animation: rotate360 2s linear infinite;
}
@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ───────────────── Responsive tweaks ───────────────── */
@media screen and (max-width: 768px) {
    body { font-size: large; }

    .header, .footer {
        padding: 15px 10px;
        font-size: 0.9em;
    }

    .main,
    .about,
    .work {
        width: 90vw;
        max-width: none;
        padding: 15px;
        margin: 20px auto;
    }

    .work { grid-template-columns: 1fr auto; }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    body  { font-size: x-large; }
    .main { width: 70vw; max-width: 600px; }
    .about,
    .work { width: 70vw; max-width: 600px; margin: 30px auto; }
}

@media screen and (min-width: 1025px) {
    .main  { width: 60vh; max-width: 700px; }
    .about,
    .work  { width: 60vh; max-width: 700px; }
}

/* Retina arrows sharper, if you decide to reuse the arrow borders elsewhere */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* example: .arrow { border-left-width: 13px; } */
}

/* Print layout */
@media print {
    .header, .footer { position: static; }
    .title           { height: auto; }
    .main            { position: static; transform: none; margin: 20px auto; }
}
