@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #050505;
  --surface: rgba(255, 255, 255, 0.025);
  --card: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f2f2f2;
  --muted: #a6a6a6;
  --accent: #ffffff;
  --shadow: rgba(0, 0, 0, 0.45);
}

:root[data-theme='light'] {
  --bg: #f4f4f1;
  --surface: rgba(0, 0, 0, 0.025);
  --card: rgba(255, 255, 255, 0.62);
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.28);
  --text: #111111;
  --muted: #5f5f5f;
  --accent: #000000;
  --shadow: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(var(--surface) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--text);
  font-family: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
  transition: background-color 0.2s, color 0.2s;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0, transparent 30%, var(--shadow));
  z-index: 0;
}

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

.screen {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.shell {
  min-height: calc(100vh - 56px);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.01);
}

.contact-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.contact-cell {
  min-height: 72px;
  padding: 14px 28px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
}

.contact-cell:last-child {
  border-right: 0;
}

.contact-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.contact-cell strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: clamp(0.82rem, 1.45vw, 1rem);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.contact-cell strong,
.contact-cell a {
  text-decoration: none;
  border-bottom: 0;
  background-image: none;
}

.mode-toggle {
  display: inline-flex;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.mode-toggle button {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 7px 11px;
}

.mode-toggle button:last-child {
  border-right: 0;
}

.mode-toggle button.is-active {
  background: var(--text);
  color: var(--bg);
}

.hero {
  padding: 42px 28px 44px;
  border-bottom: 1px solid var(--line);
}

.hero-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-bottom: 26px;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 400;
}

.role-line {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.section-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
}

.intro p:not(.role-line) {
  max-width: 850px;
  margin: 0;
  color: var(--text);
  line-height: 1.9;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  border-bottom: 1px solid var(--line);
}

.work-column,
.side-column {
  padding: 22px 28px 12px;
}

.work-column {
  border-right: 1px solid var(--line);
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 15px;
  bottom: 32px;
  width: 1px;
  background: var(--line-strong);
}

.timeline-card,
.info-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.timeline-card {
  padding: 14px 16px;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.card-head {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 14px;
  align-items: start;
}

.card-head .date,
.info-card > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.card-head h3,
.info-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.card-head h3 span {
  color: var(--muted);
}

.card-head small,
.info-card p {
  color: var(--muted);
  font-size: 0.78rem;
}

.side-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.stack {
  display: grid;
  gap: 10px;
}

.info-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

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

.skills span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 13px;
  color: var(--text);
  background: var(--card);
  font-size: 0.78rem;
}

.languages {
  display: grid;
  gap: 8px;
}

.language-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: end;
  color: var(--text);
  font-size: 0.9rem;
}

.language-row span {
  border-bottom: 1px dashed var(--line-strong);
  transform: translateY(-5px);
}

.language-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
  font-size: 0.78rem;
}

.terminal-footer {
  padding: 14px 28px 18px;
  color: var(--muted);
}

.terminal-footer p {
  margin: 0;
}

@media (max-width: 1100px) {
  .contact-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-cell:nth-child(3) {
    border-right: 0;
  }

  .contact-cell:nth-child(4),
  .contact-cell:nth-child(5) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .screen {
    width: min(100% - 24px, 1200px);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .work-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .contact-strip {
    grid-template-columns: 1fr;
  }

  .contact-cell,
  .contact-cell:nth-child(3),
  .contact-cell:nth-child(4),
  .contact-cell:nth-child(5) {
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .hero,
  .work-column,
  .side-column,
  .terminal-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card-head,
  .info-card,
  .language-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .language-row span {
    display: none;
  }

  .language-row em {
    text-align: left;
  }
}