/*
 * Daniel Archer :: Projects
 * Hand-written, tableless. Fixed 760px layout made for 800x600,
 * floats and faux columns, system fonts only.
 *
 * Palette: steel blue #336699 / #6699cc, grays #eeeeee #f5f5f5 #cccccc, white.
 * Accent rule: #ff6600 only on large non-text marks (header rule, bullets);
 * #c04f00 wherever the accent carries text (NEW label, link hover), for contrast.
 */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 20px 8px;
    background-color: #e6e6e6;
    background-image: repeating-linear-gradient(to bottom, #e6e6e6 0, #e6e6e6 2px, #dcdcdc 2px, #dcdcdc 3px);
    color: #333333;
    font-family: Verdana, Tahoma, Geneva, sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

a:link,
a:visited {
    color: #336699;
    text-decoration: underline;
}

a:hover,
a:active {
    color: #c04f00;
    text-decoration: none;
}

a:focus-visible {
    outline: 1px dotted #333333;
    outline-offset: 1px;
}

img {
    border: 0;
}

h1, h2, h3 {
    margin: 0;
    font-weight: normal;
}

p {
    margin: 0 0 8px;
}

.skip {
    position: absolute;
    left: -9999px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip:focus {
    left: 8px;
    top: 4px;
    padding: 2px 6px;
    background: #ffffff;
    border: 1px solid #336699;
}

/* ---- frame ---- */

#container {
    width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #999999;
}

#header {
    padding: 22px 16px 16px;
    background-color: #336699;
    background-image: linear-gradient(to bottom, #6699cc, #336699);
    border-bottom: 3px solid #ff6600;
    color: #ffffff;
}

#header h1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

#header .tagline {
    margin: 6px 0 0;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#nav {
    padding: 5px 16px;
    background: #eeeeee;
    border-bottom: 1px solid #cccccc;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#nav a:link,
#nav a:visited {
    text-decoration: none;
}

#nav a:hover {
    text-decoration: underline;
}

#nav .item {
    white-space: nowrap;
}

#nav .item + .item::before {
    content: "|";
    padding: 0 6px;
    color: #999999;
}

/* faux columns: white main column, gray sidebar with a 1px rule */
#wrap {
    background-image: linear-gradient(to right,
        #ffffff 0, #ffffff 559px,
        #cccccc 559px, #cccccc 560px,
        #f5f5f5 560px, #f5f5f5 100%);
}

#wrap::after {
    content: "";
    display: block;
    clear: both;
}

#main {
    float: left;
    width: 527px;
    padding: 16px;
}

#sidebar {
    float: right;
    width: 168px;
    padding: 16px;
}

/* ---- sidebar ---- */

#sidebar .box {
    margin-bottom: 18px;
}

#sidebar h2 {
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid #cccccc;
    color: #336699;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#sidebar p {
    font-size: 11px;
}

#sidebar ul.years {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
}

.small {
    font-size: 11px;
    color: #555555;
}

.counter {
    display: inline-block;
    margin-left: 4px;
    padding: 0 3px;
    background: #ffffff;
    border: 1px solid #999999;
    color: #333333;
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    letter-spacing: 2px;
}

/* ---- sections ---- */

.section {
    margin-bottom: 24px;
}

h2.bar {
    padding: 4px 8px;
    background: #336699;
    color: #ffffff;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.intro {
    margin: 6px 0 4px;
    color: #555555;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 13px;
    font-style: italic;
}

/* ---- portfolio entries ---- */

.entry {
    padding: 14px 0;
    border-bottom: 1px dotted #cccccc;
}

.entry:last-child {
    border-bottom: 0;
}

.entry::after {
    content: "";
    display: block;
    clear: both;
}

.thumb {
    float: left;
    width: 200px;
}

.shot {
    display: block;
    width: 192px;
    height: 144px;
    padding: 3px;
    background: #ffffff;
    border: 1px solid #999999;
}

.noimg {
    width: 192px;
    padding: 3px;
    background: #ffffff;
    border: 1px solid #999999;
}

.noimg span {
    display: block;
    height: 142px;
    line-height: 142px;
    background: #eeeeee;
    border: 1px solid #dddddd;
    color: #666666;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.text {
    margin-left: 214px;
}

