/* Learning Claude AI with Ashman; warm & approachable theme */
:root {
  --bg: #fdf8f3;
  --bg-card: #ffffff;
  --bg-soft: #f5ece1;
  --ink: #2b2118;
  --ink-soft: #5a4a3a;
  --accent: #d97706; /* warm amber */
  --accent-deep: #b45309;
  --accent-soft: #fde7c8;
  --border: #e8d9c4;
  --good: #15803d;
  --bad: #b91c1c;
  --shadow: 0 1px 2px rgba(43, 33, 24, 0.06), 0 8px 24px rgba(43, 33, 24, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(253, 248, 243, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--accent-deep); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-deep); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero {
  padding: 72px 0 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--accent-deep); }
.hero p.lead {
  font-size: 19px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 56ch;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.hero-card h3 { margin: 0 0 12px; font-size: 18px; }
.hero-card ul { margin: 0; padding: 0 0 0 18px; color: var(--ink-soft); }
.hero-card li { margin: 6px 0; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 17px;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: center;
}
.about-photo {
  background: var(--accent-soft);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}
.about h3 { margin-top: 0; font-size: 24px; }
.about p { color: var(--ink-soft); font-size: 16px; }

/* Course cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.course-card:hover { transform: translateY(-2px); }
.course-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.course-card h3 { margin: 0; font-size: 20px; }
.course-card p { margin: 0; color: var(--ink-soft); font-size: 15px; flex-grow: 1; }
.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-soft);
}
.course-meta strong { color: var(--ink); }

/* Form */
.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row textarea { resize: vertical; min-height: 90px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.notice {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.notice.good { background: #ecfdf5; color: var(--good); border: 1px solid #bbf7d0; }
.notice.bad { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

/* Forum */
.forum-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 40px 0 80px;
}
.forum-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.forum-toolbar h2 { margin: 0; font-size: 26px; }
.auth-status { font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.auth-status strong { color: var(--ink); }

.topic-list { display: flex; flex-direction: column; gap: 10px; }
.topic-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.topic-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.topic-title { font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.topic-meta { font-size: 13px; color: var(--ink-soft); }
.topic-count {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.thread-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.thread-header h2 { margin: 0 0 8px; }

.reply {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 12px;
}
.reply-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.reply-body { white-space: pre-wrap; word-break: break-word; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 33, 24, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 { margin: 0 0 16px; }
.modal-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.modal-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  font-family: inherit;
}
.modal-tab.active { background: white; color: var(--ink); box-shadow: var(--shadow); }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-soft);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.config-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 14px;
}
.config-warning code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 32px; }
  .about { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn) { display: none; }
}
