/* ==========================================================================
   TapMe — uslublar
   Estetika: jasur, issiq, neo-brutalist. Qalin chegaralar, qattiq soyalar.
   Shriftlar: Bricolage Grotesque (display) + Plus Jakarta Sans (matn).
   ========================================================================== */

:root {
  /* Ranglar */
  --bg:        #FBFAF7;
  --bg-2:      #F3F0E9;
  --ink:       #13110F;
  --muted:     #6B655C;
  --teal:      #39D6C7;
  --coral:     #FF7B63;
  --lime:      #D9F86C;
  --violet:    #6C5CE7;
  --white:     #FFFFFF;

  /* Soyalar (qattiq, neo-brutalist) */
  --shadow:      4px 4px 0 var(--ink);
  --shadow-lg:   7px 7px 0 var(--ink);
  --shadow-sm:   2px 2px 0 var(--ink);

  /* O'lchamlar */
  --border:    2.5px solid var(--ink);
  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1120px;

  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body:    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  /* yengil nuqta-pattern atmosfera uchun */
  background-image: radial-gradient(rgba(19,17,15,0.045) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ===== Tartib ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section   { padding: 64px 0; }
.center    { text-align: center; }
.stack > * + * { margin-top: 16px; }

/* ===== Tugmalar ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1rem;
  padding: 13px 24px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center;
  line-height: 1.1;
}
.btn:hover  { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(2px, 2px);   box-shadow: var(--shadow-sm); }
.btn svg { width: 20px; height: 20px; }

.btn-teal   { background: var(--teal); }
.btn-coral  { background: var(--coral); color: var(--white); }
.btn-lime   { background: var(--lime); }
.btn-violet { background: var(--violet); color: var(--white); }
.btn-ink    { background: var(--ink); color: var(--bg); }
.btn-block  { display: flex; width: 100%; }
.btn-sm     { padding: 8px 14px; font-size: .85rem; box-shadow: var(--shadow-sm); }
.btn-ghost  { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); transform: none; box-shadow: none; }

/* ===== Kartochka / panel ===== */
.panel {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.panel-flat { box-shadow: none; }

/* ===== Badge / teglar ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .8rem;
  padding: 5px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  line-height: 1;
}
.badge-teal   { background: var(--teal); }
.badge-coral  { background: var(--coral); color: var(--white); }
.badge-lime   { background: var(--lime); }
.badge-violet { background: var(--violet); color: var(--white); }

/* ===== Forma ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px;
}
.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: box-shadow .12s ease, transform .12s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}
.textarea { resize: vertical; min-height: 96px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }

/* ===== Flash xabarlar ===== */
.flash {
  border: var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; font-weight: 600; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.flash-error   { background: var(--coral); color: var(--white); }
.flash-success { background: var(--lime); }
.flash-info    { background: var(--teal); }

/* ===== Sayt sarlavhasi (header) ===== */
.site-header {
  border-bottom: var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 8px;
}
.logo .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--coral); border: 2px solid var(--ink);
}
.nav { display: flex; align-items: center; gap: 10px; }
.nav a.navlink { font-weight: 700; padding: 7px 10px; }
.nav a.navlink:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ===== Landing (bosh sahifa) ===== */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  background: var(--lime); border: 2px solid var(--ink);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.hero h1 .hl {
  background: linear-gradient(120deg, var(--teal), var(--coral) 60%, var(--lime));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 20px 0 28px; max-width: 40ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* qalqib turuvchi namuna profil kartasi */
.hero-card {
  border: var(--border); border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-lg); overflow: hidden; transform: rotate(1.5deg);
}
.hero-card .cover {
  height: 92px; background: linear-gradient(135deg, var(--teal), var(--coral) 55%, var(--lime));
  border-bottom: var(--border);
}
.hero-card .body { padding: 18px; }
.hero-card .ava {
  width: 64px; height: 64px; border-radius: 12px; border: var(--border);
  background: var(--ink); color: var(--white); margin-top: -46px;
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 800; font-size: 1.6rem;
}
.hero-card .mini-link {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--ink);
  border-radius: 10px; padding: 9px 12px; font-weight: 700; margin-top: 10px;
  box-shadow: var(--shadow-sm);
}
.hero-card .mini-link svg { width: 18px; height: 18px; }

/* xususiyatlar */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { border: var(--border); border-radius: var(--radius); padding: 22px; background: var(--white); box-shadow: var(--shadow); }
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--ink);
  display: grid; place-items: center; margin-bottom: 14px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.25rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ===== Auth sahifalari ===== */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--muted); }
.auth-foot a { font-weight: 700; color: var(--ink); text-decoration: underline; }

