:root {
  --bg: #dfe8e2;
  --bg-deep: #c5d4cb;
  --ink: #14201c;
  --ink-soft: #3d4f47;
  --accent: #0b6e4f;
  --accent-deep: #085540;
  --highlight: #e8ff6b;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-solid: #fffdf8;
  --line: rgba(20, 32, 28, 0.12);
  --shadow: 0 24px 60px rgba(20, 32, 28, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 1100px;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% -10%, #f4ffe8 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 20%, #b8d4c8 0%, transparent 50%),
    linear-gradient(180deg, #e7efe9 0%, var(--bg) 35%, #d3dfd6 100%);
  line-height: 1.55;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(223, 232, 226, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.35rem;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: clip;
  isolation: isolate;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(223, 232, 226, 0.15) 0%,
      rgba(20, 32, 28, 0.55) 70%,
      rgba(20, 32, 28, 0.82) 100%
    ),
    radial-gradient(ellipse 80% 60% at 70% 30%, #7fb59a 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 60%, #e8ff6b55 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #1f4d3a 0%, #0f2a22 45%, #243b32 100%);
  background-size: cover, cover, cover, 180px 180px, cover;
  transform: scale(1.02);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.5%, 1%, 0);
  }
}

.hero-content {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
  color: #f7faf7;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 1.1rem;
  max-width: 14ch;
  animation: rise 0.9s ease both;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.35;
  max-width: 28ch;
  margin: 0 0 1rem;
  color: rgba(247, 250, 247, 0.92);
  animation: rise 0.9s ease 0.12s both;
}

.hero-lede {
  max-width: 38rem;
  margin: 0 0 1.75rem;
  color: rgba(247, 250, 247, 0.78);
  font-size: 1.02rem;
  animation: rise 0.9s ease 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.32s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--highlight);
  color: var(--ink);
}

.btn-primary:hover {
  background: #f2ff9a;
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.hero .btn-ghost {
  color: #f7faf7;
  border-color: rgba(247, 250, 247, 0.45);
}

.hero .btn-ghost:hover {
  background: rgba(247, 250, 247, 0.08);
}

.section {
  padding: 5rem 0;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.section-lede {
  max-width: 38rem;
  color: var(--ink-soft);
  margin: 0;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-heading-row h2 {
  margin-bottom: 0.6rem;
}

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

.about-grid p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.about-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.about-meta div {
  margin: 0;
}

.about-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.about-meta dd {
  margin: 0;
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.job {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.job:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.job-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.job h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.job-company {
  color: var(--accent);
  font-weight: 600;
}

.job-dates {
  color: var(--ink-soft);
  font-size: 0.92rem;
  white-space: nowrap;
}

.job-blurb {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.job ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, #1f4d3a, #0b6e4f 55%, #c5d4cb),
    radial-gradient(circle at 80% 20%, #e8ff6b88, transparent 40%);
  position: relative;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.project-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.project-body p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(11, 110, 79, 0.1);
  color: var(--accent-deep);
}

.project-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.project-actions a,
.project-actions button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-actions button.delete {
  color: #8a3b2c;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.skill-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.skill-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.edu-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.edu-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.edu-list strong {
  display: block;
  font-size: 1.05rem;
}

.edu-list span {
  color: var(--ink-soft);
}

.contact {
  padding-bottom: 4rem;
}

.contact-inner {
  background: var(--ink);
  color: #f4f7f4;
  border-radius: calc(var(--radius) + 8px);
  padding: 2.5rem 1.75rem;
}

.contact .eyebrow {
  color: var(--highlight);
}

.contact .section-lede {
  color: rgba(244, 247, 244, 0.75);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.contact .btn-ghost {
  border-color: rgba(244, 247, 244, 0.35);
}

.contact-fine {
  margin: 0;
  color: rgba(244, 247, 244, 0.65);
  font-size: 0.92rem;
}

.contact-fine a {
  color: inherit;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}

.project-dialog {
  border: none;
  border-radius: calc(var(--radius) + 4px);
  padding: 0;
  width: min(92vw, 480px);
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(20, 32, 28, 0.45);
  backdrop-filter: blur(4px);
}

.project-dialog form {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem 1.25rem 1.4rem;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.dialog-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.icon-btn {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}

.project-dialog label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.project-dialog input,
.project-dialog textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

@media (max-width: 860px) {
  .about-grid,
  .project-grid,
  .skill-groups,
  .about-meta {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: rgba(223, 232, 226, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-atmosphere,
  .hero-brand,
  .hero h1,
  .hero-lede,
  .hero-actions,
  .job,
  .project-card {
    animation: none;
    transition: none;
  }
}
