/* =========================================================
   Nasrullo — Portfolio  |  style.css
   ========================================================= */
:root {
  --bg: #07090f;
  --bg-2: #0c1019;
  --panel: rgba(14, 19, 30, 0.9);
  --panel-solid: #10151f;
  --border: rgba(120, 140, 180, 0.14);
  --border-hi: rgba(0, 255, 163, 0.35);
  --text: #e6edf6;
  --muted: #8693a8;
  --accent: #00ffa3;
  --accent-2: #00b3ff;
  --accent-3: #a855f7;
  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  /* syntax */
  --s-key: #c792ea;
  --s-str: #c3e88d;
  --s-num: #f78c6c;
  --s-fn: #82aaff;
  --s-cls: #ffcb6b;
  --s-com: #5c6a82;
  --s-punc: #89ddff;
  --s-prop: #f07178;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 8px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* syntax colors */
.c-key { color: var(--s-key); }
.c-str { color: var(--s-str); }
.c-num { color: var(--s-num); }
.c-fn { color: var(--s-fn); }
.c-cls { color: var(--s-cls); }
.c-com { color: var(--s-com); font-style: italic; }
.c-punc { color: var(--s-punc); }
.c-prop { color: var(--s-prop); }

/* ================= LOADER ================= */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .7s var(--ease), visibility .7s;
}
#loader.done { opacity: 0; visibility: hidden; }
/* Xavfsizlik: JS ishlamasa ham loader 2.5s da yo'qoladi */
#loader { animation: loaderFailsafe 0s 2.5s forwards; }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }
.no-js #loader { display: none; }
.loader-term { width: min(520px, 88vw); font-family: var(--mono); font-size: 13px; }
.loader-lines div { color: var(--muted); white-space: pre; overflow: hidden; animation: lineIn .25s var(--ease) both; }
.loader-lines .ok { color: var(--accent); }
.loader-lines .cmd { color: var(--text); }
.loader-bar { margin-top: 18px; height: 2px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s linear; box-shadow: 0 0 12px var(--accent); }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }

/* ================= BACKGROUND ================= */
#codeCanvas { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(120,140,180,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,140,180,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -2; pointer-events: none;
  width: 700px; height: 700px; border-radius: 50%;
  left: 0; top: 0; will-change: transform;
  transform: translate3d(calc(var(--mx, 50vw) - 350px), calc(var(--my, 30vh) - 350px), 0);
  background: radial-gradient(circle, rgba(0,255,163,.09), rgba(0,179,255,.05) 40%, transparent 70%);
  transition: transform .5s ease-out;
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= CURSOR ================= */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.cursor-ring {
  width: 36px; height: 36px; border: 1px solid rgba(0,255,163,.5);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s;
}
.cursor-ring.hover { width: 60px; height: 60px; background: rgba(0,255,163,.08); border-color: var(--accent); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } input, textarea { cursor: text; } }

/* ================= PROGRESS ================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 10px var(--accent); }

/* ================= NAV ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 32px;
  padding: 22px 6vw;
  transition: padding .3s var(--ease), background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { padding: 14px 6vw; background: rgba(7,9,15,.75); backdrop-filter: blur(14px); border-color: var(--border); }
.nav.hidden { transform: translateY(-100%); }
.nav { transition: transform .35s var(--ease), padding .3s, background .3s; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 18px; margin-right: auto; letter-spacing: -.5px; }
.logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 26px; font-size: 14px; }
.nav-links a { position: relative; color: var(--muted); transition: color .2s; }
.nav-links a span { font-family: var(--mono); color: var(--accent); margin-right: 4px; font-size: 12px; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.burger { display: none; width: 32px; height: 22px; position: relative; }
.burger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--text); transition: .3s var(--ease); }
.burger span:first-child { top: 5px; } .burger span:last-child { bottom: 5px; }
.burger.open span:first-child { top: 10px; transform: rotate(45deg); }
.burger.open span:last-child { bottom: 10px; transform: rotate(-45deg); }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 15px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .3s, border-color .3s, color .3s;
  will-change: transform;
}
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #031b12; box-shadow: 0 0 0 0 rgba(0,255,163,.5); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grad); opacity: 0; transition: opacity .35s;
}
.btn-primary:hover { box-shadow: 0 10px 40px -8px rgba(0,255,163,.6); }
.btn-primary:hover::before { opacity: 1; }
.btn-ghost { border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { border: 1px solid var(--accent); color: var(--accent); padding: 10px 20px; font-family: var(--mono); font-size: 13px; }
.btn-outline:hover { background: rgba(0,255,163,.1); box-shadow: 0 0 24px -4px rgba(0,255,163,.5); }

/* ================= HERO ================= */
.hero {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 5vw;
  padding: 130px 6vw 80px; position: relative; max-width: 1440px; margin: 0 auto;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-family: var(--mono);
  padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border-hi); background: rgba(0,255,163,.06); color: var(--accent);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.6s infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }
