/*
Theme Name: Brendan Tully
Theme URI: https://www.brendantully.me/
Author: Brendan Tully
Description: Personal site. One column, text first, a posts list that mixes site posts with syndicated videos and articles from each brand.
Version: 1.0.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: brendantully
*/

:root{
  --ink:#000000;
  --muted:#5f6368;
  --rule:#e6e6e6;
  --accent:#1f4fd1;
  --accent-ink:#163a9b;
  --bg:#ffffff;
  --wash:#f5f5f3;
  --w:680px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:17px;line-height:1.6}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}
a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:var(--w);margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* header */
header.site{padding:28px 0 0}
header.site .row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brandname{font-weight:700;font-size:19px;letter-spacing:-.01em;color:var(--ink)}
.brandname:hover{text-decoration:none;color:var(--accent)}
nav.primary ul{display:flex;gap:22px;flex-wrap:wrap;list-style:none;margin:0;padding:0}
nav.primary a{color:var(--ink);font-weight:500;font-size:15px}

/* hero */
.hero{padding:64px 0 48px;border-bottom:1px solid var(--rule)}
.hero .cols{display:flex;gap:28px;align-items:flex-start}
.hero img.photo{width:88px;height:88px;border-radius:50%;object-fit:cover;flex:none;margin-top:8px}
.hero h1{font-size:40px;line-height:1.12;letter-spacing:-.03em;font-weight:700;margin:0 0 18px}
.hero p{margin:0 0 10px;max-width:560px}
.hero p.quiet{color:var(--muted);font-size:15.5px}
.hero .status{display:inline-flex;align-items:center;gap:10px;margin-top:22px;padding:8px 12px 8px 10px;background:var(--wash);border-radius:999px;font-size:14px;color:var(--ink)}
.hero .status .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#1a9b4a;margin-right:8px;vertical-align:1px}
.hero .status a{color:var(--ink);font-weight:500}

/* sections */
section,.section{padding:48px 0;border-bottom:1px solid var(--rule)}
main > :last-child{border-bottom:0}
h2{font-size:15px;font-weight:700;letter-spacing:0;margin:0 0 22px;color:var(--ink);display:flex;align-items:baseline;justify-content:space-between;gap:12px}
h2 .more{font-weight:500;font-size:14px;color:var(--muted)}
h3.sub{font-size:14px;font-weight:600;color:var(--muted);margin:26px 0 12px}
h3.sub:first-child{margin-top:0}

