:root {
  --bg: #02080d;
  --panel: #0a141d;
  --panel-soft: #101b25;
  --line: rgba(255, 255, 255, .12);
  --text: #f7fafc;
  --muted: #c4ccd4;
  --gold: #f4ad13;
  --gold-dark: #6d5419;
  --blue: #55bdf7;
  --green: #7ce47b;
  --violet: #7460ff;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 18%, rgba(42, 58, 72, .24), transparent 30rem),
    linear-gradient(180deg, #02060a 0%, var(--bg) 48%, #02060a 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
svg { width: 24px; height: 24px; stroke-width: 2; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 76px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 18px;
  padding: 0 38px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(4, 10, 16, .96);
  backdrop-filter: blur(14px);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  display: block;
  font-size: 35px;
  line-height: .84;
  font-weight: 900;
  letter-spacing: .01em;
}

.brand span { color: var(--gold); }

.tagline {
  margin-top: 5px;
  color: #f5f7f9;
  font-size: 12px;
  line-height: 1;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1vw, 22px);
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.desktop-nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  border: 0;
  background: transparent;
  position: relative;
}

.notify-badge,
.profile-menu span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #101820;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.notify-badge {
  position: absolute;
  top: -4px;
  right: -3px;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #fff;
  border: 0;
  background: transparent;
  font-weight: 800;
}

.profile-trigger svg { width: 16px; height: 16px; }

.avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
}

.mobile-menu { display: none; }

.profile-menu {
  position: fixed;
  top: 76px;
  right: 36px;
  z-index: 45;
  width: 205px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 22, 31, .96);
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.profile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: #fff;
  font-size: 14px;
}

.profile-menu svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.profile-menu span { margin-left: auto; }

.menu-drawer {
  position: fixed;
  inset: 76px 0 auto auto;
  z-index: 50;
  width: min(330px, 88vw);
  min-height: calc(100vh - 76px);
  padding: 24px;
  border-left: 1px solid var(--line);
  background: #08131c;
  transform: translateX(100%);
  transition: transform .2s ease;
}

.menu-drawer.open { transform: translateX(0); }
.menu-drawer a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 800; }

.mobile-bottom-nav {
  display: none;
}

.page-shell {
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 38px 42px;
}

.hero {
  min-height: 334px;
  display: flex;
  align-items: center;
  padding-left: 78px;
  background-image:
    linear-gradient(90deg, rgba(2, 7, 11, .96) 0%, rgba(2, 7, 11, .72) 34%, rgba(2, 7, 11, .16) 78%, rgba(2, 7, 11, .72) 100%),
    linear-gradient(180deg, rgba(2, 7, 11, .05), rgba(2, 7, 11, .56)),
    url("../img/hero-web.jpg");
  background-size: cover;
  background-position: center;
}

.hero-content { max-width: 440px; }

.hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.03;
  font-weight: 900;
}

.hero h1 span {
  display: block;
  color: var(--gold);
}

.hero p {
  margin: 22px 0 18px;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-actions .btn,
.course-card .btn {
  min-width: 160px;
  min-height: 42px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 900;
  text-decoration: none;
}

.hero-actions svg { width: 21px; height: 21px; }

.btn-primary {
  color: #081016;
  background: linear-gradient(180deg, #ffc12b, var(--gold));
  border-color: var(--gold);
}

.btn-outline-warning {
  color: #fff;
  background: transparent;
  border-color: var(--gold);
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
  padding: 20px 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(18, 32, 42, .97), rgba(10, 20, 29, .97));
}

.feature-card {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.14);
}

.feature-card:last-child { border-right: 0; }
.feature-card svg { width: 38px; height: 38px; margin-bottom: 10px; color: var(--gold); }
.feature-card strong { font-size: 15px; line-height: 1.2; }
.feature-card span { margin-top: 6px; color: var(--muted); font-size: 14px; }
.feature-card em,
.course-card em {
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: var(--violet);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 304px;
  gap: 24px;
  margin-top: 12px;
}

.left-sidebar,
.right-sidebar > *,
.content-card {
  border: 1px solid var(--line);
  background: rgba(9, 18, 27, .93);
}

.left-sidebar {
  overflow: hidden;
  align-self: start;
  border-radius: 7px;
}

.left-sidebar a {
  min-height: 41px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 800;
}

.left-sidebar a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(135, 101, 27, .86), rgba(102, 80, 25, .64));
}

.left-sidebar svg {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.section-block { margin-bottom: 23px; }

.section-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2,
.popular-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.section-head a {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.project-grid,
.news-grid,
.info-grid {
  display: grid;
  gap: 14px;
}

.project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.content-card {
  overflow: hidden;
  border-radius: 6px;
}

.content-card img {
  width: 100%;
  height: 116px;
  display: block;
  object-fit: cover;
}

.content-card div { padding: 12px; }

.content-card h3 {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.content-card p {
  margin: 5px 0 7px;
  color: #d9e0e7;
  font-size: 12px;
}

.status {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.status-blue { color: #9bdcff; background: rgba(30, 87, 124, .55); }
.status-green { color: #8cf28b; background: rgba(32, 104, 52, .55); }
.status-gold { color: var(--gold); background: rgba(120, 78, 16, .62); }

.info-card,
.course-list article,
.discussion-board,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(9, 18, 27, .93);
}

.info-card {
  min-height: 152px;
  padding: 16px;
}

.meta-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--gold);
  background: rgba(244, 173, 19, .12);
  font-size: 12px;
  font-weight: 900;
}

.info-card h3,
.course-list h3,
.contact-panel h3 {
  margin: 12px 0 7px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
}

.info-card p,
.course-list p,
.contact-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.info-card strong {
  color: #fff;
  font-size: 13px;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.course-list article {
  min-height: 138px;
  padding: 16px;
}

.discussion-board {
  overflow: hidden;
}

.discussion-board a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.discussion-board a:last-child { border-bottom: 0; }

.discussion-board span {
  color: var(--gold);
  font-weight: 900;
}

.discussion-board strong {
  font-size: 14px;
}

.discussion-board em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.contact-panel h3 { margin-top: 0; }
.contact-panel p { margin-bottom: 0; }
.contact-panel .btn { min-width: 160px; font-weight: 900; }

.site-footer {
  width: 100%;
  max-width: 1536px;
  margin: 10px auto 0;
  padding: 32px 38px 22px;
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, .75fr));
  gap: 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 13, 20, .35), rgba(6, 13, 20, .88));
}

