/* ═══════════════════════════════════════════
   forceofhands.ru — Linear-inspired
   Tech-focused student portal
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #08090a;
  --bg-raised: #151516;
  --bg-hover: #1c1c1d;
  --fg: #f7f8f8;
  --fg-secondary: #9ea0a6;
  --fg-tertiary: #6c6e75;
  --accent: #5e6ad2;
  --accent-hover: #7170ff;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter Variable', 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: var(--fg); }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--fg); font-weight: 510; letter-spacing: -0.02em; line-height: 1.1; }

h1 {
  font-size: 3.5rem;
  font-weight: 538;
  letter-spacing: -0.05em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.875rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

p { line-height: 1.6; margin-bottom: 1rem; color: var(--fg-secondary); }

/* --- Layout --- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: 720px; margin: 0 auto; padding: 0 2rem; }

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,9,10,0.72);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 100%;
  padding: 0 2rem;
}

.nav__logo {
  font-size: 0.9375rem;
  font-weight: 510;
  color: var(--fg);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo-mark {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--accent) 0%, #8a8cff 100%);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-secondary);
  transition: color 0.15s;
}

.nav__links a:hover,
.nav__links a.active { color: var(--fg); }

/* --- Hero --- */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(94,106,210,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 40%, rgba(138,140,255,0.1) 0%, transparent 55%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  max-width: 820px;
  margin: 0 auto 1.25rem;
  font-size: 3.75rem;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--fg-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero__cta { display: inline-flex; gap: 0.625rem; }

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-secondary);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.hero__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 510;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
}

.btn--primary:hover { background: rgba(255,255,255,0.92); color: var(--bg); }

.btn--accent {
  background: var(--accent);
  color: var(--fg);
}

.btn--accent:hover { background: var(--accent-hover); color: var(--fg); }

.btn--secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn--secondary:hover { background: var(--bg-raised); color: var(--fg); }

/* --- Section --- */
.section { padding: 5rem 0; }
.section--border { border-top: 1px solid var(--border); }

.section__header { text-align: center; margin-bottom: 3rem; }

.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 510;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.section__header h2 { font-size: 2.25rem; margin-bottom: 0.75rem; }
.section__header p { color: var(--fg-secondary); max-width: 520px; margin: 0 auto; }

/* --- Feature cards (main page: 4 sections) --- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(94,106,210,0.06) 100%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  color: inherit;
  transform: translateY(-2px);
}

.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 40px;
  height: 40px;
  background: rgba(94,106,210,0.12);
  border: 1px solid rgba(94,106,210,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-hover);
}

.feature-card__title {
  font-size: 1.0625rem;
  font-weight: 510;
  color: var(--fg);
  margin-bottom: 0.375rem;
  letter-spacing: -0.015em;
}

.feature-card__text {
  font-size: 0.875rem;
  color: var(--fg-secondary);
  line-height: 1.55;
}

.feature-card__count {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  font-variant-numeric: tabular-nums;
}

/* --- Article list (for category pages) --- */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.article-list__item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: padding 0.2s;
}

.article-list__item:hover { padding-left: 0.5rem; color: inherit; }

.article-list__num {
  font-size: 0.875rem;
  color: var(--fg-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 2rem;
}

.article-list__body { flex: 1; }

.article-list__title {
  font-weight: 510;
  color: var(--fg);
  margin-bottom: 0.125rem;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.article-list__desc {
  font-size: 0.875rem;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.article-list__arrow {
  color: var(--fg-tertiary);
  transition: transform 0.2s, color 0.2s;
}

.article-list__item:hover .article-list__arrow {
  color: var(--fg);
  transform: translateX(4px);
}

/* --- Blog grid (for main blog index) --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.blog-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  color: inherit;
  transform: translateY(-2px);
}

.blog-card__img {
  height: 160px;
  background: var(--bg);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.blog-card:hover .blog-card__img img { opacity: 1; }

.blog-card__body { padding: 1.25rem; }

.blog-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 510;
  color: var(--accent-hover);
  background: rgba(94,106,210,0.12);
  border: 1px solid rgba(94,106,210,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-feature-settings: "tnum";
}

.blog-card__title {
  font-size: 0.9375rem;
  font-weight: 510;
  color: var(--fg);
  margin-bottom: 0.375rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-card__excerpt {
  font-size: 0.8125rem;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

/* --- Article --- */
.article { padding: 3rem 0; }

.article__header { text-align: center; margin-bottom: 2.5rem; }

.article__header h1 {
  font-size: 2.5rem;
  max-width: 680px;
  margin: 0 auto 0.75rem;
}

.article__meta {
  font-size: 0.8125rem;
  color: var(--fg-tertiary);
  font-variant-numeric: tabular-nums;
}

.article__content { font-size: 1rem; line-height: 1.7; }

.article__content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article__content h3 { margin-top: 1.75rem; }

.article__content p { color: var(--fg-secondary); }

.article__content a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(113, 112, 255, 0.4);
}

.article__content a:hover { text-decoration-color: var(--accent-hover); }

.article__content ul,
.article__content ol {
  margin: 1rem 0 1.5rem 1.25rem;
  color: var(--fg-secondary);
}

.article__content li { margin-bottom: 0.5rem; line-height: 1.6; }

.article__content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-raised);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article__content blockquote p { color: var(--fg); margin-bottom: 0; }

.article__content code {
  background: var(--bg-raised);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.875em;
  color: var(--accent-hover);
}

.article__content pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article__content pre code {
  background: none;
  padding: 0;
  color: var(--fg);
}

.article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.article__content th {
  background: var(--bg-raised);
  font-weight: 510;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article__content td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  color: var(--fg-secondary);
}

/* --- CTA Block --- */
.cta-block {
  background: linear-gradient(135deg, var(--bg-raised) 0%, rgba(94,106,210,0.08) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(94,106,210,0.4), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cta-block h3 {
  color: var(--fg);
  font-size: 1.5rem;
  font-weight: 538;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.cta-block p {
  color: var(--fg-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--fg-tertiary);
  margin-bottom: 1.5rem;
}

.breadcrumbs a { color: var(--fg-secondary); }
.breadcrumbs a:hover { color: var(--fg); }
.breadcrumbs span { margin: 0 0.375rem; color: var(--border-strong); }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  color: var(--fg-secondary);
  background: var(--bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__brand {
  font-size: 0.9375rem;
  font-weight: 510;
  color: var(--fg);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.footer__desc { font-size: 0.8125rem; line-height: 1.5; max-width: 280px; color: var(--fg-secondary); }

.footer h4 {
  font-size: 0.75rem;
  font-weight: 510;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-tertiary);
  margin-bottom: 0.75rem;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.375rem; }

.footer ul a {
  font-size: 0.8125rem;
  color: var(--fg-secondary);
  transition: color 0.15s;
}

.footer ul a:hover { color: var(--fg); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: var(--fg-tertiary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2.25rem; }
  .features { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .article__header h1 { font-size: 1.75rem; }
  .cta-block { padding: 1.75rem 1.25rem; }
  .article-list__item { flex-wrap: wrap; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
