/*
  Design tokens.
  Signature accent (copper) nods to electrical wiring; monospace chrome nods
  to the terminal/CLI work under Skills. Status dots borrow the vocabulary of
  network link lights (built = link up, in design = blueprint blue).
  Contrast checked against WCAG 2.1: text/muted/accent >=4.5:1 on their
  surface in both themes; status colors are decorative indicators (paired
  with a text label, never the only signal) and are checked to >=3:1.
*/
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #18181b;
  --color-muted: #52525b;
  --color-accent: #b45309;
  --color-border: #d4d4d8;
  --color-tag-bg: #f4f4f5;

  --color-status-built: #16a34a;
  --color-status-progress: #0d9488;
  --color-status-design: #2563eb;
  --color-status-concept: #7c3aed;

  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --max-width: 1080px;
}

:root[data-theme="dark"] {
  --color-bg: #111214;
  --color-surface: #17181b;
  --color-text: #f4f4f5;
  --color-muted: #a1a1aa;
  --color-accent: #fbbf24;
  --color-border: #3f3f46;
  --color-tag-bg: #1c1c1f;

  --color-status-built: #4ade80;
  --color-status-progress: #2dd4bf;
  --color-status-design: #60a5fa;
  --color-status-concept: #a78bfa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #111214;
    --color-surface: #17181b;
    --color-text: #f4f4f5;
    --color-muted: #a1a1aa;
    --color-accent: #fbbf24;
    --color-border: #3f3f46;
    --color-tag-bg: #1c1c1f;

    --color-status-built: #4ade80;
    --color-status-progress: #2dd4bf;
    --color-status-design: #60a5fa;
    --color-status-concept: #a78bfa;
  }
}

* {
  box-sizing: border-box;
}

.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;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--color-text) 14%, transparent) 1.5px, transparent 0);
  background-size: 24px 24px;
  background-attachment: fixed;
  line-height: 1.65;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* When the interactive dot canvas takes over, hide the static CSS dots
   underneath it so they don't double up. */
html.has-dot-canvas body {
  background-image: none;
}

#dot-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  background: var(--color-bg);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.logo {
  font-weight: 700;
  color: var(--color-text);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.nav-links a.active {
  color: var(--color-accent);
  font-weight: 600;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-tag-bg);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

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

.theme-toggle .icon-dark {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-light {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-dark {
    display: inline;
  }
}

.prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.prompt::before {
  content: "$ ";
  color: var(--color-accent);
}

.hero {
  padding: 3.5rem 1.5rem;
}

.hero h1 {
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
}

.avatar {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  color: var(--color-muted);
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.hero-body {
  max-width: 560px;
  margin: 0 0 0.65rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0 0 0.4rem;
}

.eyebrow::before {
  content: "// ";
  color: var(--color-accent);
}

.section {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem 2rem;
}

.two-col-grid h2 {
  font-size: 1.15rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

.section p {
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--color-muted);
  margin-top: -0.35rem;
}

.subheading {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.nav-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.4rem;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.nav-card:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.nav-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-card h3 span {
  color: var(--color-accent);
}

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0.85rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.4rem;
}

.project-card p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--dot-color, currentColor);
  flex-shrink: 0;
}

.status-built {
  --dot-color: var(--color-status-built);
}

.status-progress {
  --dot-color: var(--color-status-progress);
}

.status-design {
  --dot-color: var(--color-status-design);
}

.status-concept {
  --dot-color: var(--color-status-concept);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0;
}

.tag {
  font-family: var(--font-mono);
  background: var(--color-tag-bg);
  color: var(--color-text);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

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

.skills-section > .section-intro {
  max-width: 44rem;
  margin: 0 0 1.5rem;
}

.knowledge-panel {
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 10px;
}

.skills-section .knowledge-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 0.65rem;
}

.skills-section .knowledge-panel p {
  max-width: 52rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.skills-section > h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.skill-category {
  min-width: 0;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.skill-category:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.skill-category h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.skills-section .skill-category p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: minmax(0, 1fr); }
  .knowledge-panel { padding: 1.25rem; margin-bottom: 1.5rem; }
}

.social-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.school-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 10px;
  padding: 1.4rem;
  margin: 0 0 1rem;
}

.section .school-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-muted);
  margin: 0 0 0.25rem;
}

.school-label::before {
  content: "> ";
  color: var(--color-accent);
}

.school-name {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.section .school-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0 0 0.65rem;
}

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

.school-links a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-tag-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.school-links a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}

.page-nav {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.page-nav-top {
  border-top: none;
  border-bottom: 1px solid var(--color-border);
}

.page-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  min-width: 140px;
}

.page-nav-link:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.page-nav-next {
  margin-left: auto;
  text-align: right;
}

.page-nav-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-muted);
}

.page-nav-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1rem 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.site-footer .container {
  font-family: var(--font-mono);
}

