:root {
  color-scheme: dark;
  --bg: #14181a;
  --panel: #20262a;
  --panel-strong: #2a3135;
  --ink: #fffaf0;
  --muted: #d7cfbf;
  --line: rgba(255, 250, 240, 0.2);
  --teal: #59e0d2;
  --amber: #f0bd59;
  --coral: #cc3d37;
  --green: #58b77a;
  --brace-green: #15543f;
  --brace-gold: #b4873e;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.brand,
.site-nav,
.hero-actions,
.project-tools,
.contact-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 72px;
  height: 34px;
  object-fit: contain;
}

.site-nav {
  gap: clamp(12px, 3vw, 28px);
  flex-wrap: wrap;
  justify-content: end;
}

.site-nav a,
.text-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.text-link:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 130px clamp(18px, 6vw, 80px) 54px;
}

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

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

.hero-shade {
  background:
    linear-gradient(90deg, rgba(20, 24, 26, 0.9), rgba(20, 24, 26, 0.58) 42%, rgba(20, 24, 26, 0.1)),
    linear-gradient(0deg, var(--bg), transparent 38%);
}

.hero-content {
  position: relative;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.hero-copy {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-kicker {
  margin: 16px 0 0;
  color: var(--amber);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
}

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

.button,
.filter-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.button.primary {
  color: #111318;
  background: linear-gradient(135deg, #ffd477, var(--brace-gold));
  border-color: rgba(255, 250, 240, 0.34);
  box-shadow: 0 16px 34px rgba(180, 135, 62, 0.28);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(180, 135, 62, 0.4);
}

.button.secondary {
  color: #fffaf0;
  background: rgba(247, 243, 234, 0.12);
  border-color: rgba(255, 250, 240, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.button.secondary:hover {
  background: rgba(247, 243, 234, 0.18);
  border-color: rgba(240, 189, 89, 0.72);
}

.button.resume-button {
  color: #101714;
  background: linear-gradient(135deg, #ffd477, var(--brace-gold));
  border-color: rgba(255, 250, 240, 0.34);
  box-shadow: 0 16px 34px rgba(180, 135, 62, 0.28);
}

.button.resume-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(180, 135, 62, 0.4);
}

.intro-band,
.projects-section,
.experience-section,
.contact-band {
  padding: clamp(64px, 9vw, 110px) clamp(18px, 6vw, 80px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(240px, 0.8fr);
  gap: 16px;
}

.about-panel,
.stats-panel,
.featured-project,
.project-card,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px var(--shadow);
}

.about-panel {
  padding: 26px;
}

.about-panel p,
.about-panel li,
.featured-project p,
.timeline p,
.contact-band p {
  color: var(--muted);
  line-height: 1.7;
}

.focus-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.stats-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.stats-panel div {
  display: grid;
  align-content: center;
  min-height: 108px;
  padding: 20px;
  background: var(--panel-strong);
}

.stats-panel strong {
  font-size: 2rem;
  line-height: 1;
}

.stats-panel span {
  color: var(--muted);
  font-weight: 700;
}

.projects-section {
  background:
    linear-gradient(135deg, rgba(21, 84, 63, 0.34), transparent 42%),
    linear-gradient(315deg, rgba(180, 135, 62, 0.16), transparent 44%),
    #17201d;
}

.project-tools {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-button {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  padding: 0 14px;
}

.filter-button:hover,
.filter-button.is-active {
  color: #111318;
  background: var(--amber);
  border-color: var(--amber);
}

.featured-project {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(21, 84, 63, 0.66), rgba(180, 135, 62, 0.18) 48%, transparent),
    var(--panel);
}

.braceforge-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  align-items: stretch;
  border-color: rgba(180, 135, 62, 0.48);
  box-shadow: 0 22px 58px rgba(21, 84, 63, 0.28), 0 0 0 1px rgba(240, 189, 89, 0.1);
}

.braceforge-copy {
  display: grid;
  align-content: center;
}

.braceforge-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.braceforge-lockup img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(21, 84, 63, 0.22));
}

.braceforge-lockup .eyebrow {
  margin: 0;
  color: var(--teal);
}

.featured-project h3 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.braceforge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.braceforge-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(255, 250, 240, 0.34);
  border-radius: 8px;
  color: #101714;
  background: linear-gradient(135deg, #ffd477, var(--brace-gold));
  box-shadow: 0 18px 42px rgba(180, 135, 62, 0.36);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
  justify-self: start;
}

.braceforge-cta::after {
  content: "->";
  margin-left: 10px;
}

.braceforge-cta.secondary {
  color: var(--ink);
  background: rgba(21, 84, 63, 0.56);
  border-color: rgba(240, 189, 89, 0.62);
  box-shadow: 0 14px 34px rgba(21, 84, 63, 0.28);
}

.braceforge-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(180, 135, 62, 0.48);
}

.braceforge-cta.secondary:hover {
  border-color: rgba(255, 212, 119, 0.86);
  box-shadow: 0 20px 44px rgba(21, 84, 63, 0.38);
}

.braceforge-model-panel {
  position: relative;
  min-height: 420px;
  overflow: visible;
  border: 1px solid rgba(180, 135, 62, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 58% 48%, rgba(89, 224, 210, 0.22), transparent 34%),
    radial-gradient(circle at 42% 58%, rgba(180, 135, 62, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(21, 84, 63, 0.2), rgba(17, 21, 22, 0.1));
  box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.04);
  isolation: isolate;
}

.braceforge-model-panel::before {
  content: "";
  position: absolute;
  inset: 12% 5% 7%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 189, 89, 0.24), transparent 58%);
  filter: blur(18px);
}

