:root {
  --bg: #efe6da;
  --bg-deep: #e6d8c8;
  --surface: rgba(255, 250, 243, 0.86);
  --surface-strong: #fffdf8;
  --surface-soft: rgba(243, 230, 216, 0.7);
  --ink: #163441;
  --muted: #5f7078;
  --line: rgba(22, 52, 65, 0.11);
  --accent: #cb6a4d;
  --accent-deep: #a8543b;
  --accent-soft: #f0ddd0;
  --accent-alt: #2f807b;
  --accent-alt-soft: #d6ece8;
  --shadow-sm: 0 16px 30px rgba(17, 42, 53, 0.08);
  --shadow-lg: 0 30px 70px rgba(17, 42, 53, 0.14);
  --radius-xl: 40px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --content-width: min(1180px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(203, 106, 77, 0.17), transparent 30%),
    radial-gradient(circle at top right, rgba(47, 128, 123, 0.1), transparent 28%),
    radial-gradient(circle at bottom center, rgba(203, 106, 77, 0.08), transparent 24%),
    linear-gradient(180deg, #f5ede3 0%, #efe6da 52%, #e9dece 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 110px,
      rgba(255, 255, 255, 0.14) 110px,
      rgba(255, 255, 255, 0.14) 111px
    );
  opacity: 0.3;
  pointer-events: none;
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 32px;
  pointer-events: none;
  z-index: -2;
}

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

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

button {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: -1;
}

.page-glow-left {
  top: 70px;
  left: -110px;
  background: rgba(203, 106, 77, 0.22);
}

.page-glow-right {
  right: -120px;
  bottom: 60px;
  background: rgba(47, 128, 123, 0.16);
}

.site-header,
.section,
.site-footer {
  width: var(--content-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 26px;
  background: rgba(255, 249, 242, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ink), #28505d 52%, var(--accent) 100%);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.site-nav a {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(22, 52, 65, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 800;
}

.section {
  position: relative;
  padding: 108px 0;
}

.section-alt {
  padding-inline: 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(203, 106, 77, 0.11), transparent 32%),
    radial-gradient(circle at bottom left, rgba(47, 128, 123, 0.09), transparent 25%),
    linear-gradient(145deg, rgba(255, 251, 246, 0.9), rgba(243, 229, 214, 0.72));
  box-shadow: var(--shadow-lg);
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(22, 52, 65, 0.1);
}

.section-heading h2,
.hero h1,
.card h3,
.project-card h3,
.contact-card h3 {
  margin: 0;
  font-family: "Fraunces", serif;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 34px;
  align-items: start;
  padding-top: 76px;
}

.hero-copy,
.hero-visual {
  position: relative;
}

.hero-copy {
  padding: clamp(32px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(203, 106, 77, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 245, 0.96), rgba(243, 228, 211, 0.8));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(47, 128, 123, 0.08);
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero-lead,
.section-heading h2 + p,
.card p,
.project-body p,
.timeline-item p,
.skill-list small,
.contact-card a,
.detail-list dd,
.muted-note {
  color: var(--muted);
  line-height: 1.85;
}

.hero-lead {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), #dc9167);
  color: #fff;
  box-shadow: 0 18px 34px rgba(203, 106, 77, 0.28);
}

.button-secondary {
  border: 1px solid rgba(22, 52, 65, 0.1);
  background: rgba(255, 255, 255, 0.68);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.hero-stats article,
.card,
.portrait-card,
.impact-card,
.project-card,
.contact-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(248, 241, 232, 0.88));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero-stats article::before,
.card::before,
.project-card::before,
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(47, 128, 123, 0.7));
}

.hero-stats article {
  padding: 22px 20px 20px;
}

.hero-stats strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-deep);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual {
  display: grid;
  gap: 22px;
}

.portrait-card {
  padding: 18px;
}

.portrait-card img {
  aspect-ratio: 4 / 4.6;
  border-radius: calc(var(--radius-lg) - 8px);
  object-fit: cover;
  box-shadow: 0 16px 30px rgba(17, 42, 53, 0.12);
}

.portrait-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 10px 8px;
}

.portrait-meta p {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 900;
}

