/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0c0c10;
  --bg2:      #111116;
  --bg3:      #16161d;
  --surface:  #1c1c25;
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.1);
  --accent:   #7c6ff7;
  --accent2:  #9d93ff;
  --ember:    #e8632a;
  --gold:     #f0a830;
  --green:    #4ade80;
  --text:     #eeeef5;
  --text2:    #9090a8;
  --text3:    #50505f;
  --mono:     'JetBrains Mono', monospace;
  --sans:     'Inter', system-ui, sans-serif;
  --r:        10px;
  --r-lg:     18px;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --t:        0.22s;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.container { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }

/* ===== EYEBROW / TITLES ===== */
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}

/* ===== STATUS DOT ===== */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74,222,128,0.4);
  animation: pulse 2.4s ease infinite;
  flex-shrink: 0;
}
.status-dot--sm { width: 6px; height: 6px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 24px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,111,247,0.3);
}
.btn--primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,111,247,0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn--ghost:hover { color: var(--text); background: var(--surface); }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--t), box-shadow var(--t), backdrop-filter var(--t);
}
.nav.scrolled {
  background: rgba(12,12,16,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.nav__logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.nav__links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--t);
}
.nav__link:hover { color: var(--text); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.nav__burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all var(--t) var(--ease);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--text); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--text); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero__noise {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.4;
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero__glow--1 {
  width: 600px; height: 600px;
  background: rgba(124,111,247,0.07);
  top: -100px; left: -100px;
}
.hero__glow--2 {
  width: 500px; height: 500px;
  background: rgba(232,99,42,0.05);
  bottom: -80px; right: -80px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 120px 28px 80px;
  width: 100%;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 36px;
  font-family: var(--mono);
}

.hero__name {
  font-size: clamp(52px, 9vw, 110px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.hero__name-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--ember) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__roles {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 24px;
  height: 28px;
}
.hero__role {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text2);
}
.hero__cursor {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero__bio {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text2);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero__links {
  display: flex;
  gap: 12px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.hero__socials {
  display: flex;
  gap: 8px;
}
.social-link {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  transition: all var(--t) var(--ease);
}
.social-link:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface);
  transform: translateY(-2px);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px; right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text3);
  opacity: 0.6;
}
.hero__scroll-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-indicator {
  animation: scrollBob 1.8s ease-in-out infinite;
}
@keyframes scrollBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===== ABOUT ===== */
.about { background: var(--bg2); border-top: 1px solid var(--border); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 72px;
  align-items: start;
}
.about__text {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 18px;
}
.about__text strong { color: var(--text); font-weight: 600; }

.about__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail:nth-child(2n) { border-right: none; }
.detail:nth-last-child(-n+2) { border-bottom: none; }

