/* =============================================================
   Jay Archer — resume site
   styled in the spirit of an early-2000s consumer desktop OS.
   Visual vocabulary intentionally matches my own recalls.zone work.

   Quick-edit tips:
   - colors live in :root below, change once and they update everywhere
   - to swap the wallpaper, set --wallpaper to a url(...) or a gradient
   - to swap the title-bar font, drop a .ttf in /assets and update
     the @font-face block; everything that uses --title-font follows
   - each window is just <article class="window">; copy the markup
     and add a slot in the grid to add a new one
   ============================================================= */

:root {
    /* sizing */
    --taskbar-height: 35px;
    --window-radius: 5px;
    --gap: 18px;
    --content-max: 1200px;

    /* colors — mirrored from recalls.zone palette */
    --titlebar: #255fdc;
    --titlebar-text: #ffffff;
    --window-body: #cbcbcb;
    --window-border: #255fdc;
    --window-shadow: 0 1px 5px rgba(0, 0, 0, 0.36);
    --content-bg: #ffffff;
    --content-text: #1a1a1a;
    --muted: #666666;
    --rule: #c0c4cf;
    --accent: #255fdc;
    --accent-soft: #d3e5fb;
    --accent-rule: #82a1c7;

    /* taskbar gradient stops */
    --tb-1: rgba(36, 94, 220, 1);
    --tb-2: rgba(181, 181, 232, 1);
    --tb-3: rgba(41, 98, 220, 1);
    --tb-4: rgba(20, 54, 122, 1);

    /* fonts (drop in your own .ttf in /assets and add an @font-face below) */
    --title-font: "Trebuchet MS", "Tahoma", "Segoe UI", sans-serif;
    --body-font: "Tahoma", "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    /* wallpaper — replace with url('assets/your-image.jpg') if you want */
    --wallpaper:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.18), transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(20,54,122,0.35), transparent 60%),
        linear-gradient(170deg, #6b9bd8 0%, #4e7fc4 40%, #2f5ea8 78%, #1f3d80 100%);
}

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

html, body { height: 100%; }

body {
    font-family: var(--body-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--content-text);
    background: var(--wallpaper);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    /* leave room under the fixed taskbar so the last row of windows clears it */
    padding-bottom: calc(var(--taskbar-height) + var(--gap) * 2);
}

/* ---------- desktop / page wrap ---------- */

.desktop {
    padding: var(--gap);
    /* explicit bottom gap so the last row never tucks under the fixed taskbar */
    padding-bottom: calc(var(--taskbar-height) + var(--gap) * 2);
    max-width: var(--content-max);
    margin: 0 auto;
}

/* hero block above the windows — sits like a desktop banner */
.hero {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    padding: 24px 8px 18px;
    margin-bottom: 6px;
}
.hero h1 {
    font-family: var(--title-font);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}
.hero .tag {
    font-size: clamp(14px, 1.6vw, 18px);
    margin-top: 8px;
    opacity: 0.95;
}

/* ---------- the window grid ---------- */

.window-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap);
    align-items: start;
}

/* default — each window spans full row */
.window { grid-column: span 6; }

/* layout assignments (desktop). edit these to rearrange the page. */
.w-work      { grid-column: span 4; }            /* Experience — hero, left 2/3 */
.right-col   { grid-column: span 2;              /* About + Contact stack next to Experience */
               display: flex;
               flex-direction: column;
               gap: var(--gap); }
.right-col .window { width: 100%; }              /* fill the right column */
.w-skills    { grid-column: span 3; }            /* Skills — left half of mid row */
.w-projects  { grid-column: span 3; }            /* Projects — right half of mid row */
.w-download  { grid-column: span 4; }            /* Resume.pdf — wide bottom-left */
.w-credits   { grid-column: span 2; }            /* Credits — narrow bottom-right */

