/*
Theme Name: Cyber Portfolio
Theme URI: https://github.com/basicdimon
Author: basicdimon
Description: Современный одностраничник в стиле киберпанк для системного администратора.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: cyber-portfolio
*/

:root{
  /* Cyberpunk palette (без чёрного: используем глубокий индиго, не #000) */
  --bg0:#070a1a;
  --bg1:#0b1130;
  --glass: rgba(255,255,255,.06);

  --text:#e8f7ff;
  --muted:#a9d8ff;

  --neon1:#00f5ff; /* cyan */
  --neon2:#ff2bd6; /* magenta */
  --neon3:#a7ff00; /* acid */
  --warn:#ffb703;  /* amber */

  --line: rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0, 245, 255, .12);
  --shadow2: 0 14px 44px rgba(255, 43, 214, .10);

  --r: 20px;
  --max: 1120px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;

  background:
    radial-gradient(900px 600px at 15% 12%, rgba(0,245,255,.18), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(255,43,214,.16), transparent 55%),
    radial-gradient(800px 600px at 40% 92%, rgba(167,255,0,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* subtle animated grid */
.grid{
  position:fixed; inset:0; pointer-events:none; z-index:-1;
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,.9), transparent 70%);
  opacity:.35;
  animation: drift 18s linear infinite;
}
@keyframes drift{
  from{ transform: translateY(0); }
  to{ transform: translateY(42px); }
}

a{ color:inherit; text-decoration:none; }
.wrap{ max-width: var(--max); margin: 0 auto; padding: 22px; }

/* Header */
header{
  position: sticky; top:0; z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(11,17,48,.85), rgba(11,17,48,.40));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding: 14px 0;
}

.brand{ display:flex; align-items:center; gap:12px; }
.mark{
  width: 44px; height: 44px; border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(0,245,255,.22), rgba(255,43,214,.18)),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.40), transparent 55%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}
.mark:after{
  content:"";
  position:absolute; inset:-60%;
  background: conic-gradient(from 180deg, transparent, rgba(0,245,255,.30), transparent, rgba(255,43,214,.25), transparent);
  filter: blur(1px);
  animation: spin 8s linear infinite;
}
@keyframes spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
.brand small{
  display:block;
  color: rgba(233,247,255,.72);
  font-weight: 800;
  letter-spacing:.25px;
}
.brand b{
  display:block;
  font-weight: 950;
  letter-spacing:.2px;
}

nav{
  display:flex; gap:10px; flex-wrap:wrap;
  color: rgba(233,247,255,.78);
  font-weight: 900;
}
nav a{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: .18s ease;
}
nav a:hover{
  border-color: rgba(0,245,255,.26);
  background: rgba(255,255,255,.05);
  box-shadow: 0 16px 40px rgba(0,245,255,.10);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 950;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  box-shadow: 0 12px 36px rgba(0,0,0,.12);
  transition: .18s ease;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(0,245,255,.28); box-shadow: var(--shadow); }
.btn.primary{
  border: 1px solid rgba(0,245,255,.32);
  background: linear-gradient(135deg, rgba(0,245,255,.18), rgba(255,43,214,.14));
}
.btn.ghost{
  border: 1px solid rgba(255,43,214,.28);
  background: rgba(255,255,255,.04);
}

/* Hero */
.hero{
  padding: 26px 0 10px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items:stretch;
}

.card{
  border-radius: var(--r);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 60px rgba(0,0,0,.20);
  position:relative;
  overflow:hidden;
}
.card:before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(700px 320px at 10% 0%, rgba(0,245,255,.18), transparent 60%),
    radial-gradient(700px 320px at 90% 10%, rgba(255,43,214,.14), transparent 62%);
  opacity:.9;
  pointer-events:none;
}
.pad{ padding: 22px; position:relative; }

