/* ================================================================
   «Невидимка» — Стили сайта-маски
   Минималистичный персональный сайт разработчика
   ================================================================ */

:root {
  --bg:         #0f1117;
  --bg-alt:     #161b27;
  --surface:    #1e2436;
  --border:     #2a3147;
  --text:       #e2e8f0;
  --text-muted: #8892a4;
  --accent:     #5b8def;
  --accent-2:   #a78bfa;
  --green:      #4ade80;
  --red:        #f87171;
  --yellow:     #fbbf24;

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --radius:     8px;
  --radius-lg:  16px;
  --max-w:      1100px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----------------------------------------------------------------
   HEADER / NAV
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .75; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

/* ----------------------------------------------------------------
   HERO
   ---------------------------------------------------------------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.25);
  border-radius: 100px;
  font-size: .8rem;
  color: var(--green);
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1.2rem;
}
.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 440px;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #4178d4;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(91,141,239,.35);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Terminal window */
.terminal-window {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green  { background: var(--green); }
.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 2;
}
.line { display: block; }
.prompt { color: var(--green); margin-right: .5rem; }
.output { color: var(--text-muted); }
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ----------------------------------------------------------------
   SECTIONS
   ---------------------------------------------------------------- */
.section {
  padding: 5rem 2rem;
}
.section-alt {
  background: var(--bg-alt);
}
.container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -.01em;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: .5rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.tag {
  padding: .3rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .8rem;
  color: var(--text-muted);
  transition: all .2s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: all .25s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.project-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
}
.project-card p {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
.project-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.project-tags span {
  padding: .15rem .6rem;
  background: rgba(91,141,239,.12);
  border-radius: 4px;
  font-size: .75rem;
  color: var(--accent);
}
.project-link {
  font-size: .85rem;
  color: var(--accent);
  transition: gap .2s;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.project-link:hover { text-decoration: underline; }

/* Notes */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.note-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}
.note-item:last-child { border-bottom: none; }
.note-date {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: .4rem;
}
.note-item h3 {
  font-size: 1.05rem;
  margin-bottom: .4rem;
}
.note-item h3 a:hover { color: var(--accent); }
.note-item p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* Contact */
.contact-container {
  text-align: center;
}
.contact-desc {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text-muted);
  font-size: .95rem;
  transition: color .2s;
}
.contact-link:hover { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 4rem 1.5rem 3rem;
    gap: 2.5rem;
  }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .8rem; }
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; }
  .contact-links { flex-direction: column; align-items: center; }
}
