:root{
  --bg:#0b0f17;
  --card:#111827;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#60a5fa;
  --border:#1f2937;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --max: 1040px;
  --maxText: 78ch;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#f7f7fb;
    --card:#ffffff;
    --text:#111827;
    --muted:#4b5563;
    --accent:#2563eb;
    --border:#e5e7eb;
    --shadow: 0 10px 30px rgba(17,24,39,.08);
  }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(96,165,250,.16), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(16,185,129,.12), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:var(--max); margin:0 auto; padding:28px 18px 64px}

header{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:8px 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(11,15,23,.85), rgba(11,15,23,.40), rgba(11,15,23,0));
  backdrop-filter: blur(10px);
}
@media (prefers-color-scheme: light){
  header{background: linear-gradient(to bottom, rgba(247,247,251,.90), rgba(247,247,251,.55), rgba(247,247,251,0));}
}

@media (max-width: 900px){
  header{position:relative; background:transparent; backdrop-filter:none}
}

.brand{display:flex; align-items:center; gap:12px; min-width: 220px}
.avatar{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(16,185,129,.9));
  box-shadow: var(--shadow);
  flex:0 0 auto;
}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}

.navline{display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
nav{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
nav a{
  color:var(--muted);
  padding:6px 8px;
  border-radius:10px;
}
nav a:hover{color:var(--text); text-decoration:none; background: rgba(255,255,255,.04)}
nav a.active{color:var(--text); background: rgba(96,165,250,.12); border: 1px solid rgba(96,165,250,.25)}

.lang{
  display:flex; gap:6px; flex-wrap:wrap; align-items:center;
  padding-left:8px;
  border-left: 1px solid var(--border);
}
.lang a{
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
.lang a:hover{color:var(--text); text-decoration:none; border-color: rgba(96,165,250,.55)}
.lang a.active{color:var(--text); border-color: rgba(96,165,250,.55); background: rgba(96,165,250,.12)}

.card{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.hero{display:grid; grid-template-columns: 1.25fr .75fr; gap:18px; margin-top:14px}
@media (max-width: 900px){ .hero{grid-template-columns:1fr} }

h1{font-size: 34px; margin:0 0 8px; letter-spacing:-0.02em}
h2{font-size: 18px; margin:0 0 10px}
.subtitle{color:var(--muted); margin:0; max-width: var(--maxText)}

.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.chip{
  padding:6px 10px; border-radius:999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.02);
  font-size: 13px;
  white-space: nowrap;
}

.cta{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(96,165,250,.12);
  color: var(--text);
  text-decoration:none;
}
.btn.secondary{background: rgba(255,255,255,.02); color: var(--muted)}
.btn:hover{text-decoration:none; border-color: rgba(96,165,250,.55)}

section{margin-top:18px}

.grid{display:grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap:12px}
.col-12{grid-column: span 12}
.col-8{grid-column: span 8}
.col-6{grid-column: span 6}
.col-4{grid-column: span 4}
@media (max-width: 900px){ .col-8,.col-6,.col-4{grid-column: span 12} }

.proj{box-shadow:none}
.proj h3{margin:0 0 6px; font-size: 16px}
.proj p{margin:0; color:var(--muted); font-size: 14px; max-width: var(--maxText)}
.meta{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; color:var(--muted); font-size: 13px}

.kvs{display:grid; grid-template-columns: 1fr; gap:10px}
.kv{display:flex; justify-content:space-between; gap:12px; border-top: 1px dashed var(--border); padding-top:10px}
.kv:first-child{border-top:none; padding-top:0}
.kv .k{color:var(--muted)}
.kv .v{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}

.media{margin-top:12px; border-radius: 14px; overflow:hidden; border: 1px solid var(--border); background: rgba(255,255,255,.02)}
video{display:block; width:100%; height:auto; background:#000}
img{display:block; width:100%; height:auto}

.gallery{display:grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap:10px; margin-top:12px}
.g4{grid-column: span 4}
.g6{grid-column: span 6}
.g12{grid-column: span 12}
@media (max-width: 900px){ .g4,.g6{grid-column: span 12} }

.thumb{cursor: zoom-in; border-radius: 14px; overflow:hidden; border: 1px solid var(--border); background: rgba(255,255,255,.02); transition: transform .12s ease}
.thumb:hover{transform: translateY(-1px)}

footer{margin-top:22px; color: var(--muted); font-size: 13px; text-align:center}
.muted{color:var(--muted)}
.list{margin:10px 0 0 0; padding-left: 18px; color: var(--muted); font-size: 14px}

/* Details */
details{margin-top:12px; border: 1px dashed var(--border); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.02)}
details > summary{cursor:pointer; color: var(--text); font-weight: 700}
details p, details ul{margin-top: 8px}

/* Lightbox */
.lb{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:999; padding:18px}
.lb.active{display:flex}
.lb .backdrop{position:absolute; inset:0; background: rgba(0,0,0,.72)}
.lb .panel{position:relative; max-width:min(1100px, 96vw); max-height: 88vh}
.lb img{max-width:100%; max-height: 88vh; border-radius: 16px; border:1px solid rgba(255,255,255,.15)}
.lb .close{position:absolute; top:10px; right:10px; padding:10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.35); color: #fff; cursor:pointer}
.lb .close:hover{background: rgba(0,0,0,.5)}