/* ===== Dashboard ===== */
.dash { padding: 32px 0 64px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-head h1 { font-size: 2.2rem; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  font-family: var(--font-display); font-weight: 700; padding: 9px 16px;
  border: var(--border); border-radius: 999px; background: var(--white);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.tab.active { background: var(--ink); color: var(--bg); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .35s ease both; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* qatorlar (link/loyiha) */
.row-item {
  display: flex; align-items: center; gap: 12px; border: 2px solid var(--ink);
  border-radius: var(--radius-sm); padding: 12px 14px; background: var(--white);
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.row-item .ic { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; }
.row-item .ic svg { width: 20px; height: 20px; }
.row-item .meta { flex: 1; min-width: 0; }
.row-item .meta strong { display: block; }
.row-item .meta small { color: var(--muted); word-break: break-all; }
.row-actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* ===== Ommaviy profil ===== */
.profile-wrap { padding: 28px 0 60px; }
.profile-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 24px; align-items: start; }
.pcard { border: var(--border); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-lg); overflow: hidden; position: sticky; top: 90px; }
.pcard .cover { height: 120px; background: linear-gradient(135deg, var(--teal), var(--coral) 55%, var(--lime)); border-bottom: var(--border); background-size: cover; background-position: center; }
.pcard .body { padding: 22px; }
.pcard .avatar {
  width: 96px; height: 96px; border-radius: 16px; border: var(--border);
  margin-top: -64px; object-fit: cover; background: var(--ink); color: var(--white);
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 800; font-size: 2.2rem; box-shadow: var(--shadow);
}
.pname { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.pname h1 { font-size: 1.9rem; }
.verified {
  width: 26px; height: 26px; border-radius: 50%; background: var(--teal);
  border: 2px solid var(--ink); display: grid; place-items: center; flex: 0 0 auto;
}
.verified svg { width: 15px; height: 15px; }
.phandle { color: var(--muted); font-weight: 700; }
.pmeta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-top: 10px; font-size: .92rem; }
.pmeta svg { width: 16px; height: 16px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.links-list { display: grid; gap: 12px; }
.link-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: var(--border); border-radius: var(--radius-sm); padding: 14px 16px;
  background: var(--white); font-family: var(--font-display); font-weight: 700;
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.link-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.link-btn .left { display: flex; align-items: center; gap: 12px; }
.link-btn .left svg { width: 22px; height: 22px; }
.link-btn .chev svg { width: 18px; height: 18px; color: var(--muted); }

.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.proj {
  border: var(--border); border-radius: var(--radius-sm); padding: 16px;
  background: var(--bg-2); box-shadow: var(--shadow-sm);
}
.proj h3 { font-size: 1.2rem; }
.proj p { color: var(--muted); font-size: .92rem; margin: 8px 0; }
.proj-links { display: flex; gap: 12px; font-weight: 700; font-size: .9rem; margin-top: 10px; }
.proj-links a { text-decoration: underline; }

.block-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.block-title h2 { font-size: 1.5rem; }

/* ===== Admin ===== */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { border-right: var(--border); background: var(--bg-2); padding: 22px 16px; }
.admin-side .logo { font-size: 1.3rem; margin-bottom: 22px; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.admin-nav a {
  font-weight: 700; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 2px solid transparent;
}
.admin-nav a:hover { background: var(--white); border-color: var(--ink); }
.admin-nav a.active { background: var(--ink); color: var(--bg); }
.admin-main { padding: 28px; }
.admin-main h1 { font-size: 2rem; margin-bottom: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat { border: var(--border); border-radius: var(--radius); padding: 18px; background: var(--white); box-shadow: var(--shadow); }
.stat .n { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.stat .l { color: var(--muted); font-weight: 600; margin-top: 6px; font-size: .9rem; }
.stat.teal   { background: var(--teal); }
.stat.coral  { background: var(--coral); color: var(--white); }
.stat.lime   { background: var(--lime); }
.stat.violet { background: var(--violet); color: var(--white); }

/* jadval */
.table-wrap { border: var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--bg-2); font-size: .92rem; }
th { font-family: var(--font-display); font-weight: 700; background: var(--bg-2); }
tr:last-child td { border-bottom: none; }
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; max-width: 460px; }

/* 404 / xabar */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h1 { font-size: 2.6rem; }
.empty-state p { color: var(--muted); margin-top: 10px; }

/* ===== Footer ===== */
.site-footer { border-top: var(--border); padding: 28px 0; margin-top: 40px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer small { color: var(--muted); }

/* ===== Animatsiyalar ===== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.reveal { animation: rise .5s ease both; }
.reveal-1 { animation-delay: .05s; } .reveal-2 { animation-delay: .12s; }
.reveal-3 { animation-delay: .19s; } .reveal-4 { animation-delay: .26s; }
.links-list .link-btn { animation: rise .4s ease both; }
.links-list .link-btn:nth-child(1){animation-delay:.04s} .links-list .link-btn:nth-child(2){animation-delay:.08s}
.links-list .link-btn:nth-child(3){animation-delay:.12s} .links-list .link-btn:nth-child(4){animation-delay:.16s}
.links-list .link-btn:nth-child(5){animation-delay:.20s} .links-list .link-btn:nth-child(6){animation-delay:.24s}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-card { transform: none; max-width: 380px; }
  .features { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .pcard { position: static; }
  .proj-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { border-right: none; border-bottom: var(--border); }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .site-header .container { height: 60px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 560px; }
}

/* fokus halqasi (klaviatura bilan) */
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
