:root {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --text: #1c1b1a;
  --muted: #6f6b66;
  --border: #e7e3de;
  --accent: #e4572e;
  --accent-soft: #fde9e1;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 18, 16, 0.04), 0 8px 24px rgba(20, 18, 16, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151413;
    --surface: #1e1d1b;
    --text: #f3f1ee;
    --muted: #a39d96;
    --border: #322f2c;
    --accent: #ff7a50;
    --accent-soft: #3a2420;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

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

/* Hero */
.hero {
  padding: 56px 24px 24px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
  max-width: 560px;
}

/* Widget grid */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 24px 24px 72px;
}

@media (max-width: 760px) {
  .widget-grid { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.widget__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget__head h2 {
  font-size: 1.05rem;
  margin: 0;
  flex: 1;
}

.widget__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.widget__link:hover { color: var(--accent); }

.widget__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--accent-soft);
}

/* YouTube widget */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.video-thumb {
  width: 96px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #d8d4cd, #c3bfb7);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .video-thumb { background: linear-gradient(135deg, #302e2b, #211f1d); }
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent rgba(255,255,255,0.85);
}

.video-meta { min-width: 0; }

.video-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Telegram widget */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.post-text {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.post-date {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

/* Photos widget */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-tile {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.photo-tile--1 { background: linear-gradient(160deg, #e4572e, #f2a65a); }
.photo-tile--2 { background: linear-gradient(160deg, #3d5a80, #98c1d9); }
.photo-tile--3 { background: linear-gradient(160deg, #6a994e, #a7c957); }
.photo-tile--4 { background: linear-gradient(160deg, #9d4edd, #c77dff); }
.photo-tile--5 { background: linear-gradient(160deg, #e07a5f, #f2cc8f); }
.photo-tile--6 { background: linear-gradient(160deg, #495057, #868e96); }

/* About widget */
.about-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
}

.link-list a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 40px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
