:root {
  color-scheme: light;
  --bg: #f6f2ec;
  --bg-strong: #efe7db;
  --ink: #1d1a16;
  --muted: #5c5348;
  --accent: #8f5c2b;
  --accent-soft: #d6b58f;
  --card: #fbf8f3;
  --line: #e2d7c8;
  --shadow: 0 20px 40px rgba(29, 26, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff8ee 0%, var(--bg) 60%);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.8rem, 2.2vw + 0.9rem, 2.6rem);
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.cheeky-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-style: italic;
  color: var(--ink);
}

.cheeky-icon {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.bg-noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
      rgba(0, 0, 0, 0.035) 1px,
      transparent 1px
    ),
    radial-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 24px 24px, 120px 120px;
  background-position: 0 0, 40px 40px;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.site-header {
  padding: 1.15rem 0 0.9rem;
  background: linear-gradient(135deg, #fef6eb 0%, #f5e6d2 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(143, 92, 43, 0.15), transparent 60%);
  top: -140px;
  right: -120px;
  filter: blur(2px);
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.title {
  font-weight: 500;
  color: var(--ink);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.contact-card {
  background: var(--card);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 220px;
  box-shadow: var(--shadow);
  max-width: 360px;
  width: 100%;
  justify-self: end;
}

.contact-card p {
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.contact-card span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0.75rem 0 1rem;
  font-weight: 500;
}

.main-tab {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.main-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.main-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-tab {
  display: none;
}

.page-tab.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: center;
}

.hero-line {
  font-size: clamp(1.15rem, 1.3vw + 0.95rem, 1.8rem);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
  max-width: 100%;
}

.hero-sub {
  max-width: 720px;
  margin-bottom: 0.35rem;
}

.hero > div:first-child {
  max-width: 720px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.quick-stats h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--accent);
}

.focus-card {
  background: var(--card);
  padding: 1.1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  max-width: 360px;
  width: 100%;
  justify-self: end;
}

.focus-card h2 {
  font-size: 1.15rem;
}

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

.focus-tags span,
.tags span {
  background: var(--bg-strong);
  color: var(--ink);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.chip-row {
  margin-bottom: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
  background: var(--bg-strong);
  border: 1px solid var(--line);
}

.panel ul {
  padding-left: 1.2rem;
  margin: 0;
  color: var(--muted);
}

.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.project-detail {
  margin-top: 3rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.project-header h3 {
  margin-bottom: 0.5rem;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 1rem;
}

.tab {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panels {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.tab-panel {
  display: none;
  animation: fadeUp 0.4s ease;
}

.tab-panel.active {
  display: block;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.checklist li {
  margin: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--muted);
}

.checklist li::before {
  content: "[ ]";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.checklist li.done {
  color: var(--ink);
}

.checklist li.done::before {
  content: "[x]";
}

.table {
  display: grid;
  gap: 0.5rem;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.table-header {
  background: var(--bg-strong);
  font-weight: 600;
  color: var(--ink);
}

.resume-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-strong);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.footnote {
  font-size: 0.85rem;
  margin-top: 2rem;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .main-nav {
    gap: 0.75rem;
  }

  .contact-card {
    width: 100%;
  }

  .tab {
    flex: 1 1 auto;
  }
}
