:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;

  /* Theme Tokens - Light Mode Default */
  --bg-body: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-header: #fbfbfd;
  --bg-nav: #fbfbfdf2;
  --border-color: #e7e7ec;
  --border-card: #e8e8ed;
  --border-card-hover: #d2d2d7;

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #6e6e73;

  --brand-mark-bg: #1d1d1f;
  --brand-mark-fg: #ffffff;

  --accent-color: #1d1d1f;
  --accent-hover: #424245;
  --accent-active: #000000;
  --accent-subtle: #e8e8ed;

  --tag-bg: #f5f5f7;
  --tag-text: #424245;

  --shadow-card: 0 10px 30px rgba(29, 29, 31, 0.04);
  --shadow-card-hover: 0 14px 36px rgba(29, 29, 31, 0.07);
  --shadow-subcard: 0 8px 24px rgba(29, 29, 31, 0.03);
  --shadow-subcard-hover: 0 12px 28px rgba(29, 29, 31, 0.06);

  --art-bg-stack: #f0f0f2;
  --art-stack-border: #d2d2d7;
  --art-bg-store: #f5f5f7;
  --art-bag: #b8b8bd;
  --art-cloud: #86868b;
  --art-orbit: #d2d2d7;

  --ctrl-btn-bg: #ffffff;
  --ctrl-btn-border: #d8d8dd;
  --ctrl-btn-hover: #e8e8ed;

  color: var(--text-primary);
  background: var(--bg-body);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg-body: #000000;
  --bg-surface: #1c1c1e;
  --bg-header: #161618;
  --bg-nav: rgba(22, 22, 24, 0.92);
  --border-color: #2c2c2e;
  --border-card: #2c2c2e;
  --border-card-hover: #3a3a3c;

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;

  --brand-mark-bg: #f5f5f7;
  --brand-mark-fg: #1c1c1e;

  --accent-color: #f5f5f7;
  --accent-hover: #d2d2d7;
  --accent-active: #ffffff;
  --accent-subtle: #3a3a3c;

  --tag-bg: #2c2c2e;
  --tag-text: #e5e5ea;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 14px 36px rgba(0, 0, 0, 0.6);
  --shadow-subcard: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-subcard-hover: 0 12px 28px rgba(0, 0, 0, 0.5);

  --art-bg-stack: #242426;
  --art-stack-border: #3a3a3c;
  --art-bg-store: #252527;
  --art-bag: #545458;
  --art-cloud: #a1a1a6;
  --art-orbit: #3a3a3c;

  --ctrl-btn-bg: #2c2c2e;
  --ctrl-btn-border: #3a3a3c;
  --ctrl-btn-hover: #3a3a3c;

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-body: #000000;
    --bg-surface: #1c1c1e;
    --bg-header: #161618;
    --bg-nav: rgba(22, 22, 24, 0.92);
    --border-color: #2c2c2e;
    --border-card: #2c2c2e;
    --border-card-hover: #3a3a3c;

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #86868b;

    --brand-mark-bg: #f5f5f7;
    --brand-mark-fg: #1c1c1e;

    --accent-color: #f5f5f7;
    --accent-hover: #d2d2d7;
    --accent-active: #ffffff;
    --accent-subtle: #3a3a3c;

    --tag-bg: #2c2c2e;
    --tag-text: #e5e5ea;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 14px 36px rgba(0, 0, 0, 0.6);
    --shadow-subcard: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-subcard-hover: 0 12px 28px rgba(0, 0, 0, 0.5);

    --art-bg-stack: #242426;
    --art-stack-border: #3a3a3c;
    --art-bg-store: #252527;
    --art-bag: #545458;
    --art-cloud: #a1a1a6;
    --art-orbit: #3a3a3c;

    --ctrl-btn-bg: #2c2c2e;
    --ctrl-btn-border: #3a3a3c;
    --ctrl-btn-hover: #3a3a3c;

    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--bg-body);
  color: var(--text-primary);
}

