@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
}

:root {
  --bg:            #05070a;
  --bg-soft:       #0a0e13;
  --panel:         rgba(18, 24, 28, 0.55);
  --panel-solid:   #0d1216;
  --border:        rgba(57, 255, 150, 0.12);
  --border-strong: rgba(57, 255, 150, 0.35);

  --green:         #39ff95;
  --green-dim:     #1f8f57;
  --green-glow:    rgba(57, 255, 150, 0.45);
  --green-soft:    rgba(57, 255, 150, 0.08);

  --gray:          #8a949c;
  --gray-dim:      #7c8690;
  --white:         #e7f0ec;

  --radius:        16px;
  --radius-sm:     10px;
  --maxw:          1120px;

  --mono: "JetBrains Mono", "Fira Code", "SF Mono", ui-monospace, "Cascadia Code",
          Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--mono);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img, svg, .brand-logo, .nf-img, .dc-avatar, .rb-avatar, .badge {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.secure-tag { color: var(--green-dim); font-size: 0.78rem; letter-spacing: 0.02em; }

html { scrollbar-width: thin; scrollbar-color: var(--green-dim) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #04050700; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--green), var(--green-dim));
  border: 3px solid var(--bg);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--green-glow);
}
::-webkit-scrollbar-thumb:hover { background: var(--green); }
::-webkit-scrollbar-corner { background: transparent; }

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}
.bg-grid {
  background-image:
    linear-gradient(var(--green-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--green-soft) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  animation: gridDrift 24s linear infinite;
}
.bg-glow {
  z-index: -2;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(57,255,150,0.10), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(31,143,87,0.10), transparent 65%);
}
.bg-scanlines {
  z-index: -1;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.18) 3px, rgba(0,0,0,0) 4px);
  opacity: 0.35;
  mix-blend-mode: overlay;
}
@keyframes gridDrift { from { background-position: 0 0, 0 0; } to { background-position: 46px 46px, 46px 46px; } }

:root {
  --cur-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M3 2 L3 19 L8 14 L11.5 21 L14 20 L10.5 13.5 L17 13.5 Z' fill='%23f4fff9' stroke='%23061a10' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, auto;
  --cur-point: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M3 2 L3 19 L8 14 L11.5 21 L14 20 L10.5 13.5 L17 13.5 Z' fill='%2339ff95' stroke='%23061a10' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, pointer;
  --cur-text:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 4 H15 M9 20 H15 M12 4 V20' stroke='%23f4fff9' stroke-width='2' fill='none'/%3E%3C/svg%3E") 12 12, text;
}
body { cursor: var(--cur-arrow); }
a, button, .interactive, .chip, .tag, .skill-card, .proj-card,
.nav-toggle, summary, [role="button"], label { cursor: var(--cur-point); }
input, textarea, select { cursor: var(--cur-text); }

.cursor-aura {
  position: fixed; top: 0; left: 0;
  width: 26px; height: 26px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: width .22s var(--ease), height .22s var(--ease),
              border-color .22s var(--ease), background .22s var(--ease),
              opacity .3s var(--ease);
  will-change: transform;
  mix-blend-mode: screen;
}
.cursor-aura.visible { opacity: 1; }
.cursor-aura.hover {
  width: 48px; height: 48px;
  border-color: var(--green);
  background: radial-gradient(circle, rgba(57,255,150,0.16), transparent 70%);
}
.cursor-aura.click { width: 18px; height: 18px; border-color: var(--green); }
@media (hover: none), (pointer: coarse) { .cursor-aura { display: none; } }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }

.section-head { margin-bottom: 2.5rem; }
.section-head .prompt { color: var(--green-dim); font-size: 0.85rem; letter-spacing: 0.04em; }
.section-head h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-top: 0.35rem;
  letter-spacing: -0.01em;
}
.dot-title { text-transform: lowercase; }
.dot-title::after { content: "."; color: var(--green); }
.prompt { color: var(--green-dim); }
.mt1 { margin-top: 1rem; }
.pid { color: var(--gray-dim); font-size: 0.75rem; }
.cta-center { justify-content: center; }
.dc-bio a { color: var(--green); }
.viewer-error a { color: var(--green); }
.rb-note { color: var(--gray-dim); }
.section-head p { color: var(--gray); max-width: 60ch; margin-top: 0.6rem; }

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 18px 40px -24px rgba(0,0,0,0.9);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(57,255,150,0.06), transparent 40%);
  pointer-events: none;
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(5,7,10,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; text-decoration: none; color: var(--green); }
.nav .brand .blink { color: var(--green); }
.nav .brand .dim { color: var(--gray-dim); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--green);
  transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; color: var(--green); font-size: 1.4rem; }

.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 6rem; }
.hero .container { width: min(100% - 2.5rem, 940px); }

.terminal { width: 100%; }
.terminal-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13,18,22,0.6);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.terminal-bar .title { margin-left: 0.5rem; color: var(--gray); font-size: 0.82rem; }
.terminal-bar .status { margin-left: auto; color: var(--green-dim); font-size: 0.78rem; }

