:root {
  --text: #d5d0c4;
  --muted: #98a18e;
  --line: rgba(213, 208, 196, 0.13);
  --button: #afa78d;
  --button-hover: #87966d;
  --button-text: #0b0e09;
  --accent: #87966d;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.085);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 8%, rgba(146, 159, 103, 0.12), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(135deg, #090c08 0%, #171d13 58%, #090c08 100%);
}

body {
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.68;
  overflow-x: hidden;
}

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

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

p {
  margin: 0 0 18px;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.04) 36%, transparent 52%);
  opacity: 0.42;
}

.container {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 38px;
  min-height: 64px;
}

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

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-brand {
  gap: 13px;
}

.identity-brand .brand-text {
  display: block;
  gap: 3px;
}

.identity-brand .brand-name {
  display: block;
  color: #f1ede2;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.identity-brand .brand-title {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.13em;
}

.menu {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.menu a {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.menu a:hover,
.menu a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(135, 150, 109, 0.24);
}

.menu .pipe {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4.5vw, 58px);
  align-items: start;
  padding: clamp(68px, 10vw, 118px) 0 44px;
}

.hello {
  margin: 4px 0 0 24px;
  font-size: clamp(68px, 7.5vw, 96px);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: 0;
}

.lead,
.page-heading,
.section-copy,
.case-hero > p,
.case-content {
  font-size: 16px;
  line-height: 1.72;
}

.lead strong {
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%),
    var(--button);
  color: var(--button-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%),
    var(--button-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid rgba(175, 167, 141, 0.42);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #2b241d;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.center-actions {
  justify-content: center;
}

.page-heading {
  max-width: 760px;
  padding: 68px 0 28px;
}

.page-heading.centered {
  margin: 0 auto;
  text-align: center;
}

.contact-heading .section-title {
  font-size: clamp(46px, 5.8vw, 56px);
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: 0;
}

.content-section {
  padding: 54px 0;
  border-top: 1px solid var(--line);
}

.section-copy {
  max-width: 700px;
  margin-bottom: 26px;
}

.credential {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 0;
  padding: 6px 10px;
  border: 1px solid rgba(135, 150, 109, 0.24);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.credential:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(135, 150, 109, 0.42);
  color: var(--text);
}

.section-copy h2,
.project-feature h2,
.case-content h2,
.contact-wrap h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3.4vw, 38px);
  line-height: 1.15;
}

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

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

.mini-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 45px rgba(0, 0, 0, 0.22);
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.mini-card p:last-child,
.mini-card ul:last-child {
  margin-bottom: 0;
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.25fr);
  gap: clamp(30px, 4vw, 48px);
  align-items: center;
}

.project-feature-large {
  padding: 22px 0 54px;
}

.phone-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(8, 12, 8, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.24);
}