.hero-hello { color: var(--s-com); margin: 26px 0 6px; font-size: 15px; }
.hero-name { font-size: clamp(54px, 8.5vw, 116px); line-height: .95; letter-spacing: -4px; font-weight: 700; }
.glitch { position: relative; display: inline-block; background: linear-gradient(180deg, #fff 30%, #9fb0c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text;
  opacity: 0;
}
.glitch:hover::before, .glitch.glitching::before { opacity: .8; color: var(--accent); -webkit-text-fill-color: var(--accent); animation: g1 .35s steps(2) infinite; }
.glitch:hover::after, .glitch.glitching::after { opacity: .8; color: var(--accent-3); -webkit-text-fill-color: var(--accent-3); animation: g2 .35s steps(2) infinite; }
@keyframes g1 { 0% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, -2px); } 50% { clip-path: inset(55% 0 20% 0); transform: translate(4px, 1px); } 100% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 2px); } }
@keyframes g2 { 0% { clip-path: inset(70% 0 5% 0); transform: translate(4px, 2px); } 50% { clip-path: inset(5% 0 75% 0); transform: translate(-4px, -1px); } 100% { clip-path: inset(40% 0 30% 0); transform: translate(3px, -2px); } }
.hero-role { font-size: clamp(16px, 2vw, 22px); font-weight: 500; margin: 22px 0 22px; color: var(--text); }
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: var(--muted); max-width: 560px; font-size: 17px; }
.hero-desc b { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 50px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-wrap: wrap; align-items: baseline; max-width: 110px; }
.hero-stats b { font-size: 34px; font-weight: 700; font-family: var(--mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { width: 100%; color: var(--muted); font-size: 13px; }

.hero-right { position: relative; perspective: 1400px; }
.editor {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset, 0 0 80px -30px rgba(0,255,163,.25);
  overflow: hidden; transform-style: preserve-3d;
  position: relative;
}
.editor::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(0,255,163,.5), transparent 30%, transparent 70%, rgba(168,85,247,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.editor-top { display: flex; align-items: center; gap: 18px; padding: 0 16px; height: 42px; background: rgba(0,0,0,.25); border-bottom: 1px solid var(--border); }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.tabs { display: flex; height: 100%; font-family: var(--mono); font-size: 12px; }
.tab { display: flex; align-items: center; gap: 7px; padding: 0 14px; color: var(--muted); border-right: 1px solid var(--border); }
.tab.active { color: var(--text); background: rgba(255,255,255,.03); box-shadow: inset 0 -2px 0 var(--accent); }
.tab em { font-style: normal; font-weight: 700; font-size: 10px; }
.tab em.ts { color: #3178c6; } .tab em.js { color: var(--s-cls); }
.editor-body { display: flex; font-family: var(--mono); font-size: 13px; line-height: 1.75; padding: 16px 0; height: 432px; overflow: hidden; }
.gutter { color: #3a465c; text-align: right; padding: 0 16px 0 18px; user-select: none; min-width: 52px; }
.gutter div.cur { color: var(--text); }
.code { flex: 1; white-space: pre; overflow: hidden; color: var(--text); font-family: inherit; padding-right: 12px; }
.code .cursor { display: inline-block; width: 8px; height: 1.15em; vertical-align: text-bottom; background: var(--accent); animation: blink 1s steps(1) infinite; box-shadow: 0 0 8px var(--accent); }
.editor-term { font-family: var(--mono); font-size: 12px; border-top: 1px solid var(--border); background: rgba(0,0,0,.3); padding: 10px 18px; height: 92px; overflow: hidden; color: var(--muted); }
.editor-term .ok { color: var(--accent); }
.editor-term .cmd { color: var(--text); }
.editor-term .cmd::before { content: "❯ "; color: var(--accent-3); }
.editor-status { display: flex; gap: 16px; font-family: var(--mono); font-size: 11px; padding: 5px 16px; background: linear-gradient(90deg, rgba(0,255,163,.18), rgba(0,179,255,.12)); color: #bff7e1; }
.editor-status .sp { flex: 1; }
.float-badge {
  position: absolute; font-size: 12px; padding: 9px 14px; border-radius: 10px;
  background: rgba(12,16,25,.85); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: float 5s ease-in-out infinite;
}
.float-badge.b1 { top: -18px; right: 24px; color: var(--s-cls); }
.float-badge.b2 { bottom: 40px; left: -34px; color: var(--accent); animation-delay: -2.5s; }
@keyframes float { 50% { transform: translateY(-12px); } }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; letter-spacing: 3px; }
.scroll-hint span { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); animation: drop 2s infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ================= MARQUEE ================= */
.marquee { border-block: 1px solid var(--border); padding: 22px 0; overflow: hidden; background: rgba(255,255,255,.012); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 35s linear infinite; font-size: 20px; color: var(--muted); }
.marquee-track span { display: inline-flex; align-items: center; gap: 56px; transition: color .2s; }
.marquee-track span::after { content: "✦"; color: var(--accent); font-size: 12px; }
.marquee-track span:hover { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= SECTIONS ================= */
.section { max-width: 1200px; margin: 0 auto; padding: 130px 6vw 40px; }
.sec-title { display: flex; align-items: center; gap: 14px; font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -1px; margin-bottom: 50px; }
.sec-title .num { color: var(--accent); font-size: .55em; font-weight: 400; }
.sec-title .line { flex: 1; max-width: 320px; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }

/* reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* JS ishlamasa ham kontent ko'rinsin (Google bot uchun ham) */
.no-js .reveal { opacity: 1; transform: none; }
/* Ekrandan tashqaridagi bo'limlarni brauzer render qilmaydi -> tezroq */
.section:not(#terminal) { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* tilt */
.tilt { transform-style: preserve-3d; transition: transform .5s var(--ease); will-change: transform; }
.tilt .shine { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255,255,255,.08), transparent 45%); opacity: 0; transition: opacity .3s; z-index: 2; }
.tilt:hover .shine { opacity: 1; }

/* ================= ABOUT ================= */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 17px; }
.about-text b { color: var(--text); }
.principles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; font-size: 14px; }
.principles span { color: var(--accent); margin-right: 6px; }
.about-card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); background: rgba(0,0,0,.25); }
.json { padding: 22px; font-size: 14px; line-height: 1.8; overflow-x: auto; }

/* ================= SKILLS ================= */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill-card {
  position: relative; padding: 30px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  overflow: hidden;
}
.skill-card::after { content: ""; position: absolute; width: 200px; height: 200px; right: -80px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(0,255,163,.12), transparent 70%); transition: transform .5s var(--ease); }
.skill-card:hover { border-color: var(--border-hi); }
.skill-card:hover::after { transform: scale(1.6); }
.skill-icon { font-size: 26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: rgba(0,255,163,.08); color: var(--accent); border: 1px solid var(--border-hi); margin-bottom: 18px; }
.skill-card h3 { font-size: 22px; }
.skill-card > p { font-size: 13px; margin: 4px 0 22px; }
.bars { display: grid; gap: 16px; }
.bar { position: relative; font-size: 14px; }
.bar span { display: flex; justify-content: space-between; margin-bottom: 7px; }
.bar span::after { content: attr(data-p); font-family: var(--mono); font-size: 12px; color: var(--accent); }
.bar i { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; width: var(--w, 0%); background: var(--grad); border-radius: inherit; transition: width 1.6s var(--ease); box-shadow: 0 0 12px rgba(0,255,163,.6); }