body {
  min-width: 320px;
}

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

button {
  font: inherit;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: -80px;
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.skip-link:focus {
  top: 12px;
}

[hidden] {
  display: none !important;
}

/* App Shell & Header Navigation */
.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) calc(69px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  z-index: 3;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: normal;
  color: var(--text-primary);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-mark-bg);
  color: var(--brand-mark-fg);
  font-size: 11px;
  letter-spacing: normal;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-location {
  font-size: 11px;
  color: var(--text-tertiary);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--tag-bg);
  border-color: var(--border-card-hover);
  transform: scale(1.06);
}

.theme-toggle:active {
  transform: scale(0.94);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}
[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

:root:not([data-theme="dark"]) .theme-toggle .sun-icon {
  display: none;
}
:root:not([data-theme="dark"]) .theme-toggle .moon-icon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon-icon {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .sun-icon {
    display: block;
  }
}

.screens {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.screen {
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-body);
}

.screen-inner {
  height: 100%;
  min-height: 0;
  width: 100%;
  padding-inline: max(20px, calc((100% - 1180px) / 2));
}

/* Global Typography & Buttons */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  margin: 0 0 17px;
}

.lead {
  color: var(--text-secondary);
  font-size: clamp(14px, 3.5vw, 17px);
  line-height: 1.55;
  margin: 0;
  max-width: 570px;
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: normal;
  color: var(--text-primary);
}

h1, h2 {
  font-weight: 650;
  line-height: 1.04;
}

h1 span, h2 span {
  color: var(--accent-color);
}

h1 {
  font-size: clamp(46px, 12vw, 72px);
}

h2 {
  font-size: clamp(42px, 11vw, 68px);
}

h3 {
  font-weight: 650;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.button-primary {
  background: var(--accent-color);
  color: var(--brand-mark-fg);
}

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

.button-text {
  color: var(--accent-color);
  padding-inline: 5px;
}

.button-text:hover, .quiet-link:hover, .project-copy a:hover {
  color: var(--accent-active);
}

/* Beyond The Prompt cover */
.screen-home {
  background: var(--bg-surface);
}

.home-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 8vh, 90px);
  padding-block: clamp(40px, 10vh, 110px) 5rem;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.scrollable-pane {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(5rem, env(safe-area-inset-bottom));
  scrollbar-gutter: stable;
}

.home-experience {
  width: min(100%, 850px);
}

.home-experience-heading h2 {
  font-size: clamp(32px, 6vw, 48px);
  margin-bottom: 10px;
}

.experience-timeline {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  position: relative;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 136px;
  width: 1px;
  background: var(--border-card-hover);
}

.experience-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 116px 40px minmax(0, 1fr);
  align-items: start;
  padding: 0 0 30px;
}

.experience-timeline li:last-child {
  padding-bottom: 0;
}

.experience-timeline li:last-child::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 0;
  left: 136px;
  width: 1px;
  background: var(--bg-surface);
}

.experience-timeline li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 130px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  background: var(--bg-surface);
  z-index: 1;
}

.experience-timeline li:first-child::before {
  background: var(--accent-color);
}

.experience-timeline li > div {
  grid-column: 3;
}

.experience-timeline .timeline-date {
  padding-top: 3px;
}

