/* andyedgewrites.com */
@font-face { font-family: "Libre Baskerville"; src: url(../fonts/libre-baskerville-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url(../fonts/libre-baskerville-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url(../fonts/libre-baskerville-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url(../fonts/crimson-text-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url(../fonts/crimson-text-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url(../fonts/crimson-text-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mrs Saint Delafield"; src: url(../fonts/mrs-saint-delafield-latin-400-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --bg: #121212;
  --panel: #1a1b1b;
  --line: #2c2f2f;
  --cream: #ddd6c6;
  --muted: #a9a294;
  --bright: #f3efe6;
  --accent: #c0643a;
  --on-accent: #fbf3ea;
  --head: "Libre Baskerville", Georgia, serif;
  --body: "Crimson Text", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font: 400 1.22rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
em { font-style: italic; }
strong { color: var(--bright); font-weight: 700; }

.banner { background: var(--accent); color: var(--on-accent); text-align: center; font: 400 .95rem/1.4 var(--head); padding: .55rem 1rem; }

.nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 2.2rem; padding: 1.1rem 1rem; border-bottom: 1px solid var(--line); }
.nav a { color: var(--cream); font: 400 .82rem var(--head); letter-spacing: .14em; text-transform: uppercase; }
.nav a.on, .nav a:hover { color: var(--accent); text-decoration: none; }

.hero { height: min(72vh, 44rem); background: #1a1a1a url(../img/hero.jpg) center 55% / cover no-repeat; display: flex; align-items: center; justify-content: center; position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.05) 50%, rgba(18,18,18,.9)); }
.hero .name { position: relative; z-index: 1; margin: 0; font: 400 clamp(4.5rem, 11vw, 9rem)/1 "Mrs Saint Delafield", cursive; color: var(--bright); text-shadow: 0 2px 24px rgba(0,0,0,.55); }

.pagehead { text-align: center; padding: 3.2rem 1rem 1rem; }
.pagehead .name.small { font: 400 2.4rem/1 "Mrs Saint Delafield", cursive; color: var(--bright); }
.pagehead h1 { font: 400 2.3rem/1.25 var(--head); color: var(--bright); margin: 1.2rem 0 0; }

main { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
section { padding: 3.5rem 0 1rem; }
h2 { font: 400 2rem/1.25 var(--head); color: var(--bright); text-align: center; margin: 0 0 1.6rem; }
h3 { font: 400 1.25rem/1.35 var(--head); color: var(--bright); margin: .2rem 0 .6rem; }
.center, .lead, .intro { text-align: center; }
.intro { max-width: 40rem; margin: 2rem auto 0; color: var(--muted); }
.kicker { font: 400 .78rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 17rem 1fr; gap: 3rem; align-items: center; }
.about h2 { text-align: left; }
.about .portrait { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1); }
.about p { margin: 0 0 1rem; }

/* Upcoming */
.upcoming { list-style: none; padding: 0; margin: 0 auto; max-width: 44rem; }
.upcoming li { border-bottom: 1px solid var(--line); }
.upcoming a { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1.5rem; padding: 1rem .2rem; color: var(--cream); }
.upcoming a:hover { text-decoration: none; background: var(--panel); }
.upcoming .t { font: 400 1.1rem var(--head); color: var(--bright); }
.upcoming .w { grid-column: 1; font-style: italic; color: var(--muted); }
.upcoming .d { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--accent); font: 400 .85rem var(--head); letter-spacing: .08em; }
.feature { text-align: center; max-width: 44rem; margin: 2rem auto 0; }
.feature .t { font-family: var(--head); color: var(--bright); }

/* Poetry */
.cert { width: 100%; max-width: 30rem; margin: 0 auto 1.5rem; border-radius: 4px; }

/* Screenplay news, 2 x 2 */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card { background: var(--panel); border: 1px solid var(--line); padding: 1.6rem; text-align: center; }
.card .badge { height: 11rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; }
.card .badge img { max-height: 100%; width: auto; border-radius: 3px; }
.card p:last-child { margin: 0; color: var(--muted); }

.emblem { width: 11rem; height: 11rem; border: 2px solid var(--accent); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; }
.emblem span { font: 400 .6rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.emblem b { font: 700 1.25rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--bright); }
.emblem i { font: 400 1.7rem/1.1 "Mrs Saint Delafield", cursive; color: var(--accent); }
.hp { display: none; }

/* Manuscripts and screenplays */
.work { border-top: 1px solid var(--line); padding: 3rem 0 1rem; max-width: 46rem; margin: 3rem auto 0; }
.work h2 { margin-bottom: .5rem; }
.work .meta { text-align: center; color: var(--accent); font: 400 .82rem var(--head); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1.8rem; }
.work .meta span { color: var(--muted); padding: 0 .3rem; }
.work .logline { font-size: 1.35rem; color: var(--bright); }
.work .comps, .work .ip { color: var(--muted); }
.work .comps strong { font: 400 .78rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-right: .6rem; }
.work .ip { font-style: italic; }
.honors { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.honors li { border-left: 3px solid var(--accent); padding: .25rem 0 .25rem .9rem; margin: .5rem 0; color: var(--bright); }

/* Publications, one row of 3 */
.out { margin-top: 3rem; }
.pubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
@media (max-width: 1000px) and (min-width: 761px) { .pubs { grid-template-columns: repeat(2, 1fr); } }
.pub { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pub .cover img, .pub .nocover { width: 12rem; height: 18.5rem; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.pub .nocover { background: var(--panel); border: 1px solid var(--line); }
.pub .kicker { margin-top: 1.4rem; }
.pub h2 { font-size: 1.5rem; margin: .4rem 0 .2rem; }
.pub .where { color: var(--muted); margin: 0 0 .8rem; }
.pub .blurb { margin-bottom: 1.6rem; }
.btn { display: inline-block; margin-top: auto; border: 1px solid var(--accent); color: var(--accent); font: 400 .8rem var(--head); letter-spacing: .16em; text-transform: uppercase; padding: .7rem 1.8rem; }
.btn:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }

/* Contact */
.contact { border-top: 1px solid var(--line); margin-top: 3rem; }
.lead { max-width: 36rem; margin: 0 auto 1.8rem; color: var(--muted); }
.form { max-width: 32rem; margin: 0 auto; display: grid; gap: .9rem; }
.form input, .form textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--bright); font: 400 1.1rem var(--body); padding: .8rem 1rem; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form button { justify-self: center; background: var(--accent); color: var(--on-accent); border: 0; font: 400 .85rem var(--head); letter-spacing: .16em; text-transform: uppercase; padding: .85rem 2.6rem; cursor: pointer; }
.mail { text-align: center; color: var(--muted); margin-top: 2rem; font-size: 1.05rem; }

footer { border-top: 1px solid var(--line); text-align: center; padding: 2.2rem 1rem 2.6rem; color: var(--muted); font-size: 1rem; }
footer > a { font: 400 .8rem var(--head); letter-spacing: .16em; text-transform: uppercase; }
footer p { margin: .6rem 0 0; }
footer .credit { font-size: .9rem; }

@media (max-width: 760px) {
  body { font-size: 1.12rem; }
  .hero { height: 22rem; }
  .about { grid-template-columns: 1fr; text-align: center; gap: 1.6rem; }
  .about h2 { text-align: center; }
  .about .portrait { max-width: 15rem; margin: 0 auto; }
  .cards, .pubs { grid-template-columns: 1fr; }
  .upcoming a { grid-template-columns: 1fr; }
  .upcoming .d { grid-row: auto; grid-column: 1; }
  h2 { font-size: 1.65rem; }
  .pagehead h1 { font-size: 1.8rem; }
}

/* Themes. Each sets the accent color and the colored sections on the home page. */
body[class*="theme-"] { --bg: #16110e; --panel: #211913; --line: #33291f; }
body[class*="theme-"] .hero { background-color: var(--bg); }
body[class*="theme-"] .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,0) 50%, var(--bg)); }
body[class*="theme-"] main { max-width: none; padding: 0 0 3rem; }
body[class*="theme-"] main > section, body[class*="theme-"] main > .intro, body[class*="theme-"] main > .work,
body[class*="theme-"] main > .out, body[class*="theme-"] main > .pubs { margin-left: auto; margin-right: auto; }
body[class*="theme-"] main > section { padding: 4rem max(1.5rem, calc(50% - 32rem)) 3rem; }
body[class*="theme-"] main > .work { max-width: 46rem; padding-left: 1.5rem; padding-right: 1.5rem; }
body[class*="theme-"] main > .pubs { max-width: 64rem; padding: 0 1.5rem; }
body[class*="theme-"] main > section:nth-of-type(2) { background: var(--band1); }
body[class*="theme-"] main > section:nth-of-type(4) { background: var(--band2); }
body[class*="theme-"] .banner { background: var(--accent); color: var(--on-accent); }
body[class*="theme-"] .btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
body[class*="theme-"] .btn:hover { filter: brightness(1.1); }
body[class*="theme-"] .card { background: rgba(0,0,0,.22); }
body[class*="theme-"] .contact { margin-top: 0; }
body.theme-teal { --accent: #2fc4c0; --on-accent: #06201f; --band1: #0e2a2b; --band2: #0b2122; }
body.theme-autumn { --accent: #b86a3c; --on-accent: #fbf0e6; --band1: #3b1d14; --band2: #2a1a12; }
body.theme-bone { --accent: #d8ccb0; --on-accent: #1d1712; --band1: #241c16; --band2: #1e1813; }
body.theme-autumn-bone { --accent: #d8ccb0; --on-accent: #1d1712; --band1: #3b1d14; --band2: #2a1a12; }

/* Light bone page with leaf orange */
body.theme-bone-orange { --bg: #ebe3d4; --panel: #e2d7c4; --line: #cdbfa6; --cream: #2e261f; --muted: #6a5b4b; --bright: #1c1612;
  --accent: #b5602c; --on-accent: #fbf3ea; --band1: #e0d1b8; --band2: #e4d8c4; }
.theme-bone-orange .nav a { color: #3a3027; }
.theme-bone-orange .nav a.on, .theme-bone-orange .nav a:hover { color: var(--accent); }
.theme-bone-orange .hero .name { color: #f6efe2; }
body.theme-bone-orange .card { background: #f1eadd; border-color: var(--line); }
.theme-bone-orange .badge.dark img { background: #2a211b; border-radius: 6px; padding: .6rem 1rem; }
.theme-bone-orange .pub .cover img { box-shadow: 0 10px 24px rgba(40,25,10,.3); }
.theme-bone-orange .form input, .theme-bone-orange .form textarea { background: #f4eee3; }
.theme-bone-orange .about .portrait { box-shadow: 0 8px 22px rgba(40,25,10,.25); }

/* Dark brown page with burnt orange sections and bone headings */
body.theme-ember { --bg: #1d1410; --panel: #2a1d16; --line: #3d2b20; --cream: #e6dccb; --muted: #c4b49c; --bright: #f1e8d8;
  --accent: #bf6a32; --on-accent: #1d1007; --band1: #5a2713; --band2: #47200d; }
body.theme-ember main > section:nth-of-type(2) p, body.theme-ember main > section:nth-of-type(4) p { color: #eadfcd; }
body.theme-ember main > section:nth-of-type(2) .kicker, body.theme-ember main > section:nth-of-type(4) .kicker { color: #f0b183; }
body.theme-ember main > section:nth-of-type(2) .btn { background: #f1e8d8; border-color: #f1e8d8; color: #4a200d; }
body.theme-ember .card { background: rgba(20,10,5,.3); border-color: rgba(255,220,190,.12); }
body.theme-ember .card p:last-child { color: #e2d3bf; }
body.theme-ember .emblem { border-color: #f0b183; }
body.theme-ember .emblem i { color: #f0b183; }
body.theme-ember footer { background: #160f0c; }
/* More bone in the ember theme */
body.theme-ember { --bright: #eadbbd; }
body.theme-ember .nav { background: #e3d5b9; border-bottom: 0; }
body.theme-ember .nav a { color: #3b2516; }
body.theme-ember .nav a.on, body.theme-ember .nav a:hover { color: #9a4f20; }
body.theme-ember main > section:nth-of-type(3) { background: #e3d5b9; }
body.theme-ember main > section:nth-of-type(3) h2 { color: #2a1a10; }
body.theme-ember main > section:nth-of-type(3) p { color: #3b2b1e; }
body.theme-ember main > section:nth-of-type(3) strong { color: #2a1a10; }
body.theme-ember .btn, body.theme-ember .form button { background: #e3d5b9; border-color: #e3d5b9; color: #4a200d; }
body.theme-ember .banner { background: var(--band1); color: #eadbbd; }

/* One continuous dark brown page, orange accent, bone headings and buttons */
body.theme-hearth { --bg: #1c140f; --panel: #271c15; --line: #3a2a1f; --cream: #e4d9c6; --muted: #b9a88f; --bright: #eadbbd;
  --accent: #c46d34; --on-accent: #1d1007; --band1: transparent; --band2: transparent; }
body.theme-hearth .nav { border-bottom: 1px solid var(--line); }
body.theme-hearth .btn, body.theme-hearth .form button { background: #e3d5b9; border-color: #e3d5b9; color: #4a200d; }
body.theme-hearth .banner { background: #5a2713; color: #eadbbd; }
body.theme-hearth main > section + section { border-top: 1px solid var(--line); }
body.theme-hearth main > section { max-width: 64rem; padding: 4rem 1.5rem 3rem; }
.honors-list .row { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1.5rem; padding: 1rem .2rem; }
.honors-list .t em { font-style: italic; }
.honors-list .d { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--accent); font: 400 .85rem var(--head); letter-spacing: .08em; }
@media (max-width: 760px) { .honors-list .row { grid-template-columns: 1fr; } .honors-list .d { grid-row: auto; grid-column: 1; } }
.honors-list a.row { color: var(--cream); }
.honors-list a.row:hover { text-decoration: none; background: var(--panel); }
.honors-list a.row .t::after { content: " \2192"; color: var(--accent); font-size: .85em; }
.work, .pub { scroll-margin-top: 1.5rem; }

/* Four covers across. Titles and venue lines hold two lines each so the blurbs line up. */
@media (min-width: 1001px) {
  .pub h2 { font-size: 1.15rem; line-height: 1.35; min-height: 2.7em; display: flex; align-items: center; justify-content: center; }
  .pub .where { min-height: 3.3em; }
}