/* ================= PROJECTS ================= */
.filters { display: flex; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.filters button { padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; color: var(--muted); transition: .25s; }
.filters button::before { content: "#"; color: var(--accent); margin-right: 2px; }
.filters button:hover { color: var(--text); border-color: var(--border-hi); }
.filters button.active { background: rgba(0,255,163,.1); color: var(--accent); border-color: var(--accent); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column;
}
.project:hover { border-color: var(--border-hi); box-shadow: 0 30px 60px -30px rgba(0,255,163,.3); }
.project.hide { display: none; }
.project-visual { height: 170px; position: relative; display: grid; place-items: center; overflow: hidden; }
.project-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; }
.project-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--panel-solid)); }
.v1 { background: radial-gradient(circle at 30% 30%, #00ffa355, transparent 60%), radial-gradient(circle at 80% 70%, #00b3ff44, transparent 60%), #0b1220; }
.v2 { background: radial-gradient(circle at 70% 30%, #a855f755, transparent 60%), radial-gradient(circle at 20% 80%, #ff4d8d33, transparent 60%), #120b1f; }
.v3 { background: radial-gradient(circle at 50% 30%, #00b3ff55, transparent 60%), radial-gradient(circle at 80% 90%, #00ffa333, transparent 60%), #08141c; }
.v4 { background: radial-gradient(circle at 20% 40%, #ffcb6b44, transparent 60%), radial-gradient(circle at 80% 60%, #f78c6c33, transparent 60%), #17120a; }
.v5 { background: radial-gradient(circle at 60% 30%, #229ed955, transparent 60%), radial-gradient(circle at 20% 80%, #00ffa333, transparent 60%), #08131c; }
.v6 { background: radial-gradient(circle at 40% 30%, #f0717855, transparent 60%), radial-gradient(circle at 80% 80%, #a855f744, transparent 60%), #1a0b10; }
.pv-code { position: relative; z-index: 1; font-size: 20px; font-weight: 700; padding: 10px 18px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); transition: transform .5s var(--ease); }
.project:hover .pv-code { transform: translateZ(40px) scale(1.06); }
.project-body { padding: 4px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.project-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.project-links { display: flex; gap: 6px; }
.project-links a { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--border); font-size: 16px; transition: .25s; }
.project-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.project h3 { font-size: 21px; margin: 10px 0 8px; }
.project p { color: var(--muted); font-size: 14.5px; flex: 1; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font-size: 11px; padding: 4px 10px; border-radius: 6px; background: rgba(0,255,163,.07); color: var(--accent); border: 1px solid rgba(0,255,163,.15); }

/* ================= TIMELINE ================= */
.cmd-line { margin: -30px 0 40px; font-size: 14px; }
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3), transparent); }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-dot { position: absolute; left: -34px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 14px var(--accent); }
.tl-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; transition: .35s var(--ease); }
.tl-card:hover { border-color: var(--border-hi); transform: translateX(8px); }
.tl-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; }
.tl-meta .hash { color: var(--s-cls); }
.tl-meta .branch { color: var(--accent); padding: 0 8px; border: 1px solid var(--border-hi); border-radius: 5px; }
.tl-meta .date { color: var(--muted); }
.tl-card h3 { font-size: 19px; }
.tl-card h3 span { color: var(--accent); font-weight: 500; }
.tl-card p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* ================= TERMINAL ================= */
#terminal > p { margin: -30px 0 26px; }
.term { background: rgba(5,7,12,.85); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 60px -30px rgba(0,255,163,.3); }
.term-title { font-size: 12px; color: var(--muted); margin: 0 auto; transform: translateX(-30px); }
.term-body { padding: 18px 22px; height: 400px; overflow-y: auto; font-size: 14px; line-height: 1.7; }
.term-body .line { white-space: pre-wrap; word-break: break-word; }
.term-input-row { display: flex; gap: 10px; align-items: center; }
.prompt { white-space: nowrap; }
.prompt b { color: var(--accent); font-weight: 500; } .prompt i { color: var(--accent-2); font-style: normal; }
#termInput { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; caret-color: var(--accent); }
.t-ok { color: var(--accent); } .t-err { color: var(--s-prop); } .t-muted { color: var(--muted); } .t-key { color: var(--s-key); } .t-cls { color: var(--s-cls); } .t-fn { color: var(--s-fn); }

/* ================= CONTACT ================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.big { font-size: clamp(30px, 4vw, 46px); line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 18px; }
.contact-links { display: grid; gap: 12px; margin-top: 30px; font-size: 15px; }
.contact-links a { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); transition: border-color .25s, box-shadow .25s; width: fit-content; }
.contact-links a:hover { border-color: var(--accent); box-shadow: 0 0 30px -10px rgba(0,255,163,.5); }
.contact-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; display: grid; gap: 14px; }
.form-head { font-size: 14px; }
.contact-form label { display: grid; gap: 6px; padding-left: 22px; }
.contact-form label span { font-size: 13px; color: var(--s-prop); }
.contact-form input, .contact-form textarea {
  background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text); font: 15px var(--sans); outline: none; resize: vertical; transition: .25s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,255,163,.12); }
.contact-form .btn { justify-self: start; margin-top: 6px; }
.form-status { font-size: 13px; min-height: 20px; color: var(--accent); }

/* ================= FOOTER ================= */
.footer { text-align: center; padding: 80px 20px 40px; font-size: 13px; display: grid; gap: 6px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; }
  .hero-right { max-width: 640px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .float-badge.b2 { left: 10px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 880px) {
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 80vw); flex-direction: column; justify-content: center; padding: 40px;
    background: rgba(7,9,15,.97); border-left: 1px solid var(--border); font-size: 18px; gap: 28px;
    transform: translateX(100%); transition: transform .45s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-cta { display: none; }
  .burger { display: block; z-index: 2; }
  .about-grid, .contact-grid, .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .hero-name { letter-spacing: -2px; }
  .hero-stats { gap: 24px; }
  .editor-body { font-size: 11px; height: 380px; }
  .gutter { min-width: 36px; padding: 0 10px; }
  .tab:not(.active) { display: none; }
  .section { padding-top: 100px; }
  .principles { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
  .term-body { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
