:root {
  --bg: #f2efe7;
  --ink: #0f1720;
  --muted: #495766;
  --panel: #fffdf8;
  --line: #c9c2b6;
  --brand: #0b3a7a;
  --brand-2: #b38a3f;
  --ok: #0f7a4f;
  --warn: #8d3d00;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 18px 36px rgba(15, 23, 32, 0.1);
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(11, 58, 122, 0.16), transparent 36%),
    radial-gradient(circle at 90% 20%, rgba(179, 138, 63, 0.2), transparent 42%),
    linear-gradient(180deg, #f8f5ef 0%, #f2efe7 38%, #ece8de 100%);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  letter-spacing: -0.03em;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  margin-bottom: 0.65rem;
}

a {
  color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--brand-2);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  backdrop-filter: blur(8px);
  background: rgba(247, 243, 233, 0.88);
  border-bottom: 1px solid rgba(15, 23, 32, 0.08);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 32, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 0.95rem;
  line-height: 1;
}

.brand-copy span {
  font-size: 0.73rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: #14263f;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(11, 58, 122, 0.35);
  outline-offset: 2px;
}

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

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 23, 32, 0.22);
}

.btn-secondary {
  border-color: rgba(15, 23, 32, 0.2);
  color: var(--ink);
  background: transparent;
}

.hero {
  padding: 5.2rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.4rem;
  align-items: stretch;
}

.hero-card,
.stat-card,
.section-card,
.contact-card {
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.94) 0%, rgba(255, 251, 244, 0.82) 100%);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1.25rem, 2vw, 2rem);
}

.hero-eyebrow {
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  color: #3d4a58;
  font-size: 0.72rem;
}

.hero p {
  color: var(--muted);
  max-width: 62ch;
  margin-top: 0.8rem;
}

.hero-cta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-wrap {
  display: grid;
  gap: 0.85rem;
}

.stat-card {
  padding: 1.1rem 1rem;
}

.stat-card h3 {
  font-size: 2rem;
  line-height: 1;
}

.stat-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

main section {
  padding: 1rem 0 2.3rem;
}

.section-card {
  padding: 1.3rem;
}

.lead {
  margin: 0;
  max-width: 74ch;
  color: var(--muted);
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
}

.pill-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  background: #fff;
  font-size: 0.85rem;
  color: #223244;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

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

.project-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 32, 0.11);
  background: #fff;
  padding: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.project-logo-shell {
  height: 54px;
  border: 1px solid rgba(15, 23, 32, 0.09);
  border-radius: 10px;
  background: linear-gradient(180deg, #f5f2ec, #ece8df);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  overflow: hidden;
}

.project-logo-shell-dark {
  background: linear-gradient(180deg, #243446, #151f2b);
  border-color: rgba(15, 23, 32, 0.28);
}

.project-logo-shell-black {
  background: linear-gradient(180deg, #171717, #060606);
  border-color: rgba(0, 0, 0, 0.55);
}

.project-logo {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.project-logo-shell-dark .project-logo,
.project-logo-shell-black .project-logo {
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.5));
}

.project-logo-kf {
  max-height: 40px;
}

.project-logo-pbd {
  max-height: 38px;
  transform: scale(1.42);
  transform-origin: center;
}

.project-logo-xpia {
  max-height: 36px;
}

.project-logo-saints {
  max-height: 44px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.project-name {
  font-weight: 700;
  font-size: 1.03rem;
}

.project-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-live {
  color: var(--ok);
  background: rgba(15, 122, 79, 0.09);
  border-color: rgba(15, 122, 79, 0.24);
}

.badge-build,
.badge-future {
  color: var(--warn);
  background: rgba(141, 61, 0, 0.1);
  border-color: rgba(141, 61, 0, 0.2);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-links .muted {
  color: #6d7785;
  font-size: 0.88rem;
}

.founder {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 1.1rem;
  align-items: start;
}

.founder-media {
  width: 156px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 32, 0.14);
  background: #e9ecef;
  box-shadow: 0 10px 26px rgba(15, 23, 32, 0.12);
}

.founder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.founder p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-card {
  padding: 1.2rem;
}

.contact-meta {
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.5rem;
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

input,
textarea,
select {
  font: inherit;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 32, 0.2);
  padding: 0.65rem 0.75rem;
  background: #fff;
}

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

.form-help {
  margin: 0;
  color: #637080;
  font-size: 0.82rem;
}

.form-status {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.88rem;
  color: #27445d;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 32, 0.12);
  padding: 1.1rem 0 2.4rem;
  margin-top: 1.4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #516172;
  font-size: 0.86rem;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  body {
    line-height: 1.45;
  }

  .hero {
    padding-top: 4.3rem;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

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

  .project-card {
    padding: 0.85rem;
  }

  .project-links {
    gap: 0.55rem;
  }

  .btn {
    width: 100%;
  }

  .hero-cta {
    width: 100%;
  }

  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .founder {
    grid-template-columns: 1fr;
  }

  .founder-media {
    width: 130px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1120px, 94vw);
  }

  h1 {
    font-size: clamp(1.75rem, 8vw, 2.1rem);
  }

  h2 {
    font-size: clamp(1.2rem, 6vw, 1.5rem);
  }

  .section-card,
  .contact-card,
  .hero-card {
    padding: 1rem;
  }

  .badge {
    font-size: 0.67rem;
  }
}