.footer-brand p {
  max-width: 360px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.site-footer h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.site-footer a,
.footer-contact span {
  color: var(--muted);
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #fff;
  background: rgba(255,255,255,.03);
  font-size: 12px;
  font-weight: 900;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #9ca7b2;
  font-size: 13px;
}

.right-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.search-box {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 7px;
}

.search-box input {
  width: 100%;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  background: rgba(255,255,255,.03);
  outline: 0;
  padding: 9px 36px 9px 12px;
}

.search-box button {
  width: 32px;
  margin-left: -36px;
  color: #d8dee5;
  border: 0;
  background: transparent;
}

.search-box svg { width: 19px; height: 19px; }

.course-card {
  min-height: 252px;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}

.course-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}

.course-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 31, .96) 0%, rgba(17, 12, 45, .72) 56%, rgba(4, 6, 16, .18) 100%);
}

.course-copy {
  position: relative;
  z-index: 1;
  width: 64%;
  padding: 22px;
}

.course-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
}

.course-copy h2 span { display: block; color: #c99cff; }
.course-copy p { margin: 18px 0 18px; font-size: 16px; line-height: 1.22; font-weight: 800; }
.course-card .btn { min-width: 137px; min-height: 35px; font-size: 13px; }
.course-card em { margin-left: 10px; font-size: 12px; }

.popular-card {
  padding: 16px;
  border-radius: 7px;
}

.popular-card h2 { margin-bottom: 12px; }

.popular-card a {
  display: grid;
  grid-template-columns: 20px 1fr 30px;
  gap: 12px;
  padding: 8px 0;
  align-items: start;
}

.popular-card span {
  color: var(--gold);
  font-weight: 900;
}

.popular-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.popular-card em {
  position: relative;
  color: #cbd2da;
  font-size: 13px;
  font-style: normal;
  text-align: right;
}

.popular-card em::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  vertical-align: -2px;
}

@media (max-width: 1280px) {
  .site-header { grid-template-columns: 220px minmax(0, 1fr) auto; gap: 14px; padding: 0 22px; }
  .desktop-nav { gap: 14px; }
  .desktop-nav a { font-size: 13px; }
  .page-shell { padding: 0 22px 36px; }
  .site-footer { padding-inline: 22px; }
  .dashboard-grid { grid-template-columns: 215px minmax(0, 1fr) 280px; gap: 18px; }
}

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .site-header { grid-template-columns: 220px 1fr; }
  .mobile-menu { display: grid; }
  .profile-menu { display: none; }
  .hero { padding-left: 34px; }
  .quick-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-card { border-bottom: 1px solid rgba(255,255,255,.14); }
  .feature-card:nth-child(3n) { border-right: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .left-sidebar { display: none; }
  .right-sidebar { grid-template-columns: 1fr 1fr; }
  .popular-card { min-height: 252px; }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .site-header {
    height: auto;
    min-height: 70px;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }
  .brand { font-size: 30px; }
  .tagline { font-size: 11px; }
  .header-actions { gap: 8px; }
  .profile-trigger span,
  .profile-trigger > svg { display: none; }
  .avatar { width: 38px; height: 38px; }
  .page-shell { padding: 0 14px 30px; }
  .hero {
    min-height: 365px;
    padding: 24px 18px;
    background-position: 59% center;
  }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero p { margin: 24px 0 17px; font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-actions .btn { min-height: 42px; width: 100%; }
  .quick-panel { grid-template-columns: 1fr 1fr; padding: 10px; }
  .feature-card { min-height: 126px; padding: 12px 8px; }
  .feature-card:nth-child(3n) { border-right: 1px solid rgba(255,255,255,.14); }
  .feature-card:nth-child(even) { border-right: 0; }
  .project-grid,
  .news-grid,
  .info-grid,
  .course-list { grid-template-columns: 1fr; }
  .content-card img { height: 132px; }
  .right-sidebar { grid-template-columns: 1fr; }
  .course-copy { width: 72%; }
  .contact-panel { align-items: stretch; flex-direction: column; }
  .discussion-board a { grid-template-columns: 34px minmax(0, 1fr); }
  .discussion-board em { grid-column: 2; }
  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 14px 92px;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(7, 16, 24, .98);
    backdrop-filter: blur(14px);
    box-shadow: 0 -14px 34px rgba(0,0,0,.34);
  }
  .mobile-bottom-nav a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #c8d0d8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
  }
  .mobile-bottom-nav a.active {
    color: var(--gold);
  }
  .mobile-bottom-nav svg {
    width: 25px;
    height: 25px;
  }
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
