/* ============================================================
   Кабинет программирования и моделирования — kabinet.isaevislom.uz
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --panel: #101825;
  --panel-2: #141e2e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f3ee;
  --muted: #b5becc;
  --dim: #7f8a9c;

  --gold: #dfbf81;
  --gold-2: #f3dba7;

  --c-prog: #f5c26b;
  --c-kodu: #7ee081;
  --c-scratch: #ff9a3c;
  --c-3d: #5cc8ff;
  --c-pink: #ff6fae;
  --c-violet: #a78bfa;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  --font-head: "Unbounded", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { padding-left: 1.2em; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.section-head .eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px;
}
.section-head p { color: var(--muted); font-size: 1.08rem; }

.text-center { text-align: center; }
.text-center .section-head { margin-inline: auto; }
.text-center .eyebrow { justify-content: center; }

.accent-prog { --accent: var(--c-prog); }
.accent-kodu { --accent: var(--c-kodu); }
.accent-scratch { --accent: var(--c-scratch); }
.accent-3d { --accent: var(--c-3d); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.98rem; line-height: 1;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1a1407;
  box-shadow: 0 10px 30px rgba(223, 191, 129, 0.25);
}
.btn-primary:hover { box-shadow: 0 16px 40px rgba(223, 191, 129, 0.4); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255,255,255,0.2); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Scroll progress + nav ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--c-prog), var(--c-scratch), var(--c-kodu), var(--c-3d));
  z-index: 1000; transition: width 0.1s linear;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 14px 0;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  padding: 10px 0;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 0.82rem; line-height: 1.2; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1407;
  font-size: 0.8rem; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 8px 20px rgba(223, 191, 129, 0.3);
}
.brand small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 11px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.06); }

.burger {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); position: relative;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s, top 0.35s var(--ease);
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 980px) {
  .burger { display: block; }
  .brand { font-size: 0.74rem; max-width: calc(100% - 60px); }
  .brand small { font-size: 0.64rem; }
  .nav-links {
    position: fixed; inset: 68px 16px auto 16px; flex-direction: column; gap: 2px;
    padding: 12px; border-radius: var(--r-md);
    background: rgba(12, 17, 30, 0.96); border: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-10px) scale(0.98);
    transition: opacity 0.3s, transform 0.35s var(--ease);
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden; isolation: isolate;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(223, 191, 129, 0.14), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(92, 200, 255, 0.14), transparent 60%),
    radial-gradient(50% 40% at 60% 90%, rgba(255, 154, 60, 0.12), transparent 60%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.hero-badge .dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(126, 224, 129, 0.15); color: var(--c-kodu); font-size: 12px;
}
.hero-badge .dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 rgba(126,224,129,0.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(126,224,129,0); } 100% { box-shadow: 0 0 0 0 rgba(126,224,129,0); } }

.hero h1 { margin-bottom: 20px; }
.hero h1 .line { display: block; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--c-scratch));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 560px; margin-bottom: 20px; }
.rotator {
  display: block; margin-top: 6px; height: 1.5em; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); position: relative;
}
.rotator .word {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s, transform 0.5s var(--ease);
  background: linear-gradient(90deg, var(--gold-2), var(--c-3d));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rotator .word.in { opacity: 1; transform: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }

.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; justify-content: start; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1; margin-bottom: 6px; }
.stat strong .plus { color: var(--gold); }
.stat span { color: var(--dim); font-size: 0.85rem; font-weight: 600; }

/* floating subject tiles */
.hero-visual { position: relative; height: 480px; }
.tile {
  position: absolute; width: 180px; padding: 18px; border-radius: var(--r-md);
  background: rgba(16, 24, 37, 0.75); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: float 7s ease-in-out infinite;
  transition: transform 0.6s var(--ease);
}
.tile .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}
.tile .ico svg { width: 24px; height: 24px; }
.tile h4 { font-size: 0.95rem; margin-bottom: 4px; }
.tile p { margin: 0; font-size: 0.78rem; color: var(--muted); }
.tile-1 { left: 6%; top: 8%; animation-delay: 0s; }
.tile-2 { right: 4%; top: 2%; animation-delay: -2s; }
.tile-3 { left: 0%; bottom: 10%; animation-delay: -4s; }
.tile-4 { right: 8%; bottom: 4%; animation-delay: -1s; }
.tile-core {
  position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-2), var(--gold) 45%, #8d6a2c 100%);
  box-shadow: 0 0 80px rgba(223,191,129,0.45), 0 30px 60px rgba(0,0,0,0.5);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: #1a1407; font-size: 1.3rem;
  animation: breathe 5s ease-in-out infinite;
}
.tile-core::after {
  content: ""; position: absolute; inset: -22px; border-radius: 50%; border: 1px dashed rgba(223,191,129,0.35);
  animation: spin 24s linear infinite;
}
.tile-core::before {
  content: ""; position: absolute; inset: -46px; border-radius: 50%; border: 1px solid rgba(92,200,255,0.18);
  animation: spin 40s linear infinite reverse;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-16px) rotate(1deg); } }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--dim); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-hint i {
  width: 22px; height: 36px; border: 2px solid var(--dim); border-radius: 12px; position: relative;
}
.scroll-hint i::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; border-radius: 2px; background: var(--gold);
  transform: translateX(-50%); animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 20px; } }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { height: 380px; }
  .tile { width: 150px; padding: 14px; }
  .tile-core { width: 120px; height: 120px; font-size: 1.1rem; }
  .scroll-hint { display: none; }
}
@media (max-width: 520px) {
  .hero { padding-top: 100px; }
  .hero-visual { height: 330px; }
  .tile { width: 132px; padding: 12px; }
  .tile .ico { width: 36px; height: 36px; }
  .tile h4 { font-size: 0.82rem; }
  .tile p { font-size: 0.7rem; }
  .tile-core { width: 96px; height: 96px; font-size: 0.9rem; }
  .stats { gap: 18px; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0;
  background: rgba(255,255,255,0.02);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-head); font-size: 0.85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.marquee-track span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Subjects ---------- */
.subjects { display: grid; gap: 28px; }
.subject {
  --accent: var(--gold);
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 4vw, 44px); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.subject::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  top: -160px; left: -120px; pointer-events: none;
}
.subject:nth-child(even) { grid-template-columns: 1.25fr 1fr; }
.subject:nth-child(even) .subject-side { order: 2; }
.subject:nth-child(even)::before { left: auto; right: -120px; }

