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

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #0d0d0d;
  --surface:   #111111;
  --border:    #212121;
  --text:      #e8e8e8;
  --text-dim:  #999999;
  --muted:     #5a5a5a;
  --accent:    #7fff7f;
  --accent-dim: rgba(127, 255, 127, 0.12);
  --mono:      'IBM Plex Mono', ui-monospace, monospace;
  --sans:      'Inter', -apple-system, sans-serif;
  --max:       760px;
}

html {
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(127, 255, 127, 0.06), transparent);
  background-repeat: no-repeat;
}

a { color: inherit; }

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* — layout — */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* — nav — */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.nav-mark span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.15s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.2s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.nav-links a.active {
  color: var(--accent);
}

/* — header / hero — */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
}

h1 span { color: var(--accent); }

.tagline {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 56px;
}

.hero {
  padding-top: 48px;
}

/* — divider — */
.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 40px;
}

/* — section scaffolding — */
.section { margin-bottom: 64px; }

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

h2 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 24px;
}

/* — project cards — */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.card:hover {
  background: var(--surface);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}

.card-arrow {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
  flex-shrink: 0;
}

.card:hover .card-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 480px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
}

/* — cv: skills grid — */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}

.skill-row dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.skill-row dd {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* — cv: experience — */
.job {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.job:last-child { border-bottom: 1px solid var(--border); }

.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 4px;
}

.job-title {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.job-dates {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

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

.job-org span { color: var(--muted); }

.job ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.job li {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}

.job li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.job-stack {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.job-stack em {
  font-style: normal;
  color: var(--text-dim);
}

/* — education — */
.edu-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.edu-name {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text);
}

.edu-place {
  font-size: 13px;
  color: var(--text-dim);
}

/* — footer — */
.footer {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.footer-text {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-text a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

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

/* — print (cv) — */
@media print {
  body { background: #fff; color: #000; }
  .nav, .footer { display: none; }
}

@media (max-width: 560px) {
  .skills-grid { grid-template-columns: 1fr; }
  .nav { padding: 22px 20px; }
  .nav-links { gap: 18px; }
  .wrap { padding: 0 20px 100px; }
}
