/* Kurt Johnson — kurtjohnson.me */
:root {
  --bg: #0f172a;          /* slate-900 navy */
  --bg-raised: #1e293b;   /* slate-800 */
  --heading: #f1f5f9;     /* slate-100 */
  --text: #94a3b8;        /* slate-400 — 7.0:1 on --bg */
  --text-strong: #cbd5e1; /* slate-300 */
  --accent: #5eead4;      /* teal-300 — 11:1 on --bg */
  --accent-soft: rgba(94, 234, 212, 0.1);
  --border: #1e293b;
  --font: "Inter", "InterVariable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@supports (font-variation-settings: normal) {
  body { font-family: "InterVariable", var(--font); }
}

h1, h2, h3 { color: var(--heading); line-height: 1.25; margin: 0; }
p { margin: 0 0 1rem; }
strong { color: var(--text-strong); font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--heading); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }
.content p a, .bullets a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; color: var(--bg); }

/* ---------- Layout ---------- */
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sidebar { padding: 3rem 0 1rem; }

.name { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.025em; }
.name a { color: var(--heading); }
.name a:hover { color: var(--heading); }
.role { margin: 0.75rem 0 0; color: var(--heading); font-size: 1.125rem; font-weight: 500; }
.meta { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--text); }

.nav { display: none; }

.sidebar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--accent-soft); color: var(--accent); }

.social { display: flex; gap: 0.25rem; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
}
.social a:hover { color: var(--accent); }

/* ---------- Content ---------- */
.content { padding: 1rem 0 0; }

.section { padding: 3rem 0 1rem; scroll-margin-top: 1rem; }
.section > p { max-width: 42rem; }

.section-title {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -1.5rem 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sub-title {
  margin: 2.5rem 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-strong);
}

/* Skills */
.skills { margin: 0; display: grid; gap: 1rem; }
.skills dt { color: var(--heading); font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.skills dd { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.skills .tags { margin-top: 0; }
.tags li {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Experience */
.timeline { display: grid; gap: 2.5rem; }
.entry { display: grid; gap: 0.5rem; }
.entry-date {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}
.entry-title { font-size: 1rem; font-weight: 500; color: var(--heading); margin: 0; }
.entry-org { color: var(--text); font-weight: 400; }
.entry-org-line { margin: 0.25rem 0 0; font-size: 0.9375rem; }
.bullets { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.bullets li { position: relative; padding-left: 1.25rem; font-size: 0.9375rem; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Projects */
.projects { display: grid; gap: 1rem; }
.project {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.project:hover { background: rgba(30, 41, 59, 0.5); border-color: #334155; }
.project p { margin: 0.5rem 0 0; font-size: 0.9375rem; }
.project-title { font-size: 1.0625rem; font-weight: 600; }
.project-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin: -0.5rem 0;
}
.arrow { display: inline-block; transition: transform 0.15s ease; }
.project-title a:hover .arrow,
.project-title a:focus-visible .arrow { transform: translate(2px, -2px); }

/* Footer */
.footer { padding: 3rem 0 4rem; font-size: 0.8125rem; }
.footer p { margin: 0; max-width: 42rem; }

/* ---------- Desktop: fixed left column ---------- */
@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    grid-template-rows: auto 1fr;
    column-gap: 4rem;
    padding: 0 3rem;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem 0 4rem;
  }

  .name { font-size: 3rem; }
  .role { font-size: 1.25rem; }

  .nav { display: block; margin-top: 4rem; }
  .nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .nav a::before {
    content: "";
    display: block;
    width: 2rem;
    height: 1px;
    background: currentColor;
    transition: width 0.15s ease;
  }
  .nav a:hover,
  .nav a:focus-visible,
  .nav a.is-active { color: var(--heading); }
  .nav a:hover::before,
  .nav a:focus-visible::before,
  .nav a.is-active::before { width: 4rem; background: var(--heading); }

  .sidebar-foot { margin-top: 2rem; }

  .content { grid-column: 2; padding: 5rem 0 0; }
  .footer { grid-column: 2; }

  .section { padding: 1rem 0 5rem; scroll-margin-top: 5rem; }
  .section-title {
    position: static;
    margin: 0 0 1.5rem;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .entry { grid-template-columns: 8.5rem 1fr; gap: 1.5rem; }
  .entry-date { padding-top: 0.2rem; }

  .skills > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; align-items: start; }
  .skills dt { margin: 0.2rem 0 0; }
}