.entry h3 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.2;
    color: #222222;
}

.new,
.sticker {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    background: #c04f00;
    color: #ffffff;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.3;
    text-transform: uppercase;
    vertical-align: 2px;
}

.meta {
    margin: 3px 0 7px;
    color: #336699;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* the separator travels with the status, so a wrapped meta line never ends on a dangling dot */
.meta .st {
    white-space: nowrap;
}

.what {
    margin-bottom: 6px;
}

ul.hl {
    margin: 0 0 6px;
    padding: 0 0 0 16px;
    list-style: square;
}

ul.hl li {
    margin-bottom: 2px;
}

ul.hl li::marker {
    color: #ff6600;
}

.stack {
    margin: 0;
    color: #666666;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- view switch: grid | list, at the right end of the first section bar ---- */

.barrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    background: #336699;
}

.barrow h2.bar {
    padding-right: 12px;
}

.viewswitch {
    padding: 4px 8px;
    color: #c6d6e8;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
}

/* the switch needs the script: hidden with JS off, and kept invisible (but in place) until view.js has wired the buttons */
.no-js .viewswitch {
    display: none;
}

.js:not(.view-ready) .viewswitch {
    visibility: hidden;
}

#view-label {
    margin-right: 4px;
}

.viewswitch .sep {
    padding: 0 4px;
    color: #6699cc;
}

.viewswitch button {
    margin: 0;
    padding: 0 1px;
    background: none;
    border: 0;
    border-radius: 0;
    color: #c6d6e8;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.viewswitch button:hover {
    color: #ffffff;
}

.viewswitch button:focus-visible {
    outline: 1px dotted #ffffff;
    outline-offset: 1px;
}

.view-grid .viewswitch [data-view="grid"],
.view-list .viewswitch [data-view="list"] {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    cursor: default;
}

/* ---- grid view: framed thumbnails three across, name, dates and the short description ---- */

.view-grid .entries {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
    margin-top: 4px;
    overflow: hidden; /* clips the row rules where they run past the last column */
}

.view-grid .entry {
    position: relative;
    padding: 12px 0 14px;
    border-bottom: 0;
}

/* one dotted rule above each row: every tile draws its own across its width and the gutter after it,
   so the pieces join into a single line across the row */
.view-grid .entry::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: -16px;
    border-top: 1px dotted #cccccc;
}

.view-grid .entry:nth-child(-n+3)::before {
    content: none;
}

.view-grid .thumb {
    position: relative;
    float: none;
    width: auto;
    margin-bottom: 7px;
}

/* in the grid the NEW label leaves the name line and becomes a tag pinned to the frame's corner,
   so long names stay on one line and the meta lines line up across a row */
.sticker {
    display: none;
}

.view-grid .sticker {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
}

.view-grid .text .new {
    display: none;
}

.view-grid .shot {
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

.view-grid .noimg {
    width: auto;
}

.view-grid .noimg span {
    height: auto;
    padding: calc(37.5% - 8px) 0;
    line-height: 14px;
}

.view-grid .text {
    margin-left: 0;
}

.view-grid .entry h3 {
    font-size: 14px;
}

.view-grid .new {
    margin-left: 2px;
    vertical-align: 1px;
}

.view-grid .meta {
    margin: 2px 0 5px;
    letter-spacing: 0.8px; /* a hair under the bars' 1px, so "09/2022 – 05/2023 · Shelved" fits a 165px tile */
}

.view-grid .what {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
}

.view-grid ul.hl,
.view-grid .stack {
    display: none;
}

/* ---- footer ---- */

#footer {
    padding: 10px 16px 12px;
    background: #eeeeee;
    border-top: 1px solid #cccccc;
    color: #555555;
    font-size: 11px;
    text-align: center;
}

#footer p {
    margin: 0 0 6px;
}

#footer .buttons {
    margin: 0;
    line-height: 15px;
}

#footer .buttons img {
    margin: 2px 1px;
    vertical-align: top;
}

/* ---- smaller screens: one column, sidebar on top ---- */