.timeline-date, .card-kicker {
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.experience-timeline h3 { font-size: 19px; }
.experience-timeline p { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

@media (max-width: 520px) {
  .experience-timeline::before { left: 6px; }
  .experience-timeline li { display: block; padding: 0 0 28px 30px; }
  .experience-timeline li::before { left: 0; }
  .experience-timeline li:last-child::after { left: 6px; }
  .experience-timeline .timeline-date { display: block; padding: 0 0 7px; }
}

.home-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 0.25em;
  row-gap: 0.08em;
  max-width: 100%;
  color: var(--text-primary);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-align: center;
  margin-bottom: 22px;
}

.home-title .home-title-bright {
  color: var(--text-primary);
}

.home-title .home-title-muted {
  color: var(--text-secondary);
}

.home-title-mark {
  width: 1.08em;
  height: 1.08em;
  flex: none;
  color: var(--text-primary);
}

.home-identity {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-identity span {
  color: var(--text-tertiary);
  padding-inline: 0.4em;
}

.home-description {
  max-width: 560px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 3.5vw, 17px);
  line-height: 1.55;
}

.home-focus {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.home-focus li {
  padding: 6px 10px;
  border: 1px solid var(--border-card);
  border-radius: 99px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.home-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(20px, 6vw, 60px); margin: 24px 0 0; }
.home-stats div { display: grid; gap: 4px; }
.home-stats dt { font-size: 23px; font-weight: 650; }
.home-stats dd { margin: 0; color: var(--text-tertiary); font-size: 11px; }

.home-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 24px;
}

.home-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.home-links a:hover {
  color: var(--text-secondary);
}

.home-links .home-link-primary {
  padding-inline: 18px;
  border-radius: 99px;
  background: var(--accent-color);
  color: var(--brand-mark-fg);
}

.home-links .home-link-primary:hover {
  background: var(--accent-hover);
  color: var(--brand-mark-fg);
}

.home-links .home-link-secondary {
  padding-inline: 18px;
  border: 1px solid var(--border-card);
  border-radius: 99px;
}

.home-links .home-link-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.home-link-socials {
  display: inline-flex;
  gap: 4px;
}

.screen-home a:focus-visible {
  outline-color: var(--accent-color);
}

/* About, Work, Blogs, Connect Screens */
.content-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.section-intro h2 {
  margin-bottom: 15px;
}

.section-intro .lead {
  max-width: 500px;
}

.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.work-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 17px;
  padding-top: clamp(22px, 5vh, 58px);
}

.scrollable-pane.content-layout { justify-content: flex-start; padding-top: clamp(28px, 8vh, 90px); }

.work-layout .section-intro h2 {
  margin-bottom: 8px;
}

.work-layout .section-intro .lead {
  font-size: 13px;
}

.quiet-link {
  display: inline-block;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 13px;
  margin-top: 9px;
}

.work-pane {
  min-height: 0;
}

.project-stage {
  min-height: 0;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 21px;
  overflow: hidden;
}

.project-art {
  position: relative;
  min-height: 110px;
  height: clamp(110px, 20vh, 180px);
  display: grid;
  place-items: center;
  background: var(--art-bg-stack);
  overflow: hidden;
}

.project-art-icon {
  background: var(--bg-surface);
}

.project-icon {
  width: min(128px, 34vw);
  height: min(128px, 34vw);
  object-fit: cover;
  border-radius: 24%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.stack {
  position: absolute;
  width: 75px;
  height: 91px;
  border-radius: 12px;
  border: 1px solid var(--art-stack-border);
  background: var(--bg-surface);
  box-shadow: 6px 8px 16px rgba(0, 0, 0, 0.1);
}

.stack-back {
  transform: translate(20px, -7px) rotate(12deg);
}

.stack-front {
  transform: translate(-18px, 7px) rotate(-6deg);
  padding: 20px 12px;
}

.stack-front span {
  display: block;
  height: 4px;
  width: 45px;
  background: var(--border-card-hover);
  border-radius: 3px;
  margin-bottom: 8px;
}

.stack-front span:nth-child(2) {
  width: 30px;
}

.stack-front b {
  position: absolute;
  bottom: 11px;
  right: 11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-color);
  color: var(--brand-mark-fg);
  font-size: 12px;
}

.cloud-icon {
  font-family: Georgia, serif;
  color: var(--art-cloud);
  font-size: 88px;
  z-index: 1;
}

.cloud-ring {
  position: absolute;
  border: 1px solid var(--art-orbit);
  border-radius: 50%;
  width: 170px;
  height: 170px;
}