.terminal-body { padding: clamp(1.2rem, 3vw, 2rem); }
.line { white-space: pre-wrap; word-break: break-word; }
.line .cmd { color: var(--green); }
.line .out { color: var(--white); }
.line .muted { color: var(--gray); }
.term-prompt { color: var(--green-dim); }

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0.2rem 0 0.6rem;
  letter-spacing: -0.02em;
}
.hero-greet { color: var(--gray); font-size: clamp(1rem, 3vw, 1.4rem); margin-top: 1.4rem; }
.hero-name { color: var(--green); text-shadow: 0 0 28px var(--green-glow); text-transform: lowercase; }
.hero-name::after { content: "."; color: var(--white); text-shadow: none; }
.hero .role { color: var(--gray); font-size: clamp(0.95rem, 2.5vw, 1.15rem); min-height: 1.6em; }
.hero .role .typed { color: var(--green); }
.caret { display: inline-block; width: 9px; height: 1.05em; background: var(--green);
         margin-left: 2px; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--green-soft);
  color: var(--green);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 600;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: rgba(57,255,150,0.16);
             box-shadow: 0 8px 30px -12px var(--green-glow); }
.btn.ghost { background: transparent; color: var(--gray); border-color: var(--border); }
.btn.ghost:hover { color: var(--white); border-color: var(--border-strong); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--gray);
  font-size: 0.8rem;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.chip:hover { color: var(--green); border-color: var(--border-strong); transform: translateY(-2px); }
.chip .bullet { color: var(--green); }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; }
.about-card { padding: 1.6rem; }
.about-card p { color: var(--gray); }
.about-card p + p { margin-top: 0.9rem; }
.about-card strong { color: var(--white); }
.about-card .hl { color: var(--green); }

.meta-list { list-style: none; display: grid; gap: 0.85rem; }
.meta-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem;
                padding-bottom: 0.7rem; border-bottom: 1px dashed var(--border); }
.meta-list li:last-child { border-bottom: none; padding-bottom: 0; }
.meta-list .k { color: var(--gray-dim); }
.meta-list .v { color: var(--green); text-align: right; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.skill-card { padding: 1.3rem; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.skill-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.skill-card h3 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
                 color: var(--gray-dim); margin-bottom: 0.9rem; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { font-size: 0.82rem; padding: 0.35rem 0.7rem; border-radius: 8px;
       background: rgba(57,255,150,0.06); border: 1px solid var(--border); color: var(--white); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.proj-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.7rem;
             transition: transform .25s var(--ease), border-color .25s var(--ease); }
.proj-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.proj-card .top { display: flex; justify-content: space-between; align-items: center; }
.proj-card .ico { color: var(--green); font-size: 1.2rem; }
.proj-card h3 { font-size: 1.1rem; }
.proj-card p { color: var(--gray); font-size: 0.9rem; flex: 1; }
.proj-card .stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.proj-card .stack span { font-size: 0.72rem; color: var(--green-dim); }
.proj-card .link { color: var(--gray); text-decoration: none; font-size: 0.85rem; }
.proj-card .link:hover { color: var(--green); }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }

.viewer { padding: 0; }
.viewer-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.2rem;
               border-bottom: 1px solid var(--border); }
.viewer-head .label { font-size: 0.85rem; color: var(--gray); }
.brand-logo { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.viewer-head .ping { margin-left: auto; font-size: 0.72rem; color: var(--gray-dim);
                     display: inline-flex; align-items: center; gap: 0.4rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-dim); }