@media (max-width: 600px) {
  .nav-links {
    gap: 0.85rem;
    justify-content: center;
  }

  .hero h1 {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* A little more room to build, with the original copper / terminal character. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.025em; }
main > .section:first-child { border-top: 0; }
main > .section:first-child h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1.5rem; }
.nav-links a { color: var(--color-muted); font-size: 0.9rem; display: inline-block; padding: 0.4rem 0; }
.nav-links a:hover { color: var(--color-accent); }
.nav-links a.active { text-decoration: underline; text-underline-offset: 0.6rem; text-decoration-thickness: 2px; }
.logo { letter-spacing: -0.035em; font-size: 1.1rem; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 3rem; align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.home-hero h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); letter-spacing: -0.055em; margin: 0.5rem 0 1rem; }
.accent { color: var(--color-accent); }
.hero-subtitle { font-size: 1.2rem; color: var(--color-text); max-width: 32rem; margin-bottom: 1rem; }
.hero-body { color: var(--color-muted); margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.7rem 1.1rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: 0.9rem; font-weight: 600; }
.button:hover { border-color: var(--color-accent); text-decoration: none; }
.button-primary { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.hero-profile { padding: 1.8rem; background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--color-accent); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.04); }
.hero-profile .avatar { width: 112px; height: 112px; margin-bottom: 1.2rem; }
.profile-name { font-weight: 700; margin: 0 0 0.4rem; }
.profile-caption { font-size: 0.85rem; color: var(--color-muted); margin: 0; }
.profile-topics { display: grid; gap: 0.5rem; border-top: 1px solid var(--color-border); padding-top: 1rem; margin-top: 1.3rem; font: 0.75rem var(--font-mono); color: var(--color-muted); }
.nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.nav-card { transition: border-color 0.18s ease, transform 0.18s ease; }
.nav-card:hover { transform: translateY(-3px); }
.nav-card h3 { margin-bottom: 0.6rem; }
.project-grid { gap: 1rem; }
.project-card-head { flex-wrap: wrap; }
.project-card .tag-list { margin-top: 1rem; }
#about > p:not(.eyebrow) { max-width: 48rem; color: var(--color-muted); }
.social-links a { display: inline-block; border: 1px solid var(--color-border); border-radius: 8px; padding: 0.65rem 1.2rem; background: var(--color-surface); }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 20; padding: 0.75rem 1rem; background: var(--color-surface); border: 2px solid var(--color-accent); border-radius: 6px; }
.skip-link:focus { top: 1rem; }
@media (max-width: 760px) {
  .nav { justify-content: center; }
  .logo { width: 100%; text-align: center; }
  .nav-links { gap: 0.35rem 1rem; justify-content: center; }
  .nav-links a { font-size: 0.8rem; min-height: 44px; display: inline-flex; align-items: center; }
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .hero-profile { display: none; }
  .section { padding-top: 2rem; padding-bottom: 2rem; }
}
@media (max-width: 440px) {
  .nav-grid { grid-template-columns: minmax(0, 1fr); }
  .page-nav-link { min-width: 0; flex: 1; }
  .page-nav-title { font-size: 0.85rem; }
  .tag { overflow-wrap: anywhere; }
}

/* Travel journal shares the portfolio's copper and dotted-paper palette. */
.travel-journal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 2rem; border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; background: var(--color-surface); }
.travel-art { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem; gap: 1.25rem; background: var(--color-tag-bg); color: var(--color-accent); border-right: 1px solid var(--color-border); }
.travel-art svg { width: min(100%, 240px); height: auto; }
.travel-art-caption { font: 0.75rem var(--font-mono); color: var(--color-muted); text-align: center; }
.travel-note { padding: clamp(1.5rem, 4vw, 3rem); align-self: center; }
.travel-note > p:not(.eyebrow) { color: var(--color-muted); }
.travel-note .button { margin-top: 0.75rem; }
@media (min-width: 761px) and (max-width: 1050px) {
  .nav { justify-content: center; }
  .logo { width: 100%; text-align: center; }
  .nav-links { justify-content: center; }
}
@media (max-width: 600px) {
  .travel-journal { grid-template-columns: minmax(0, 1fr); }
  .travel-art { border-right: 0; border-bottom: 1px solid var(--color-border); padding: 1.5rem; }
  .travel-art svg { width: 160px; }
}

.travel-stats { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; margin: 1.5rem 0; }
.travel-stats dt { font: 0.7rem var(--font-mono); color: var(--color-muted); }
.travel-stats dd { margin: 0.25rem 0 0; font-size: 1.7rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.04em; }
.places-heading { margin-top: 3rem; }
.places-heading p { max-width: 44rem; color: var(--color-muted); font-size: 0.9rem; }
.places-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin-top: 1.5rem; align-items: start; }
.place-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 1.4rem; min-width: 0; }
.place-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.place-icon { font-size: 1.8rem; line-height: 1.2; }
.visit-count { font: 0.75rem var(--font-mono); color: var(--color-accent); background: var(--color-tag-bg); border-radius: 6px; padding: 0.4rem 0.6rem; }
.place-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.section .place-latest { color: var(--color-muted); font-size: 0.8rem; margin-bottom: 1rem; }
.visit-history { border-top: 1px solid var(--color-border); padding-top: 0.75rem; }
.visit-history summary { cursor: pointer; color: var(--color-accent); font-size: 0.85rem; padding: 0.4rem 0; }
.visit-history summary:hover { text-decoration: underline; }
.visit-history summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 3px; }
.visit-dates { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.75rem 0 0; }
.visit-dates li { background: var(--color-tag-bg); border-radius: 6px; padding: 0.3rem 0.55rem; font: 0.7rem var(--font-mono); color: var(--color-muted); }
.section .visit-note { color: var(--color-muted); font-size: 0.8rem; margin: 0.8rem 0 0; }

.social-card-action { display: inline-block; margin-top: 1.25rem; color: var(--color-accent); font-size: 0.85rem; font-weight: 600; }
