:root {
  color-scheme: light;
  --bg: #F5F2EB;
  --ink: #263238;
  --muted: #596568;
  --line: #DCE3D5;
  --panel: #ffffff;
  --soft: #DCE3D5;
  --accent: #78A6A6;
  --button: #315B63;
  --radius: 14px;
  --shadow: 0 22px 58px rgba(38, 50, 56, 0.12);
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(245, 242, 235, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(20px, 4vw, 56px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.brand-mark {
  align-items: center;
  background: var(--button);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 32px;
  justify-content: center;
  letter-spacing: 0;
  width: 32px;
}

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

.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

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

.section {
  margin: 0 auto;
  max-width: var(--max);
  padding: 84px clamp(24px, 4vw, 32px) 0;
}

.hero {
  padding-top: 88px;
}

.hero-kicker,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero-kicker {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.stats dt {
  font-family: inherit;
  font-weight: 700;
}

h1 {
  font-size: clamp(54px, 7.5vw, 92px);
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 16px;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-role {
  color: var(--ink);
  font-size: clamp(52px, 7.5vw, 92px);
  font-weight: 700;
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 900px;
}

.hero-text {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  max-width: 860px;
  text-align: justify;
}

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

.button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 600;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button-primary {
  background: var(--button);
  color: #fff;
}

.button-primary:hover {
  background: #264950;
}

.button-secondary {
  border: 1px solid var(--button);
  color: var(--button);
}

.button-secondary:hover {
  background: rgba(49, 91, 99, 0.08);
  border-color: #264950;
  color: #264950;
}

.hero-contact {
  margin-top: 38px;
}

.hero-contact h2,
.section-heading h2 {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-contact p {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.hero-contact a,
.text-link,
.project-meta a {
  color: var(--button);
  font-weight: 600;
}

.hero-contact a:hover,
.text-link:hover,
.project-meta a:hover {
  text-decoration: underline;
}

.stats {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 7vw, 72px);
  margin: 52px 0 0;
  padding-top: 28px;
}

.stats dt {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.stats dd {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.section-heading {
  margin-bottom: 32px;
}

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

.project-card {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 100%;
}

.project-card:hover {
  border-color: rgba(120, 166, 166, 0.55);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-thumb {
  background: #eef3ea;
  border-bottom: 1px solid var(--line);
  display: block;
  height: 236px;
  overflow: hidden;
}

.project-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.project-thumb-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #eef3ea, #dce3d5);
  color: var(--button);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card-body {
  display: grid;
  flex: 1;
  gap: 16px;
  padding: 24px;
}

.project-title-row {
  display: block;
}

.project-title-row span:last-child {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.project-summary {
  color: var(--muted);
  display: block;
  font-size: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  background: var(--soft);
  border: 1px solid rgba(49, 91, 99, 0.12);
  border-radius: 999px;
  color: var(--button);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
}

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

.skill-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.skill-card .eyebrow {
  color: var(--button);
  margin-bottom: 18px;
}

.split {
  display: grid;
  gap: clamp(36px, 8vw, 88px);
  grid-template-columns: 0.8fr 1.2fr;
}

.timeline {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0 0 0 26px;
}

.timeline li {
  display: grid;
  gap: 18px;
  grid-template-columns: 52px 1fr;
  position: relative;
}

.timeline li::before {
  background: var(--accent);
  border: 4px solid var(--bg);
  border-radius: 50%;
  content: "";
  height: 15px;
  left: -34px;
  position: absolute;
  top: 2px;
  width: 15px;
}

.timeline span {
  color: var(--button);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline p,
.proof p,
.project-modal-content p:not(.eyebrow) {
  color: var(--muted);
}

.proof {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(49, 91, 99, 0.12);
  border-radius: var(--radius);
  display: grid;
  gap: 32px;
  grid-template-columns: 132px minmax(0, 1fr);
  margin-top: 84px;
  padding: 32px;
}

.credential-badge {
  display: block;
  max-width: 132px;
  width: 100%;
}

.credential-copy .eyebrow {
  color: var(--muted);
  margin-bottom: 12px;
}

.credential-copy h2 {
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.2;
  margin-bottom: 10px;
}

.text-link {
  display: inline-flex;
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  margin-top: 96px;
  padding: 24px clamp(24px, 4vw, 56px);
  text-align: center;
}

.footer p {
  margin: 0;
}

.project-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 22px;
  position: fixed;
  z-index: 80;
}

.project-modal.is-open {
  display: flex;
}

.project-modal-backdrop {
  background: rgba(38, 50, 56, 0.72);
  inset: 0;
  position: absolute;
}

.project-modal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  max-height: min(86vh, 820px);
  max-width: 1240px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.project-modal-panel > img {
  align-self: stretch;
  background: #eef3ea;
  height: auto;
  max-height: min(86vh, 820px);
  min-height: 420px;
  object-fit: contain;
  object-position: center;
  padding: 18px;
  width: 100%;
}

.project-modal-panel.has-no-image {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.project-modal-panel.has-no-image > img {
  display: none;
}

.project-modal-content {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(26px, 4vw, 44px);
  padding-right: clamp(34px, 4.5vw, 52px);
  scrollbar-color: rgba(49, 91, 99, 0.45) transparent;
  scrollbar-width: thin;
}

.project-modal-content::-webkit-scrollbar {
  width: 6px;
}

.project-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.project-modal-content::-webkit-scrollbar-thumb {
  background: rgba(49, 91, 99, 0.42);
  border-radius: 999px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(49, 91, 99, 0.72);
}

.project-modal-content h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.project-meta {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
}

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

.project-meta strong {
  color: var(--ink);
}

.project-meta a {
  overflow-wrap: anywhere;
}

.modal-close {
  align-items: center;
  background: var(--button);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 26px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  z-index: 2;
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }

  .project-grid,
  .skills-grid,
  .split,
  .project-modal-panel {
    grid-template-columns: 1fr;
  }

  .proof {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .project-modal-panel > img {
    max-height: 48vh;
    min-height: 220px;
    padding: 12px;
  }
}

@media (max-width: 620px) {
  .brand span:last-child {
    display: none;
  }

  .section {
    padding-top: 64px;
  }

  .hero {
    padding-top: 64px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-role {
    font-size: 46px;
  }

  .stats {
    gap: 24px;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .project-thumb {
    height: 200px;
  }
}
