/* harveybarnhard.com — site styles */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
:root {
  --ink: #1c1814;
  --muted: #79706a;
  --bg: #faf7f2;
  --accent: #7c2d3a;
  --rule: #e0d9cf;
  --body: #322c26;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --serif: "Source Serif 4", Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--accent); color: #fff; }
a { transition: color .15s ease; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
.page { max-width: 780px; margin: 0 auto; padding: 52px 28px 96px; }
.page-wide { max-width: 1000px; }

/* Nav */
nav.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 64px; }
nav.top .brand { font-family: var(--mono); font-size: 13.5px; color: var(--muted); text-decoration: none; }
nav.top .brand:hover { color: var(--accent); }
nav.top .menu a { font-family: var(--mono); font-size: 13.5px; color: var(--ink);
                  text-decoration: none; margin-left: 24px; }
nav.top .menu a:hover, nav.top .menu a.here { color: var(--accent); }

/* Hero (homepage) */
.hero { display: grid; grid-template-columns: 1fr 140px; gap: 32px; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: 48px; font-weight: 700;
           letter-spacing: -0.015em; line-height: 1.05; }
.hero .role { font-family: var(--mono); font-size: 14px; color: var(--accent); margin-top: 12px; }
.hero img { width: 140px; height: 140px; border-radius: 6px; object-fit: cover; }

/* Page titles (subpages) */
h1.page-title { font-family: var(--serif); font-size: 36px; font-weight: 700;
                letter-spacing: -0.015em; line-height: 1.1; margin-bottom: 10px; }
.page-sub { font-family: var(--mono); font-size: 13.5px; color: var(--accent); margin-bottom: 36px; }

/* Skyline graphic (homepage) */
.skyline { display: block; height: 46px; margin-top: 30px; }
.skyline svg { width: 100%; height: 46px; display: block; }
.skyline:hover svg polyline { stroke-opacity: 1; }

/* Links row */
.rule-strong { border-top: 2px solid var(--ink); margin-top: 6px; }
.links { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 14px; }
.links a { font-family: var(--mono); font-size: 13px; color: var(--ink); text-decoration: none; }
.links a::before { content: "\2192 "; color: var(--accent); }
.links a:hover { color: var(--accent); }

/* Prose */
.bio, .prose { max-width: 640px; }
.bio { margin-top: 44px; }
.bio p, .prose p { margin-bottom: 16px; font-size: 17px; color: var(--body); }
.prose a, .bio a { color: var(--accent); text-decoration: none; }
.prose a:hover, .bio a:hover { text-decoration: underline; }

/* Section headers */
h2.sec { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.15em;
         text-transform: uppercase; color: var(--muted); margin: 60px 0 8px; font-weight: 500; }
h2.sec::before { content: "\00a7 "; color: var(--accent); }

/* Papers */
.paper { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.paper:first-of-type { border-top: 2px solid var(--ink); }
.paper .row { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.paper .title { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.paper .title a { color: var(--ink); text-decoration: none; }
.paper .title a:hover { color: var(--accent); }
.paper .year { font-family: var(--mono); font-size: 13.5px; color: var(--muted); flex: none; }
.paper .meta { color: var(--muted); font-size: 15px; margin-top: 4px; }
.paper .meta .me { font-weight: 500; }
.paper .tags { margin-top: 10px; }
.paper .tags a { font-family: var(--mono); font-size: 12.5px; color: var(--accent);
                 text-decoration: none; margin-right: 18px; }
.paper .tags a:hover { text-decoration: underline; }
.paper details { margin-top: 10px; max-width: 640px; }
.paper summary { font-family: var(--mono); font-size: 12.5px; color: var(--muted); cursor: pointer; }
.paper details p { font-size: 15.5px; color: var(--body); margin-top: 8px; }
.new-badge { font-family: var(--mono); font-size: 11px; color: #fff; background: var(--accent);
             padding: 2px 7px; border-radius: 3px; margin-left: 10px; vertical-align: 4px; }

/* Elsewhere strip (homepage) + footer */
.elsewhere { margin-top: 90px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
             padding: 12px 0; display: flex; gap: 30px; flex-wrap: wrap; align-items: baseline; }
.elsewhere .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
                    text-transform: uppercase; color: var(--muted); }
.elsewhere a { font-family: var(--mono); font-size: 13px; color: var(--ink); text-decoration: none; }
.elsewhere a:hover { color: var(--accent); }
.elsewhere a::before { content: "\2192 "; color: var(--accent); }
footer.site { margin-top: 28px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
footer.site a { color: var(--muted); }

/* CV page */
.cv-actions { margin: 0 0 28px; }
.cv-actions a { font-family: var(--mono); font-size: 13px; color: var(--accent);
                text-decoration: none; border: 1px solid var(--accent); padding: 8px 14px;
                border-radius: 4px; }
.cv-actions a:hover { background: var(--accent); color: #fff; }
.cv-frame { width: 100%; height: 1100px; border: 1px solid var(--rule); border-radius: 4px;
            background: #fff; }

/* Day entries (coast to coast) */
.day { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.day summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between;
               gap: 24px; align-items: baseline; }
.day summary::-webkit-details-marker { display: none; }
.day .title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); }
.day summary:hover .title { color: var(--accent); }
.day .date { font-family: var(--mono); font-size: 13px; color: var(--muted); flex: none; }
.day .content { margin-top: 16px; }
.day iframe.yt { width: 100%; max-width: 560px; aspect-ratio: 16/9; border: 0; }
.day .strava-embed-placeholder { margin-top: 12px; }

/* Photography */
.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-buttons button { font-family: var(--mono); font-size: 13px; color: var(--ink);
                         background: none; border: 1px solid var(--rule); padding: 7px 14px;
                         border-radius: 4px; cursor: pointer; }
.filter-buttons button:hover, .filter-buttons button.active { border-color: var(--accent);
                                                              color: var(--accent); }
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.portfolio .portfolio-item { position: relative; cursor: pointer; overflow: hidden; border-radius: 4px; }
.portfolio .portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block;
                                 aspect-ratio: 1; transition: transform .25s; }
.portfolio .portfolio-item:hover img { transform: scale(1.03); }

/* Lightbox modal */
.custom-modal { display: none; position: fixed; z-index: 50; inset: 0;
                background: rgba(20, 16, 12, 0.92); }
.custom-modal-content { position: relative; margin: auto; top: 50%; transform: translateY(-50%);
                        max-width: 92vw; text-align: center; }
.custom-modal-content img { max-width: 90vw; max-height: 84vh; border-radius: 4px; }
.custom-modal .close { position: absolute; top: -40px; right: 8px; color: #fff; font-size: 32px;
                       cursor: pointer; z-index: 51; }
.custom-modal-caption { color: #d8d2c8; font-family: var(--mono); font-size: 13px;
                        margin-bottom: 10px; }
.custom-modal .prev, .custom-modal .next { position: absolute; top: 50%; transform: translateY(-50%);
                                           color: #fff; font-size: 30px; cursor: pointer;
                                           padding: 16px; user-select: none; }
.custom-modal .prev { left: -8px; }
.custom-modal .next { right: -8px; }

/* Charts */
.chart-wrap { margin-top: 24px; }
.chart-wrap svg { width: 100%; height: auto; }
#active_time text, #infobox { font-family: var(--mono); font-size: 13px; fill: var(--ink); }
.axis path, .axis line { stroke: var(--muted); }
.axis text { fill: var(--muted); font-family: var(--mono); }

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
  .hero img { order: -1; }
  .hero h1 { font-size: 38px; }
  h1.page-title { font-size: 30px; }
  .elsewhere { gap: 16px; }
  .portfolio { grid-template-columns: repeat(2, 1fr); }
  .cv-frame { height: 75vh; }
}
