/* ==========================================================================
   dasturlash.mamun.club — Mustaqil ishlar (MT1–MT15)
   Tungi minimalistik texnik uslub
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #141413;
  --bg-elevated: #1a1a18;
  --text: #ecebe6;
  --text-muted: #9e9c95;
  --border: #2e2d2a;
  --border-strong: #3d3b37;

  --accent: #ecebe6;
  --badge-team: #e8d9a8;   /* iliq oq-sariq — jamoaviy */
  --badge-solo: #a9d5b6;   /* yumshoq yashil — yakka */

  --radius: 4px;
  --wrap: 1100px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

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

a:focus-visible,
.table-wrap:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
  border-radius: var(--radius);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Layout ------------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
}

main {
  flex: 1;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-top {
  padding: 64px 0 40px;
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
}

.meta span {
  padding-inline: 4px;
  color: var(--border-strong);
}

/* Navigation -------------------------------------------------------------- */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 20px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.nav-link--current {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

/* Section ----------------------------------------------------------------- */

.works {
  padding: 56px 0 72px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}

h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--text);
}

.section-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* Table ------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.works-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}

.works-table th,
.works-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.works-table thead th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}

.works-table tbody tr {
  transition: background-color 0.15s ease;
}

.works-table tbody tr:hover {
  background: var(--bg-elevated);
}

.works-table tbody tr:last-child th,
.works-table tbody tr:last-child td {
  border-bottom: 0;
}

.works-table tbody th {
  font-weight: 500;
  white-space: nowrap;
}

.works-table col:first-child,
.works-table th:first-child {
  width: 1%;
}

.mt-id {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.topic {
  color: var(--text);
  line-height: 1.45;
}

.due {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.action {
  text-align: right;
  white-space: nowrap;
}

/* Whole-row hover highlight for both links */
.works-table tbody tr:hover .mt-id,
.works-table tbody tr:hover .open-link {
  color: var(--text);
}

.works-table tbody tr:hover .mt-id {
  border-bottom-color: var(--border-strong);
}

/* Badges ------------------------------------------------------------------ */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--team {
  color: var(--badge-team);
}

.badge--solo {
  color: var(--badge-solo);
}

/* "Ochish →" link ---------------------------------------------------------- */

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.open-link:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.open-link .arrow {
  transition: transform 0.15s ease;
}

.open-link:hover .arrow {
  transform: translateX(2px);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

.site-footer span {
  padding-inline: 4px;
  color: var(--border-strong);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }

  .header-top {
    padding: 44px 0 28px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .meta {
    font-size: 13px;
  }

  .works {
    padding: 40px 0 56px;
  }

  .works-table th,
  .works-table td {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
