/* ------------------------------------------------
   Base & Reset
   ------------------------------------------------ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #1a1a1a;
  background-color: #f5f2ed;
}

/* ------------------------------------------------
   Typography
   ------------------------------------------------ */
h1,
h2 {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-weight: 400;
}

h1 {
  font-style: italic;
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;
  color: #111;
}

h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0.7rem;
  color: #1a1a1a;
}

a {
  color: #1a1a1a;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.8);
}

/* ------------------------------------------------
   Layout
   ------------------------------------------------ */
.section {
  max-width: 640px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a2a;
}

.prose p {
  margin-bottom: 1.3em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.section-note {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

/* ------------------------------------------------
   Hero
   ------------------------------------------------ */
.hero {
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.tagline {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.7;
  font-weight: 300;
}

/* ------------------------------------------------
   Dividers (via section borders)
   ------------------------------------------------ */
.about,
.books,
.movies,
.drawings,
.notes,
.contact,
.poxel-settings {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------
   Poxel Settings
   ------------------------------------------------ */
.poxel-fields {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.poxel-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.poxel-field[style*="flex-direction: row"] {
  flex: 1 0 100%;
  justify-content: center;
  margin-top: 1rem;
}

.poxel-field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.poxel-field input {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.poxel-field input:focus {
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.poxel-field input::placeholder {
  color: #aaa;
}

.char-count {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.3rem;
  text-align: right;
}

/* ------------------------------------------------
   Grid — Books / Movies / Music
   ------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
}

/* ------------------------------------------------
   Cards
   ------------------------------------------------ */
.card {
  text-align: left;
}

.card:hover .cover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cover-album {
  aspect-ratio: 1 / 1;
}

/* ------------------------------------------------
   Drawings
   ------------------------------------------------ */
.drawings {
  max-width: 900px;
}

.drawings-grid {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.drawings-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawings-col.in-view {
  opacity: 1;
}

/* Stagger columns vertically for organic masonry feel */
.drawings-col:nth-child(2) {
  padding-top: 2.5rem;
}

.drawings-col:nth-child(3) {
  padding-top: 1rem;
}

.drawing-card {
  border-radius: 6px;
  overflow: hidden;
}

.drawing-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  filter: grayscale(100%);
}

.drawing-card:hover img {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cover-title {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
  display: block;
}

.cover-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
  display: block;
}

.meta {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.2rem;
  font-weight: 300;
}

/* ------------------------------------------------
   Notes
   ------------------------------------------------ */
.notes-list {
  list-style: none;
}

.notes-list li {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.notes-list li:first-child {
  padding-top: 0;
}

.notes-list li:last-child {
  border-bottom: none;
}

.note-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #2a2a2a;
  display: block;
}

.note-source {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.3rem;
  display: block;
  font-weight: 300;
}

/* ------------------------------------------------
   Contact
   ------------------------------------------------ */
.contact {
  text-align: center;
}

.contact .prose {
  text-align: center;
}

.contact-links {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pill-button {
  display: inline-block;
  background: #1a1a1a;
  color: #f5f2ed;
  padding: 0.75rem 2.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.pill-button:hover {
  background: #333;
  transform: translateY(-1px);
  text-decoration: none;
}

.socials {
  font-size: 0.88rem;
  color: #888;
}

.socials a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.socials a:hover {
  color: #1a1a1a;
}

.dot {
  margin: 0 0.5rem;
  color: #ccc;
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */
footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  font-size: 0.8rem;
  color: #aaa;
  font-weight: 300;
}

/* ------------------------------------------------
   Responsive
   ------------------------------------------------ */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }

  .drawings-col:nth-child(3) {
    display: none;
  }

  .poxel-fields {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .poxel-field {
    width: 100%;
  }

  .cover-title {
    font-size: 0.9rem;
  }

  .cover-author {
    font-size: 0.65rem;
  }

  h3 {
    font-size: 0.82rem;
  }

  .meta {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem 0.8rem;
  }
}

/* ------------------------------------------------
   Poxel Walkers
   ------------------------------------------------ */
#poxel-area {
  position: fixed;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 110px;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}

.poxel-walker {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: default;
}

.poxel-tooltip {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  color: #444;
  background: rgba(245, 242, 237, 0.95);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.poxel-walker:hover .poxel-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.poxel-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: #1a1a1a;
  background: rgba(245, 242, 237, 0.9);
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.poxel-img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  object-fit: contain;
}