.art-store {
  background: var(--art-bg-store);
}

.store-bag {
  width: 78px;
  height: 87px;
  border-radius: 6px 6px 12px 12px;
  background: var(--art-bag);
  position: relative;
  z-index: 1;
  transform: rotate(-7deg);
  box-shadow: 8px 9px 0 var(--art-orbit);
}

.store-bag::before {
  content: '';
  position: absolute;
  left: 22px;
  top: -20px;
  width: 34px;
  height: 27px;
  border: 6px solid var(--art-bag);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
}

.store-orbit {
  position: absolute;
  border: 1px solid var(--art-orbit);
  border-radius: 50%;
  width: 180px;
  height: 180px;
}

.project-copy {
  padding: 18px 20px 19px;
}

.project-type {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.11em;
  font-weight: 700;
}

.project-copy h3 {
  font-size: clamp(21px, 5vw, 27px);
  margin: 6px 0;
  color: var(--text-primary);
}

.project-copy p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0 0 9px;
  min-height: calc(1.4em * 3);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.project-copy a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-color);
}

.project-link-unavailable {
  display: inline-block;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; }
.project-tags li { border-radius: 99px; background: var(--tag-bg); color: var(--tag-text); padding: 5px 9px; font-size: 10px; font-weight: 600; }

.stacked-layout { padding-top: clamp(28px, 6vh, 70px); }
.stacked-layout .section-intro { margin-bottom: 30px; }
.community-content > h3, .speaking-section > h3 { margin-bottom: 14px; font-size: 19px; }
.mentorship-grid, .writing-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.mentorship-card, .article-card { padding: 23px; }
.mentorship-card h4 { font-size: 20px; margin: 12px 0 8px; }
.mentorship-card p, .article-card p, .speaking-list p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 0 0 15px; }
.mentorship-card a, .article-card a { color: var(--accent-color); font-size: 13px; font-weight: 650; }
.speaking-section { margin-top: 34px; }
.speaking-list { padding: 0; margin: 0; list-style: none; }
.speaking-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border-color); }
.speaking-thumbnail { width: 112px; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; display: grid; place-items: center; flex: 0 0 auto; }
.speaking-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbnail-wwdc { background: #1d1d1f; }
.thumbnail-swiftcairo { background: linear-gradient(135deg, #f47b20, #ed3b67); color: #fff; font-size: 14px; font-weight: 800; line-height: 1.05; letter-spacing: .08em; text-align: center; }
.thumbnail-swiftcairo img { object-fit: contain; }
.speaking-copy { min-width: 0; }
.speaking-list h4 { margin: 7px 0 5px; font-size: 17px; }
.speaking-list p { margin: 0; }
.speaking-link { color: var(--accent-color); font-size: 12px; font-weight: 650; }
.speaking-status { color: var(--text-tertiary); font-size: 11px; text-align: right; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--text-tertiary); font-size: 11px; }
.article-card h3 { font-size: clamp(20px, 3vw, 25px); line-height: 1.2; margin: 15px 0 10px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px 17px; margin-top: 18px; }
.social-links a { color: var(--accent-color); font-size: 13px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

.project-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.project-controls div {
  display: flex;
  gap: 8px;
}

.project-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ctrl-btn-border);
  background: var(--ctrl-btn-bg);
  color: var(--text-primary);
  cursor: pointer;
}

.project-controls button:hover {
  background: var(--ctrl-btn-hover);
}

.coming-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 195px;
  text-align: center;
}

.coming-symbol {
  font-size: 58px;
  color: var(--art-cloud);
  line-height: 1;
}

.coming-label {
  color: var(--text-tertiary);
  letter-spacing: 0.15em;
  font-size: 10px;
  font-weight: 700;
  margin: 10px 0;
}

.coming-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.connect-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.connect-icon {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-subtle);
  color: var(--accent-color);
  width: 44px;
  height: 44px;
  font-size: 24px;
  margin-bottom: 14px;
}