.subject-side { position: relative; }
.subject-num { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 14px; }
.subject-icon {
  width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.subject-icon svg { width: 38px; height: 38px; }
.subject h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 10px; }
.subject .lead { color: var(--muted); font-size: 1.02rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.meta span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; color: var(--muted);
}
.meta span b { color: var(--accent); }
.tool-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); font-size: 0.92rem;
  padding-bottom: 2px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: gap 0.3s;
}
.tool-link:hover { gap: 12px; }

.subject-body h4 { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.subject-body .block + .block { margin-top: 24px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.98rem; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px; margin-top: 2px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics span {
  padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--text);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.topics span:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.topics span i { font-style: normal; color: var(--accent); margin-right: 6px; font-family: var(--font-head); font-size: 0.72rem; }

@media (max-width: 860px) {
  .subject, .subject:nth-child(even) { grid-template-columns: 1fr; }
  .subject:nth-child(even) .subject-side { order: 0; }
}

/* ---------- Grading ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab {
  --accent: var(--gold);
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted); font-weight: 700; font-size: 0.9rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.tab .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.tab:hover { transform: translateY(-2px); color: var(--text); }
.tab.active { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--text); }

.grade-panel { display: none; }
.grade-panel.active { display: block; animation: fadeUp 0.5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.grade-intro {
  padding: 18px 22px; border-radius: var(--r-md); margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--muted); font-size: 0.98rem;
}
.grade-intro b { color: var(--text); }

.grades { display: grid; gap: 14px; }
.grade {
  display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: stretch;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.grade:hover { transform: translateX(6px); border-color: rgba(255,255,255,0.16); }
.grade-mark {
  display: grid; place-items: center; font-family: var(--font-head); font-size: 2.4rem; font-weight: 800;
  background: var(--g); color: #0b0d12; position: relative;
}
.grade-mark small { position: absolute; bottom: 8px; font-size: 0.6rem; letter-spacing: 0.12em; font-weight: 700; opacity: 0.7; }
.grade[data-mark="5"] { --g: linear-gradient(160deg, #a5f3a5, #4fcf6a); }
.grade[data-mark="4"] { --g: linear-gradient(160deg, #ffe39a, #f2b134); }
.grade[data-mark="3"] { --g: linear-gradient(160deg, #ffc08a, #f5853f); }
.grade[data-mark="2"] { --g: linear-gradient(160deg, #ffa3a3, #e5535b); }
.grade-body { padding: 18px 20px 18px 0; }
.grade-body h4 { margin-bottom: 8px; }
.grade-body ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.95rem; display: grid; gap: 4px; }

@media (max-width: 600px) {
  .grade { grid-template-columns: 1fr; }
  .grade-mark { padding: 10px; font-size: 1.8rem; flex-direction: row; display: flex; gap: 10px; justify-content: flex-start; }
  .grade-mark small { position: static; font-size: 0.7rem; }
  .grade-body { padding: 16px 18px; }
}

.formula { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.formula-card {
  padding: 24px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden;
}
.formula-card .pct { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.formula-card h4 { margin-bottom: 6px; }
.formula-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.formula-card .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); margin-top: 16px; overflow: hidden; }
.formula-card .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width 1.2s var(--ease); }
.formula-card.visible .bar i { width: var(--w); }
@media (max-width: 760px) { .formula { grid-template-columns: 1fr; } }

.checklist {
  margin-top: 40px; padding: clamp(22px, 4vw, 36px); border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(223,191,129,0.1), rgba(92,200,255,0.06)); border: 1px solid var(--line);
}
.checklist h3 { margin-bottom: 18px; }
.checklist-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.checklist label {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  transition: background 0.25s; color: var(--muted); font-size: 0.95rem;
}
.checklist label:hover { background: rgba(255,255,255,0.04); }
.checklist input { appearance: none; flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--dim); margin-top: 1px; position: relative; transition: background 0.25s, border-color 0.25s; }
.checklist input:checked { background: var(--c-kodu); border-color: var(--c-kodu); }
.checklist input:checked::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062b10' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checklist input:checked + span { color: var(--text); }
.checklist-result { margin-top: 16px; font-weight: 700; color: var(--gold); min-height: 1.5em; }
@media (max-width: 640px) { .checklist-grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--muted); font-weight: 700; font-size: 0.85rem; transition: all 0.3s var(--ease);
}
.filter:hover { color: var(--text); transform: translateY(-2px); }
.filter.active { background: var(--gold); border-color: var(--gold); color: #1a1407; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project {
  border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; transform-style: preserve-3d; position: relative;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), opacity 0.4s, border-color 0.3s;
}
.project:hover { box-shadow: 0 30px 60px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.18); }
.project.hide { display: none; }
.project-img { aspect-ratio: 16 / 9; overflow: hidden; position: relative; background: #1b2231; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.project:hover .project-img img { transform: scale(1.06); }
.project-img .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ph) 35%, #1b2231), #0f1522),
    repeating-conic-gradient(rgba(255,255,255,0.03) 0 25%, transparent 0 50%) 0 0 / 40px 40px;
  color: var(--text); text-align: center; padding: 16px;
}
.project-img .ph svg { width: 44px; height: 44px; color: var(--ph); }
.project-img .ph small { color: var(--muted); font-size: 0.75rem; }
.project-tag {
  position: absolute; top: 12px; left: 12px; padding: 6px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 800;
  background: rgba(7,11,20,0.75); backdrop-filter: blur(8px); color: var(--c-3d); letter-spacing: 0.08em;
}
.project-cls {
  position: absolute; top: 12px; right: 12px; padding: 6px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 800;
  background: var(--gold); color: #1a1407;
}
.project-body { padding: 18px 20px 20px; }
.project-body h4 { margin-bottom: 4px; font-size: 1.05rem; }
.project-body .who { color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.project-body p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.project-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.project-skills span { font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; background: rgba(92,200,255,0.1); color: var(--c-3d); }

.projects-note {
  margin-top: 28px; padding: 18px 22px; border-radius: var(--r-md); border: 1px dashed rgba(255,255,255,0.18);
  color: var(--muted); font-size: 0.92rem; display: flex; gap: 14px; align-items: flex-start;
}
.projects-note svg { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 6, 12, 0.9); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  width: min(1000px, 100%); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  transform: scale(0.94) translateY(16px); transition: transform 0.45s var(--ease);
  display: grid; grid-template-columns: 1.4fr 0.8fr; max-height: 90vh;
}
.lightbox.open .lightbox-inner { transform: none; }
.lightbox-img { background: #1b2231; display: grid; place-items: center; min-height: 260px; }
.lightbox-img img { width: 100%; height: 100%; object-fit: contain; max-height: 80vh; }
.lightbox-info { padding: 28px; overflow: auto; }
.lightbox-info h3 { margin-bottom: 6px; }
.lightbox-info .who { color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.lightbox-info p { color: var(--muted); font-size: 0.95rem; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.06); display: grid; place-items: center; font-size: 22px;
  transition: background 0.3s, transform 0.3s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.14); transform: rotate(90deg); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.06); display: grid; place-items: center; font-size: 22px;
}
.lightbox-nav.prev { left: 18px; } .lightbox-nav.next { right: 18px; }
@media (max-width: 760px) {
  .lightbox-inner { grid-template-columns: 1fr; }
  .lightbox-img img { max-height: 48vh; }
  .lightbox-nav { top: auto; bottom: 14px; transform: none; }
}

/* ---------- Roadmap ---------- */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.roadmap::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 36px; height: 2px;
  background: linear-gradient(90deg, var(--c-prog), var(--c-scratch), var(--c-kodu), var(--c-3d));
  opacity: 0.5;
}
.step { --accent: var(--gold); position: relative; padding-top: 16px; }
.step-dot {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  font-family: var(--font-head); font-weight: 800; font-size: 0.9rem;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--bg), 0 0 30px color-mix(in srgb, var(--accent) 40%, transparent);
}
.step-card {
  padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); height: calc(100% - 60px);
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.step-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.step-card .cls { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.step-card h4 { margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.step-card .tools { display: flex; flex-wrap: wrap; gap: 6px; }
.step-card .tools span { font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
@media (max-width: 900px) {
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .roadmap::before { display: none; }
}
@media (max-width: 520px) { .roadmap { grid-template-columns: 1fr; } }

/* ---------- Glossary ---------- */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.flip { perspective: 1200px; height: 190px; cursor: pointer; }
.flip-inner {
  position: relative; width: 100%; height: 100%; transition: transform 0.7s var(--ease); transform-style: preserve-3d;
}
.flip:hover .flip-inner, .flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; border-radius: var(--r-md); padding: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end;
}
.flip-front { background: var(--panel); }
.flip-front .emoji { font-size: 2rem; margin-bottom: auto; }
.flip-front h4 { margin: 0; }
.flip-front small { color: var(--dim); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.flip-back {
  transform: rotateY(180deg); background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  color: #0b0d12; justify-content: center;
}
.flip-back p { margin: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }

/* ---------- Quiz ---------- */
.quiz {
  max-width: 760px; margin-inline: auto; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden;
}
.quiz::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--c-prog), var(--c-scratch), var(--c-kodu), var(--c-3d));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.5; pointer-events: none;
}
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 0.85rem; color: var(--dim); font-weight: 700; }
.quiz-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; margin-bottom: 24px; }
.quiz-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-prog), var(--c-3d)); transition: width 0.5s var(--ease); }
.quiz-q { font-family: var(--font-head); font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 600; margin-bottom: 20px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  text-align: left; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  display: flex; gap: 14px; align-items: center; transition: all 0.3s var(--ease);
}
.quiz-opt:hover:not(:disabled) { background: rgba(255,255,255,0.07); transform: translateX(4px); }
.quiz-opt .k { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-head); font-size: 0.8rem; font-weight: 700; background: rgba(255,255,255,0.06); }
.quiz-opt.correct { border-color: var(--c-kodu); background: rgba(126,224,129,0.12); }
.quiz-opt.correct .k { background: var(--c-kodu); color: #062b10; }
.quiz-opt.wrong { border-color: #e5535b; background: rgba(229,83,91,0.12); }
.quiz-opt.wrong .k { background: #e5535b; color: #fff; }
.quiz-explain { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,0.04); color: var(--muted); font-size: 0.92rem; display: none; }
.quiz-explain.show { display: block; animation: fadeUp 0.4s var(--ease); }
.quiz-actions { margin-top: 20px; display: flex; justify-content: flex-end; }
.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .big { font-family: var(--font-head); font-size: clamp(3rem, 8vw, 5rem); font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, var(--gold-2), var(--c-scratch)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-result p { color: var(--muted); margin: 10px 0 20px; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1500; }

/* ---------- Rules ---------- */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rule {
  padding: 24px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel);
  transition: transform 0.4s var(--ease), background 0.3s;
}
.rule:hover { transform: translateY(-6px); background: var(--panel-2); }
.rule .n { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 12px; }
.rule .emoji { font-size: 1.8rem; margin-bottom: 10px; }
.rule h4 { margin-bottom: 6px; }
.rule p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 10px; }
.faq-item { border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; padding: 20px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  background: none; border: none; font-family: var(--font-head); font-weight: 600; font-size: 1rem;
}
.faq-q .plus { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; position: relative; transition: transform 0.4s var(--ease), background 0.3s; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--gold); border-radius: 2px; }
.faq-q .plus::before { width: 12px; height: 2px; }
.faq-q .plus::after { width: 2px; height: 12px; transition: opacity 0.3s; }
.faq-item.open .faq-q .plus { transform: rotate(180deg); background: rgba(223,191,129,0.12); }
.faq-item.open .faq-q .plus::after { opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease); }
.faq-a p { padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- About / contacts ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-photo { position: relative; }
.about-photo img {
  border-radius: var(--r-lg); aspect-ratio: 1; object-fit: cover; width: 100%;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.about-photo::before {
  content: ""; position: absolute; inset: -14px; border-radius: calc(var(--r-lg) + 14px); z-index: -1;
  background: conic-gradient(from 180deg, var(--c-prog), var(--c-scratch), var(--c-kodu), var(--c-3d), var(--c-prog));
  filter: blur(24px); opacity: 0.35;
}
.about-badge {
  position: absolute; bottom: -16px; right: -10px; padding: 14px 18px; border-radius: 16px;
  background: var(--gold); color: #1a1407; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; line-height: 1.2;
  box-shadow: 0 16px 40px rgba(223,191,129,0.35); animation: float 6s ease-in-out infinite;
}
.about-badge small { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.7rem; opacity: 0.75; }
.about h2 { margin-bottom: 12px; }
.about .role { color: var(--gold); font-weight: 700; margin-bottom: 18px; }
.about p { color: var(--muted); }
.achievements { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 12px; }
.achievements li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.95rem; }
.achievements li .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(223,191,129,0.12); color: var(--gold); }
.achievements li .ic svg { width: 18px; height: 18px; }

.contacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.contact {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03); transition: transform 0.35s var(--ease), background 0.3s, border-color 0.3s;
}
.contact:hover { transform: translateY(-4px); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }
.contact .ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, var(--gold)) 15%, transparent); color: var(--accent, var(--gold)); }
.contact .ic svg { width: 20px; height: 20px; }
.contact small { display: block; color: var(--dim); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.contact b { font-size: 0.95rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about-photo { max-width: 420px; } }
@media (max-width: 520px) { .contacts { grid-template-columns: 1fr; } }

/* ---------- Links ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.link-card {
  --accent: var(--gold);
  padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; gap: 6px; transition: transform 0.4s var(--ease), border-color 0.3s;
}
.link-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.link-card .dom { font-size: 0.75rem; color: var(--accent); font-weight: 800; letter-spacing: 0.06em; }
.link-card h4 { margin: 0; }
.link-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- CTA / QR ---------- */
.cta {
  border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px); text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(223,191,129,0.16), rgba(92,200,255,0.1)); border: 1px solid var(--line);
}
.cta::before, .cta::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(60px); opacity: 0.35; pointer-events: none;
}
.cta::before { background: var(--c-scratch); left: -100px; top: -100px; }
.cta::after { background: var(--c-3d); right: -100px; bottom: -100px; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--muted); max-width: 560px; margin-inline: auto; }
.cta .btn { margin-top: 10px; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 32px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.85rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; z-index: 800;
  background: var(--gold); color: #1a1407; border: none; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(223,191,129,0.35); opacity: 0; pointer-events: none; transform: translateY(16px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 20px; height: 20px; }

::selection { background: rgba(223,191,129,0.35); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
