:root {
  --bg: #0b1220;
  --bg-panel: #101a2e;
  --bg-panel-2: #0e1626;
  --border: rgba(233, 238, 248, 0.08);
  --border-strong: rgba(233, 238, 248, 0.14);
  --text: #e9eef8;
  --text-dim: #8fa0bd;
  --text-faint: #5c6c88;
  --gold: #d8ab5b;
  --gold-dim: #a9834a;
  --teal: #42d3c6;
  --radius: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.display {
  font-family: 'Space Grotesk', sans-serif;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

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

ul {
  list-style: none;
}

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

/* ---------- layout shell ---------- */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-panel-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 44px 32px;
  z-index: 100;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 36px;
}

/* ---------- logo (single source of truth) ---------- */
.crown-mark {
  width: 190px;
  max-width: 100%;
  height: auto;
  margin-bottom: 16px;
  display: block;
}

.footer-logo {
  width: 130px;
  height: auto;
  display: block;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.03em;
}

.socials {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
}

.socials a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all .2s ease;
}

.socials a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.socials svg {
  width: 15px;
  height: 15px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: all .18s ease;
}

.nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(216, 171, 91, 0.06);
}

.sidebar-footer {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 24px;
  letter-spacing: 0.02em;
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
}

/* ---------- main ---------- */
.main {
  grid-column: 2;
}

section {
  padding: 100px 72px;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-tag::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-lede {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ---------- hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.75) 32%, rgba(11, 18, 32, 0.25) 58%, rgba(11, 18, 32, 0.05) 100%);
  z-index: 1;
}

.hero-eyebrow,
.hero h1,
.hero-typing,
.hero-desc,
.hero-cta,
.hero-stats {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: none;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-bottom: 22px;
  position: relative;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  position: relative;
  max-width: 900px;
}

.hero h1 .accent {
  color: var(--gold);
}

.hero-typing {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--text-dim);
  margin-bottom: 34px;
  min-height: 32px;
  position: relative;
}

.hero-typing .prompt {
  color: var(--teal);
}

.hero-typing .cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--gold);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 40px;
  font-size: 15px;
  position: relative;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gold);
  color: #0b1220;
}

.btn-primary:hover {
  background: #e8bd76;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  position: relative;
  flex-wrap: wrap;
}

.hero-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo-wrap {
  position: sticky;
  top: 44px;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold-dim);
  outline: 10px solid var(--bg);
  outline-offset: -10px;
  z-index: 2;
  pointer-events: none;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(15%) contrast(1.05);
}

.about-bio p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 15px;
  max-width: 680px;
}

.about-bio strong {
  color: var(--text);
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 36px 0 44px;
  max-width: 680px;
  border: 1px solid var(--border);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.fact:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.fact-k {
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.fact-v {
  color: var(--text);
  font-weight: 500;
}

.skills {
  margin-top: 48px;
  max-width: 680px;
  padding: 28px 28px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.skill-row {
  margin-bottom: 22px;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.skill-head span:first-child {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.skill-head span:last-child {
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
}

.skill-bar {
  height: 5px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  width: 0%;
  transition: width 1.2s ease;
}

.timeline {
  margin-top: 56px;
  max-width: 680px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 22px 24px;
  border-left: 2px solid var(--border);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--teal);
  padding-top: 2px;
}

.timeline-role {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- projects ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  transition: all .18s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.filter-btn.active {
  color: #0b1220;
  background: var(--gold);
  border-color: var(--gold);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.project-card[data-cat*="ai"] {
  border-top-color: #42d3c6;
}

.project-card[data-cat*="web3"] {
  border-top-color: #9b7ee8;
}

.project-card[data-cat*="ecom"] {
  border-top-color: #e8834a;
}

.project-card[data-cat*="automation"] {
  border-top-color: #d8ab5b;
}

.project-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.5);
}

.project-top {
  padding: 22px 22px 0;
}

.project-status {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  margin-bottom: 14px;
}

.project-status.live {
  color: var(--teal);
  border-color: rgba(66, 211, 198, 0.3);
}

.project-status.progress {
  color: var(--gold);
  border-color: rgba(216, 171, 91, 0.3);
}

.project-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 22px;
  margin-bottom: 18px;
}

.project-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-faint);
  background: var(--bg-panel-2);
  padding: 4px 8px;
  border: 1px solid var(--border);
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.project-link.disabled {
  color: var(--text-faint);
}

.project-link svg {
  width: 14px;
  height: 14px;
}

.projects-cta {
  margin-top: 48px;
  padding: 36px 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.projects-cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

.projects-cta-sub {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg-panel);
  padding: 36px 28px;
}

.service-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 20px;
}

.service-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.contact-info-item:last-child {
  border-bottom: 1px solid var(--border);
}

.ci-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}

.ci-icon svg {
  width: 16px;
  height: 16px;
}

.ci-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.ci-value {
  font-size: 14.5px;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 13px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  border-radius: var(--radius);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field {
  margin-bottom: 16px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 14px;
}

/* ---------- footer ---------- */
.footer {
  padding: 36px 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
}

.footer-right {
  font-size: 12px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {

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

  .about-photo-wrap {
    position: static;
    max-width: 220px;
    aspect-ratio: 1;
  }

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

  .fact:nth-child(odd) {
    border-right: none;
  }
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    height: 64px;
    overflow: visible;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
    gap: 12px;
  }

  .crown-mark {
    margin-bottom: 0;
    width: 140px;
    height: auto;
  }

  .brand-sub {
    display: none;
  }

  .socials {
    display: none;
  }

  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-panel-2);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all .25s ease;
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    background: none;
    color: var(--text);
    cursor: pointer;
  }

  .nav a {
    padding: 13px 12px;
    font-size: 15px;
  }

  .hero-photo {
    object-position: center 15%;
  }

  .field input,
  .field textarea {
    font-size: 16px;
  }

  .main {
    grid-column: 1;
    margin-top: 64px;
  }

  section,
  .hero,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding-top: 64px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero {
    min-height: unset;
    padding-bottom: 56px;
  }

  .hero-stats {
    gap: 28px;
    margin-top: 44px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 18px 18px 24px;
  }

  .timeline-date {
    padding-top: 0;
  }

  .projects-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }
}

@media (max-width: 420px) {
  .section-title {
    font-size: 26px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .skills {
    padding: 22px 18px 8px;
  }

  .about-bio p {
    font-size: 14px;
  }

  .hero-stats {
    gap: 20px 28px;
  }

  .hero-stat-num {
    font-size: 24px;
  }

  .hero-stat-label {
    font-size: 10.5px;
  }

  .hero-eyebrow {
    font-size: 11.5px;
  }

  .hero-typing {
    font-size: 15px;
  }

  .project-top,
  .project-tags,
  .project-link {
    padding-left: 18px;
    padding-right: 18px;
  }

  .service-card {
    padding: 28px 20px;
  }

  .contact-info-item {
    gap: 12px;
  }
}