/* Shared styles for The Idea of Justice. */

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Georgia, "Times New Roman", serif;
    color: #f5efe2;
    background-color: #2a2017;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Landing page: the Justitia figure is tall and narrow, so show all of it. */
body.landing {
    background-image: url("images/justitia.jpg");
    background-size: contain;
    background-position: center;
}

/* Ancient Greece: the Parthenon fills the window. */
body.greece {
    background-color: #0d3a75;
    background-image: url("images/parthenon.jpg");
    background-size: cover;
    background-position: center;
}

/* The Iliad: Rubens, Achilles Defeating Hector. */
body.iliad {
    background-color: #3a2e1c;
    background-image: url("images/achilles-hector.jpg");
    background-size: cover;
    background-position: center;
}

/* Antigone: Lenepveu, Antigone Gives Token Burial to Polynices. */
body.antigone {
    background-color: #4a463c;
    background-image: url("images/antigone.jpg");
    background-size: cover;
    background-position: center;
}

/* Introduction: Friedrich, Wanderer above the Sea of Fog. */
body.fog {
    background-color: #9aa3ae;
    background-image: url("images/wanderer-fog.jpg");
    background-size: cover;
    background-position: center 15%;
}

/* These subjects fill the center and bottom, so float the panel up top. */
body.fog main,
body.montesquieu main,
body.hume main {
    margin-top: 2rem;
    margin-bottom: auto;
}

/* Plato / Aristotle: Raphael, The School of Athens. */
body.school-of-athens {
    background-color: #d8c9a8;
    background-image: url("images/school-of-athens.jpg");
    background-size: cover;
    background-position: center;
}

/* The Middle Ages: the Chi-Rho page of the Lindisfarne Gospels. */
body.middle-ages {
    background-color: #e6d9bc;
    background-image: url("images/lindisfarne-chi-rho.jpg");
    background-size: cover;
    background-position: center 20%;
}

/* Augustine: Philippe de Champaigne, Saint Augustine. */
body.augustine {
    background-color: #1f2b22;
    background-image: url("images/augustine.jpg");
    background-size: cover;
    background-position: center 15%;
}

/* Aquinas: Gozzoli, The Triumph of Saint Thomas Aquinas (detail). */
body.aquinas {
    background-color: #c9a440;
    background-image: url("images/aquinas-triumph.jpg");
    background-size: cover;
    background-position: center 20%;
}

