:root {
  --bg: #f6f1e8;
  --surface: #fffaf0;
  --surface-2: #efe5d3;
  --ink: #171411;
  --text: #171411;
  --muted: #6d6256;
  --soft: #d8cbb8;
  --accent: #90f3c2;
  --accent-dark: #002b30;
  --accent-2: #ff7b54;
  --border: rgba(23, 20, 17, .14);
  --border-strong: rgba(23, 20, 17, .32);
  --shadow: 0 26px 70px rgba(45, 36, 25, .10);
  --radius: 34px;
  --max: 1180px;
}

[data-theme="light"] {
  --bg: #f6f1e8;
  --surface: #fffaf0;
  --surface-2: #efe5d3;
  --ink: #171411;
  --text: #171411;
  --muted: #6d6256;
  --accent: #90f3c2;
  --border: rgba(23, 20, 17, .14)
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.01em
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 8% 8%, rgba(23, 123, 91, 0.28), transparent 24%), radial-gradient(circle at 96% 12%, rgba(255, 123, 84, .13), transparent 22%), linear-gradient(180deg, #f9f4ea 0%, #f6f1e8 48%, #eee2d0 100%)
}

a {
  color: inherit
}

img {
  max-width: 100%
}

p,
li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78
}

strong {
  color: var(--text)
}

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 22px max(6vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(246, 241, 232, .78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border)
}

.logo {
  font-weight: 900;
  letter-spacing: -.04em;
  font-size: 20px
}

.logo a {
  text-decoration: none
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px
}

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

.hero,
.case-hero,
section,
footer {
  padding-left: max(6vw, 24px);
  padding-right: max(6vw, 24px)
}

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 118px;
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 64px;
  align-items: end;
  border-bottom: 1px solid var(--border)
}

.badge,
.tag,
.mini-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 250, 240, .64);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 7px 14px 0
}

.tag {
  font-size: 12px;
  padding: 8px 12px;
  background: #fffaf0
}

.mini-label {
  background: var(--accent);
  color: var(--accent-dark);
  border-color: rgba(37, 48, 0, .25)
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 9.6vw, 100px);
  line-height: .86;
  margin: 0 0 28px;
  letter-spacing: -.075em;
  font-weight: 500;
  max-width: 1080px;
  color: var(--ink);
}

h2 {
  font-size: clamp(34px, 4.7vw, 72px);
  line-height: .96;
  margin: 0 0 24px;
  letter-spacing: -.065em;
  text-wrap: balance
}

h3 {
  font-size: clamp(24px, 2.3vw, 36px);
  line-height: 1.05;
  margin: 28px 0 12px;
  letter-spacing: -.05em
}

h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--muted);
  margin: 28px 0 8px;
  font-weight: 950
}

.hero p,
.case-hero p {
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.45;
  color: #41372d;
  max-width: 850px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  font-weight: 950;
  padding: 16px 24px;
  margin: 18px 10px 0 0;
  transition: .2s ease
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(23, 20, 17, .18)
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong)
}

.btn.secondary:hover {
  background: var(--surface)
}

.profile {
  background: var(--ink);
  color: var(--surface);
  border-radius: 36px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.profile p {
  color: rgba(255, 250, 240, .72);
  font-size: 16px
}

.stat {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 250, 240, .16)
}

.stat:last-child {
  border: 0
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: clamp(34px, 4vw, 54px);
  line-height: .92;
  letter-spacing: -.07em
}

section {
  padding-top: 96px;
  padding-bottom: 96px;
  max-width: 1440px;
  margin: 0 auto
}

.section-head {
  max-width: 900px;
  margin-bottom: 44px
}

.section-head p {
  font-size: 21px;
  line-height: 1.6
}

.intro-card {
  max-width: 1120px;
  border: 1.5px solid var(--ink);
  border-radius: 40px;
  background: var(--accent);
  color: var(--accent-dark);
  padding: 38px 42px;
  box-shadow: 8px 8px 0 var(--ink)
}

.intro-card h3 {
  margin-top: 10px;
  color: var(--accent-dark)
}

.intro-card p,
.intro-card li {
  color: rgba(37, 48, 0, .78)
}

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

.card-link {
  text-decoration: none;
  color: inherit;
  display: block
}

.card {
  height: 100%;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 38px;
  background: rgba(255, 250, 240, .72);
  box-shadow: var(--shadow);
  transition: .24s ease
}

.card-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
  filter: saturate(.92) contrast(.98)
}

.card-body {
  padding: 30px 32px 36px
}

.card h3 {
  margin-top: 10px
}

.card p {
  font-size: 17px
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--ink), 0 24px 70px rgba(45, 36, 25, .14)
}