.braceforge-model-panel::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 10%;
  bottom: 12%;
  height: 20%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.32), transparent 68%);
  filter: blur(10px);
}

#braceViewport {
  width: 100%;
  height: 100%;
  min-height: 420px;
  pointer-events: none;
}

#braceViewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.model-status {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 10px;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(17, 21, 22, 0.72);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 800;
  pointer-events: none;
}

.home-preview-inputs {
  display: none;
}

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

.project-grid-compact .project-card {
  min-height: 250px;
}

.project-card {
  display: grid;
  min-height: 285px;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover,
.project-card.is-selected {
  transform: translateY(-4px);
  border-color: rgba(180, 135, 62, 0.82);
}

.project-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.project-token {
  display: grid;
  width: 46px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #111318;
  font-weight: 900;
}

.project-card:nth-child(4n + 1) .project-token {
  background: var(--brace-green);
  color: var(--ink);
}

.project-card:nth-child(4n + 2) .project-token {
  background: var(--brace-gold);
}

.project-card:nth-child(4n + 3) .project-token {
  background: var(--coral);
}

.project-card:nth-child(4n + 4) .project-token {
  background: var(--green);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  margin-top: 22px;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.experience-section {
  background: var(--bg);
}

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

.timeline article {
  min-height: 260px;
  padding: 24px;
}

.timeline span {
  display: block;
  margin-bottom: 14px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.contact-band p {
  max-width: 700px;
}

.contact-links {
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.contact-links a {
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .about-grid,
  .project-grid,
  .timeline,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .featured-project {
    align-items: start;
    flex-direction: column;
  }

  .braceforge-feature {
    grid-template-columns: 1fr;
  }

  .braceforge-model-panel,
  #braceViewport {
    min-height: 360px;
  }

  .contact-links {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: sticky;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .site-nav {
    justify-content: space-between;
  }

  .hero {
    min-height: 82svh;
    padding-top: 72px;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(20, 24, 26, 0.96), rgba(20, 24, 26, 0.72)),
      linear-gradient(0deg, var(--bg), transparent 34%);
  }

  .button {
    width: 100%;
  }

  .braceforge-cta {
    width: 100%;
  }
}
