:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.86);
  --muted: rgba(255,255,255,.62);
  --accent: #7c3aed;
  --accent2: #22c55e;
  --warn: #f59e0b;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(800px 500px at 80% 30%, rgba(34,197,94,.18), transparent 55%),
    radial-gradient(700px 450px at 60% 85%, rgba(59,130,246,.14), transparent 60%),
    linear-gradient(180deg, #070a14 0%, var(--bg) 100%);
  overflow-x:hidden;
}

.fx{
  pointer-events:none;
  position:fixed; inset:0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.035) 0px,
    rgba(255,255,255,.035) 1px,
    transparent 2px,
    transparent 5px
  );
  mix-blend-mode: overlay;
  opacity:.18;
  animation: drift 12s linear infinite;
}
@keyframes drift{ from{transform:translateY(0)} to{transform:translateY(40px)} }

.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 80px;
  position:relative;
}

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 18px 18px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand{display:flex;align-items:center;gap:14px;min-width:0;}
.logo{
  width:44px; height:44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(124,58,237,.85), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(34,197,94,.7), transparent 55%),
    rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  position:relative;
  overflow:hidden;
}
.logo:after{
  content:"";
  position:absolute; inset:-40%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.22), transparent);
  transform: rotate(15deg);
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine{
  0%, 70%{ transform: translateX(-40%) rotate(15deg); opacity:.0;}
  85%{ opacity:.6;}
  100%{ transform: translateX(40%) rotate(15deg); opacity:0;}
}

.title{min-width:0;display:flex;flex-direction:column;gap:2px;}
.title h1{
  margin:0;font-size: 16px;letter-spacing:.2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.title .subtitle{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

nav{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration:none;
  font-family: var(--mono);
  font-size: 12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  white-space:nowrap;
}
.btn:hover{transform: translateY(-1px);background: rgba(255,255,255,.09);border-color: rgba(255,255,255,.22);}
.btn:active{ transform: translateY(0px); }
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding: 7px 10px;border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  font-family: var(--mono);font-size: 12px;color: var(--muted);
}
.dot{width:8px;height:8px;border-radius:50%;background: var(--accent2);box-shadow: 0 0 0 4px rgba(34,197,94,.14);}

main{margin-top: 18px;display:grid;grid-template-columns: 1.1fr .9fr;gap: 18px;}
@media (max-width: 940px){ main{ grid-template-columns: 1fr; } }

.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}
.card .head{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.card .head .h{display:flex;flex-direction:column;gap:2px;min-width:0;}
.card .head h2{margin:0;font-size: 14px;letter-spacing:.2px;}
.card .head .mini{font-family: var(--mono);font-size: 12px;color: var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.card .body{padding: 16px;}

.grid{display:grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 12px;}
@media (max-width: 560px){ .grid{ grid-template-columns: 1fr; } }

.kpi{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  padding: 12px 12px;
  position:relative;
  overflow:hidden;
}
.kpi:before{
  content:"";
  position:absolute; inset:-1px;
  background: radial-gradient(240px 120px at 20% 0%, rgba(124,58,237,.25), transparent 60%);
  opacity:.8;pointer-events:none;
}
.kpi .label{font-family: var(--mono);color: var(--muted);font-size: 11px;position:relative;}
.kpi .value{margin-top: 6px;font-size: 14px;font-weight: 650;position:relative;display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.tag{
  display:inline-flex;align-items:center;
  padding: 4px 8px;border-radius: 999px;
  font-family: var(--mono);font-size: 11px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
}

/* Terminal */
.terminal{
  background: rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  overflow:hidden;
}
.term-top{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding: 10px 12px;border-bottom:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  font-family: var(--mono);font-size: 12px;color: var(--muted);
}
.traffic{display:flex; gap:7px;}
.traffic span{width:10px;height:10px;border-radius:50%;display:inline-block;}
.traffic span:nth-child(1){ background: rgba(239,68,68,.75); }
.traffic span:nth-child(2){ background: rgba(245,158,11,.75); }
.traffic span:nth-child(3){ background: rgba(34,197,94,.75); }

.term-body{
  padding: 12px 12px 10px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  max-height: 320px;
  overflow:auto;
}
.term-line{ color: rgba(255,255,255,.84); }
.term-muted{ color: rgba(255,255,255,.58); }
.term-accent{ color: #a78bfa; }
.term-ok{ color: #86efac; }
.term-warn{ color: #fcd34d; }

.prompt{
  display:flex;gap:8px;align-items:center;
  padding: 10px 12px 12px;border-top:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  font-family: var(--mono);font-size: 12px;
}
.prompt .ps1{color: rgba(255,255,255,.70);white-space:nowrap;}
.prompt input{
  width:100%;border:none;outline:none;background: transparent;
  color: rgba(255,255,255,.9);
  font-family: var(--mono);font-size: 12px;
}
.kbd{
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 11px;
  color: rgba(255,255,255,.75);
  white-space:nowrap;
}

/* Portfolio */
.projects{display:flex;flex-direction:column;gap:10px;}
.proj{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  border-radius: 16px;
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.proj .top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.proj .name{font-weight:650;font-size: 13px;margin:0;}
.proj .desc{margin:0;color: var(--muted);font-size: 13px;line-height:1.45;}
.proj .meta{display:flex;gap:8px;flex-wrap:wrap;}

a.inline{
  color: rgba(255,255,255,.86);
  text-decoration:none;
  border-bottom: 1px dotted rgba(255,255,255,.35);
}
a.inline:hover{ border-bottom-color: rgba(255,255,255,.75); }

footer{
  margin-top: 18px;
  border:1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  padding: 14px 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

/* Print-friendly CV */
@media print{
  .fx, nav, .terminal, .pill, .btn.print-hide{ display:none !important; }
  body{ background: #fff !important; color:#111 !important; }
  .card{ box-shadow:none !important; background:#fff !important; border:1px solid #ddd !important; }
  a{ color:#111 !important; text-decoration:none !important; }
}

/* Language switch */
.lang-switch{
  display:inline-flex;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow:hidden;
}
.lang-switch a{
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  text-decoration:none;
  color: rgba(255,255,255,.82);
  border-right:1px solid rgba(255,255,255,.12);
}
.lang-switch a:last-child{border-right:none;}
.lang-switch a:hover{ background: rgba(255,255,255,.09); }
.lang-switch a.active{
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95);
}
