/* ---------- design tokens ---------- */
:root {
  --bg:         #0A0B0F;
  --bg-2:       #0E1117;
  --surface:    #161B22;
  --surface-2: #1C2129;
  --text:       #E8ECF0;
  --muted:      #8B97A3;
  --muted-2:    #6B7480;
  --accent:     #66FCF1;
  --accent-2:   #45A29E;
  --secondary:  #C792EA;
  --success:    #A6E22E;
  --warn:       #FFCB6B;
  --border:     rgba(102, 252, 241, 0.10);
  --border-2:   rgba(199, 146, 234, 0.16);
  --glow:       rgba(102, 252, 241, 0.18);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Fira Code", Menlo, monospace;

  --w-content: 1120px;
  --r-md: 10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Background: radial cyan glow up top + faint dot grid. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(102, 252, 241, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 10%, rgba(199, 146, 234, 0.05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(102, 252, 241, 0.25); color: var(--text); }

/* ---------- layout ---------- */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 15, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}

.nav__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--accent);
}
.nav__brand::before { content: "<"; color: var(--muted-2); margin-right: 2px; }
.nav__brand::after  { content: "/>"; color: var(--muted-2); margin-left: 2px; }

.nav__links { display: flex; gap: 6px; align-items: center; }

.nav__link {
  color: var(--muted);
  font-size: 0.93rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 120ms ease, background 120ms ease;
}
.nav__link:hover { color: var(--text); text-decoration: none; background: rgba(255,255,255,0.04); }
.nav__link--active { color: var(--accent); background: rgba(102, 252, 241, 0.08); }

.nav__link--ext {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 4px;
}

.lang-toggle {
  display: inline-flex;
  margin-left: 10px;
  padding: 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 2px;
}

.lang-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: color 120ms ease, background 120ms ease;
}
.lang-toggle__btn:hover { color: var(--text); }
.lang-toggle__btn--active {
  color: var(--bg);
  background: var(--accent);
}
.lang-toggle__btn--active:hover { color: var(--bg); }

/* ---------- hero ---------- */

.hero {
  padding: 110px 0 96px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero__name {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.0;
  margin: 0 0 22px;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.hero__name-accent { color: var(--accent); }

.hero__role {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 32px;
  max-width: 580px;
}
.hero__role strong { color: var(--text); font-weight: 600; }

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 28px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(166, 226, 46, 0.06);
  border: 1px solid rgba(166, 226, 46, 0.22);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}
.hero__status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(166, 226, 46, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(166, 226, 46, 0.16); }
  50%      { box-shadow: 0 0 0 7px rgba(166, 226, 46, 0.04); }
}

.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- code card (hero right side) ---------- */

.code-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 50px -20px rgba(0,0,0,0.6);
}

.code-card__chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
}
.code-card__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--muted-2); opacity: 0.55;
}
.code-card__dot:nth-child(1) { background: #FF5F57; }
.code-card__dot:nth-child(2) { background: #FEBC2E; }
.code-card__dot:nth-child(3) { background: #28C840; }
.code-card__title {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--muted-2);
  letter-spacing: 0.4px;
}

.code-card__body { padding: 18px 22px 22px; }
.code-card__body .code-line { white-space: pre; }

.tok-paren   { color: var(--muted-2); }
.tok-key     { color: var(--accent); }
.tok-str     { color: var(--success); }
.tok-kw      { color: var(--secondary); }
.tok-bool    { color: var(--warn); }
.tok-comment { color: var(--muted-2); font-style: italic; }

/* ---------- stats band ---------- */

.stats-band {
  padding: 36px 0 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat {
  padding: 18px 22px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat:first-child { border-left: 0; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}

.stat__label {
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.4px;
  line-height: 1.35;
}
.stat__label-line { display: block; }

/* ---------- how-i-work two-column ---------- */

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.how-card {
  padding: 24px 26px;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color 160ms ease;
}
.how-card:hover { border-color: rgba(102, 252, 241, 0.22); }

.how-card__heading {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
}
.how-card__caret { color: var(--accent); font-family: var(--font-mono); margin-right: 2px; }

.how-card__body {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.how-background {
  margin: 0;
  padding: 18px 22px;
  border-left: 2px solid var(--border-2);
  background: rgba(199, 146, 234, 0.03);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 80ch;
}

/* ---------- project preview ---------- */

.project-card__preview {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}
.project-card__preview .code-line { white-space: pre; }
.project-card__preview .code-line:first-child::before { content: ""; }

/* ---------- contact opener ---------- */

.contact__opener {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 70ch;
}

/* ---------- chip ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(102, 252, 241, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ---------- section ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--border);
  animation: fade-up 520ms ease both;
}
.section:nth-of-type(1) { animation-delay: 60ms; }
.section:nth-of-type(2) { animation-delay: 140ms; }
.section:nth-of-type(3) { animation-delay: 220ms; }

.section__head { margin-bottom: 36px; }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 1px;
  margin: 0 0 8px;
}
.section__eyebrow::before {
  content: ";; ";
  color: var(--muted-2);
}
.section__eyebrow-num {
  color: var(--secondary);
  margin-right: 6px;
}

.section__title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
}

/* ---------- prose ---------- */

.prose { max-width: 72ch; font-size: 1.05rem; color: var(--text); }
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- projects grid ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 0% 0%, var(--glow), transparent 70%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 252, 241, 0.32);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
.project-card:hover::before { opacity: 1; }

.project-card__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}

.project-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}
.project-card__title::before { content: "› "; color: var(--muted-2); }

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 3px 8px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(199, 146, 234, 0.06);
  white-space: nowrap;
}

.project-card__desc { color: var(--text); flex: 1; line-height: 1.6; }

.project-card__stack { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card__stack .chip { font-size: 0.72rem; padding: 3px 8px; }

.project-card__links {
  display: flex; gap: 16px; font-size: 0.92rem;
  font-family: var(--font-mono);
  padding-top: 4px;
}

/* ---------- contact ---------- */

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  transition: border-color 160ms ease, background 160ms ease;
}
.contact-item:hover { border-color: rgba(102, 252, 241, 0.28); background: var(--surface); }

.contact-item__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-item__label::before { content: ";; "; color: var(--muted-2); }

.contact-item a { font-size: 1rem; }

/* ---------- footer ---------- */

.footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

.footer__row {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

.footer__prompt { color: var(--muted-2); }
.footer__prompt::before { content: "$ "; color: var(--accent); }

/* ---------- small screens ---------- */

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .code-card { font-size: 0.84rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 6px 0; }
  .stat:nth-child(3) { border-left: 0; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav__inner { height: 58px; }
  .nav__link--ext { display: none; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 60px 0; }
  .stats-band { padding: 28px 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .section { animation: none; }
  .project-card { transition: none; }
}
