:root {
  --bg: #07090e;
  --panel: #0d121d;
  --panel-alt: #131b2a;
  --border: #1f2a3e;
  --border-soft: #141c2b;
  --text: #e7eaee;
  --muted: #8996a6;
  --muted-dim: #5f6b7a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --crit: #e5484d;
  --high: #f0883e;
  --med:  #dcb84a;
  --low:  #4fb477;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; }
::selection { background: rgba(59, 130, 246, 0.3); }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  max-width: 900px; margin: 0 auto;
}
.brand {
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--low); box-shadow: 0 0 8px var(--low); }
.navlinks { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.navlinks a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  transition: color .15s ease;
}
.navlinks a:hover { color: var(--text); }
.navtoggle { display: none; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 7px 10px; font-size: 18px; cursor: pointer; }

@media (max-width: 680px){
  .navlinks { display: none; }
  .navtoggle { display: block; }
  .navlinks.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 56px; left: 0; right: 0;
    background: var(--panel); border-bottom: 1px solid var(--border);
    padding: 8px 28px 16px;
  }
  .navlinks.open a { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
}

section { padding: 60px 0; border-bottom: 1px solid var(--border-soft); }

.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); margin: 0 0 12px; letter-spacing: .02em; }
.kicker::before { content: "// "; color: var(--muted-dim); }
h2 { font-family: var(--mono); font-weight: 700; font-size: 26px; margin: 0 0 28px; color: var(--text); }

.hero {
  padding-top: 50px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px;
  align-items: center;
}
@media (max-width: 800px){ .hero { grid-template-columns: 1fr; text-align: center; } }

.hero-text { display: flex; flex-direction: column; }
@media (max-width: 800px){ .hero-text { align-items: center; } }

.role-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; color: var(--low);
  background: rgba(79, 180, 119, 0.08); border: 1px solid rgba(79, 180, 119, 0.28);
  padding: 6px 12px; border-radius: 20px; margin-bottom: 20px; width: fit-content;
}
.role-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--low); }

.hero h1 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent); }

.hero p.lead { font-size: 16px; color: var(--muted); max-width: 48ch; margin: 0 0 28px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  padding: 10px 20px; border-radius: 8px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: all .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); }

.avatar-container {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.avatar-frame {
  width: 210px; height: 210px; border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.25);
}
.avatar-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; background: var(--panel-alt);
  border: 3px solid var(--bg);
}

.terminal-box {
  background: #090d16;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  margin-top: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.terminal-header {
  background: #111723;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red { background: #ff5f56; }
.t-yellow { background: #ffbd2e; }
.t-green { background: #27c93f; }
.t-title { color: var(--muted); font-size: 12px; margin-left: auto; margin-right: auto; }
.terminal-body {
  padding: 18px 20px;
  color: var(--text);
  line-height: 1.7;
  min-height: 220px;
}

.term-line { margin-bottom: 6px; }
.term-line .p { color: var(--accent); font-weight: 600; }
.term-line.out { color: var(--muted); }
.term-line.ok { color: var(--low); font-weight: 600; }
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 0.8s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 24px; bottom: 24px; width: 2px; background: var(--border-soft); }

.titem { position: relative; margin-bottom: 24px; }
.titem:last-child { margin-bottom: 0; }

.titem-node {
  position: absolute; left: -28px; top: 20px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted-dim); z-index: 2;
  transition: all .2s ease;
}
.titem.active .titem-node {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.tcard { 
  background: transparent; 
  padding: 8px 0; 
  display: flex; 
  flex-direction: column; 
  width: 100%; 
}

.tcard-header { 
  display: flex; 
  align-items: flex-start; 
  gap: 16px; 
  cursor: pointer; 
  width: 100%; 
}

.tlogo { 
  width: 44px; 
  height: 44px; 
  border-radius: 10px; 
  background: #111723; 
  border: 1px solid var(--border); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  overflow: hidden; 
  flex-shrink: 0; 
  padding: 0; 
}

.tlogo img { 
  display: block;
  width: 100%; 
  height: 100%; 
  object-fit: cover;
  object-position: center;
}

.tinfo { 
  flex-grow: 1; 
}

.tinfo .when { 
  font-size: 13px; 
  color: var(--muted-dim); 
  margin-bottom: 4px; 
}

.tinfo h3 { 
  margin: 0 0 2px; 
  font-size: 17px; 
  color: #fff; 
  font-weight: 600; 
}

.tinfo .org { 
  font-size: 14px; 
  color: var(--accent); 
  margin-bottom: 4px; 
}

.toggle-btn { 
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
}
.toggle-btn span { display: inline-block; transition: transform 0.2s ease; }
.titem.active .toggle-btn span { transform: rotate(180deg); }

.tcard-body {
  max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding-top: 0; color: var(--muted); font-size: 14px;
}
.titem.active .tcard-body {
  max-height: 1000px; transition: max-height 0.3s ease-in-out;
  padding-top: 14px; border-top: 1px solid var(--border-soft); margin-top: 14px;
}
.tcard-body ul { margin: 0; padding-left: 18px; }
.tcard-body li { margin-bottom: 6px; }

.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.project-preview { border-bottom: 1px solid var(--border); }
.project-preview-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel-alt);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.project-preview-dots { display: flex; gap: 6px; flex-shrink: 0; }
.project-preview-window {
  height: clamp(120px, 20vw, 200px);
  overflow: hidden;
  background: var(--bg);
}
.project-preview-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(2.5px);
  transform: scale(1.02);
  transform-origin: center;
}
.project-content { padding: 24px; }
.project-card h3 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
}
.project-card p {
  max-width: 68ch;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .15s ease;
}
.project-link:hover { color: var(--accent-hover); text-decoration: underline; }
.project-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

