:root {
  --bg: #f7f4ef;
  --bg-alt: #efe8dc;
  --text: #1f2a37;
  --muted: #516072;
  --card: #fffdf8;
  --stroke: #d9cfbf;
  --accent: #0f7b6c;
  --accent-2: #e76f51;
  --accent-3: #264653;
  --shadow: 0 20px 40px rgba(38, 70, 83, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(15, 123, 108, 0.16), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(231, 111, 81, 0.2), transparent 38%),
    linear-gradient(145deg, var(--bg), var(--bg-alt));
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(7px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--accent-3));
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  border-color: var(--stroke);
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}

.hero {
  margin-top: 1rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 123, 108, 0.2), transparent 70%);
}

.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--accent-3);
  margin-bottom: 0.7rem;
}

.hero h1 {
  margin: 0;
  max-width: 19ch;
  line-height: 1.06;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
}

.hero p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(150deg, var(--accent), #159f8b);
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 123, 108, 0.28);
}

.button.secondary {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.78);
}

.metrics {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem;
}

.metric {
  border: 1px solid var(--stroke);
  border-radius: 0.9rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.75);
}

.metric strong {
  display: block;
  font-size: 1.28rem;
  font-family: "Bricolage Grotesque", sans-serif;
}

.section {
  margin-top: 2.8rem;
}

.section h2 {
  margin: 0 0 0.9rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section p {
  color: var(--muted);
  line-height: 1.6;
}

.card-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.card {
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--card);
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(31, 42, 55, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.card p {
  margin: 0;
  color: var(--muted);
}

.card .meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 0.76rem;
  padding: 0.2rem 0.5rem;
  color: var(--accent-3);
  background: rgba(255, 255, 255, 0.7);
}

.resume-list,
.contact-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
}

.resume-list li,
.contact-list li {
  margin: 0.7rem 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 2.8rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: revealUp 600ms ease forwards;
}

.reveal[data-delay="1"] {
  animation-delay: 100ms;
}

.reveal[data-delay="2"] {
  animation-delay: 200ms;
}

.reveal[data-delay="3"] {
  animation-delay: 300ms;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.switch input {
  width: 1rem;
  height: 1rem;
}

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

.error-box {
  border: 1px solid #b1573f;
  background: #fdf2ed;
  color: #743221;
  border-radius: 0.75rem;
  padding: 0.85rem;
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-shell {
    width: min(1100px, calc(100% - 1.2rem));
  }
}
