:root {
  --ink: #17201b;
  --muted: #68726d;
  --paper: #f8f7f2;
  --panel: #ffffff;
  --line: #d9ded7;
  --moss: #45624d;
  --teal: #1f6f78;
  --coral: #d96b4c;
  --gold: #b68b2f;
  --shadow: 0 24px 70px rgba(23, 32, 27, 0.12);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(248, 247, 242, 0.92)),
    var(--paper);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  color: #fff;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header[data-elevated="true"] {
  color: var(--ink);
  background: rgba(248, 247, 242, 0.92);
  box-shadow: 0 1px 0 rgba(23, 32, 27, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.icon-button,
.button,
.work-body a,
.site-footer a {
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 15px;
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.site-header[data-elevated="true"] .nav-links a:hover,
.site-header[data-elevated="true"] .nav-links a:focus-visible,
.site-header[data-elevated="true"] .icon-button:hover,
.site-header[data-elevated="true"] .icon-button:focus-visible {
  background: rgba(69, 98, 77, 0.1);
}

.icon-button {
  display: inline-grid;
  width: 44px;
  place-items: center;
  justify-self: end;
  border: 1px solid currentColor;
  border-radius: 8px;
}

.icon-button svg,
.button svg,
.work-body svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 92vh);
  overflow: hidden;
  color: #fff;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 18, 14, 0.82), rgba(10, 18, 14, 0.42) 52%, rgba(10, 18, 14, 0.08)),
    linear-gradient(180deg, rgba(10, 18, 14, 0.4), rgba(10, 18, 14, 0.5));
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(720px, calc(100% - 36px));
  margin: 0 clamp(18px, 7vw, 88px) 86px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffc5ad;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: 128px;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  max-width: 760px;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
}

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

.button.primary:hover,
.button.primary:focus-visible {
  background: #314838;
}

.button.secondary {
  border: 1px solid currentColor;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 88px 0;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin-top: -40px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.intro-strip div {
  min-width: 0;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
}

.intro-strip span,
.tag {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.intro-strip strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

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

.work-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.07);
}

.work-card.featured {
  grid-column: span 2;
}

.work-visual {
  min-height: 260px;
  background-size: cover;
  background-position: center;
}

.visual-a {
  background-image:
    linear-gradient(135deg, rgba(31, 111, 120, 0.72), rgba(23, 32, 27, 0.12)),
    url("assets/portfolio-hero.png");
}

.visual-b {
  background:
    radial-gradient(circle at 24% 26%, rgba(217, 107, 76, 0.32), transparent 28%),
    linear-gradient(135deg, #fbfbf8, #dfe8e0 52%, #7aa095);
}

.visual-c {
  background:
    linear-gradient(120deg, rgba(23, 32, 27, 0.86), rgba(31, 111, 120, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px 72px);
}

.work-body {
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: 24px;
}

.work-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.work-body a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--teal);
  font-weight: 900;
}

.about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  align-items: start;
}

.about-layout p {
  margin: 0;
  color: #344039;
  font-size: 22px;
  line-height: 1.9;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344039;
  font-weight: 800;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 32px;
  align-items: center;
}

.contact .button.secondary {
  background: #fff;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(10, 18, 14, 0.36), rgba(10, 18, 14, 0.9));
  }

  .hero-content {
    width: min(620px, calc(100% - 36px));
    margin: 0 auto 64px;
  }

  .intro-strip,
  .work-grid,
  .about-layout,
  .contact {
    grid-template-columns: 1fr;
  }

  .work-card.featured {
    grid-column: auto;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading {
    display: block;
  }

  h1 {
    font-size: 92px;
  }

  h2 {
    font-size: 48px;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 8ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  h1 {
    font-size: 60px;
  }

  h2 {
    font-size: 36px;
  }

  .hero-copy,
  .about-layout p {
    font-size: 18px;
  }

  .work-visual {
    min-height: 220px;
  }
}