.project-achievement {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.project-achievement-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-alt);
}
.project-achievement-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-achievement-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--bg);
  opacity: .9;
}
.project-achievement-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--low);
}
.project-achievement h4 {
  margin: 6px 0 8px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.project-achievement p { margin: 0 0 12px; font-size: 14px; }
.project-achievement-action {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  transition: color .15s ease;
}
.project-achievement:hover .project-achievement-action {
  color: var(--accent-hover);
  text-decoration: underline;
}
.project-achievement:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}
@media (max-width: 540px) {
  .project-achievement { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.fbtn {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 14px; cursor: pointer; transition: .15s ease;
}
.fbtn:hover { border-color: var(--muted); color: var(--text); }
.fbtn.active { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }

.findings { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.frow {
  display: grid; grid-template-columns: 1.1fr 2fr 0.9fr;
  gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  align-items: center; transition: background .15s ease;
}
.frow:last-child { border-bottom: none; }
.frow:hover { background: var(--panel-alt); }
.frow.fhead {
  font-family: var(--mono); font-size: 11px; color: var(--muted-dim);
  text-transform: uppercase; letter-spacing: .04em; background: var(--panel-alt);
}
.fprog { font-weight: 600; font-size: 14px; color: var(--text); }
.fvuln { font-size: 13.5px; color: var(--muted); }
.fvuln .note { display: block; font-size: 12px; color: var(--muted-dim); margin-top: 2px; }
.sev {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px;
  border-radius: 6px; justify-self: start; white-space: nowrap;
}
.sev .sdot { width: 6px; height: 6px; border-radius: 50%; }
.sev-crit { color: var(--crit); background: rgba(229,72,77,0.1); border: 1px solid rgba(229,72,77,0.25); }
.sev-crit .sdot { background: var(--crit); }
.sev-high { color: var(--high); background: rgba(240,136,62,0.1); border: 1px solid rgba(240,136,62,0.25); }
.sev-high .sdot { background: var(--high); }
.sev-med { color: var(--med); background: rgba(220,184,74,0.1); border: 1px solid rgba(220,184,74,0.25); }
.sev-med .sdot { background: var(--med); }
.sev-low { color: var(--low); background: rgba(79,180,119,0.1); border: 1px solid rgba(79,180,119,0.25); }
.sev-low .sdot { background: var(--low); }

@media (max-width: 680px){
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .frow.fhead { display: none; }
}

.contact-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 36px;
}
.contact-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 28px; }
.contact-item { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 14px; }
.contact-item .ico { color: var(--accent); width: 18px; }
.contact-item .ico svg { width: 100%; height: 100%; fill: currentColor; }
.copy-btn {
  background: none; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono);
  font-size: 11px; padding: 3px 8px; border-radius: 5px; cursor: pointer; margin-left: auto;
}
.copy-btn:hover { color: var(--text); border-color: var(--muted); }

footer { padding: 30px 0 50px; text-align: center; }
footer p { font-family: var(--mono); font-size: 12.5px; color: var(--muted-dim); margin: 0; }
