/* brendanwinters.com
   One stylesheet. No build step. No JavaScript. */

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #5c6166;
  --line: #e4e7e9;
  --accent: #0e7c86;
  --photo-frame: #ffffff;
  --todo-bg: #fff1a8;
  --todo-text: #463a00;
  --todo-line: #d9b800;

  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #f5f5f5;
    --muted: #9ba1a6;
    --line: #26292b;
    --accent: #2dd4bf;
    --photo-frame: #f5f5f5;
    --todo-bg: #4d4000;
    --todo-text: #fff3b0;
    --todo-line: #a38a00;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--body);
}

.wrap {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

/* Header and menu */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 2rem 0 1rem;
}

.site-name {
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.45em;
}

/* Main content */

main {
  padding: 2.5rem 0 3.5rem;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.4rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.4rem;
}

li::marker {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Home */

.hero {
  display: grid;
  grid-template-areas:
    "photo"
    "hello"
    "intro";
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .hero {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "hello hello"
      "intro photo";
    gap: 1.5rem 2.25rem;
  }
}

.hello {
  grid-area: hello;
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.intro {
  grid-area: intro;
  font-size: 1.25rem;
  line-height: 1.5;
}

.portrait {
  grid-area: photo;
  display: block;
  width: 240px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0.25rem 0 0 0.25rem;
  border: 8px solid var(--photo-frame);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.14);
  transform: rotate(-2.5deg);
  transition: transform 0.2s ease;
}

.portrait:hover {
  transform: rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .portrait {
    transition: none;
  }
}

.links {
  list-style: none;
  padding: 0;
  margin-top: 2.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.links li + li {
  margin-top: 0.6rem;
}

.links a::after {
  content: " \2192";
}

.links a[href^="http"]::after {
  content: " \2197";
}

.nowrap {
  white-space: nowrap;
}

/* The wave on the home page waves once on load. */

.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 1.6s ease-in-out 0.4s 1;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

@media (prefers-reduced-motion: reduce) {
  .wave {
    animation: none;
  }
}

/* Video and podcast players */

.video {
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.podcast {
  width: 100%;
  border: 0;
  border-radius: 10px;
  margin: 0 0 1.5rem;
  display: block;
}

/* Photos */

figure {
  margin: 0;
}

.photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.photos img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.photos img.low {
  object-position: center 80%;
}

.photos figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.photo-top {
  margin: 0.75rem 0 1.5rem;
}

.photo-top img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .photos {
    grid-template-columns: 1fr 1fr;
  }
}

/* Contact */

.email {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
}

/* Footer */

.site-footer {
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

/* Placeholder text. Remove the class once the real copy is in. */

.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  outline: 1px dashed var(--todo-line);
  border-radius: 3px;
  padding: 0 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
