﻿/* ===== Resume Stylesheet =====
   Author: Alan
   Google Font: Inter (300/400/600/700)
   Usage: <link rel="stylesheet" href="resume.css">  */

:root {
    --font-stack: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --text-color: #2b2b2b;
    --heading-color: #1a1a1a;
    --accent-color: #0b5ed7; /* tweak for your theme */
    --bg-color: #ffffff;
}

html {
    font-size: 16px; /* 1 rem = 16 px */
    scroll-behavior: smooth;
}

body {
    margin: 0 auto;
    padding: 0 1.5rem;
    max-width: 980px; /* nice readable column */
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
    margin-top: 0;
    font-weight: 600;
    color: var(--heading-color);
}

h1 {
    font-size: 2rem;
    letter-spacing: 0.4px;
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    padding-top: 2rem;

    margin-bottom: 0.5rem;
    border-bottom: 0.2rem solid transparent;
}

h3 {
    font-size: 1.25rem;
    padding-top: 1.2rem;
    margin-bottom: 0.5rem;
}

/* ---------- Layout helpers ---------- */
section {
    margin-bottom: 1.5rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

article {
    padding-bottom: 5rem;
}

.name {
    font-size: 2.25rem;
    font-weight: 700;
}

/* ---------- Typography ---------- */
a {
    color: var(--accent-color);
    text-decoration: none;
}

ul, ol {
    margin: 0 0 0.75rem 0.5rem;
    padding: 0;
}

li {
    margin-bottom: 0.5rem;
}

strong {
    font-weight: 600;
}

li::marker {
    content: "· ";
}

/* ---------- Print styles ---------- */
@media print {
    body {
        padding: 0;
        max-width: none;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ---------- Manual line-break helper ---------- */
/* desktop & tablets */
.mobile-break {
    display: none;
}

.breakable {
    white-space: nowrap;
}

/* ---------- Target highlight ---------- */

:target {
    animation: target-fade 3s linear both;
}

/* Fade the highlight away after a moment */
@keyframes target-fade {
    10% {
        border-bottom-color: var(--accent-color);
    }

    100% {
        border-bottom-color: transparent;
    }
}

@media (max-width: 600px) { /* phones in portrait */
    .mobile-break {
        display: inline-block; /* becomes a breakable inline element */
        width: 100%; /* forces a wrap exactly here */
        height: 0; /* no extra vertical space */
    }
    /* acts like a <br> */
    .inline-nobreak {
        display: none;
    }

    .breakable {
        white-space: normal; /* allow wrapping */
        line-height: 0.8rem;
    }
}

@media (min-width: 800px) { /* tweak breakpoint to taste */
    /* Use a two-column grid:   260 px sidebar  +  remaining width */
    body {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 0 2.5rem; /* horizontal gutter only */
    }

    header {
        position: sticky; /* stays visible while scrolling */
        top: 0; /* pin to top of viewport        */
        height: 100vh; /* full-height sidebar           */
        padding: 0 1rem 0 0;
        margin: 0;
        overflow-y: auto; /* scroll inside if tall content */
        border-bottom: none; /* ditch the mobile divider      */
        border-right: 1px solid #e0e0e0;
    }

    nav {
        padding: 2.5rem 0;
    }

    article {
        padding-top: 2.5rem;
    }

    .toc-item {
        display: block;
        margin-bottom: 1.4rem;
    }
}

@media (max-width: 800px) { /* tweak breakpoint to taste */

    nav > a {
        white-space: nowrap
    }

    header {
        margin: 1.8rem 0;
    }

    .hide-mobile {
        display: none;
    }

    .toc-item {
    }

        .toc-item:not(:last-child)::after {
            content: " |"
        }
}

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