.live-dot.on { background: var(--green); box-shadow: 0 0 10px var(--green-glow);
               animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.viewer-body { padding: 1.4rem; min-height: 220px; }

.dc-banner { height: 110px; border-radius: 12px; margin: -0.2rem 0 0;
             position: relative; overflow: hidden;
             background-color: #0d1216; background-size: cover; background-position: center;
             background-repeat: no-repeat; }
.dc-banner::after { content: ""; position: absolute; inset: 0;
             background: linear-gradient(180deg, transparent 40%, rgba(13,18,22,0.55)); }
.dc-status { color: var(--gray); font-size: 0.85rem; margin-top: 0.6rem; }
.dc-bio { color: var(--gray); font-size: 0.82rem; line-height: 1.55; margin-top: 0.8rem;
          padding: 0.8rem; border-radius: 12px; background: rgba(0,0,0,0.22);
          border: 1px solid var(--border); white-space: normal; word-break: break-word; }
.a-fallback { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
              font-size: 1.4rem; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.dc-avatar-wrap { position: relative; display: inline-block; margin: -44px 0 0 6px; }
.dc-avatar { width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--panel-solid);
             background: var(--panel-solid); object-fit: cover; display: block; }
.dc-presence { position: absolute; right: 2px; bottom: 6px; width: 22px; height: 22px;
               border-radius: 50%; border: 5px solid var(--panel-solid); background: var(--gray-dim); }
.dc-presence.online { background: #23a55a; }
.dc-presence.idle   { background: #f0b232; }
.dc-presence.dnd    { background: #f23f43; }
.dc-presence.offline{ background: #80848e; }
.dc-names { margin-top: 0.5rem; }
.dc-names .display { font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.dc-names .handle { color: var(--gray); font-size: 0.85rem; }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.9rem;
             padding: 0.5rem 0.65rem; border-radius: 10px; background: rgba(0,0,0,0.24);
             border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.badge { width: 22px; height: 22px; object-fit: contain; display: block; }
.badge-link { display: inline-flex; line-height: 0; }
.badge-link:hover .badge { filter: drop-shadow(0 0 6px var(--green-glow)); }

.dc-activity { margin-top: 1rem; padding: 0.9rem; border-radius: 12px;
               background: rgba(0,0,0,0.25); border: 1px solid var(--border);
               display: flex; gap: 0.8rem; align-items: center; }
.dc-activity img { width: 46px; height: 46px; border-radius: 10px; }
.dc-activity .a-name { font-size: 0.9rem; font-weight: 600; }
.dc-activity .a-detail { font-size: 0.8rem; color: var(--gray); }
.dc-activity .a-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
                        color: var(--green-dim); margin-bottom: 0.2rem; }

.rb-account { display: flex; gap: 1rem; align-items: center; padding: 1rem 0;
              border-bottom: 1px dashed var(--border); }
.rb-account:last-child { border-bottom: none; }
.rb-avatar { width: 64px; height: 64px; border-radius: 12px; background: rgba(255,255,255,0.04);
             border: 1px solid var(--border); object-fit: cover; flex-shrink: 0; }
.rb-info { flex: 1; min-width: 0; }
.rb-info .name { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.rb-info .name .verified { color: var(--green); font-size: 0.75rem; }
.rb-info .display { color: var(--gray); font-size: 0.82rem; }
.rb-stats { display: flex; gap: 1.3rem; margin-top: 0.5rem; }
.rb-stats .stat { font-size: 0.8rem; color: var(--gray); }
.rb-stats .stat b { color: var(--green); display: block; font-size: 0.95rem; }
.rb-link { color: var(--gray); font-size: 0.8rem; text-decoration: none; align-self: flex-start; }
.rb-link:hover { color: var(--green); }

.skeleton { color: var(--gray-dim); font-size: 0.85rem; display: flex; align-items: center; gap: 0.6rem; }
.skeleton .spin { width: 14px; height: 14px; border: 2px solid var(--border);
                  border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-error { color: var(--gray); font-size: 0.85rem; }
.viewer-error code { color: var(--green-dim); }

.contact-card { padding: 2rem; text-align: center; }
.contact-card h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.contact-card p { color: var(--gray); margin: 0.6rem auto 1.6rem; max-width: 50ch; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

.footer { padding: 2rem 0 3rem; border-top: 1px solid var(--border); color: var(--gray-dim);
          font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between; }
.footer .accent { color: var(--green-dim); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.notfound .nf-img { width: clamp(140px, 30vw, 220px); filter: drop-shadow(0 0 40px rgba(57,255,150,0.15));
                    animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.notfound h1 { font-size: clamp(3rem, 14vw, 7rem); color: var(--green); text-shadow: 0 0 30px var(--green-glow);
               margin: 0.5rem 0; letter-spacing: -0.04em; }
.notfound .nf-term { max-width: 520px; margin: 1.4rem auto 0; text-align: left; }
.notfound .nf-term .line { font-size: 0.88rem; }

@media (max-width: 820px) {
  .about-grid, .profile-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; inset: 60px 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(5,7,10,0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    transform: translateY(-120%);
    transition: transform .3s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links li { padding: 0.6rem 1.5rem; }
  .nav-toggle { display: block; }
}

@media (max-width: 600px) {
  :root { --radius: 14px; }
  .container { width: min(100% - 1.6rem, var(--maxw)); }
  section { padding: 3.2rem 0; }
  .hero { padding-top: 5rem; }
  .terminal-body { padding: 1.1rem; }
  .terminal-bar .status { display: none; }
  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }

  .meta-list li { flex-direction: column; gap: 0.2rem; }
  .meta-list .v { text-align: left; }

  .skill-grid { grid-template-columns: 1fr 1fr; }
  .proj-grid { grid-template-columns: 1fr; }

  .viewer-body { padding: 1.1rem; }
  .dc-banner { height: 88px; }
  .dc-avatar-wrap { margin-top: -36px; }
  .dc-avatar { width: 72px; height: 72px; }
  .dc-names .display { font-size: 1.08rem; }
  .badge { width: 20px; height: 20px; }

  .rb-account { gap: 0.7rem; }
  .rb-avatar { width: 54px; height: 54px; }
  .rb-stats { gap: 0.9rem; flex-wrap: wrap; }
  .rb-link { align-self: center; }

  .contact-card { padding: 1.4rem; }
  .contact-links .btn { flex: 1 1 100%; justify-content: center; }
  .footer { flex-direction: column; gap: 0.4rem; text-align: center; justify-content: center; }
}

@media (max-width: 360px) {
  .skill-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
