* {
  box-sizing: border-box;
}

:root {
  --bg: #12141c;
  --surface: #191b24;
  --surface-2: #20232f;
  --line: #2c3040;
  --text: #e8eaf0;
  --muted: #9aa0b4;
  --accent: #c8ff00;
  --accent-2: #6ee7ff;
  --ph: #ffb454;
  --mono: 'JetBrains Mono', Menlo, Consolas, monospace;
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1.6;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(60, 64, 82, 0.35) 1px, transparent 1px);
  background-size: 22px 22px;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.accent {
  color: var(--accent);
}

/* ---------- Заглушки ---------- */
.ph {
  color: var(--ph);
  border-bottom: 1px dashed var(--ph);
  cursor: help;
}

.ph-block {
  color: var(--ph);
  background: rgba(255, 180, 84, 0.07);
  border: 1px dashed rgba(255, 180, 84, 0.45);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(18, 20, 28, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.85rem;
}

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

/* ---------- Герой ---------- */
.hero {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.hero__hello {
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 600;
}

.hero__typed {
  min-height: 1.7em;
  margin: 0.9rem 0 0;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--accent-2);
}

.cursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--mono);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--accent);
  color: #10120a;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(200, 255, 0, 0.25);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
}

/* ---------- Терминал ---------- */
.hero__terminal {
  margin-top: 2.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.terminal__bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal__bar span:nth-child(2) { background: #febc2e; }
.terminal__bar span:nth-child(3) { background: #28c840; }

.terminal__bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}

.terminal__body {
  margin: 0;
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

.t-green { color: var(--accent); }
.t-dim { color: var(--muted); }
.t-accent { color: var(--accent-2); }

/* ---------- Секции ---------- */
.section {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section__title {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  margin: 0 0 0.8rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.num {
  color: var(--accent);
  font-size: 0.85em;
}

.section__lead {
  color: var(--muted);
  max-width: 40rem;
  margin-top: 0;
}

/* ---------- Обо мне ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.about__facts {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.about__facts li {
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}

.fact-key {
  color: var(--accent-2);
}

/* ---------- Таймлайн ---------- */
.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--line);
}

.timeline__item {
  position: relative;
  padding: 0 0 2.2rem 1.6rem;
}

.timeline__dot {
  position: absolute;
  left: -9px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 255, 0, 0.18);
}

.timeline__dot--future {
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.18);
}

.timeline__date {
  display: inline-block;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.timeline__card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.timeline__card p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline__tag {
  font-size: 0.78rem;
  border-bottom: none;
}

/* ---------- Навыки ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.skill-group h3 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.tag--wish {
  background: rgba(110, 231, 255, 0.08);
  border-color: rgba(110, 231, 255, 0.4);
}

/* ---------- Уроки ---------- */
.lessons {
  display: grid;
  gap: 1rem;
}

.lesson {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.lesson__num {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}

.lesson p {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
}

/* ---------- Контакты ---------- */
.section--contacts {
  text-align: center;
}

.section--contacts .section__title::after {
  display: none;
}

.section--contacts .section__lead {
  margin: 0 auto 1.2rem;
}

.contacts {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.8rem;
  display: inline-block;
  text-align: left;
}

.contacts li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer p {
  margin: 0.25rem 0;
}

.footer__note {
  color: var(--accent);
}

/* ---------- Анимация появления ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Мобильные ---------- */
@media (max-width: 720px) {
  .nav {
    gap: 0.7rem;
  }

  .nav a {
    font-size: 0.78rem;
  }
}