.phone-preview img,
.case-gallery img {
  width: 100%;
  background: var(--surface-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.phone-preview img {
  aspect-ratio: 9 / 18.5;
  border: 1px solid rgba(7, 10, 7, 0.9);
  border-radius: 20px;
  object-fit: cover;
  object-position: center top;
}

.case-gallery img {
  border-radius: 12px;
}

.phone-preview img:nth-child(2) {
  transform: translateY(-18px);
}

.desktop-preview {
  width: min(100%, 520px);
  justify-self: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.desktop-preview img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.plain-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.plain-list li {
  margin-bottom: 8px;
}

.work-page {
  padding-bottom: 0;
}

.work-layout .work-page {
  width: min(980px, calc(100% - 48px));
}

.work-card {
  width: min(780px, 100%);
  margin: 0;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  border: 1px solid rgba(3, 5, 3, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 24px 64px rgba(0, 0, 0, 0.2);
}

.work-page .footer-line {
  margin-top: 56px;
}

.work-copy {
  display: block;
}

.frugal-logo {
  width: 188px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 38px;
  background: #202124;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.frugal-logo span {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.frugal-logo .frugal-accent {
  color: #4caf50;
}

.work-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.work-copy p:not(.eyebrow) {
  max-width: 440px;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.72;
}

.resume-layout .resume-page {
  width: min(880px, calc(100% - 48px));
}

.resume-page {
  padding-bottom: 0;
}

.resume-title {
  margin: 0 0 16px;
  font-size: clamp(54px, 8vw, 88px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0;
}

.resume-hero {
  max-width: 720px;
  padding: clamp(82px, 12vw, 138px) 0 clamp(82px, 12vw, 132px);
}

.resume-hero p:not(.eyebrow) {
  max-width: 660px;
  margin-bottom: 26px;
  font-size: 16px;
  line-height: 1.72;
}

.resume-page .footer-line {
  margin-top: 0;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  padding: 68px 0 36px;
}

.case-meta {
  display: grid;
  gap: 12px;
}

.case-meta h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.case-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.case-content {
  max-width: 840px;
  padding: 28px 0;
}

.case-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 42px;
}

.case-overview article,
.case-meta article {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 16px;
}

.case-overview h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.case-overview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.case-content h2 {
  margin-top: 36px;
}

.case-content h2:first-child {
  margin-top: 0;
}

.case-gallery {
  display: grid;
  gap: 16px;
  margin: 18px 0 34px;
}

.gallery-intro {
  max-width: 720px;
  padding-top: 18px;
}

.gallery-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.gallery-intro p {
  margin-bottom: 0;
  color: var(--muted);
}

.case-gallery.wireframes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.case-gallery.app-screens {
  grid-template-columns: 1fr;
  gap: 56px;
  max-width: 900px;
  margin-inline: auto;
}

.contact-wrap {
  max-width: 760px;
  padding: 22px 0 44px;
}

.contact-panel {
  padding: 30px;
  border: 1px solid rgba(3, 5, 3, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 24px 64px rgba(0, 0, 0, 0.2);
}

.contact-panel h2 {
  max-width: 620px;
  margin: 0 0 26px;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.45;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(31, 41, 55, 0.22);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

textarea {
  min-height: 136px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(75, 54, 33, 0.35);
  border-color: rgba(75, 54, 33, 0.55);
}

.footer-line {
  height: 1px;
  background: var(--line);
  margin: 34px 0 24px;
  opacity: 0.72;
}

.site-footer {
  margin-top: auto;
  padding: 2px 0 34px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}

.site-footer .dot {
  display: none;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 4px;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 36px, 760px);
  }

  .hero,
  .project-feature,
  .case-hero,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
    gap: 28px;
  }

  .card-grid,
  .card-grid.two-col,
  .case-overview {
    grid-template-columns: 1fr;
  }

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

  .case-gallery.app-screens {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-card {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
    padding: 20px;
  }

  .frugal-logo {
    width: 156px;
    border-radius: 32px;
  }

  .work-copy {
    width: 100%;
    text-align: left;
  }

  .resume-hero {
    padding-top: 48px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 360px);
    margin-left: 14px;
    margin-right: auto;
  }

  .top-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    max-width: 100%;
    line-height: 1.3;
  }

  .menu .pipe {
    height: 14px;
  }

  .hello {
    margin-left: 0;
    font-size: clamp(52px, 16vw, 72px);
  }

  .page-heading,
  .case-hero {
    padding-top: 46px;
  }

  .content-section {
    padding: 38px 0;
  }

  .phone-preview,
  .desktop-preview,
  .case-gallery.app-screens {
    max-width: 260px;
    margin-inline: auto;
  }

  .phone-preview,
  .case-gallery.app-screens {
    grid-template-columns: 1fr;
  }

  .desktop-preview {
    max-width: 100%;
  }

  .phone-preview img:nth-child(2) {
    transform: none;
  }

  .case-gallery.wireframes {
    grid-template-columns: 1fr;
  }

  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .text-link {
    justify-content: center;
    width: 100%;
  }

  .work-layout .work-page {
    width: min(100% - 28px, 360px);
    margin-left: 14px;
    margin-right: auto;
  }

  .work-copy h2 {
    font-size: clamp(36px, 13vw, 48px);
  }

  .resume-layout .resume-page {
    width: min(100% - 28px, 360px);
    margin-left: 14px;
    margin-right: auto;
  }

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