/* Early Modernity: Holbein, The Ambassadors. */
body.early-modern {
    background-color: #2f4a1e;
    background-image: url("images/ambassadors.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* Machiavelli: Blaeu's hand-colored map of Italy's many states. */
body.machiavelli {
    background-color: #e6d5b0;
    background-image: url("images/italy-blaeu.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* Hobbes: Bosse's frontispiece to Leviathan (detail). */
body.hobbes {
    background-color: #d8d8d0;
    background-image: url("images/leviathan.jpg");
    background-size: cover;
    background-position: center top;
}

/* Locke: John White, The Town of Secoton, with its fields of corn. */
body.locke {
    background-color: #e3d6bd;
    background-image: url("images/secoton.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* The American Founding: the Constitution, "We the People". */
body.american-founding {
    background-color: #e8dcc0;
    background-image: url("images/constitution.jpg");
    background-size: cover;
    background-position: center top;
}

/* Paine: Oertel, Pulling Down the Statue of King George III. */
body.paine {
    background-color: #3d4456;
    background-image: url("images/statue.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* Jefferson: Trumbull, Declaration of Independence. */
body.jefferson {
    background-color: #4e4236;
    background-image: url("images/declaration.jpg");
    background-size: cover;
    background-position: center 40%;
}

/* Montesquieu: Christy, Scene at the Signing of the Constitution. */
body.montesquieu {
    background-color: #4a3a28;
    background-image: url("images/signing.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* The Eighteenth Century: Wright of Derby, A Philosopher Lecturing on the Orrery. */
body.eighteenth-century {
    background-color: #1a1410;
    background-image: url("images/orrery.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* Rousseau: "Il retourne chez ses égaux", for the Discourse on Inequality. */
body.rousseau {
    background-color: #e6dcc8;
    background-image: url("images/rousseau-egaux.jpg");
    background-size: cover;
    background-position: center 80%;
}

/* Hume: Eakins, The Biglin Brothers Racing; justice as convention, like
   "two men, who pull the oars of a boat". */
body.hume {
    background-color: #4d5a4a;
    background-image: url("images/biglin.jpg");
    background-size: cover;
    background-position: center 60%;
}

/* Kant: Van Gogh, Starry Night over the Rhône; "the starry heavens above me". */
body.kant {
    background-color: #142033;
    background-image: url("images/starry-rhone.jpg");
    background-size: cover;
    background-position: center top;
}

/* The Nineteenth Century: Turner, Rain, Steam and Speed, the railway age. */
body.nineteenth-century {
    background-color: #b9a77f;
    background-image: url("images/rain-steam-speed.jpg");
    background-size: cover;
    background-position: center 60%;
}

/* Hegel: David's Napoleon crossing the Alps, the "world-soul on horseback" Hegel saw at Jena. */
body.hegel {
    background-color: #3a3a36;
    background-image: url("images/napoleon-alps.jpg");
    background-size: cover;
    background-position: center 25%;
}

/* Mill: Osborn, Nameless and Friendless, a woman artist at the mercy of a dealer. */
body.mill {
    background-color: #5a2e22;
    background-image: url("images/nameless-friendless.jpg");
    background-size: cover;
    background-position: center 30%;
}

/* Marx: Menzel, The Iron Rolling Mill, labor in the age of industry. */
body.marx {
    background-color: #2a2017;
    background-image: url("images/iron-rolling-mill.jpg");
    background-size: cover;
    background-position: center;
}

/* The Twentieth Century: Anders, Earthrise, Apollo 8, 1968. */
body.twentieth-century {
    background-color: #000000;
    background-image: url("images/earthrise.jpg");
    background-size: cover;
    background-position: center bottom;
}

/* Rawls: Strazza, The Veiled Virgin; choosing behind the veil of ignorance. */
body.rawls {
    background-color: #1c1430;
    background-image: url("images/veiled-virgin.jpg");
    background-size: cover;
    background-position: center 25%;
}

/* Nozick: Rembrandt, The Night Watch; the minimal, "night-watchman" state. */
body.nozick {
    background-color: #1e1810;
    background-image: url("images/night-watch.jpg");
    background-size: cover;
    background-position: center 40%;
}

/* MacIntyre: Cole, The Course of Empire: Desolation; After Virtue's "new
   dark ages", the ruins amid which we wait for "another St. Benedict". */
body.macintyre {
    background-color: #6f7480;
    background-image: url("images/desolation.jpg");
    background-size: cover;
    background-position: center 40%;
}

/* These figures stand at the center, so keep the panel off them. */
body.school-of-athens main,
body.middle-ages main,
body.augustine main,
body.aquinas main,
body.machiavelli main,
body.hobbes main,
body.locke main,
body.american-founding main,
body.paine main,
body.eighteenth-century main,
body.rousseau main,
body.kant main,
body.jefferson main,
body.hegel main,
body.mill main,
body.marx main,
body.twentieth-century main,
body.rawls main,
body.nozick main,
body.macintyre main {
    margin-top: auto;
    margin-bottom: 1rem;
}

main {
    background: rgba(20, 14, 8, 0.72);
    padding: 2rem 3rem;
    border-radius: 6px;
    text-align: center;
    max-width: 40rem;
    margin: auto 2rem;
}

/* Pages with prose: a darker panel and left-aligned, readable paragraphs. */
main:has(p) {
    background: rgba(20, 14, 8, 0.86);
    max-width: 42rem;
    padding: 2.5rem 3rem;
}

main p {
    text-align: left;
    font-size: 1.2rem;
    line-height: 1.65;
    margin: 0 0 1.1em;
}

/* Pictures in an essay, with their credits underneath. */
main figure {
    margin: 1.5em 0 2em;
}

main figure img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    margin: 0 auto;
}

/* A picture marked {.smaller} in the Markdown is two thirds the usual size. */
main figure img.smaller {
    max-width: 67%;
    max-height: 53vh;
}

@media (max-width: 600px) {
    main figure img.smaller {
        max-width: 100%;
    }
}

main figcaption {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-top: 0.6em;
    color: #d8ccb4;
}

h1 {
    font-size: 3rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    margin: 0 0 1.5rem;
}

ul, ol {
    font-size: 1.5rem;
    line-height: 2;
    margin: 0;
}

ul {
    list-style: none;
    padding: 0;
}

ol {
    display: inline-block;
    text-align: left;
}

a {
    color: #f3d58a;
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

nav.back {
    margin-top: 1.5rem;
    font-size: 1rem;
}

footer {
    background: rgba(20, 14, 8, 0.72);
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Phones: use more of the narrow screen for text. */
@media (max-width: 600px) {
    main, main:has(p) {
        margin: auto 0.75rem;
        padding: 1.5rem 1.25rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    main p {
        font-size: 1.1rem;
    }
}