.connect-card h3 {
  font-size: 26px;
  color: var(--text-primary);
}

.connect-card p {
  max-width: 480px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 9px 0 17px;
}

.connect-card .quiet-link {
  margin-top: 15px;
}

/* App Bottom Navigation Bar */
.app-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 4;
  backdrop-filter: saturate(180%) blur(18px);
}

.app-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  min-width: 0;
  min-height: 44px;
}

.app-nav a[aria-current="page"] {
  color: var(--accent-color);
}

.nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

@media (max-width: 430px) {
  .header-location { display: none; }

  .speaking-list li { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .speaking-thumbnail { width: 82px; border-radius: 10px; }
  .speaking-status { display: none; }
  .thumbnail-swiftcairo { font-size: 10px; }
}

/* Desktop & Tablet Layout (min-width: 760px) */
@media (min-width: 760px) {
  .app-shell {
    grid-template-rows: 68px minmax(0, 1fr);
  }

  .header-inner {
    padding-inline: clamp(30px, 5vw, 80px);
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .header-location {
    font-size: 12px;
  }

  .app-nav {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 68px;
    width: min(450px, 48vw);
    border: 0;
    background: transparent;
    padding: 0;
  }

  .app-nav a {
    flex-direction: row;
    font-size: 12px;
  }

  .app-nav a:hover {
    color: var(--accent-color);
  }

  .app-nav .nav-icon {
    display: none;
  }

  .screen-inner {
    padding-inline: max(50px, calc((100% - 1180px) / 2));
  }

  .content-layout, .work-layout {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    align-items: center;
    gap: min(9vw, 100px);
  }

  .section-intro h2 {
    font-size: clamp(56px, 6.3vw, 94px);
  }

  .section-intro .lead {
    font-size: 17px;
  }

  .content-card {
    padding: clamp(28px, 4vw, 52px);
  }

  .project-art {
    height: min(30vh, 230px);
  }

  .project-copy {
    padding: 22px 27px;
  }

  .project-copy h3 {
    font-size: 30px;
  }

  .project-copy p {
    font-size: 15px;
  }

  .project-copy a {
    font-size: 13px;
  }

  .work-layout .section-intro .lead {
    font-size: 17px;
  }

  .coming-card {
    min-height: 310px;
  }

  .connect-card h3 {
    font-size: 36px;
  }

  .connect-card p {
    font-size: 16px;
  }
}

/* Mobile Small Viewports */
@media (max-width: 759px) and (max-height: 690px) {
  .app-shell {
    grid-template-rows: 48px minmax(0, 1fr) calc(59px + env(safe-area-inset-bottom));
  }

  .header-inner {
    padding-inline: 16px;
  }

  .screen-inner {
    padding-inline: 16px;
  }

  .content-layout {
    gap: 14px;
  }

  .section-intro h2 {
    font-size: clamp(36px, 9.5vw, 52px);
    margin-bottom: 8px;
  }

  .section-intro .lead {
    font-size: 13px;
    line-height: 1.4;
  }

  .content-card {
    padding: 17px;
  }

  .work-layout {
    gap: 8px;
  }

  .work-layout .section-intro h2 {
    font-size: clamp(34px, 9vw, 47px);
  }

  .work-layout .section-intro .lead, .work-layout .quiet-link {
    display: none;
  }

  .project-art {
    height: 95px;
    min-height: 95px;
  }

  .project-copy {
    padding: 11px 16px;
  }

  .project-copy h3 {
    font-size: 20px;
    margin: 3px 0;
  }

  .project-copy p {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .project-controls {
    margin-top: 5px;
  }

  .coming-card {
    min-height: 150px;
  }

  .connect-card p {
    margin: 5px 0 10px;
  }

  .connect-card h3 {
    font-size: 23px;
  }

  .connect-icon {
    margin-bottom: 7px;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
