/* Fraunces' ampersand is very ornate; swap in a plainer serif for just that glyph */
@font-face {
  font-family: "Amp";
  src: local("Georgia"), local("Times New Roman"), local("Noto Serif"), local("DejaVu Serif");
  unicode-range: U+0026;
}

:root {
  --paper: #f2ebd9;
  --heading: #24493a;
  --text: #22392f;
  --text-muted: #4b6157;
  --ink-green: #00a95c;
  --ink-teal: #00838a;
  --ink-orange: #ff6c2f;
  --ink-pink: #ff48b0;
  --band: #24493a;
  --band-text: #f2ebd9;
  --band-muted: #b9cbbd;
  --band-dots: rgba(0, 169, 92, 0.22);
  --card-bg: #f2ebd9;
  --card-shadow: #ff6c2f;
  --border: #24493a;
  --blend: multiply;
  --grain-opacity: 0.38;
  --grain-blend: multiply;
}

:root[data-theme="dark"] {
  --paper: #16231c;
  --heading: #e9e4cf;
  --text: #e9e4cf;
  --text-muted: #a7b9ad;
  --ink-green: #2fbf7a;
  --ink-teal: #1f6f6a;
  --ink-orange: #ffc46b;
  --ink-pink: #ff7ac4;
  --band: #0c1611;
  --band-text: #e9e4cf;
  --band-muted: #9fb2a6;
  --band-dots: rgba(47, 191, 122, 0.12);
  --card-bg: #1b2b22;
  --card-shadow: #2fbf7a;
  --border: #3d5a4b;
  --blend: screen;
  --grain-opacity: 0.5;
  --grain-blend: overlay;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Riso paper grain laid over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.15  0 0 0 0 0.12  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

html {
  scroll-behavior: smooth;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 2rem;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1.5px solid color-mix(in srgb, var(--border) 25%, transparent);
  transition: background 0.3s ease;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.home-mark {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.site-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.site-menu {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-menu::-webkit-scrollbar { display: none; }

.site-menu a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-family: "Amp", "Fraunces", Georgia, serif;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.site-menu a:hover {
  background: color-mix(in srgb, var(--ink-green) 18%, transparent);
}

.site-menu a[aria-current] {
  color: var(--ink-teal);
  box-shadow: inset 0 -2px 0 var(--ink-orange);
  border-radius: 0;
}

:root[data-theme="dark"] .site-menu a[aria-current] {
  color: var(--ink-green);
}

.mark-pine {
  width: 0.8rem;
  height: 1.6rem;
  fill: var(--ink-green);
  filter: drop-shadow(2px 1px 0 var(--ink-orange));
}

.theme-toggle {
  flex-shrink: 0;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--heading);
}

.theme-toggle:focus-visible,
.home-mark:focus-visible,
.site-menu a:focus-visible,
.button:focus-visible,
.footer-links a:focus-visible,
.social-links a:focus-visible {
  outline: 2px solid var(--ink-orange);
  outline-offset: 3px;
}

.icon {
  width: 18px;
  height: 18px;
}

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 2rem 1rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  width: 100%;
  max-width: 40rem;
  text-align: left;
}

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #13221b;
  background: var(--ink-orange);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin: 0 0 1.5rem;
}

h1 {
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: var(--heading);
  /* offset second ink pass, like a riso misregistration */
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--ink-pink) 55%, transparent);
}

.name {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  /* ground line the grove stands on */
  border-bottom: 3px solid var(--ink-green);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--ink-orange) 60%, transparent);
}

.grove {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  height: 1.84em;
  margin-bottom: -0.9rem;
}

.grove-pine {
  display: block;
  mix-blend-mode: var(--blend);
}

.grove-pine-1 {
  width: 0.62em;
  height: 1.24em;
  fill: var(--ink-teal);
  margin-right: -0.2em;
}

.grove-pine-2 {
  width: 0.9em;
  height: 1.8em;
  fill: var(--ink-green);
  filter: drop-shadow(3px 2px 0 var(--ink-orange));
  position: relative;
  z-index: 1;
}

.grove-pine-3 {
  width: 0.5em;
  height: 1em;
  fill: var(--ink-teal);
  margin-left: -0.15em;
}

.tagline {
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  color: var(--heading);
  margin: 0 0 0.9rem;
}

.value-prop {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-teal);
  margin: 0 0 1.5rem;
}

:root[data-theme="dark"] .value-prop { color: var(--ink-green); }

.lede {
  max-width: 60ch;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 2rem;
}

.lede p { margin: 0 0 1rem; }
.lede p:last-child { margin-bottom: 0; }

.social-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 1.5rem 0 0;
  color: var(--text-muted);
}

.social-links a {
  color: var(--heading);
  font-weight: 600;
  text-decoration-color: var(--ink-orange);
  text-underline-offset: 4px;
}

