/* =============================================
   INDEX PAGE — WORK CAROUSEL
============================================= */
.main-col > * {
  animation: fadeUp 0.5s ease both;
}

.work-section   { animation-delay: 0.05s; margin-bottom: 64px; }
.writing-section { animation-delay: 0.15s; margin-bottom: 64px; }

.sidebar {
  animation: fadeUp 0.5s ease 0.1s both;
}

.carousel-wrapper { position: relative; }

.carousel-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  transition: opacity 0.3s;
}

.work-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.work-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-card:hover .work-card-img img { transform: scale(1.04); }

.work-card-body { padding: 12px 0 0; }

.work-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.work-card:hover .work-card-title { color: var(--red); }

.work-card-meta {
  font-size: 12px;
  color: var(--light);
  font-weight: 700;
}

/* Carousel nav */
.carousel-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.carousel-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.15s;
}

.carousel-btn:hover { border-color: var(--red); background: var(--red); }
.carousel-btn:hover svg { stroke: var(--bg); }

.carousel-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--black);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.15s;
}

.carousel-dots { display: flex; gap: 6px; margin-left: auto; }

.carousel-dot {
  width: 5px;
  height: 5px;
  background: var(--rule);
  border-radius: 50%;
  transition: background 0.3s;
  cursor: pointer;
  border: none;
}

.carousel-dot.active { background: var(--black); }

/* =============================================
   INDEX PAGE — WRITING / NOTES LIST
============================================= */
.writing-list { display: flex; flex-direction: column; }

.writing-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s, border-color 0.3s;
}

.writing-item:first-child { padding-top: 0; }

.writing-item-left { display: flex; flex-direction: column; gap: 6px; }

.writing-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.writing-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.15s;
}

.writing-item:hover .writing-title { color: var(--red); }

.writing-excerpt {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.55;
  font-weight: 400;
}

.writing-date {
  font-size: 12px;
  color: var(--light);
  white-space: nowrap;
  font-weight: 400;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  transition: gap 0.2s;
}

.view-all-link:hover { gap: 10px; }

.view-all-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* =============================================
   INDEX PAGE — NEWSLETTER FOOTER
============================================= */
.notes-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 24px;
}

.notes-footer .view-all-link { margin-top: 0; }

.newsletter-form {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.newsletter-input {
  width: 160px;
  padding: 6px 0;
  font-family: 'Chivo', sans-serif;
  font-size: 13px;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--black);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-input::placeholder { color: var(--light); }
.newsletter-input:focus { border-color: var(--black); }

[data-theme="dark"] .newsletter-input {
  border-bottom-color: #3a3a3a;
}

.newsletter-btn {
  padding: 6px 0;
  margin-left: 12px;
  background: none;
  color: var(--red);
  font-family: 'Chivo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.newsletter-btn:hover { color: var(--black); }
.newsletter-btn:disabled { opacity: 0.4; cursor: default; }

.newsletter-success,
.newsletter-error {
  display: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.newsletter-success { color: var(--mid); }
.newsletter-error   { color: var(--red); }

/* =============================================
   RESPONSIVE — INDEX OVERRIDES
============================================= */
@media (max-width: 900px) {
  .carousel-track { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .work-section { margin-bottom: 40px; }
  .writing-section { margin-bottom: 40px; }
  .notes-footer { flex-wrap: wrap; gap: 16px; }
  .newsletter-input { width: 140px; }
  .carousel-track { grid-template-columns: 1fr 1fr; gap: 12px; }
  .writing-item { grid-template-columns: 1fr; }
  .writing-date { display: none; }
}
