:root {
  --bg: #12151a;
  --surface: #1b1f27;
  --border: #2a2f3a;
  --border-strong: #3a4150;
  --text: #eef1f5;
  --text-soft: #c3cad5;
  --muted: #8b93a1;
  --accent: #5b8def;
  --amber: #f5a623;
  --green: #3ecf8e;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: var(--accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- STATUS BAR ---------- */
.statusbar {
  background: #0c0e12;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.statusbar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ---------- HEADER ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(18, 21, 26, .92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.nav a:hover { color: var(--text); }

.lang-switch {
  font-family: var(--font-mono);
  font-size: 12.5px !important;
  letter-spacing: .06em;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 3px 8px;
}

.lang-switch:hover {
  border-color: var(--amber);
  color: var(--amber) !important;
}

/* ---------- INTRO ---------- */
.intro { padding: 84px 28px 72px; }

.intro-grid {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.intro h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 22px;
  max-width: 20ch;
}

.lead {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.intro-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.portrait {
  width: 168px;
  height: 168px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(1);
  border: 1px solid var(--border);
}

.btn {
  display: inline-block;
  background: var(--amber);
  color: #14171c;
  padding: 11px 22px;
  border: 0;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: #ffb845; }

.link-plain {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}

.link-plain:hover { color: var(--accent); border-color: var(--accent); }

.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- SECTIONS ---------- */
.band {
  padding: 56px 28px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 32px;
}

.prose p {
  color: var(--text-soft);
  max-width: 62ch;
  margin: 0 0 18px;
}

.prose p:last-child { margin-bottom: 0; }

.prose-lead {
  font-size: 19px;
  color: var(--text) !important;
  font-weight: 500;
}

/* Bulleted lists inside CV rows and project entries */
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 64ch;
}

.cv-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.cv-list li:last-child { margin-bottom: 0; }

.cv-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.entry-body .cv-list { margin: 0 0 14px; }

/* ---------- PROJECT ENTRIES ---------- */
.entry {
  display: flex;
  gap: 32px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.entry:first-of-type { border-top: 0; padding-top: 0; }

.entry-meta { flex-shrink: 0; width: 110px; padding-top: 4px; }

.entry-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
}

.entry-body { flex: 1; min-width: 0; }

.entry-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.01em;
  margin: 0 0 10px;
}

.entry-body p {
  color: var(--text-soft);
  margin: 0 0 12px;
  max-width: 62ch;
}

.entry-tech {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted) !important;
  margin-bottom: 0 !important;
}

/* ---------- READ MORE ---------- */
.read-more {
  display: inline-block;
  margin: 2px 0 16px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

.read-more:hover { color: var(--amber); border-color: var(--amber); }

.entry-more {
  margin: 0 0 18px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border);
}

.entry-more h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 22px 0 8px;
}

.entry-more h4:first-child { margin-top: 0; }

.entry-more p {
  color: var(--text-soft);
  font-size: 16px;
  margin: 0 0 12px;
  max-width: 64ch;
}

.entry-more code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ---------- CV ROWS ---------- */
.cv-row {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.cv-row:first-of-type { border-top: 0; padding-top: 0; }

.cv-date {
  flex-shrink: 0;
  width: 110px;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.cv-content { flex: 1; min-width: 0; }

.cv-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  margin: 0 0 2px;
}

.cv-org {
  color: var(--muted) !important;
  font-size: 15px;
  margin: 0 0 10px !important;
}

.cv-content p {
  color: var(--text-soft);
  margin: 0;
  max-width: 62ch;
}

/* ---------- SKILLS ---------- */
.skills-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 32px 40px;
}

.skills-columns h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.skills-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skills-columns li {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-alt { font-size: 15.5px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

label { font-size: 14px; color: var(--muted); }

input, textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text);
  padding: 11px 12px;
  font-family: var(--font-body);
  font-size: 15.5px;
}

input:focus, textarea:focus { border-color: var(--accent); }

.contact-form .btn { align-self: flex-start; }

.form-status { font-size: 14.5px; min-height: 20px; margin: 0; }
.form-status.ok { color: var(--green); }
.form-status.error { color: #f4767d; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p { margin: 0; }
.footer-note { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  body { font-size: 16.5px; }

  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }

  .intro { padding: 52px 28px 48px; }
  .intro-grid { flex-direction: column-reverse; gap: 28px; }
  .portrait { width: 120px; height: 120px; }
  .intro h1 { max-width: none; }

  .band { padding: 44px 28px; }

  .entry, .cv-row { flex-direction: column; gap: 8px; }
  .entry-meta, .cv-date { width: auto; padding-top: 0; }

  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
