:root {
  --bg: #050807;
  --panel: #0b1510;
  --text: #f1f7ef;
  --muted: #8d9a8b;
  --muted-2: #626d61;
  --line: rgba(125, 255, 107, .20);
  --accent: #7dff6b;
  --accent-soft: rgba(125, 255, 107, .10);
  --max: 1420px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

:target { scroll-margin-top: 100px; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 14%, rgba(28, 105, 99, .13), transparent 30%),
    radial-gradient(circle at 15% 55%, rgba(17, 91, 83, .08), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.65;
}

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

.page {
  width: min(calc(100% - 48px), var(--max));
  margin: 28px auto;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    rgba(3, 11, 14, .76);
  background-size: 48px 48px;
  border-radius: 14px;
  overflow: clip;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #070f11;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.04em;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 17px;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
}

nav a::before,
nav a::after {
  color: var(--accent);
  opacity: .8;
}

nav a::before { content: "["; margin-right: 5px; }
nav a::after { content: "]"; margin-left: 5px; }

.lang {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

.lang a::before,
.lang a::after { content: none; }

.lang [aria-current="true"] {
  color: var(--text);
  font-weight: 700;
}

main { padding: 0 38px; }

.hero {
  min-height: 530px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 70px;
  align-items: center;
  padding: 74px 0 68px;
}

.eyebrow { color: var(--muted); margin-bottom: 10px; }

h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(58px, 7vw, 102px);
  line-height: .94;
  letter-spacing: -.075em;
  font-weight: 800;
}

.role {
  margin-top: 25px;
  color: var(--accent);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: .03em;
}

.intro {
  max-width: 720px;
  margin: 27px 0 28px;
  color: #d9e4e3;
  font-size: 17px;
}

.contacts { display: flex; flex-wrap: wrap; gap: 10px; }

.contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 14px;
  background: rgba(4, 15, 18, .65);
  font-size: 13px;
  transition: .2s ease;
}

.contact:hover {
  border-color: rgba(85,242,167,.6);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.contact svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex: 0 0 auto;
}

/* Terminal */
.terminal {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px 28px;
  background: rgba(4, 16, 19, .82);
  min-height: 315px;
  overflow: hidden;
}

.terminal-screen {
  height: 265px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.terminal-line {
  min-height: 25px;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt { color: var(--muted); }
.command { color: #dce7e6; }
.output { color: var(--accent); margin-bottom: 10px; }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink .8s steps(1) infinite;
}

.terminal-clear {
  color: var(--muted-2);
  opacity: 0;
  transition: opacity .15s;
}

.terminal-clear.visible { opacity: 1; }

section {
  border-top: 1px solid var(--line);
  padding: 34px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
  align-items: baseline;
}

h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .02em;
}

h2::after {
  content: "—";
  color: var(--accent);
  margin-left: 12px;
}

.section-note { color: var(--muted); font-size: 11px; }

.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 60px;
}

.about-copy {
  color: #cbd9d8;
  font-size: 14px;
}

/* Experience timeline */
.timeline {
  position: relative;
  margin-left: 0;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 158px;
  top: 7px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 56px minmax(0, 1fr);
  gap: 0;
  padding: 0 0 34px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: 153px;
  top: 8px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft);
  z-index: 1;
}

.timeline-date {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  padding-top: 2px;
  padding-right: 20px;
  white-space: nowrap;
  text-align: right;
}

.timeline-company {
  font-size: 17px;
  font-weight: 700;
  color: #f0f5f4;
}

.timeline-role {
  color: var(--accent);
  font-size: 12px;
  margin-top: 3px;
}

.timeline-client {
  display: inline-block;
  margin-top: 10px;
  margin-right: 6px;
  color: #c8d5d4;
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
}

.timeline-description {
  margin-top: 12px;
  max-width: 820px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item > div:nth-child(2) {
  grid-column: 3;
}

.timeline-tags {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.timeline-tag {
  color: var(--muted-2);
  font-size: 10px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.skill-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 19, 24, .72);
  padding: 19px;
  min-height: 135px;
}

.skill-title {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.skill-content {
  color: #bdcccb;
  font-size: 12px;
}

/* Work & Lab */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.project {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 19, 24, .72);
  padding: 20px;
  min-height: 190px;
}

.project-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  color: var(--accent);
  font-size: 10px;
  border: 1px solid rgba(85,242,167,.25);
  padding: 2px 6px;
  margin-bottom: 13px;
}

.project p {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}

.project-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
}

/* Notes */
.notes-list { margin-top: 5px; }

.note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(135,190,192,.08);
  font-size: 12px;
}

.note-date {
  color: var(--muted-2);
  white-space: nowrap;
}

.notes-more,
.skills-more {
  display: inline-block;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 13px;
  font-size: 11px;
}

/* Note article (blog post) */
.note-body {
  max-width: 760px;
  color: #cbd9d8;
  font-size: 14px;
}

.note-body h3 {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .02em;
  margin: 28px 0 10px;
}

.note-body p { margin: 0 0 16px; }

.note-body a { color: var(--accent); }

.note-body code {
  background: rgba(7, 19, 24, .9);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}

.note-body pre {
  background: rgba(4, 16, 19, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 12px;
}

.note-body pre code { border: 0; padding: 0; background: none; }

.note-meta {
  color: var(--muted-2);
  font-size: 11px;
  margin-bottom: 26px;
}

.note-back {
  display: inline-block;
  margin-top: 30px;
  font-size: 11px;
  color: var(--muted);
}

/* Complete skills */
.complete-skills {
  color: #cbd9d8;
  font-size: 12px;
}

.complete-skills p { margin: 0 0 18px; }
.complete-skills strong { color: var(--accent); }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
}

.footer-copy {
  color: var(--muted);
  font-size: 11px;
}

.footer-copy strong {
  color: #dce7e6;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 25px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .terminal { max-width: 800px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  header {
    padding: 18px 20px;
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  :target { scroll-margin-top: 150px; }

  main { padding: 0 20px; }

  .hero {
    padding: 55px 0;
    min-height: auto;
  }

  h1 { font-size: 55px; }

  .terminal { min-height: 300px; }

  .timeline { margin-left: 0; padding-left: 0; }

  .timeline::before { left: 0; }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 30px;
  }

  .timeline-item::before { left: -5px; }

  .timeline-date {
    text-align: left;
    padding-right: 0;
  }

  .timeline-item > div:nth-child(2) { grid-column: 1; }

  .skills-grid,
  .projects { grid-template-columns: 1fr; }

  .note { flex-direction: column; gap: 3px; }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links { flex-wrap: wrap; }
}