.social-links a:hover { text-decoration-color: var(--ink-pink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: var(--heading);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  border: 1.5px solid var(--heading);
  box-shadow: 4px 4px 0 var(--ink-orange);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button-outline {
  background: transparent;
  color: var(--heading);
  box-shadow: 4px 4px 0 var(--ink-green);
}

.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink-orange);
}

.button-outline:hover {
  box-shadow: 6px 6px 0 var(--ink-green);
}

.forest-scene {
  line-height: 0;
  margin-top: 1rem;
}

.forest {
  display: block;
  width: 100%;
  height: clamp(170px, 24vw, 300px);
}

.riso { mix-blend-mode: var(--blend); }

.sun { fill: var(--ink-orange); }
.sun-dots { fill: url(#dots-pink); }
.dot-pink { fill: var(--ink-pink); }

.back-solid { fill: var(--ink-teal); opacity: 0.9; }
.back-dots { fill: url(#dots-green); }
.dot-green { fill: var(--ink-green); }

.front { fill: var(--band); }

.projects {
  background-color: var(--band);
  background-image: radial-gradient(var(--band-dots) 1.2px, transparent 1.6px);
  background-size: 9px 9px;
  color: var(--band-text);
  padding: 3rem 2rem 4rem;
  transition: background-color 0.3s ease;
}

.projects h2 {
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.75rem;
  text-align: center;
  margin: 0 0 2.25rem;
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--ink-green) 70%, transparent);
}

.project-list {
  display: grid;
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.project-card {
  padding: 1.75rem 2rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 6px 6px 0 var(--card-shadow);
}

.project-card:nth-child(even) {
  box-shadow: 6px 6px 0 var(--ink-green);
}

.project-tagline {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-teal);
}

:root[data-theme="dark"] .project-tagline { color: var(--ink-green); }

.project-card h3 {
  margin: 0 0 0.35rem;
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--heading);
}

.project-role {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.project-overview {
  margin: 1rem 0 1.25rem;
  line-height: 1.6;
}

.project-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.impact {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.impact li + li { margin-top: 0.4rem; }

.impact li::marker { color: var(--ink-orange); }

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

.tags li {
  padding: 0.25rem 0.65rem;
  border: 1.5px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--heading);
  background: color-mix(in srgb, var(--ink-green) 8%, transparent);
}

/* About & Skills */
.section {
  padding: 4.5rem 2rem;
}

.section-skills {
  padding-top: 0;
}

.section-inner {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.section-inner-wide {
  max-width: 820px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-teal);
  margin: 0 0 0.75rem;
}

:root[data-theme="dark"] .eyebrow { color: var(--ink-green); }

.section-title {
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.15;
  color: var(--heading);
  text-wrap: balance;
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--ink-pink) 55%, transparent);
  margin: 0 0 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 3px solid var(--ink-green);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--ink-orange) 60%, transparent);
}

.prose p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

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

.skill-group {
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  box-shadow: 5px 5px 0 var(--card-shadow);
}

.skill-group:nth-child(4n+2),
.skill-group:nth-child(4n+3) {
  box-shadow: 5px 5px 0 var(--ink-green);
}

.skill-group h3 {
  margin: 0 0 0.9rem;
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--heading);
}

/* Contact band */
.contact {
  background-color: var(--band);
  background-image: radial-gradient(var(--band-dots) 1.2px, transparent 1.6px);
  background-size: 9px 9px;
  color: var(--band-text);
  padding: 4rem 2rem;
}

.contact .section-title {
  color: var(--band-text);
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--ink-green) 70%, transparent);
}

.contact-lede {
  color: var(--band-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--band-text) 25%, transparent);
}

.contact-label {
  width: 6rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--band-muted);
}

.contact-list a {
  font-family: "Amp", "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  color: var(--band-text);
  text-decoration-color: var(--ink-orange);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  text-decoration-color: var(--ink-pink);
}

.contact-list a:focus-visible {
  outline: 2px solid var(--ink-orange);
  outline-offset: 3px;
}

/* Keep section headings clear of the sticky header when jumping to them */
#projects, #about, #skills, #contact {
  scroll-margin-top: 4rem;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--band);
  color: var(--band-muted);
  font-size: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--band-text) 12%, transparent);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--band-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink-orange);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .button, .projects, .site-header, .site-menu a { transition: none; }
  .button:hover { transform: none; }
}

@media (max-width: 600px) {
  .site-header { padding: 0.6rem 1rem; gap: 0.5rem; }
  .site-menu a { padding: 0.45rem 0.55rem; font-size: 0.95rem; }
  .hero { padding: 1.5rem 1rem 1rem; }
  .status { font-size: 0.68rem; letter-spacing: 0.05em; }
  .projects, .contact { padding-left: 1rem; padding-right: 1rem; }
  .section { padding-left: 1rem; padding-right: 1rem; }
  .project-card { padding: 1.4rem 1.25rem; }
  .contact-list li { flex-direction: column; }
  .contact-list a { font-size: 1rem; }
}
