*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
html{scroll-behavior:smooth}
body{overflow-x:hidden;background:#060608;color:#e9eef6;font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial;-webkit-font-smoothing:antialiased;line-height:1.4}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

.site-header {
    position:sticky;
    top:0;z-index:120;
  backdrop-filter:blur(6px);
  background:linear-gradient(180deg,rgba(0,0,0,0.2),rgba(0,0,0,0.2));
  padding:18px 0
}

.header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px
}

.brand {
  font-weight:900;
  font-size:21px;
  color:#fff;
  text-decoration:none
}

.brand-highlight {
    background: linear-gradient(90deg,#ffffff,#888888);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    margin-left:8px;
    font-weight:600
}

.nav {
  display:flex;
  gap:18px;
  align-items:center
}

.nav a {
  color:#cbd5e1;
  text-decoration:none;
  font-weight:600
}

.nav a:hover {
  color:#fff;
  transform: scale(1.05);
}

.menu-toggle {
  display:none;
  background:none;
  border:none;
  color:#fff;
  font-size:22px
}

:root {
    --bg-deep: #030305;
    --text-main: #ffffff;
    --text-secondary: #bdbdbd;
    --neon-blue: #bfbfbf;
    --neon-purple: #8f8f8f;
    --card-bg: rgba(15, 15, 20, 0.7); /* Плотный фон для читаемости */
    --card-border: rgba(255, 255, 255, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 10s infinite alternate ease-in-out;
}

.light-1 {
    width: 400px;
    height: 400px;
    background: #fff;
    top: -100px;
    left: -100px;
}

.light-2 {
    width: 500px;
    height: 500px;
    background: #fff;
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

@media (max-width: 600px) {
    .ambient-light { filter: blur(110px); opacity: 0.35; }
    .light-1 { width: 200px; height: 200px; top: -50px; left: -50px; }
    .light-2 { width: 240px; height: 240px; bottom: -90px; right: -50px; }
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 150px 20px 100px;
}

.hero{padding:80px 0 60px;position:relative;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1fr auto;gap:40px;align-items:center}

.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text h1 {
    font-size:clamp(36px,8vw,80px);
    line-height:0.9;
    margin-bottom:14px;
    font-weight:800;
    background:linear-gradient(90deg,#ffffff,#666666);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent
}

.lead{color:#bfc8d3;font-size:18px;margin-bottom:20px;max-width:520px}
.lead .typed-text{white-space:pre-wrap;display:inline}
.lead .typed-cursor{display:inline-block;width:2px;height:1.05em;background:currentColor;margin-left:10px;vertical-align:middle;animation:blink 1s steps(1) infinite}

@keyframes blink{50%{opacity:0}}
.hero-nick{display:inline-block;background:linear-gradient(90deg,#838282,#3b3b3b);color:#071125;padding:8px 12px;border-radius:99px;font-weight:900;margin-bottom:12px;font-size:clamp(16px,3.5vw,48px)}
.btn{padding:10px 18px;border-radius:999px;text-decoration:none;display:inline-flex;align-items:center;gap:10px;vertical-align:middle;font-weight:700;position:relative;transition:transform 220ms cubic-bezier(.22,.8,.32,1),box-shadow 220ms cubic-bezier(.22,.8,.32,1),background-position 420ms ease;will-change:transform}
.btn.primary{
    background:linear-gradient(90deg,#838282,#3b3b3b);color:#071125;background-size:200% 100%;background-position:0% 50%;
}
.btn.ghost{border:1px solid rgba(255,255,255,0.08);color:#e6eef9;background:transparent}
.contact-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}

.glitch-text {
    font-size: 5vw;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    position: relative;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
    margin-bottom: 20px;
    transition: 0.3s;
}

.about {
    margin-top: 40%;
}

.subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 900;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(120,120,120,0.08), transparent 60%);
    pointer-events: none;
}

.card-content {
    position: relative;
    z-index: 2;
    transform: translateZ(30px);
}

.card-content p {
    font-size: 18px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.card-content strong {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.highlight-text {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(90deg, #fff, var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 30px;
}

.skills {
    margin-top: 30px;
}

.skills-grid {
    display: grid;
    gap: 30px;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 18px;
}
.term-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    margin-bottom: 14px;
}
.term-icon svg { width: 36px; height: 36px; display:block; stroke: currentColor; fill:none; }

@media (max-width:900px){
  .terms-grid{grid-template-columns:1fr}
  .term-icon{margin:0 0 12px}
}

.col-span {
    grid-column: 1 / -1;
}

.skill-box h3 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    margin-bottom: 25px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    transform: translateZ(20px);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    transform: translateZ(40px);
}

.tags span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.tags a,
.tags button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

.btn img { width: 20px; height: 20px; display:block; transition:transform 220ms cubic-bezier(.22,.8,.32,1); }
.btn:hover img { transform: translateX(6px); }
.tags span img { width: 30px; height: 30px; }
.btn.primary:hover{ transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px rgba(131,131,131,0.12); background-position:100% 50%; }
.btn.primary:active{ transform: translateY(0) scale(0.99); box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.btn.ghost{ transition: transform 180ms cubic-bezier(.22,.8,.32,1), box-shadow 180ms, background-color 180ms, border-color 180ms; }
.btn.ghost:hover{ background: rgba(255,255,255,0.03); border-color: var(--neon-blue); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(140,140,140,0.06); }
.btn.ghost:active{ transform: translateY(0); box-shadow: none; }
.btn:focus-visible{ outline: none; box-shadow: 0 0 0 6px rgba(143,143,143,0.06); }

@media (prefers-reduced-motion: reduce){
    .btn, .btn img { transition: none !important; transform: none !important; }
}
.tags span i { font-size: 26px; }

.tags span:hover,
.tags a:hover,
.tags button:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(130,130,130,0.08);
    transform: translateY(-3px);
}

.glass-footer {
    text-align: center;
    padding: 30px;
    background: rgba(3, 3, 5, 0.8);
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 14px;
}

.site-header .header-inner > *,
main > *,
.hero-grid > *,
.skills-grid .skill-box,
.tags span,
.glass-card,
.card-content > * {
    opacity: 0;
}
.stagger-item,
.stagger-item--use-margin {
    opacity: 0;
    transition: transform 520ms cubic-bezier(.22,.8,.32,1), opacity 520ms cubic-bezier(.22,.8,.32,1), margin-left 520ms cubic-bezier(.22,.8,.32,1);
}
.stagger-item {
    transform: translateX(-28px);
    will-change: transform, opacity;
}
.stagger-item.in {
    transform: translateX(0);
    opacity: 1;
}
.stagger-item--use-margin {
    margin-left: -18px;
}
.stagger-item--use-margin.in {
    margin-left: 0;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .stagger-item,
    .stagger-item--use-margin {
        transition: none !important;
        transform: none !important;
        margin-left: 0 !important;
        opacity: 1 !important;
    }
}

@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;text-align:center}
  .hero-visual{order:-1}
    .nav{display:none}
    .menu-toggle{display:block;z-index:140}
    .nav.open{display:flex;flex-direction:column;gap:12px;position:absolute;left:12px;right:12px;top:100%;background:rgba(0,0,0,0.95);padding:12px;border-radius:8px;z-index:110}
    .nav.open a{padding:10px 12px}
}
