:root {
  color-scheme: light;
  --bg: #e6e8ec;
  --surface: #f3f4f6;
  --surface-strong: #d9dde3;
  --text: #111111;
  --muted: #5f6368;
  --line: #c6cbd3;
  --accent: #6f45d9;
  --accent-strong: #3b238a;
  --accent-soft: #ece7ff;
  --shadow: 0 22px 70px rgba(18, 18, 18, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050507;
  --surface: #101015;
  --surface-strong: #181824;
  --text: #f5f3ff;
  --muted: #b8b4c8;
  --line: #292538;
  --accent: #9f7aea;
  --accent-strong: #c4b5fd;
  --accent-soft: #211833;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.modal-active {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--text);
  color: var(--bg);
  font-size: 0.86rem;
  border-radius: 8px;
}

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

.nav-links a,
.theme-toggle,
.menu-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.theme-toggle:hover,
.menu-button:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle [data-theme-icon] {
  display: inline-grid;
  place-items: center;
}

.theme-toggle i,
.theme-toggle svg,
.menu-button i,
.icon-link i,
.stat-icon i {
  width: 18px;
  height: 18px;
}

.menu-button {
  display: none;
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding: 58px 0 44px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 6.4vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-name {
  white-space: nowrap;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.lead {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--text);
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button i,
.project-link i {
  width: 18px;
  height: 18px;
}

.hero-media {
  display: grid;
  gap: 16px;
}

.media-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-panel img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  background: #e9e4df;
}

.media-panel .portrait-image {
  height: clamp(420px, 52vw, 620px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.highlight-grid img {
  width: 100%;
  height: clamp(170px, 19vw, 260px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.showcase {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.showcase-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.stat span {
  color: var(--muted);
  font-weight: 650;
}

.section {
  padding: clamp(58px, 8vw, 98px) 0;
  border-top: 1px solid var(--line);
}

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

.section-header p {
  max-width: 620px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card,
.project-card,
.timeline-item,
.contact-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.04);
}

.card,
.timeline-item,
.contact-item {
  padding: 24px;
}

.card p,
.timeline-item p,
.project-card p,
.contact-item p {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.project-card {
  overflow: hidden;
}

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

.interactive-card {
  width: 100%;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.interactive-card:hover,
.interactive-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.interactive-card img,
.interactive-card video {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: var(--surface-strong);
}

.interactive-card .photography-thumb {
  object-position: center 72%;
}

.interactive-card .veritruth-thumb {
  object-fit: contain;
  object-position: center center;
  background: #281164;
}

.interactive-card .drowning-thumb {
  object-position: center 25%;
}

.interactive-card strong {
  display: block;
  padding: 0 22px 8px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.interactive-card > span:not(.timeline-kicker) {
  display: block;
  padding: 0 22px 24px;
  color: var(--muted);
}

.interactive-card .timeline-kicker {
  display: block;
  padding: 22px 22px 10px;
}

.project-cover {
  min-height: 210px;
  display: flex;
  align-items: end;
  padding: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    repeating-linear-gradient(90deg, var(--surface-strong), var(--surface-strong) 1px, transparent 1px, transparent 18px),
    var(--surface);
}

.project-cover span {
  max-width: 260px;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
}

.project-body {
  padding: 24px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.project-link,
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 850;
}

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

.video-embed {
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0c0f;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  overflow: auto;
}

.modal.is-open {
  display: grid;
  place-items: start center;
}

.modal-panel {
  position: relative;
  width: min(1040px, 100%);
  margin: 28px auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-panel p {
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.modal-close i,
.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.modal-gallery img,
.modal-gallery video {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0c0f;
}

.modal-gallery:not(.phone-gallery) img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photography-gallery img {
  object-fit: contain;
  object-position: center center;
  cursor: zoom-in;
}

.modal-gallery img {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox img {
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 56px);
  width: auto;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #0c0c0f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  object-fit: contain;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.86);
  color: #ffffff;
  cursor: pointer;
}

.image-lightbox-close i,
.image-lightbox-close svg {
  width: 20px;
  height: 20px;
}

.phone-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.phone-gallery img {
  aspect-ratio: 9 / 19.5;
  height: auto;
  max-height: none;
  object-fit: cover;
}

.single-media {
  grid-template-columns: 1fr;
}

.single-media img,
.single-media video {
  aspect-ratio: auto;
  object-fit: contain;
}

.page-hero {
  padding: 72px 0 48px;
}

.page-hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.8rem);
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-kicker {
  color: var(--accent-strong);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.detail-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.detail-list li + li {
  margin-top: 8px;
}

.work-showcase-button {
  width: 100%;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.work-showcase-button:hover,
.work-showcase-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface));
  box-shadow: 0 16px 44px rgba(111, 69, 217, 0.14);
  outline: none;
}

.work-showcase-button span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.work-showcase-button svg,
.work-showcase-button i {
  width: 20px;
  height: 20px;
}

.work-showcase-button small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.modal-work-item {
  margin: 0;
}

.work-showcase-modal {
  display: grid;
  gap: 26px;
  margin-top: 26px;
}

.featured-work {
  justify-self: center;
  width: min(620px, 100%);
}

.logo-work {
  width: min(340px, 72vw);
  text-align: center;
}

.supporting-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.video-work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
}

.supporting-work-grid .modal-work-item:only-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(560px, 100%);
}

.work-showcase-divider {
  position: relative;
  width: min(620px, 100%);
  height: 18px;
  justify-self: center;
}

.supporting-work-grid .work-showcase-divider {
  grid-column: 1 / -1;
  margin: 2px 0;
}

.work-showcase-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--line), var(--accent), transparent);
  transform: translateY(-50%);
}

.work-showcase-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.modal-work-item img {
  width: 100%;
  max-height: none;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.modal-work-item video {
  width: auto;
  max-width: 100%;
  height: min(62vh, 620px);
  max-height: 620px;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.modal-work-item img {
  cursor: zoom-in;
}

.modal-work-item.wide-work {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(900px, 100%);
}

.modal-work-item.wide-work img {
  aspect-ratio: auto;
}

.modal-work-item.diagram-work {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(480px, 100%);
}

.modal-work-item.diagram-work img {
  aspect-ratio: 1 / 1;
}

.modal-work-item.transparent-sample img {
  padding: 0;
  background: transparent;
}

.modal-work-item figcaption {
  padding: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item i {
  width: 22px;
  height: 22px;
  color: var(--accent-strong);
}

.resume-section {
  padding-top: clamp(96px, 11vw, 132px);
}

.resume-preview {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 36px);
  align-items: center;
  max-width: 760px;
}

.resume-thumb {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resume-thumb img {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  object-fit: contain;
  object-position: top center;
  background: #ffffff;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
}

.footer-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a,
  .theme-toggle {
    justify-content: flex-start;
    width: 100%;
  }

  .hero,
  .split,
  .showcase,
  .grid.two,
  .grid.three,
  .contact-grid,
  .resume-preview,
  .project-index {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .phone-gallery,
  .modal-gallery {
    grid-template-columns: 1fr;
  }

  .supporting-work-grid {
    grid-template-columns: 1fr;
  }

  .video-work-grid {
    grid-template-columns: 1fr;
  }

  .supporting-work-grid .modal-work-item:only-child {
    width: 100%;
  }

  .work-showcase-button {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-showcase-button small {
    white-space: normal;
  }

  .section-header {
    display: block;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .page,
  .footer-shell {
    width: min(100% - 24px, 1160px);
  }

  h1 {
    font-size: 3rem;
  }

  .hero-actions,
  .section-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
