@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

:root {
  --bg:          #dff0f7;
  --surface:     #eaf7fc;
  --nav-bg:      #b8e2f2;
  --border:      #7ec8e3;
  --accent:      #0077aa;
  --accent2:     #00aacc;
  --text:        #0a2a3a;
  --text-muted:  #2a6a8a;
  --active-bg:   #0077aa;
  --active-text: #ffffff;
  --hover-bg:    #c8edf8;
  --tag-bg:      #b0dff0;
  --tag-text:    #004d6e;
  --bloom: rgba(120, 210, 245, 0.35);
--dot:   rgba(0, 100, 160, 0.07);
--card-shine: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] {
  --bg:          #071e2b;
  --surface:     #0d2d3f;
  --nav-bg:      #0a2535;
  --border:      #1a5a7a;
  --accent:      #40c4ef;
  --accent2:     #7de0f7;
  --text:        #d8f4ff;
  --text-muted:  #6abcda;
  --active-bg:   #40c4ef;
  --active-text: #071e2b;
  --hover-bg:    #0f3a52;
  --tag-bg:      #0f3a52;
  --tag-text:    #7de0f7;
  --bloom: rgba(20, 90, 140, 0.45);
--dot:   rgba(60, 180, 230, 0.06);
--card-shine: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Michroma', Tahoma, 'Trebuchet MS', sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, var(--bloom) 0%, transparent 55%),
    radial-gradient(1px 1px at 50% 50%, var(--dot) 100%, transparent 100%);
  background-size: auto, 24px 24px;
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}

/* ── NAV ── */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-name:hover { color: var(--accent2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.nav-links a.active {
  background: var(--active-bg);
  color: var(--active-text);
}

.theme-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-btn:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.email {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

/* ── MAIN ── */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.page-header p {
  margin-top: 0.4rem;
  color: var(--text);
  font-size: 0.9rem;
}

/* ── CARDS GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.lesson-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid var(--card-shine);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  background: var(--hover-bg);
}

.card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}

.card-meta {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--accent2);
}

/* ── TAG ── */
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.3rem;
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

/* ── LIST (for about page etc) ── */
.simple-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.simple-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.92rem;
}

.simple-list li:first-child { border-top: 1px solid var(--border); }

.list-label { color: var(--text); font-weight: 600; }
.list-meta  { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }

/* ── ABOUT PAGE ── */
.about-block {
  max-width: 580px;
}

.about-block p {
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.about-block p strong {
  color: var(--text);
  font-weight: 700;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.links-row a {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}

.links-row a:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
}
