:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #18181b;
  --muted: #52525b;
  --quiet: #71717a;
  --line: #e4e4e7;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 14px 32px rgba(15, 23, 42, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

::selection {
  color: #ffffff;
  background: var(--blue);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--blue);
  color: #ffffff;
  padding: 0.7rem 1rem;
  font-weight: 700;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(228, 228, 231, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.brand {
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

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

.nav-links a,
.menu-button {
  border-radius: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.menu-button:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

main {
  width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.narrow {
  width: min(860px, calc(100% - 2rem));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin: 0 0 1.2rem;
  color: var(--text);
  font-size: clamp(3.1rem, 8vw, 5.9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.headline {
  max-width: 680px;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.subheadline {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

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

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

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

.button.secondary:hover,
.button.ghost:hover {
  border-color: #bfdbfe;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.button.ghost {
  border-color: transparent;
  color: var(--muted);
}

.focus-panel,
.card,
.contact-panel,
.resume-panel,
.todo-panel {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.focus-panel {
  padding: 1.25rem;
}

.focus-grid {
  display: grid;
  gap: 1rem;
}

.focus-callout {
  border-radius: 0.65rem;
  background: var(--surface-soft);
  padding: 1rem;
}

.focus-callout p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.mini-card {
  min-height: 8.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
  padding: 1rem;
}

.label {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section.alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.section-heading h2,
.page-title h1 {
  max-width: none;
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-title p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.projects-grid,
.skills-grid,
.resume-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

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

.card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.25rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.screenshot-slot,
.project-shot {
  display: flex;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
}

.project-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-study .project-shot {
  margin: 1.5rem 0 0;
}

.card h3 {
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.card h3 a {
  border-radius: 0.2rem;
  text-decoration: none;
}

.card h3 a:hover,
.text-link:hover,
.contact-list a:hover {
  color: var(--blue-dark);
}

.card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.tags,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li,
.chip-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 1.2rem;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.about-copy {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.75;
}

.contact-panel,
.resume-panel,
.todo-panel {
  padding: 1.5rem;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.contact-list dt {
  margin-bottom: 0.35rem;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.page-header {
  padding: clamp(3.5rem, 8vw, 6rem) 0 2rem;
}

.case-study {
  padding-bottom: 4.5rem;
}

.case-section {
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}

.case-section h2 {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.case-section p,
.case-section li,
.todo-panel li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.case-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-list li {
  border-left: 3px solid #bfdbfe;
  padding-left: 1rem;
}

.demo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-list li {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
  padding: 1rem;
  color: var(--text);
  font-weight: 650;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  color: var(--quiet);
  font-size: 0.88rem;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero,
  .projects-grid,
  .skills-grid,
  .resume-grid,
  .contact-list,
  .demo-list {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    padding-top: 3.5rem;
  }
}

@media (max-width: 680px) {
  .container,
  .nav {
    width: min(100% - 2rem, 1120px);
  }

  .nav {
    align-items: flex-start;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 4.2rem;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
  }

  .nav-links[data-open="true"] {
    display: flex;
  }

  .nav-links a {
    padding: 0.85rem;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.2rem);
  }

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

  .section {
    padding: 3rem 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}
