:root {
  --bg: #f8f7f4;
  --text: #111112;
  --muted: #44474f;
  --line: #d9d7d3;
  --accent: #0f4db8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  padding: 2rem 1.5rem 3rem;
}

a {
  color: inherit;
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: 920px;
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 920px;
  margin: 0 auto 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.brand {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
}

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

nav a:hover {
  color: var(--text);
}

.intro {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  justify-self: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateY(-8%) scale(1.18);
  transform-origin: center;
}

.intro__body h1 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-size: 2.4rem;
  margin: 0.1rem 0 0.6rem;
}

.intro__body p + p {
  margin-top: 0.85rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
}

.contact {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-weight: 500;
}

.section {
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  align-items: baseline;
}

.year {
  color: var(--muted);
  font-weight: 600;
}

.title {
  font-weight: 600;
}

.meta {
  color: var(--muted);
}

.link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.thoughts .title {
  font-weight: 500;
}

.footer {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* Products section with demo preview */
#products .list li {
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
}

.product-preview {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  height: 115px;
  min-height: 115px;
  max-height: 115px;
  border-radius: 6px;
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--line);
  text-decoration: none;
}

.product-preview img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  display: block;
}

.product-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 18, 0.16);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.product-preview__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  filter: drop-shadow(0 1px 4px rgba(17, 17, 18, 0.45));
  transform: translate(-35%, -50%);
  z-index: 1;
}

.product-preview:hover::after {
  opacity: 1;
}

/* Writing section with preview images */
#writing .list li {
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
}

#writing .preview {
  width: 100px;
  height: 65px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-alt);
}

#writing .preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#writing .preview.placeholder {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  position: relative;
}

#writing .preview.placeholder::after {
  content: "📊";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  opacity: 0.3;
}

@media (max-width: 640px) {
  body {
    padding: 1.5rem 1.25rem 2rem;
  }

  .site-header {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
  }

  nav {
    flex-wrap: wrap;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .list li {
    grid-template-columns: 60px 1fr;
  }

  #products .list li {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }

  .product-preview {
    display: none;
  }

  /* Writing section mobile layout */
  #writing .list li {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }

  #writing .preview {
    display: none; /* Hide preview images on mobile for cleaner layout */
  }
}
