/* sandykay.dev: one stylesheet, light and dark themes via custom properties */

:root {
  color-scheme: light;
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1b1d20;
  --muted: #545a61;
  --border: #e2e3e0;
  --accent: #0a6b66;
  --accent-soft: #e4f1ef;
  --focus: #0a6b66;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121416;
    --surface: #181b1e;
    --text: #e7e8ea;
    --muted: #a4aab1;
    --border: #2b3035;
    --accent: #5fc9bf;
    --accent-soft: #17302e;
    --focus: #5fc9bf;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121416;
  --surface: #181b1e;
  --text: #e7e8ea;
  --muted: #a4aab1;
  --border: #2b3035;
  --accent: #5fc9bf;
  --accent-soft: #17302e;
  --focus: #5fc9bf;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 10;
}

/* top bar */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
}

.mark {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.mark:hover {
  color: var(--text);
}

.theme-toggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* hero */
.hero {
  padding: 3.5rem 0 2.5rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.headline {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
}

.intro {
  max-width: 62ch;
  margin: 0 0 1.5rem;
}

.links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.links a {
  font-weight: 500;
}

/* sections */
section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0;
}

/* experience timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.25rem 0 1.25rem;
}

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

.when {
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

.org {
  color: var(--muted);
  font-weight: 400;
}

.timeline p,
.card p {
  margin: 0.35rem 0 0;
}

/* project cards */
.cards {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem 1.2rem;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--muted);
}

.card .what {
  color: var(--muted);
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags li {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.card .repo {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.team {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: 0.1em;
  white-space: nowrap;
}

/* education */
.edu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu li {
  padding-bottom: 0.9rem;
}

.edu li:last-child {
  padding-bottom: 0;
}

.edu span {
  display: block;
  color: var(--muted);
}

/* footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  font-size: 0.95rem;
}

footer .links {
  margin-bottom: 1rem;
}

.fine {
  color: var(--muted);
  margin: 0;
  font-size: 0.85rem;
}

/* 404 */
.notfound {
  padding: 5rem 0 4rem;
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .wrap {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

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

/* keep grid children from forcing horizontal scroll on narrow screens */
.card,
.timeline li > div {
  min-width: 0;
}

/* visually hidden, still read by screen readers */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