/* credits window — small, low-importance "about this site" plate */
.credits {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.credits p { font-size: 13px; }
.credits .sig {
    font-family: var(--title-font);
    color: var(--content-text);
}

/* ---------- the window itself ---------- */

.window {
    background: var(--window-body);
    border: 1px solid var(--window-border);
    border-radius: var(--window-radius);
    box-shadow: var(--window-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 20px;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
/* subtle "this could be focused" lift on hover (pointer devices only) */
@media (hover: hover) {
    .window:hover {
        box-shadow:
            0 2px 10px rgba(20, 54, 122, 0.35),
            0 1px 2px rgba(0, 0, 0, 0.2);
    }
}

.window-top {
    background-color: var(--titlebar);
    color: var(--titlebar-text);
    height: 30px;
    line-height: 30px;
    display: flex;
    align-items: center;
    user-select: none;
    padding: 0 5px 0 7px;
    gap: 6px;
}

.title-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    background: #ffffff;
    color: var(--titlebar);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
    font-family: var(--title-font);
}

.window-title {
    font-family: var(--title-font);
    font-weight: 700;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    flex: 1 1 auto;
}

.window-bar-buttons {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.win-btn {
    width: 20px;
    height: 20px;
    border: 1px solid #ffffff;
    border-radius: 3px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    cursor: default;
    font-family: var(--mono);
    /* mimics the diagonal gloss in the original buttons */
}
.win-btn.min  { background: linear-gradient(131deg, #ffffff 0%, #0077ff 16%, #0077ff 83%); }
.win-btn.max  { background: linear-gradient(131deg, #ffffff 0%, #0077ff 16%, #0077ff 83%); }
.win-btn.close{ background: linear-gradient(131deg, #ffffff 0%, #ff0700 16%, #ff0700 83%); }
.win-btn::after {
    content: attr(data-g);
    text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

/* inner panel where content lives */
.window-content {
    background: var(--content-bg);
    margin: 0 4px 4px;
    border-radius: 3px;
    border: 1px solid #b5b9c3;
    padding: 16px 18px;
    overflow: visible; /* NEVER scroll inside windows */
    flex: 1 1 auto;
}

.window-content > * + * { margin-top: 12px; }
.window-content h2 {
    font-family: var(--title-font);
    font-size: 18px;
    color: var(--titlebar);
    letter-spacing: 0.2px;
}
.window-content h3 {
    font-family: var(--title-font);
    font-size: 15px;
    color: #222;
    margin-top: 14px;
}
.window-content p { font-size: 14.5px; }
.window-content a {
    color: var(--titlebar);
    text-decoration: underline;
}
.window-content a:hover { color: #1444a6; }

.window-content ul {
    padding-left: 18px;
}
.window-content li + li { margin-top: 4px; }

/* ---------- specific window content patterns ---------- */

/* work experience entries */
.job {
    padding: 10px 0;
    border-bottom: 1px dashed var(--rule);
}
.job:last-child { border-bottom: 0; }
.job-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.job-title {
    font-weight: 700;
    font-family: var(--title-font);
    font-size: 15.5px;
    color: #1a1a1a;
}
.job-company {
    font-family: var(--title-font);
    font-size: 13.5px;
    color: var(--titlebar);
    margin-top: 2px;
}
.job-dates {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}
.job p { margin-top: 4px; font-size: 14px; }

/* career highlight panel inside the about / projects window */
.callout {
    background: var(--accent-soft);
    border: 1px solid var(--accent-rule);
    border-radius: 4px;
    padding: 12px 14px;
    margin-top: 14px;
}
.callout h3 {
    margin-top: 0;
    color: var(--titlebar);
}
.callout p { font-size: 14px; }

/* skills grid */
.skills-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
}
.skills-list li {
    background: var(--accent-soft);
    border: 1px solid var(--accent-rule);
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 14px;
}

/* contact rows */
.contact-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 10px;
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-list .k {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 56px;
}
.contact-list .v { font-size: 14.5px; }

/* download button (resume PDF) */
.download-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.download-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.download-desc {
    margin: 0;
    flex: 1 1 auto;
}
.download-icon {
    width: 56px;
    height: 68px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #999;
    box-shadow: 1px 1px 0 #555;
    position: relative;
    flex: 0 0 auto;
}
.download-icon::before {
    content: "PDF";
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 0.5px;
}
.download-icon::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 14px; height: 14px;
    background: linear-gradient(135deg, transparent 50%, #ddd 50%);
    border-left: 1px solid #999;
    border-bottom: 1px solid #999;
}
.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #fdfdfd 0%, #e8e8e8 55%, #cccccc 100%);
    border: 1px solid #555;
    border-radius: 3px;
    color: #111;
    font-family: var(--title-font);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: inset 0 1px 0 #ffffff;
    cursor: pointer;
}
/* pure-CSS printer icon on the print button */
.print-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    background:
        /* paper exiting the top */
        linear-gradient(currentColor, currentColor) top center    / 10px 3px no-repeat,
        /* printer body */
        linear-gradient(currentColor, currentColor) center        / 14px 6px no-repeat,
        /* paper coming out the bottom (printed) */
        linear-gradient(currentColor, currentColor) bottom center / 12px 4px no-repeat;
}
/* button-as-button reset (was an <a>, now a real <button>) */
button.download-cta {
    font-family: var(--title-font);
    line-height: 1;
}
.download-cta:hover {
    background: linear-gradient(180deg, #ffffff 0%, #efefef 55%, #d6d6d6 100%);
}
.download-cta:active {
    background: linear-gradient(180deg, #c0c0c0 0%, #e0e0e0 55%, #f0f0f0 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

/* ---------- taskbar ---------- */

.taskbar {
    position: fixed;
    left: 0; bottom: 0;
    width: 100vw;
    height: var(--taskbar-height);
    background:
        linear-gradient(180deg,
            var(--tb-1) 0%,
            var(--tb-2) 3%,
            var(--tb-3) 7%,
            var(--tb-1) 51%,
            var(--tb-1) 95%,
            var(--tb-4) 100%);
    z-index: 9999;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* the green "start"-style lozenge, repurposed as a name pill */
.menu-pill {
    user-select: none;
    width: auto;
    padding: 0 18px;
    background: linear-gradient(180deg,
        rgba(235, 255, 235, 1) 0%,
        rgba(73, 176, 73, 1) 15%,
        rgba(73, 176, 73, 1) 40%,
        rgba(17, 84, 17, 1) 95%,
        rgba(40, 130, 40, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
    font-family: var(--title-font);
    font-style: italic;
    font-weight: 700;
    font-size: 18px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow:
        inset 0 0 7px -2px #000000,
        1px 1px 4px rgba(0,0,0,0.5);
    text-decoration: none;
    flex: 0 0 auto;
}
.menu-pill span { text-shadow: 1px 0 2px rgba(0,0,0,0.7); }

.taskbar-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}
.taskbar-buttons::-webkit-scrollbar { display: none; }

.tb-btn {
    height: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 0 8px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(93, 93, 183, 0.77);
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--title-font);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}
.tb-btn:hover { background: rgba(255, 255, 255, 0.3); }
.tb-btn .tb-icon {
    width: 14px; height: 14px;
    background: #ffffff;
    border-radius: 2px;
    display: inline-grid;
    place-items: center;
    color: var(--titlebar);
    font-size: 9px;
    font-weight: 800;
    font-family: var(--title-font);
    flex: 0 0 auto;
}

/* system tray */
.system-tray {
    margin-left: auto;
    background: linear-gradient(180deg,
        #789ce9 0%, #b5b5e8 3%, #799dea 7%,
        #608be6 51%, #487ae1 91%, #14367a 100%);
    box-shadow: inset 4px 1px 5px -4px #000000;
    display: flex;
    align-items: center;
    padding: 0 10px 0 14px;
    flex: 0 0 auto;
}
.tray-clock {
    color: #ffffff;
    font-family: var(--mono);
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- mobile ---------- */

@media (max-width: 760px) {
    :root { --gap: 14px; }
    body { padding-bottom: 0; }
    /* keep the bottom taskbar clearance even though we tighten side padding */
    .desktop { padding: 12px 12px calc(var(--taskbar-height) + var(--gap) * 2); }

    .hero { padding: 10px 4px 6px; }

    /* every window goes single-column, in source order */
    .window-grid { grid-template-columns: 1fr; }
    .right-col { display: contents; }   /* flatten the right-col wrapper so its children become grid children */
    .window,
    .w-about, .w-contact, .w-work,
    .w-skills, .w-projects, .w-download, .w-credits {
        grid-column: span 1;
    }

    .window-content { padding: 14px; }
    .window-content h2 { font-size: 16px; }
    .job-header { gap: 4px; }
    .job-dates { font-size: 12px; }

    /* hide taskbar quick-links on phone--too cramped.
       menu pill + clock stay so the chrome still reads as a desktop. */
    .taskbar-buttons { display: none; }
    .menu-pill { width: auto; padding: 0 14px; font-size: 16px; }
    .system-tray { min-width: 0; }
}

/* small tablets */
@media (min-width: 761px) and (max-width: 1024px) {
    .w-work      { grid-column: span 6; }
    .right-col   { display: contents; }      /* flatten the wrapper so its children share the main grid */
    .w-about     { grid-column: span 3; }
    .w-contact   { grid-column: span 3; }
    .w-skills    { grid-column: span 3; }
    .w-projects  { grid-column: span 3; }
    .w-download  { grid-column: span 4; }
    .w-credits   { grid-column: span 2; }
}

/* respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
html { scroll-behavior: smooth; }

/* ---------- print stylesheet ----------
   Strips the "desktop OS" chrome so the page prints like a clean resume:
   - hides the wallpaper, taskbar, credits window, and download window
   - flattens the grid to single column
   - replaces title-bar chrome with simple section headings
   - shows full URLs after links so they're useful on paper
*/
@media print {
    :root {
        --gap: 12px;
        --titlebar: #000000;
        --accent: #000000;
    }
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.4;
    }
    body { padding: 0; }
    .desktop { max-width: none; padding: 0; }

    /* hide the OS chrome and the things that don't belong on paper.
       .window.w-download / .window.w-credits use the doubled class to
       beat the later `.window { display: block !important; }` rule that
       flattens the remaining windows into print sections. */
    .taskbar,
    .window.w-download,
    .window.w-credits,
    .win-btn,
    .window-bar-buttons,
    .title-icon,
    .download-card { display: none !important; }

    /* hero becomes a print masthead */
    .hero {
        color: #000000;
        text-shadow: none;
        padding: 0 0 8pt 0;
        border-bottom: 1pt solid #000000;
        margin-bottom: 12pt;
    }
    .hero h1 { font-size: 24pt; }
    .hero .tag { font-size: 11pt; margin-top: 4pt; }

    /* flatten the grid, drop the right-column wrapper */
    .window-grid { display: block; }
    .right-col { display: contents; }

    /* windows become flat sections — no body chrome, no shadow */
    .window,
    .w-work, .w-about, .w-contact, .w-skills, .w-projects {
        display: block !important;
        grid-column: auto !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 0 14pt 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .window-top {
        background: transparent !important;
        color: #000000 !important;
        padding: 0;
        height: auto;
        line-height: 1.3;
        border-bottom: 0.5pt solid #888888;
        margin-bottom: 4pt;
    }
    .window-title {
        font-size: 13pt;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5pt;
    }
    .window-content {
        background: transparent !important;
        border: 0 !important;
        padding: 0;
        margin: 0;
    }
    .window-content h2 { display: none; } /* duplicates the title bar in print */
    .window-content h3 { font-size: 11pt; color: #000000; }

    /* jobs */
    .job { padding: 6pt 0; border-bottom: 0.5pt solid #cccccc; }
    .job:last-child { border-bottom: 0; }
    .job-title { font-size: 11pt; }
    .job-company { color: #000000; font-size: 10pt; }
    .job-dates { color: #000000; font-size: 9.5pt; }

    /* callout */
    .callout {
        background: transparent !important;
        border: 0.5pt solid #888888 !important;
        padding: 6pt 8pt;
    }

    /* skill chips become plain bullets */
    .skills-list { display: block; padding-left: 16pt; }
    .skills-list li {
        background: transparent !important;
        border: 0 !important;
        padding: 0;
        margin-bottom: 3pt;
        list-style: disc;
    }

    /* show the actual destination of links on paper */
    a, a:visited { color: #000000; text-decoration: none; }
    .window-content a[href^="http"]::after,
    .window-content a[href^="mailto"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555555;
    }
    .window-content a[href^="mailto:"]::after { content: ""; } /* the email itself is the label */
}