.tag{
  display:inline-flex; align-items:center; gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(0,245,255,.20);
  color: rgba(233,247,255,.88);
  font-weight: 900;
  letter-spacing:.2px;
  width: fit-content;
}
.tag i{
  width:10px; height:10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--neon1), var(--neon2));
  box-shadow: 0 0 0 7px rgba(0,245,255,.12);
  display:inline-block;
}

h1{
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}
.glow{
  background: linear-gradient(135deg, var(--neon1), var(--neon2));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
  text-shadow: 0 0 18px rgba(0,245,255,.22);
}
.sub{
  margin: 0;
  color: rgba(233,247,255,.76);
  font-weight: 760;
  line-height: 1.6;
  max-width: 78ch;
}

.bullets{
  margin: 16px 0 0;
  padding: 0;
  list-style:none;
  display:grid;
  gap: 10px;
}
.bullets li{
  display:flex; gap:10px; align-items:flex-start;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(233,247,255,.80);
  font-weight: 760;
  line-height: 1.5;
}
.sig{
  width: 22px; height: 22px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,245,255,.18), rgba(255,43,214,.14));
  border: 1px solid rgba(255,255,255,.14);
  display:grid; place-items:center;
  flex:0 0 auto;
  margin-top: 1px;
}
.sig svg{ width: 14px; height: 14px; }

.actions{
  display:flex; gap:12px; flex-wrap:wrap;
  margin-top: 16px;
}

/* Side stats */
.stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 100%;
}
@media (max-width: 820px){
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
  .stats { grid-template-columns: 1fr; }
}

.stat{
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  padding: 16px;
  position:relative;
  overflow:hidden;
}
.stat:before{
  content:"";
  position:absolute; inset:-55% -20%;
  background:
    radial-gradient(circle at 20% 25%, rgba(167,255,0,.14), transparent 55%),
    radial-gradient(circle at 75% 30%, rgba(0,245,255,.16), transparent 55%);
  pointer-events:none;
}
.stat b{
  display:block;
  font-size: 26px;
  letter-spacing:-.4px;
  position:relative;
}
.stat small{
  display:block;
  margin-top: 6px;
  color: rgba(233,247,255,.72);
  font-weight: 800;
  position:relative;
}

/* Sections */
section{ padding: 14px 0; }
.title{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  margin: 18px 0 10px;
}
.title h2{
  margin:0;
  font-size: 20px;
  letter-spacing: -.2px;
}
.title p{
  margin:0;
  color: rgba(233,247,255,.70);
  font-weight: 850;
  font-size: 13px;
  line-height: 1.3;
}

/* THE 3-BLOCK LAYOUT: PERFECTLY EVEN */
.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 980px){ .grid3{ grid-template-columns: 1fr; } }

.tile{
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.10);
  position:relative;
  overflow:hidden;
  
  /* New layout stretch logic so they are beautifully even */
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tile:before{
  content:"";
  position:absolute; inset:-60% -20%;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,245,255,.14), transparent 55%),
    radial-gradient(circle at 75% 30%, rgba(255,43,214,.12), transparent 55%);
  pointer-events:none;
}
.tile h3{ margin:0 0 8px; font-size: 16px; position:relative; }

/* flex-grow: 1 pushes chips to bottom */
.tile p{ 
  margin:0; color: rgba(233,247,255,.74); font-weight: 740; line-height: 1.55; position:relative; 
  flex-grow: 1; 
}

.chips{ margin-top: 12px; display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  font-size: 12.5px;
  font-weight: 950;
  color: rgba(233,247,255,.88);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(0,245,255,.18);
  box-shadow: 0 16px 40px rgba(0,245,255,.08);
  white-space:nowrap;
}

/* Contact */
.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items:stretch;
}
@media (max-width: 980px){ .contact{ grid-template-columns: 1fr; } }

label{ font-weight: 950; font-size: 12.5px; color: rgba(233,247,255,.86); }
input, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  outline:none;
  font-size: 14.5px;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