.detail__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
}
.detail__val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.detail__val a { color: var(--accent); }
.detail__val a:hover { text-decoration: underline; }
.detail__val--green {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

/* ===== TERMINAL ===== */
.terminal {
  background: #0a0a0e;
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--mono);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.terminal__btn {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.terminal__btn--red    { background: #ff5f57; }
.terminal__btn--yellow { background: #febc2e; }
.terminal__btn--green  { background: #28c840; }
.terminal__title {
  font-size: 11px;
  color: var(--text3);
  margin-left: 8px;
}
.terminal__body {
  padding: 20px 20px 24px;
}
.terminal__line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.terminal__prompt { color: var(--accent); font-size: 14px; }
.terminal__cmd { font-size: 13px; color: var(--text2); }
.terminal__output {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text2);
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 14px;
}
.json-key   { color: #c792ea; }
.json-str   { color: #c3e88d; }
.json-bool  { color: #f78c6c; }
.terminal__line--blink { margin-bottom: 0; }
.terminal__cursor-block {
  width: 8px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
  animation: blink 1s step-end infinite;
  display: inline-block;
}

/* ===== STACK ===== */
.stack { border-top: 1px solid var(--border); }
.stack__sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 52px;
}
.stack__groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.stack__group-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}
.stack__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  transition: all var(--t) var(--ease);
}
.chip:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface);
}
.chip__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip__dot--vue    { background: #4dba87; }
.chip__dot--ts     { background: #3178c6; }
.chip__dot--vite   { background: #bd34fe; }
.chip__dot--css    { background: #264de4; }
.chip__dot--go     { background: #00aed8; }
.chip__dot--py     { background: #3776ab; }
.chip__dot--node   { background: #539e43; }
.chip__dot--docker { background: #2496ed; }
.chip__dot--nginx  { background: #009639; }
.chip__dot--linux  { background: #e95420; }
.chip__dot--pg     { background: #336791; }
.chip__dot--ai     { background: var(--accent); }

/* ===== PROJECTS ===== */
.projects { background: var(--bg2); border-top: 1px solid var(--border); }
.projects__sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 48px;
}
.projects__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.project-card {
  display: block;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  cursor: pointer;
}
.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.project-card--featured:nth-child(1) { grid-row: span 1; }
.project-card--featured:hover { border-color: rgba(124,111,247,0.35); }

.project-card__inner { padding: 28px; display: flex; flex-direction: column; gap: 18px; height: 100%; }

.project-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-card__icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.project-card__icon-wrap--forge { background: linear-gradient(135deg, var(--ember), #b84c1a); }
.project-card__icon-wrap--gpt   { background: linear-gradient(135deg, var(--accent), #5a4fd4); }
.project-card__icon-wrap--site  { background: linear-gradient(135deg, #2a9d8f, #1d7a6e); }

.project-card__label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.project-card__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.project-card__tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--border2);
  color: var(--text3);
  background: var(--surface);
  flex-shrink: 0;
}
.project-card__tag--live {
  color: var(--green);
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.2);
}
.project-card__tag--free {
  color: var(--gold);
  background: rgba(240,168,48,0.08);
  border-color: rgba(240,168,48,0.2);
}

.project-card__desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
  flex: 1;
}

.project-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pchip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text3);
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.project-card__url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}
.project-card__arrow {
  font-size: 15px;
  color: var(--text3);
  transition: color var(--t), transform var(--t);
}
.project-card:hover .project-card__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* third card spans full width */
.projects__list > .project-card:nth-child(3) {
  grid-column: 1 / -1;
}

/* ===== MINI PROJECTS ===== */
.mini-projects {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.mini-projects__label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.mini-projects__label span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.mini-projects__label::before,
.mini-projects__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.mini-projects__label::before { flex: 0 0 0px; }

.mini-projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
  text-decoration: none;
}
.mcard:hover {
  border-color: var(--border2);
  background: var(--surface);
  transform: translateY(-2px);
}

.mcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mcard__kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
}
.mcard__kind--bot {
  color: #48aaff;
  background: rgba(72,170,255,0.09);
  border: 1px solid rgba(72,170,255,0.18);
}
.mcard__kind--service {
  color: var(--accent2);
  background: rgba(124,111,247,0.09);
  border: 1px solid rgba(124,111,247,0.18);
}

.mcard__status {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.mcard__status--live     { color: var(--green); background: rgba(74,222,128,0.08); }
.mcard__status--wip      { color: var(--gold);  background: rgba(240,168,48,0.08); }
.mcard__status--archived { color: var(--text3); background: var(--surface); }

.mcard__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.mcard__desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
}

.mcard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

/* hover accent lines per type */
.mcard--bot:hover   { border-color: rgba(72,170,255,0.3); }
.mcard--service:hover { border-color: rgba(124,111,247,0.3); }

@media (max-width: 900px) {
  .mini-projects__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .mini-projects__grid { grid-template-columns: 1fr; }
}

/* ===== CONTACT ===== */
.contact { border-top: 1px solid var(--border); }
.contact__inner { max-width: 640px; }
.contact__sub {
  color: var(--text2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 44px;
}
.contact__cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ccard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all var(--t) var(--ease);
}
.ccard:hover {
  border-color: var(--border2);
  background: var(--surface);
  transform: translateX(4px);
}
.ccard__icon {
  flex-shrink: 0;
  color: var(--text2);
}
.ccard__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.ccard__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.ccard__val {
  font-size: 15px;
  font-weight: 600;
}
.ccard__arr {
  font-size: 16px;
  color: var(--text3);
  transition: color var(--t), transform var(--t);
}
.ccard:hover .ccard__arr {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text3);
  flex-wrap: wrap;
}
.footer__domain { font-family: var(--mono); }
.footer__made { font-size: 12px; }

/* ===== FADE-UP ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .stack__groups { grid-template-columns: 1fr; gap: 32px; }
  .projects__list { grid-template-columns: 1fr; }
  .projects__list > .project-card:nth-child(3) { grid-column: auto; }
}

@media (max-width: 700px) {
  .nav__links {
    display: none;
    position: fixed; inset: 0;
    flex-direction: column;
    background: rgba(12,12,16,0.97);
    backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 99;
  }
  .nav__links.open { display: flex; }
  .nav__link { font-size: 22px; padding: 14px; }
  .nav__burger { display: flex; }
  .hero__name { font-size: clamp(44px, 14vw, 80px); }
  .about__details { grid-template-columns: 1fr; }
  .detail { border-right: none; }
  .detail:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .detail:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero__links { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer__inner { flex-direction: column; text-align: center; }
}
