/* squares all the way down */
:root {
  --bg: #fafaf9;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e0dc;
  --blue: #3b82f6;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

.section, .footer { scroll-margin-top: 64px; }

::selection { background: var(--blue); color: #fff; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 2px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 4px;
  background: var(--blue);
  transition: width 0.18s steps(4);
}
.nav-links a:hover::after { width: 100%; }

/* hero */
.hero {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; }
.hero-hint {
  position: absolute;
  bottom: 18px;
  right: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  pointer-events: none;
}
.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.scroll-cue span {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--ink);
  animation: cue-bounce 1.6s steps(6) infinite;
}
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(14px); opacity: 0.35; }
}

/* ticker */
.ticker {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ticker-track i {
  width: 9px;
  height: 9px;
  background: var(--amber);
  flex-shrink: 0;
}
.ticker-track i:nth-of-type(2n) { background: var(--blue); }
.ticker-track i:nth-of-type(3n) { background: var(--green); }
.ticker-track i:nth-of-type(5n) { background: var(--red); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* sections */
main { max-width: 980px; margin: 0 auto; padding: 0 28px; }

.section { padding: 88px 0 20px; }

.section h2 {
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: -0.01em;
  margin-bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.h-sq {
  width: 18px;
  height: 18px;
  background: var(--blue);
  flex-shrink: 0;
  box-shadow: 24px 0 0 -6px var(--amber), 44px 0 0 -12px var(--green);
  margin-right: 26px;
}
#work .h-sq { background: var(--green); box-shadow: 24px 0 0 -6px var(--blue), 44px 0 0 -12px var(--red); }
#projects .h-sq { background: var(--red); box-shadow: 24px 0 0 -6px var(--green), 44px 0 0 -12px var(--amber); }
#skills .h-sq { background: var(--amber); box-shadow: 24px 0 0 -6px var(--red), 44px 0 0 -12px var(--blue); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 44px;
  align-items: start;
}
.about-text p { margin-bottom: 16px; color: var(--ink-soft); }
.about-text strong { color: var(--ink); }

.fact-list {
  list-style: none;
  border: 2px solid var(--ink);
  padding: 22px;
  box-shadow: 8px 8px 0 0 var(--line);
}
.fact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 0;
}
.fact-list li + li { border-top: 1px dashed var(--line); }
.fact-sq { width: 11px; height: 11px; flex-shrink: 0; }
.c-blue { background: var(--blue); }
.c-green { background: var(--green); }
.c-amber { background: var(--amber); }
.c-red { background: var(--red); }
.c-ink { background: var(--ink); }

/* work */
.job { padding: 26px 0; }
.job + .job { border-top: 1px solid var(--line); }
.job-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.job-head h3 { font-size: 20px; letter-spacing: -0.01em; }
.job-role { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.job-when { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin-left: auto; }
.job p { color: var(--ink-soft); max-width: 720px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags span {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 9px;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  box-shadow: 3px 3px 0 0 var(--line);
}

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.project-card {
  border: 2px solid var(--ink);
  padding: 24px 22px;
  background: #fff;
  box-shadow: 8px 8px 0 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.project-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 0 var(--line);
}
.card-icon {
  height: 68px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
}
.project-card h3 { font-size: 17px; margin-bottom: 4px; }
.card-kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.project-card p:last-child { font-size: 14.5px; color: var(--ink-soft); }

/* skills */
.skills-rows { display: flex; flex-direction: column; gap: 18px; }
.skills-row { display: flex; align-items: baseline; gap: 20px; }
.skills-label {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  width: 90px;
  flex-shrink: 0;
}
.skills-row .tags { margin-top: 0; }

/* footer */
.footer {
  margin-top: 100px;
  border-top: 2px solid var(--ink);
  position: relative;
  background: #fff;
}
.footer-canvas { height: 46svh; min-height: 300px; }
.footer-content {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  padding: 6px 20px 0;
}
/* square buttons */
.btn-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; }

[data-sq-btn] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  overflow: visible;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}
[data-sq-btn] .sb-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
[data-sq-btn] .sb-label {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.sb-contained .sb-label { color: #fff; }
.sb-contained.sb-dissolved .sb-label { color: var(--ink); transform: scale(1.05); }
.sb-outlined .sb-label { color: var(--ink); }
.sb-outlined.sb-dissolved .sb-label { transform: scale(1.05); }
[data-sq-btn]:active .sb-label { transform: scale(0.95); }
.footer-note {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding: 26px 0 30px;
}

/* mobile */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 64px 0 12px; }
  .section h2 { font-size: 24px; }
  .job-when { margin-left: 0; width: 100%; }
  .skills-row { flex-direction: column; gap: 8px; }
  .nav { padding: 12px 18px; }
  .nav-links { gap: 16px; }
  .hero-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .scroll-cue span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
