/* ============================================
   30 App Challenge — Marc Lou Style
   2-column: fixed sidebar + card grid
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fdf2f4;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---- Layout: 2-column ---- */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Sidebar (fixed left) ---- */
.sidebar {
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 40px;
  text-align: left;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 4px solid #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.name {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: #111;
}

.location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 14px;
}

.location-icon {
  font-size: 0.9rem;
}

.separator {
  color: #ccc;
}

.stat-highlight {
  font-weight: 800;
  color: #6c5ce7;
}

.tagline {
  font-size: 1rem;
  color: #555;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Sidebar newsletter CTA */
.sidebar-newsletter {
  margin-bottom: 24px;
  width: 100%;
}

.newsletter-text {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 12px;
  line-height: 1.5;
}

.email-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.email-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.email-input:focus {
  border-color: #6c5ce7;
}

.btn-subscribe {
  padding: 10px 16px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-subscribe:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-subscribe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-msg {
  font-size: 0.75rem;
  margin-top: 8px;
  min-height: 1em;
}

.email-msg.success { color: #3a9a54; }
.email-msg.error { color: #e74c3c; }

/* Sidebar social icons */
.sidebar-social {
  display: flex;
  gap: 16px;
}

.social-icon {
  color: #aaa;
  transition: color 0.2s;
}

.social-icon:hover {
  color: #1a1a1a;
}

/* ---- Main column wrapper ---- */
.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 0 40px 48px;
}

/* ---- View toggle (top-right, icon only) ---- */
.view-toggle {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  color: #bbb;
  cursor: pointer;
  transition: all 0.15s;
}

.view-btn:hover {
  border-color: #ccc;
  color: #888;
}

.view-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.view-btn svg {
  width: 12px;
  height: 12px;
}

/* ---- Main: card grid ---- */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-content: start;
}

/* ---- List view ---- */
.main.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

.main.list-view .card {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 16px 20px;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.main.list-view .card:first-child {
  border-top: 1px solid #e8e8e8;
}

.main.list-view .card-header {
  margin-bottom: 0;
  flex: 0 0 auto;
  gap: 8px;
}

.main.list-view .card-header h3 {
  min-width: 120px;
}

.main.list-view .card-desc {
  flex: 1;
  margin-bottom: 0;
  color: #aaa;
  font-size: 0.8rem;
}

.main.list-view .card-footer {
  border-top: none;
  padding-top: 0;
  flex-shrink: 0;
  gap: 12px;
}

.main.list-view .card-upcoming {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.main.list-view .card-upcoming .card-desc {
  flex: 1;
}

/* ---- Cards ---- */
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s;
  cursor: pointer;
}

a.card:hover {
  border-color: #ccc;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 50px;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-new {
  background: rgba(100, 100, 255, 0.1);
  color: #6c5ce7;
}

.badge-active {
  background: rgba(255, 140, 6, 0.1);
  color: #e07800;
}

.badge-done {
  background: rgba(74, 184, 100, 0.1);
  color: #3a9a54;
}

.card-desc {
  font-size: 0.85rem;
  color: #888;
  flex: 1;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.card-day {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6c5ce7;
}

.card-date {
  font-size: 0.75rem;
  color: #bbb;
}

/* ---- Upcoming cards ---- */
.card-upcoming {
  opacity: 0.45;
  border-style: dashed;
  cursor: default;
}

.card-upcoming:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: #e8e8e8 !important;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 32px 16px 24px;
    align-items: center;
    text-align: center;
  }

  .main-col {
    padding: 24px 0 40px;
  }

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

@media (max-width: 600px) {
  .layout {
    padding: 0 16px;
  }

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

  .card {
    padding: 20px;
  }

  .main.list-view .card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .main.list-view .card-footer {
    width: 100%;
  }
}
