:root {
  --ink: #1f2933;
  --muted: #5f6f7a;
  --line: #d7e0e5;
  --panel: #ffffff;
  --surface: #f6f8f8;
  --surface-warm: #fbfaf8;
  --accent: #2f7d73;
  --accent-dark: #235f58;
  --accent-soft: #e7f3f0;
  --contrast: #b85c38;
  --contrast-soft: #fff1ea;
  --nav: #20272d;
  --shadow: 0 16px 32px rgba(31, 41, 51, 0.08);
  --shadow-strong: 0 24px 58px rgba(31, 41, 51, 0.2);
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

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

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

a:hover,
a:focus {
  color: var(--accent-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-container {
  width: min(1110px, calc(100% - 2rem));
  margin: 0 auto;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

.icon-filled {
  fill: currentColor;
  stroke: none;
}

.icon-large {
  width: 2.6rem;
  height: 2.6rem;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  background: var(--nav);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-shell {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand:hover,
.brand:focus {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 0.35rem;
  padding: 0.85rem 1rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  border-radius: 0.35rem;
  padding: 0.8rem 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a.is-active {
  color: #ffd8c6;
}

.hero-section {
  min-height: 64vh;
  padding: 7.25rem 0 4rem;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(47, 125, 115, 0.94) 0%, rgba(32, 39, 45, 0.98) 74%),
    #20272d;
  color: #ffffff;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: #ffd8c6;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
.project-title {
  margin-top: 0;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 6vw, 4.55rem);
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  text-align: center;
}

.hero-copy {
  max-width: 720px;
  margin: 0 0 1.55rem;
  color: #f6fbf9;
  font-size: 1.18rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  padding: 0.85rem 1.15rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.button-light {
  background: #ffffff;
  color: var(--ink);
}

.button-outline {
  border-color: #ffffff;
  background: transparent;
  color: #ffffff;
}

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

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

.button-light:hover,
.button-light:focus {
  color: var(--ink);
}

.button-outline:hover,
.button-outline:focus,
.button-primary:hover,
.button-primary:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

section {
  padding: 4.75rem 0;
}

.skills-section {
  padding: 1.6rem 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.skills-band {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: start;
  gap: 1.2rem 1.75rem;
}

.skills-band h2 {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.skill-group h3 {
  margin: 0 0 0.55rem;
  color: var(--contrast);
  font-size: 0.78rem;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills-list li {
  border: 1px solid #cde0dc;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.section-intro {
  max-width: 720px;
  margin: 1rem auto 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  text-align: center;
}

.portfolio-section {
  background: linear-gradient(180deg, var(--surface) 0%, #ffffff 100%);
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
  margin: 0 0 2rem;
  border-color: rgba(47, 125, 115, 0.28);
  box-shadow: 0 22px 48px rgba(31, 41, 51, 0.11);
}

.featured-project .portfolio-image {
  aspect-ratio: auto;
  min-height: 320px;
}

.featured-project .project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.featured-project .project-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.featured-project .project-summary {
  min-height: 0;
  font-size: 1.05rem;
}

.featured-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--contrast);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(47, 125, 115, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(31, 41, 51, 0.13);
}

.portfolio-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9eff2;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(47, 125, 115, 0.86);
  color: #ffffff;
  opacity: 0;
  transition: opacity 160ms ease;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

.project-body {
  display: block;
  padding: 1.15rem;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.project-title {
  display: block;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.project-year {
  flex: 0 0 auto;
  border: 1px solid #d6c1b7;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  background: var(--contrast-soft);
  color: #8b452a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.project-meta span {
  display: inline-flex;
  gap: 0.25rem;
  white-space: nowrap;
}

.project-meta strong {
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-summary {
  display: block;
  min-height: 5.1rem;
  margin-bottom: 0.95rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list span {
  border: 1px solid #cde0dc;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.about-section {
  background: linear-gradient(135deg, var(--accent) 0%, #2b6f67 100%);
  color: #ffffff;
}

.about-section h2 {
  color: #ffffff;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  max-width: 920px;
  margin: 1.75rem auto 0;
}

.about-grid p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.72;
}

.contact-section {
  background: var(--surface-warm);
}

.link-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  min-width: 170px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.9rem 1.15rem;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(23, 33, 47, 0.07);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.contact-link:hover,
.contact-link:focus {
  border-color: rgba(47, 125, 115, 0.45);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(31, 41, 51, 0.1);
}

.site-footer {
  padding: 1.25rem 0;
  background: var(--nav);
  color: #ffffff;
  text-align: center;
}

.site-footer small {
  display: block;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.76);
}

.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.35rem;
  background: rgba(34, 40, 47, 0.78);
  color: #ffffff;
}

.modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  overflow-y: auto;
  padding: 3rem 1rem;
  background: rgba(16, 25, 35, 0.72);
}

.modal-dialog {
  position: relative;
  width: min(880px, 100%);
  min-height: calc(100vh - 6rem);
  margin: 0 auto;
  padding: 4rem;
  background: #ffffff;
  box-shadow: var(--shadow-strong);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.modal-close:hover,
.modal-close:focus {
  background: var(--surface);
  color: var(--ink);
}

.modal-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 0.5rem;
}

.modal-content img {
  width: 100%;
  margin: 1.5rem 0;
}

.modal-content p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

@media (max-width: 991px) {
  .skills-band {
    grid-template-columns: 1fr;
  }

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

  .featured-project {
    grid-template-columns: 1fr;
  }

  .featured-project .portfolio-image {
    min-height: 260px;
  }

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

  .project-summary {
    min-height: auto;
  }
}

@media (max-width: 767px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-shell {
    position: relative;
  }

  .site-nav {
    position: absolute;
    top: calc(100% - 0.5rem);
    right: 1rem;
    left: 1rem;
    display: grid;
    gap: 0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: var(--nav);
    box-shadow: var(--shadow-strong);
  }

  .site-nav a {
    padding: 1rem;
  }

  .hero-section {
    min-height: auto;
    padding: 6.75rem 0 3.25rem;
  }

  section {
    padding: 4rem 0;
  }

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

  .about-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 575px) {
  .site-container {
    width: min(100% - 1.5rem, 1110px);
  }

  .brand {
    font-size: 1.05rem;
  }

  .hero-section {
    padding-top: 6.25rem;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.58;
  }

  .hero-actions .button {
    width: 100%;
  }

  .skills-section {
    padding: 1.25rem 0;
  }

  .skills-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 0.65rem;
  }

  .skill-group h3 {
    margin-bottom: 0.4rem;
  }

  .skills-list {
    gap: 0.32rem;
  }

  .skills-list li {
    padding: 0.26rem 0.5rem;
    font-size: 0.68rem;
  }

  .featured-project {
    margin-bottom: 1.25rem;
  }

  .featured-project .portfolio-image {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .featured-project .project-body,
  .project-body {
    padding: 0.95rem;
  }

  .featured-project .project-title,
  .project-title {
    font-size: 1rem;
  }

  .featured-label {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
  }

  .project-heading {
    margin-bottom: 0.45rem;
  }

  .project-meta {
    gap: 0.2rem 0.5rem;
    margin-bottom: 0.55rem;
    font-size: 0.62rem;
  }

  .project-meta strong {
    font-size: 0.6rem;
  }

  .project-summary,
  .featured-project .project-summary {
    margin-bottom: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .tag-list {
    gap: 0.35rem;
  }

  .tag-list span {
    padding: 0.22rem 0.48rem;
    font-size: 0.64rem;
  }

  .link-panel {
    display: grid;
  }

  .contact-link {
    width: 100%;
  }

  .modal {
    padding: 1rem;
  }

  .modal-dialog {
    min-height: calc(100vh - 2rem);
    padding: 4rem 1.25rem 2rem;
  }
}