@media (max-width: 779px) {
    body {
        padding: 8px;
    }

    #container {
        width: auto;
        max-width: 760px;
    }

    #wrap {
        background-image: none;
    }

    #main,
    #sidebar {
        float: none;
        width: auto;
    }

    #sidebar {
        padding: 12px 16px 0;
        background: #f5f5f5;
        border-top: 1px solid #cccccc;
    }

    #sidebar .box {
        margin-bottom: 12px;
    }

    .view-grid .entries {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
    }

    .view-grid .entry::before {
        right: -20px;
    }

    .view-grid .entry:nth-child(3)::before {
        content: "";
    }
}

@media (max-width: 560px) {
    body {
        font-size: 13px;
    }

    #header {
        padding: 16px 12px 12px;
    }

    #header h1 {
        font-size: 24px;
    }

    #nav {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* items wrap freely on a phone, so no separator is left hanging at a line end */
    #nav .item {
        display: inline-block;
        margin-right: 14px;
    }

    #nav .item + .item::before {
        content: none;
    }

    #header .tagline,
    #sidebar h2,
    h2.bar,
    .meta,
    .stack {
        font-size: 11px;
    }

    .new,
    .sticker {
        font-size: 10px;
    }

    #main {
        padding: 12px;
    }

    #sidebar {
        padding: 12px 12px 0;
    }

    .thumb {
        float: none;
        width: auto;
        margin-bottom: 10px;
    }

    .shot {
        width: calc(100% - 8px);
        max-width: 384px;
        height: auto;
    }

    .noimg {
        width: auto;
        max-width: 384px;
    }

    .text {
        margin-left: 0;
    }

    /* the buttons carry the bar's vertical padding, so this bar is as tall as the others and each target is 24px */
    .viewswitch {
        padding: 0 8px;
        font-size: 11px;
    }

    .viewswitch button {
        padding: 4px;
    }

    .view-grid .entries {
        grid-template-columns: minmax(0, 1fr);
    }

    .view-grid .entry:nth-child(2)::before {
        content: "";
    }

    .view-grid .shot,
    .view-grid .noimg {
        max-width: 384px;
    }

    .view-grid .entry h3 {
        font-size: 16px;
    }

    .view-grid .meta {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .view-grid .what {
        font-size: 13px;
    }
}

/* ---- early client work: a plain definition list ---- */

dl.plain {
    margin: 8px 0 0;
}

dl.plain dt {
    margin-top: 10px;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 14px;
    color: #222222;
}

dl.plain dt .when,
table.talks .when {
    color: #336699;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    white-space: nowrap;
}

dl.plain dd {
    margin: 2px 0 0;
    padding-bottom: 8px;
    border-bottom: 1px dotted #cccccc;
}

/* ---- talks & writing: an old-fashioned bordered table ---- */

table.talks {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    font-size: 11px;
}

table.talks th {
    padding: 3px 6px;
    background: #eeeeee;
    border: 1px solid #cccccc;
    color: #555555;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
}

table.talks td {
    padding: 4px 6px;
    border: 1px solid #cccccc;
    vertical-align: top;
}

table.talks tbody tr:nth-child(even) td {
    background: #f5f5f5;
}

table.talks .kind {
    display: inline-block;
    margin-right: 4px;
    color: #c04f00;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

table.talks .where {
    color: #555555;
}

/* phones: each talk becomes a stacked block, so the table never scrolls sideways */
@media (max-width: 560px) {
    table.talks thead {
        display: none;
    }

    table.talks,
    table.talks tbody,
    table.talks tr,
    table.talks td {
        display: block;
        width: auto;
    }

    table.talks tr {
        border: 1px solid #cccccc;
        border-bottom: 0;
    }

    table.talks tr:last-child {
        border-bottom: 1px solid #cccccc;
    }

    table.talks td {
        border: 0;
        padding: 2px 6px;
    }
}

/* ---- theme timeline (layout in core.css) ---- */

#themes {
    --era-accent: #ff6600;
    background: #f5f5f5;
    border: 1px solid #999999;
    color: #336699;
    font-family: Tahoma, Verdana, Geneva, sans-serif;
}


/* phones: room for the theme timeline above the page */
@media (max-width: 560px) {
    body {
        padding-top: 64px;
    }
}