.portrait-meta span {
  color: var(--muted);
}

.impact-card {
  display: grid;
  gap: 14px;
  padding: 26px 26px 24px;
  background:
    linear-gradient(135deg, rgba(47, 128, 123, 0.12), rgba(255, 251, 246, 0.95)),
    rgba(255, 255, 255, 0.8);
}

.impact-label {
  color: var(--accent-alt);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-card ul,
.certificate-list,
.chip-list,
.skill-list,
.timeline,
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.impact-card li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}

.impact-card li::before,
.certificate-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e29a70);
}

.about-grid,
.resume-grid,
.skills-grid,
.contact-grid {
  display: grid;
  gap: 24px;
}

.about-grid {
  grid-template-columns: 1.08fr 0.92fr;
}

.resume-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.contact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 32px;
}

.card h3,
.project-card h3,
.contact-card h3 {
  font-size: 1.52rem;
  letter-spacing: -0.03em;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-deep);
  font-weight: 900;
}

.text-link::after {
  content: "↗";
  font-size: 0.92rem;
}

.detail-list {
  display: grid;
  gap: 16px;
}

.detail-list div {
  padding: 18px 18px 16px;
  border: 1px solid rgba(22, 52, 65, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
}

.detail-list dt {
  margin-bottom: 6px;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.timeline {
  display: grid;
  gap: 24px;
}

.timeline-item {
  position: relative;
  padding: 0 0 0 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(203, 106, 77, 0.7), rgba(47, 128, 123, 0.3));
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(203, 106, 77, 0.14);
}

.timeline-year,
.project-topline span,
.project-topline strong {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-item h4 {
  margin: 14px 0 8px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-list li,
.filter-button {
  padding: 12px 16px;
  border: 1px solid rgba(22, 52, 65, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.chip-list li {
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.certificate-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.certificate-list li {
  position: relative;
  padding-left: 22px;
}

.muted-note {
  margin-top: 18px;
  font-size: 0.95rem;
}

.project-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
  padding: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 249, 242, 0.78);
  box-shadow: var(--shadow-sm);
}

.filter-button {
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(203, 106, 77, 0.34);
}

.filter-button.active {
  background: linear-gradient(135deg, var(--accent), #df8e65);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(203, 106, 77, 0.22);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    opacity 180ms ease;
}

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

.project-card.is-hidden {
  display: none;
}

.project-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 280ms ease;
  background: linear-gradient(135deg, rgba(203, 106, 77, 0.14), rgba(47, 128, 123, 0.12));
}

.project-card:hover img {
  transform: scale(1.04);
}

.project-body {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.project-body p {
  margin: 0;
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-topline strong {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.project-card h3 {
  font-size: 1.72rem;
  line-height: 1.15;
}

.skill-list {
  display: grid;
  gap: 16px;
}

.skill-list li {
  display: grid;
  gap: 6px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(22, 52, 65, 0.08);
}

.skill-list span {
  font-weight: 900;
}

.section-contact {
  padding-bottom: 58px;
}

.contact-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 100%;
  padding: 28px 24px;
}

.contact-card a {
  font-weight: 800;
  word-break: break-word;
}

.site-footer {
  padding: 0 0 56px;
}

.site-footer p {
  margin: 0;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 24px;
  background: rgba(255, 249, 242, 0.7);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .hero,
  .about-grid,
  .resume-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 44px;
  }
}

@media (max-width: 900px) {
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header {
    border-radius: 24px;
  }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 249, 242, 0.96);
    box-shadow: var(--shadow-lg);
  }

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

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .project-filters {
    width: 100%;
    border-radius: 28px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section,
  .site-footer {
    width: min(100vw - 24px, 1180px);
  }

  body::after {
    inset: 10px;
    border-radius: 22px;
  }

  .section {
    padding: 82px 0;
  }

  .section-alt {
    padding-inline: 16px;
    border-radius: 28px;
  }

  .hero-copy,
  .card,
  .contact-card,
  .impact-card,
  .project-body {
    padding: 22px;
  }

  .portrait-card {
    padding: 14px;
  }

  .button {
    width: 100%;
  }

  .project-card h3 {
    font-size: 1.45rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
