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

html {
  font-size: 18px;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #fff;
  color: #111;
  line-height: 1.75;
  margin: 0;
  padding: 0;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* NAV */
.sitenav {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  font-size: 0.9rem;
}

.sitenav a {
  color: #555;
  text-decoration: none;
  margin-right: 1rem;
}

.sitenav a:hover {
  color: #111;
  text-decoration: underline;
}

/* HEADINGS */
h1 {
  font-size: 1.7rem;
  font-weight: normal;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 0.85rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin: 2.5rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #eee;
}

/* LINKS */
a {
  color: #111;
  text-decoration: underline;
  text-decoration-color: #ccc;
}

a:hover {
  text-decoration-color: #111;
}

/* TEXT */
p {
  margin: 0 0 1rem;
}

.tagline {
  color: #555;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.meta {
  color: #aaa;
  font-size: 0.85rem;
  font-style: normal;
  margin-left: 0.3rem;
}

/* LISTS */
ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

ul li {
  margin-bottom: 0.5rem;
}

/* QUOTES */
blockquote {
  margin: 0 0 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid #ddd;
}

blockquote p {
  margin: 0 0 0.2rem;
  color: #222;
}

cite {
  font-size: 0.875rem;
  color: #999;
  font-style: normal;
}

/* FOOTER */
footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  border-top: 1px solid #eee;
  font-size: 0.875rem;
  color: #aaa;
}

footer a {
  color: #777;
  text-decoration: none;
  margin-right: 0.75rem;
}

footer a:hover {
  text-decoration: underline;
}

/* HOME INTRO */
.intro {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 1rem;
}

.profile-photo {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  object-position: center 50%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
  animation: photoIn 0.5s ease-out both;
}

@keyframes photoIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro > div {
  padding-top: 0;
}

.intro h1 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}


@media (max-width: 480px) {
  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .profile-photo {
    width: 100px;
    height: 100px;
  }
}

/* VIDEO THUMBNAILS */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0 2rem;
}

.video-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  border: 1px solid #eee;
  transition: opacity 0.15s;
}

.video-card:hover img {
  opacity: 0.85;
}

.video-title {
  display: block;
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* tablet: 2 across */
@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* mobile: 1 across */
@media (max-width: 400px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE */
@media (max-width: 480px) {
  html { font-size: 16px; }
  main { padding: 2rem 1.25rem 4rem; }
  .sitenav { padding: 1rem 6.5rem 0 1.25rem; }
  .sitenav a { white-space: nowrap; }
}

/* FUN MODE TOGGLE */
.fun-toggle-wrap {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.fun-toggle-label {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.fun-toggle {
  position: relative;
  width: 50px;
  height: 29px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6e6e6, #cfcfcf);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.32s ease;
}

.fun-toggle::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.fun-toggle.is-on {
  background: linear-gradient(180deg, #7bdb7b, #3fbf3f);
  box-shadow: inset 0 1px 3px rgba(0, 60, 0, 0.25);
}

.fun-toggle-knob {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.fun-toggle.is-on .fun-toggle-knob {
  transform: translateX(21px);
}

@media (max-width: 480px) {
  .fun-toggle-wrap {
    top: 0.85rem;
    right: 0.85rem;
  }

  .fun-toggle-label {
    font-size: 0.72rem;
  }
}
