/* trevoryamada.com: one stylesheet for every page.
   Layout is fluid: no fixed page width, so the site adapts to any window. */

:root {
  --bg: #000;
  --bg-raised: #111418;
  --bg-light: #e9e7e4;
  --text: #f4f2ee;
  --text-muted: #b9b6b0;
  --text-dark: #141414;
  --accent: #0522ff;
  --accent-hover: #2f48ff;
  --rule: rgba(255, 255, 255, 0.18);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Fraunces", Georgia, serif;
  --font-mark: "Libre Baskerville", Baskerville, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; } /* clear the sticky header when jumping to a section */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 1rem + 0.2vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 1.4rem + 4vw, 4.5rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); }
h3, .h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header and menu ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { font-family: var(--font-mark); font-style: italic; font-weight: 700; font-size: 1.35rem; text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); color: var(--text); border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 3vw, 36px); }
.site-nav a { text-decoration: none; font-family: var(--font-head); font-size: 1.05rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #000; border-bottom: 1px solid var(--rule); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff;
  font-family: var(--font-body); font-weight: 700; letter-spacing: 0.06em;
  padding: 14px 26px; border-radius: 4px; border: 2px solid var(--accent);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--rule); }
.btn.ghost:hover { border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.eyebrow { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.2em; }

/* ---------- Home ---------- */

.hero { padding: clamp(56px, 12vw, 140px) 0 clamp(48px, 8vw, 96px); }
.hero h1 { font-family: var(--font-mark); font-style: italic; font-weight: 700; margin-bottom: 0.4em; }
.hero h1 span { display: block; }
.hero .hero-name { font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); margin-top: 0.3em; color: var(--text-muted); }
.hero .lede { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--text-muted); max-width: 40ch; margin-bottom: 2em; }

.contact-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list .label { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; color: var(--text-muted); }
.contact-list a { font-size: 1.1rem; word-break: break-word; }
.social { display: flex; gap: 14px; margin-top: 18px; }
.social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: 50%; }
.social a:hover { border-color: #fff; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 800px) { .contact-strip { grid-template-columns: 1fr; } }

.job { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(20px, 4vw, 48px); padding: clamp(28px, 5vw, 48px) 0; border-top: 1px solid var(--rule); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job h3 { margin-bottom: 0.15em; }
.job .org { font-family: var(--font-head); color: var(--text-muted); margin: 0; }
.job .dates { font-family: var(--font-head); font-size: 1.05rem; margin: 0 0 14px; }
.job ul { margin: 16px 0 0; padding-left: 1.2em; }
.job li { margin-bottom: 0.4em; }
.job .logo { background: #fff; border-radius: var(--radius); padding: 14px; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; }
.job .logo.dark { background: var(--bg-raised); }
.job .logo img { max-height: 100%; width: auto; object-fit: contain; }
@media (max-width: 700px) {
  .job { grid-template-columns: 1fr; }
  .job .side { order: -1; display: flex; align-items: center; gap: 16px; }
  .job .logo { width: 120px; flex: none; }
  .job .dates { margin: 0; }
}

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
@media (min-width: 560px) and (max-width: 1000px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--bg-raised); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.card ul { margin: 0; padding-left: 1.2em; }

.edu { display: grid; gap: 24px; }
.edu-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.edu-item h3 { margin: 0; }
.edu-item p { margin: 0; color: var(--text-muted); }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--text-muted); }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--rule); padding: 8px 0; border-radius: 0;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact-form button { justify-self: start; cursor: pointer; font-size: 1rem; }
@media (max-width: 560px) { .contact-form { grid-template-columns: 1fr; } }

/* ---------- Embeds ---------- */

.embed { width: 100%; border: 0; border-radius: 12px; display: block; background: var(--bg-raised); }
.embed.tall { height: 352px; }
.embed.short { height: 152px; }

/* ---------- Projects ---------- */

