/* ============================================================
   Shaxsiy sayt — QORA TEMA
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-nav: #161616;
  --border: #2a2a2a;
  --accent: #e5a54b;
  --accent-dim: rgba(229, 165, 75, 0.12);
  --text: #e8e8e8;
  --text-muted: #9a9a9a;
  --text-dim: #6b6b6b;
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
}

/* ---------- Navigatsiya ---------- */
.nav-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-nav);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

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

.nav a.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ---------- HOME ---------- */
.hero {
  padding: 96px 0 48px;
  font-family: var(--mono);
}

.hero .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 28px;
  display: block;
}

.hero h1 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero p {
  font-size: 16.5px;
  color: var(--text);
  max-width: 640px;
  margin-bottom: 20px;
  line-height: 1.75;
}

.hero-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-links a {
  color: var(--accent);
  font-size: 15.5px;
  transition: opacity 0.15s;
}

.hero-links a:hover {
  opacity: 0.75;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.socials-title {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.socials {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.15s;
}

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

.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ---------- BLOG ro'yxati ---------- */
.page-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 64px 0 56px;
}

.page-title.left {
  text-align: left;
  color: var(--text);
  font-size: 32px;
  margin: 56px 0 12px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.page-subtitle a {
  color: var(--accent);
}

.blog-list {
  list-style: none;
}

.blog-item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 18px;
  margin: 0 -18px;
  border-radius: 10px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.blog-item a:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.blog-item h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.blog-item time {
  font-size: 14.5px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- POST ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 56px 0 20px;
  font-size: 15px;
  color: var(--text-muted);
}

.breadcrumb .slug {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
}

.post-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}

.post-meta {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
}

.post-content {
  padding-bottom: 80px;
}

.post-content h1,
.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.post-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text);
}

.post-content p {
  margin-bottom: 18px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text);
}

.post-content a {
  color: var(--accent);
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content strong {
  color: #fff;
}

.post-content ul,
.post-content ol {
  margin: 0 0 18px 24px;
}

.post-content li {
  margin-bottom: 8px;
  color: var(--text);
}

.post-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 24px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content blockquote p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.post-content code {
  font-family: var(--mono);
  font-size: 14px;
  background: #1d1d1d;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
}

.post-content pre {
  background: #131313;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 24px 0;
  line-height: 1.65;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  color: var(--text);
}

.post-content th {
  background: var(--bg-card);
  font-weight: 600;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- POST FOOTER ---------- */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 72px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.post-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.post-footer-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.post-footer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---------- BUILDING ---------- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 80px;
}

.project-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.project-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.project-card h2 {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.project-card .stars {
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}

.project-card .desc {
  color: var(--text);
  font-size: 15.5px;
  margin-top: 12px;
  line-height: 1.65;
}

.project-card .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.project-card .lang {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ---------- LECTURES ---------- */
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 120px 0;
  font-size: 17px;
}

.container-wide {
  max-width: 1180px;
}

.lectures-header {
  text-align: center;
  margin: 64px 0 28px;
}

.lectures-header .page-title.left {
  text-align: center;
  margin-bottom: 10px;
}

.lectures-stats {
  color: var(--text-muted);
  font-size: 15px;
}

.lectures-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill span {
  color: var(--text-dim);
  margin-left: 2px;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.pill.active span {
  color: var(--bg);
  opacity: 0.6;
}

.lecture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  padding-bottom: 80px;
}

.lecture-card {
  cursor: pointer;
}

.lecture-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.lecture-thumb img,
.lecture-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.play-btn svg {
  width: 18px;
  height: 18px;
  fill: #111;
  margin-left: 2px;
}

.lecture-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.08);
}

.duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12.5px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 6px;
}

.lecture-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.tag-green {
  background: rgba(70, 200, 130, 0.14);
  color: #4ec98a;
}

.tag-blue {
  background: rgba(80, 160, 230, 0.14);
  color: #5aa8e8;
}

.tag-purple {
  background: rgba(170, 120, 230, 0.14);
  color: #b087e8;
}

.tag-orange {
  background: rgba(230, 150, 70, 0.14);
  color: var(--accent);
}

.tag-pink {
  background: rgba(230, 110, 150, 0.14);
  color: #e670a0;
}

.lecture-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ---------- RESUME ---------- */
.resume-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 56px 0 32px;
}

.resume-head h1 {
  font-size: 32px;
  font-weight: 800;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #1a1200;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 12px;
  transition: opacity 0.15s;
}

.btn-accent:hover {
  opacity: 0.88;
}

.btn-accent svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.resume-frame {
  width: 100%;
  height: 78vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 60px;
  background: #333;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 14.5px;
  padding: 40px 16px;
}

/* ---------- Mobil ---------- */
@media (max-width: 980px) {
  .lecture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav a {
    padding: 9px 12px;
    font-size: 13.5px;
  }

  .nav a svg {
    width: 15px;
    height: 15px;
  }

  .hero {
    padding: 56px 0 36px;
  }

  .post-title {
    font-size: 26px;
  }

  .blog-item a {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

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

  .post-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .post-footer-btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}