/* posts list */
ul.posts{list-style:none;margin:0;padding:0}
ul.posts li{display:grid;grid-template-columns:72px 1fr auto;gap:0 18px;align-items:baseline;padding:11px 0;border-top:1px solid var(--rule)}
ul.posts li:first-child{border-top:0;padding-top:0}
ul.posts time{color:var(--muted);font-size:14px;white-space:nowrap}
ul.posts a.title{color:var(--ink);font-weight:700;font-size:18px;letter-spacing:-.01em;line-height:1.35}
ul.posts a.title:hover{color:var(--accent)}
ul.posts .src{color:var(--muted);font-size:13px;white-space:nowrap}
ul.posts .src.x{font-weight:700;letter-spacing:.02em}
ul.posts li.pinned a.title::before{content:"Pinned";display:inline-block;font-size:11px;font-weight:700;color:var(--accent-ink);background:#e9efff;border-radius:4px;padding:1px 6px;margin-right:8px;vertical-align:2px}
ul.posts.syndicated a.title{font-weight:600;font-size:17px}
.feednote{margin:18px 0 0;font-size:14.5px;color:var(--muted)}
.feednote a{color:var(--muted);text-decoration:underline;text-underline-offset:3px}

/* videos */
ul.videos{list-style:none;margin:0 0 6px;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:20px 16px}
ul.videos .play{display:block;width:100%;padding:0;border:0;background:#000;border-radius:6px;overflow:hidden;position:relative;cursor:pointer;aspect-ratio:16/9}
ul.videos .play img{width:100%;height:100%;object-fit:cover;opacity:.92}
ul.videos .play:hover img{opacity:1}
ul.videos .tri{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:rgba(0,0,0,.72)}
ul.videos .tri::after{content:"";position:absolute;left:18px;top:13px;border-left:14px solid #fff;border-top:9px solid transparent;border-bottom:9px solid transparent}
ul.videos.single{grid-template-columns:1fr;margin-bottom:28px}
ul.videos.single .play{border-radius:8px}
ul.videos iframe{width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:6px}
ul.videos p{margin:8px 0 0;font-size:14.5px;line-height:1.4}
ul.videos p a{color:var(--ink);font-weight:600;display:block}
ul.videos p .who{color:var(--muted);font-size:13px;display:block}
ul.videos time{color:var(--muted);font-size:13px;display:block}

.player{display:flex;align-items:center;gap:14px;margin:0 0 28px}
.player audio{width:100%;max-width:560px}
.player .dur{color:var(--muted);font-size:14px;white-space:nowrap}

/* brands */
ul.brands{list-style:none;margin:0;padding:0}
ul.brands li{display:grid;grid-template-columns:150px 1fr;gap:20px;align-items:center;padding:18px 0;border-top:1px solid var(--rule)}
ul.brands li:first-child{border-top:0;padding-top:0}
ul.brands .logo{height:40px;width:150px;display:flex;align-items:center}
ul.brands .logo img{max-width:150px;width:auto}
ul.brands .logo-text{font-weight:700}
ul.brands .what{margin:0;font-size:16px}
ul.brands .what strong{font-weight:700}
ul.brands .what a{white-space:nowrap}
ul.brands .years{color:var(--muted)}
ul.brands.archived .logo img{max-height:40px;max-width:150px;width:auto}

/* brand page */
.brandhead{padding:48px 0 32px;border-bottom:1px solid var(--rule)}
.brandhead .logo img{max-width:220px;margin-bottom:22px}
.brandhead h1{font-size:34px;line-height:1.15;letter-spacing:-.025em;margin:0 0 12px}
.brandhead p.lead{font-size:18px;margin:0 0 6px;max-width:560px}
.brandhead p.visit{margin:14px 0 0;font-weight:500}

/* talks */
ul.talks{list-style:none;margin:0;padding:0}
ul.talks li{padding:9px 0;border-top:1px solid var(--rule);display:grid;grid-template-columns:72px 1fr;gap:18px;align-items:baseline}
ul.talks li:first-child{border-top:0;padding-top:0}
ul.talks time{color:var(--muted);font-size:14px}
ul.talks .host{color:var(--muted);font-size:15px}

/* article content */
.entry-head{padding-top:56px;padding-bottom:24px}
.entry-head h1{font-size:36px;line-height:1.15;letter-spacing:-.025em;margin:0 0 10px}
.entry-head .meta{color:var(--muted);font-size:14.5px;display:flex;gap:14px;flex-wrap:wrap}
.entry{padding-bottom:56px;font-size:18px;line-height:1.65}
.entry > *{max-width:var(--w);margin-left:auto;margin-right:auto}
.entry h2{display:block;font-size:24px;letter-spacing:-.02em;margin:40px 0 12px}
.entry h3{font-size:20px;margin:30px 0 10px}
.entry p,.entry ul,.entry ol{margin:0 0 20px}
.entry img{border-radius:6px}
.entry blockquote{margin:0 0 20px;padding-left:18px;border-left:3px solid var(--rule);color:var(--muted)}
.entry pre{background:var(--wash);padding:16px;border-radius:6px;overflow:auto;font-size:14px}
.entry code{background:var(--wash);padding:1px 5px;border-radius:3px;font-size:.9em}
.entry iframe,.entry .wp-block-embed iframe{max-width:100%}
.entry iframe[src*="youtube"],.entry iframe[src*="youtu.be"],.entry iframe[src*="vimeo"]{width:100%;height:auto;aspect-ratio:16/9;border-radius:6px}
.entry audio{width:100%}
.reply{margin:0 auto 56px;font-size:15px;color:var(--muted)}
.page .entry-head{padding-top:48px}
.archive-head{padding-top:48px;padding-bottom:8px}
.archive-head h1{font-size:30px;letter-spacing:-.025em;margin:0 0 6px}
.archive-head p{color:var(--muted);margin:0}
.pagination{display:flex;gap:16px;padding-top:24px;padding-bottom:56px;font-weight:500}

/* now + subscribe */
.now p{margin:0 0 12px;max-width:560px}
form.sub{display:flex;gap:10px;max-width:460px;margin-top:8px}
form.sub input{flex:1;font:inherit;font-size:16px;padding:11px 14px;border:1px solid #c9c9c9;border-radius:6px;min-width:0}
form.sub button{font:inherit;font-weight:700;font-size:15px;background:var(--ink);color:#fff;border:0;border-radius:6px;padding:11px 18px;cursor:pointer}
form.sub button:hover{background:var(--accent)}
.subnote{font-size:14px;color:var(--muted);margin:10px 0 0}

/* footer */
footer.site{padding:36px 0 56px;color:var(--muted);font-size:14px;border-top:1px solid var(--rule)}
footer.site .links{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:14px}
footer.site .links a{color:var(--ink);font-weight:500}
footer.site p{margin:0 0 6px}

@media (max-width:640px){
  body{font-size:16.5px}
  header.site{padding-top:22px}
  .hero{padding:44px 0 36px}
  .hero .cols{flex-direction:column;gap:18px}
  .hero h1{font-size:31px}
  .hero .status{display:flex;flex-wrap:wrap;border-radius:12px;padding:12px 14px;gap:6px 10px}
  .hero .status a{flex-basis:100%;padding-left:16px}
  ul.posts li{grid-template-columns:1fr auto;gap:2px 12px}
  ul.posts time{grid-column:1 / -1;order:3}
  ul.posts a.title{font-size:17px}
  ul.videos{grid-template-columns:repeat(2,1fr)}
  ul.brands li{grid-template-columns:1fr;gap:10px}
  ul.talks li{grid-template-columns:1fr;gap:2px}
  form.sub{flex-direction:column}
  .entry-head h1{font-size:28px}
  .entry{font-size:17px}
}
@media (prefers-reduced-motion:no-preference){
  a,button{transition:color .12s ease,background-color .12s ease}
}