.page-head { padding: clamp(56px, 10vw, 120px) 0 clamp(32px, 6vw, 64px); }
.page-head h1 { font-style: italic; }
.page-head p { color: var(--text-muted); max-width: 52ch; font-size: 1.15rem; }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; padding-bottom: clamp(48px, 8vw, 96px); }
.project { display: flex; flex-direction: column; background: var(--bg-raised); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.project .thumb { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 32px; }
.project .thumb img { max-height: 100%; width: auto; }
.project .thumb.substack { background: linear-gradient(135deg, #ff6719, #ffb380); }
.project .thumb.substack span { font-family: var(--font-head); font-style: italic; font-size: clamp(1.5rem, 1rem + 2vw, 2.2rem); color: #111; text-align: center; line-height: 1.1; }
.project .thumb.groundhog { background: #000; }
.project .body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project .body p { color: var(--text-muted); }
.project .body .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Music ---------- */

.music-hero {
  min-height: calc(100vh - 64px); min-height: calc(100svh - 64px);
  display: flex; align-items: center;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(80, 110, 255, 0.95), transparent 70%),
    radial-gradient(55% 45% at 85% 85%, rgba(255, 170, 30, 0.9), transparent 70%),
    radial-gradient(70% 60% at 80% 30%, rgba(180, 160, 230, 0.9), transparent 70%),
    #e8ecf8;
  color: var(--text-dark);
}
.music-hero .wrap { padding-top: 48px; padding-bottom: 48px; }
.music-hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.want { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(4px, 1vw, 12px); }
.want li:nth-child(even) { text-align: right; }
.want a {
  font-family: var(--font-head); font-size: clamp(2.6rem, 1.5rem + 6vw, 6.5rem); line-height: 1.05;
  text-decoration: none; display: inline-block; transition: transform 0.2s;
}
.want a:hover, .want a:focus-visible { transform: translateX(8px); }
/* Each word is filled with a slowly moving gradient in its own colour. */
.want a {
  color: var(--c1);
  background: linear-gradient(100deg, var(--c1) 0%, var(--c2) 25%, var(--c1) 50%, var(--c2) 75%, var(--c1) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: want-fill 6s linear infinite;
}
.want .w1 { --c1: #1a1a1a; --c2: #6b6b6b; }
.want .w2 { --c1: #1530c9; --c2: #6f86ff; animation-delay: -1.5s; }
.want .w3 { --c1: #b89600; --c2: #ffe066; animation-delay: -3s; }
.want .w4 { --c1: #0c1145; --c2: #3a4aa8; animation-delay: -4.5s; }
@keyframes want-fill { to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .want a { animation: none; } }
.music-hero .note { margin-top: 32px; font-size: 1.1rem; }
.music-hero .note a { font-weight: 700; }

/* ---------- Playlists ---------- */

.pl-intro { text-align: center; }
.pl-intro h1 { font-style: italic; }
.pl-intro .sub { font-family: var(--font-head); font-size: 1.2rem; }
.pl-intro p { color: var(--text-muted); max-width: 52ch; margin-left: auto; margin-right: auto; }

.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.pl-row.flip .pl-text { order: 2; }
.pl-text h2 { margin-bottom: 0.4em; }
.pl-text p { color: var(--text-muted); }
@media (max-width: 760px) {
  .pl-row { grid-template-columns: 1fr; }
  .pl-row.flip .pl-text { order: 0; }
}

.pl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
/* Four playlists sit two by two so Spotify has room for each title. */
@media (min-width: 560px) { .pl-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pl-grid h3 { margin-bottom: 12px; }

.section.light { background: var(--bg-light); color: var(--text-dark); border-top: 0; }
.section.light .pl-text p { color: #444; }
/* Walk around: heading, blurb and its three playlists sit in one block. */
#walk-around .pl-text { max-width: 60ch; }
.walk-grid { margin-top: clamp(24px, 4vw, 40px); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--text-muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--text); }