textarea{ min-height: 120px; resize: vertical; }
input:focus, textarea:focus{
  border-color: rgba(0,245,255,.42);
  box-shadow: 0 0 0 6px rgba(0,245,255,.12), 0 16px 40px rgba(0,0,0,.12);
}

.footer{
  padding: 18px 0 28px;
  color: rgba(233,247,255,.66);
  font-weight: 850;
  font-size: 13px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  border-top: 1px solid rgba(255,255,255,.10);
  margin-top: 16px;
}
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: rgba(233,247,255,.78);
  font-weight: 900;
}

/* tiny scanline */
.scan{
  position:fixed; inset:0; pointer-events:none; z-index: 40;
  background: linear-gradient(transparent 0 60%, rgba(255,255,255,.03) 60% 61%, transparent 61% 100%);
  background-size: 100% 6px;
  opacity:.15;
  mix-blend-mode: overlay;
}

/* responsive header */
@media (max-width: 820px){
  nav{ display:none; }
}

/* --- Cyber enhancements: neon divider, subtle glitch, caret --- */
.divider{
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(0,245,255,.65), rgba(255,43,214,.55), transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 26px rgba(0,245,255,.16), 0 0 30px rgba(255,43,214,.10);
  margin: 6px 0 0;
  position:relative;
  overflow:hidden;
}
.divider:after{
  content:"";
  position:absolute; inset:-2px -40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.20), transparent);
  transform: translateX(-30%);
  animation: sweep 4.5s ease-in-out infinite;
  opacity:.45;
}
@keyframes sweep{
  0%{ transform: translateX(-45%); }
  50%{ transform: translateX(45%); }
  100%{ transform: translateX(45%); }
}

.glitch{
  position:relative;
  display:inline-block;
  text-shadow:
    0 0 22px rgba(0,245,255,.18),
    0 0 26px rgba(255,43,214,.10);
}
.glitch:before,
.glitch:after{
  content: attr(data-text);
  position:absolute;
  left:0; top:0;
  width:100%;
  overflow:hidden;
  clip-path: inset(0 0 0 0);
  opacity:.0;
  pointer-events:none;
}
.glitch:before{
  transform: translate(1px, 0);
  color: rgba(0,245,255,.85);
  text-shadow: 0 0 18px rgba(0,245,255,.22);
  animation: glitch1 6s infinite;
}
.glitch:after{
  transform: translate(-1px, 0);
  color: rgba(255,43,214,.75);
  text-shadow: 0 0 18px rgba(255,43,214,.18);
  animation: glitch2 6.8s infinite;
}
@keyframes glitch1{
  0%, 86%, 100% { opacity:0; clip-path: inset(0 0 0 0); }
  87% { opacity:.9; clip-path: inset(12% 0 72% 0); }
  88% { opacity:.6; clip-path: inset(55% 0 22% 0); transform: translate(2px,-1px); }
  89% { opacity:.9; clip-path: inset(30% 0 45% 0); transform: translate(1px,1px); }
  90% { opacity:0; }
}
@keyframes glitch2{
  0%, 82%, 100% { opacity:0; clip-path: inset(0 0 0 0); }
  83% { opacity:.8; clip-path: inset(64% 0 18% 0); }
  84% { opacity:.6; clip-path: inset(18% 0 66% 0); transform: translate(-2px,1px); }
  85% { opacity:.8; clip-path: inset(42% 0 38% 0); transform: translate(-1px,-1px); }
  86% { opacity:0; }
}

.caret{
  display:inline-block;
  width:.65ch;
  height: 1em;
  translate: 0 .12em;
  margin-left: .20ch;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(0,245,255,.95), rgba(255,43,214,.55));
  box-shadow: 0 0 0 6px rgba(0,245,255,.10), 0 0 24px rgba(0,245,255,.18);
  animation: blink 1.05s steps(2, end) infinite;
}
@keyframes blink{
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
