:root {
  --bg: #fafaf9;
  --fg: #1c1f24;
  --muted: #6b7280;
  --line: #e7e5e4;
  --card: #ffffff;
  --accent: #059669;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1014;
    --fg: #e6e8eb;
    --muted: #8b949e;
    --line: #22272e;
    --card: #12161b;
    --accent: #34d399;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1014;
  --fg: #e6e8eb;
  --muted: #8b949e;
  --line: #22272e;
  --card: #12161b;
  --accent: #34d399;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 14px;
}
.mark { font-weight: 700; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 18px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--accent); }
.theme {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme:hover { color: var(--accent); border-color: var(--accent); }

/* sections */
main section { padding: 40px 0; border-top: 1px solid var(--line); }
main section.hero { border-top: 0; padding-top: 48px; padding-bottom: 8px; }
main section.hero + section { border-top: 0; padding-top: 24px; }

.prompt { font-family: var(--mono); font-size: 14px; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: clamp(32px, 6vw, 42px); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.role { font-family: var(--mono); font-size: 15px; color: var(--accent); margin: 10px 0 20px; }
.hero p { margin: 0 0 12px; }

h2 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 20px;
}
h3 { font-size: 16px; margin: 0; }

/* projects */
.projects, .jobs { list-style: none; margin: 0; padding: 0; }
.projects { display: grid; gap: 12px; }
.card {
  display: block;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.card:hover { color: inherit; border-color: var(--accent); transform: translateY(-1px); }
.card:hover h3 { color: var(--accent); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.url { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card p { margin: 8px 0 0; font-size: 15px; }
.tags { font-family: var(--mono); font-size: 12px !important; color: var(--muted); }

/* experience */
.jobs li { padding: 0 0 22px 18px; border-left: 1px solid var(--line); position: relative; }
.jobs li:last-child { padding-bottom: 0; }
.jobs li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.jobs li:first-child::before { background: var(--accent); }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.at { font-weight: 400; color: var(--muted); }
.date { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.jobs p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.stack { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0; line-height: 1.9; }

/* footer */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  font-family: var(--mono);
  font-size: 13px;
}
footer p { margin: 0 0 6px; }
footer a { color: var(--muted); }

@media (max-width: 480px) {
  .top { font-size: 13px; }
  .top nav { gap: 10px; }
  main section { padding: 32px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* contact */
#contact p { margin: 0 0 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { color: var(--bg); filter: brightness(1.08); }
@media (max-width: 480px) { .btn { flex: 1 1 100%; justify-content: center; } }

/* contact form */
.contact-form { display: grid; gap: 12px; margin: 0 0 20px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form button { justify-self: start; cursor: pointer; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0 !important; font-size: 14px; color: var(--muted); min-height: 1em; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 480px) {
  .contact-form .row { grid-template-columns: 1fr; }
  .contact-form button { justify-self: stretch; }
}

.hero-actions { margin-top: 22px; }
@media (max-width: 480px) { .hero-actions .btn { flex: 1 1 0; } }