.card:hover .card-img {
  filter: saturate(1.05) contrast(1.02)
}

.grid .card-link:first-child {
  grid-column: 1/-1
}

.grid .card-link:first-child .card {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: stretch
}

.grid .card-link:first-child .card-img {
  height: 100%;
  min-height: 470px
}

.grid .card-link:first-child .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center
}

.grid .card-link:first-child h3 {
  font-size: clamp(36px, 4.4vw, 66px)
}

.skills,
.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px
}

.skill,
.meta-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px 18px;
  background: rgba(255, 250, 240, .62);
  color: var(--muted);
  font-weight: 750
}

.meta-card strong {
  display: inline-block;
  margin-bottom: 4px
}

.case-hero {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 90px;
  padding-bottom: 48px
}

.case-hero h1 {
  font-size: clamp(54px, 7.4vw, 118px);
  max-width: 1120px
}

.case-hero .meta-grid {
  margin-top: 34px
}

.case-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 38px max(6vw, 24px) 112px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px
}

.sidebar {
  position: sticky;
  top: 98px;
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 250, 240, .68);
  padding: 22px;
  box-shadow: var(--shadow)
}

.sidebar strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-weight: 850;
  padding: 10px 12px;
  border-radius: 14px
}

.sidebar a:hover {
  background: var(--ink);
  color: var(--surface)
}

.case-content {
  display: grid;
  gap: 30px
}

.case-block {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 42px;
  background: rgba(255, 250, 240, .76);
  box-shadow: var(--shadow);
  padding: 52px;
  overflow: hidden
}

.case-block:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 123, 84, .8), transparent);
  opacity: .9
}

.case-block>* {
  position: relative
}

.case-block h2 {
  font-size: clamp(38px, 5vw, 76px);
  max-width: 900px
}

.case-block img {
  display: block !important;
  width: 100% !important;
  border-radius: 30px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 22px 60px rgba(45, 36, 25, .12) !important;
  background: var(--surface) !important;
  margin: 26px 0 !important
}

.case-block ul,
.case-block ol {
  padding-left: 22px
}

.callout {
  border: 1.5px solid var(--ink);
  background: var(--accent);
  color: var(--accent-dark);
  border-radius: 24px;
  padding: 22px 24px;
  margin-top: 24px;
  font-weight: 850;
  box-shadow: 6px 6px 0 var(--ink)
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0
}

.overview-item {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(246, 241, 232, .8)
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px
}

.gallery-strip img {
  height: 240px !important;
  object-fit: cover
}

.mockup {
  height: 280px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(184, 255, 44, .5), transparent), linear-gradient(45deg, rgba(255, 123, 84, .18), transparent), var(--surface-2);
  border: 1px solid var(--border);
  margin-top: 20px
}

footer {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--border);
  color: var(--muted)
}

@media(max-width:960px) {
  nav {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column
  }

  .nav {
    flex-wrap: wrap
  }

  .hero,
  .grid .card-link:first-child .card,
  .case-layout,
  .grid,
  .two-col,
  .project-overview,
  .gallery-strip {
    grid-template-columns: 1fr
  }

  .hero {
    padding-top: 72px
  }

  .profile {
    transform: none
  }

  .grid .card-link:first-child .card-img {
    min-height: 280px
  }

  .card-img {
    height: 260px
  }

  .case-block {
    padding: 34px 24px
  }

  .sidebar {
    position: static
  }

  .case-hero h1,
  h1 {
    letter-spacing: -.065em
  }
}

/* Portfolio update: metrics, AI, publications */
.impact-section,
.feature-section {
  padding-top: 80px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.metric-card,
.publication-card,
.feature-card {
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(35, 31, 26, .10);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 18px 50px rgba(40, 32, 24, .07);
}

.metric-card strong {
  display: block;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.metric-card span {
  display: block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 1rem;
}

.metric-card p,
.publication-card p,
.feature-card p {
  margin-top: 10px;
  font-size: .96rem;
}

.feature-card.wide {
  max-width: 980px;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.publication-card span {
  display: inline-block;
  margin-bottom: 14px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .7;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 26px;
}

.project-metrics div {
  border: 1px solid rgba(35, 31, 26, .12);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, .72);
}

.project-metrics strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -.04em;
}

.project-metrics span {
  display: block;
  margin-top: 6px;
  font-size: .86rem;
}

.built-with {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(244, 226, 204, .55);
}

@media (max-width: 900px) {

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

@media (max-width: 620px) {

  .metrics-grid,
  .project-metrics,
  .publication-grid {
    grid-template-columns: 1fr;
  }
}