:root {
  --bg: #a7d3c0;
  --section-bg: #bfe3d6;
  --surface: #e8e0cf;
  --surface-alt: #f2ebdd;
  --text: #2b2b2b;
  --body-text: #3a3a3a;
  --muted: #5a5a5a;
  --border: #4b4b4b;
  --panel-radius: 22px;
  --card-radius: 16px;
  --btn-bg: #ddd3bf;
  --tag-bg: #efe7d7;
  --ctrl-yellow: #f6e6a6;
  --ctrl-blue: #c6c8f5;
  --ctrl-pink: #f4c2c2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  overflow: hidden;
}

a {
  color: var(--text);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  background: var(--section-bg);
}

.app-brand {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-brand img {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 4px;
}

.mobile-bottom-nav {
  display: none;
}

.view-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: auto;
  margin-left: auto;
  padding-bottom: 2px;
}

.view-tab {
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
}

.view-tab[aria-pressed='true'] {
  background: var(--btn-bg);
}

.floating-contact {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.floating-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.floating-contact-btn .icon-close {
  display: none;
}

.floating-contact-btn.is-open .icon-open {
  display: none;
}

.floating-contact-btn.is-open .icon-close {
  display: inline-block;
}

.floating-contact-menu {
  display: none;
  padding: 0;
}

.floating-contact-menu.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.floating-contact-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
}

.view-main {
  height: calc(100vh - 58px);
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 14px 14px;
}

.section {
  position: relative;
  margin: 0;
  padding: 68px 24px 26px;
  border: 2px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--section-bg);
}

.hero {
  padding-top: 74px;
  background: var(--surface);
}

.view-section {
  display: none;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.view-section.active {
  display: block;
  animation: viewFadeIn 220ms ease;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.panel-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  border-radius: calc(var(--panel-radius) - 2px) calc(var(--panel-radius) - 2px) 0 0;
  background: var(--surface-alt);
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel-controls span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--border);
  border-radius: 50%;
}

.panel-controls span:nth-child(1) {
  background: var(--ctrl-yellow);
}

.panel-controls span:nth-child(2) {
  background: var(--ctrl-blue);
}

.panel-controls span:nth-child(3) {
  background: var(--ctrl-pink);
}

.panel-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

h1 {
  margin: 0;
  line-height: 1.12;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 3.8vw, 2.3rem);
  font-weight: 700;
  color: var(--text);
}

h3 {
  font-weight: 600;
  color: var(--text);
}

.eyebrow {
  margin-top: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.hero-subhead {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.08rem, 2.1vw, 1.33rem);
  font-weight: 500;
  color: var(--body-text);
  text-align: center;
}

.body-copy {
  max-width: 860px;
  color: var(--body-text);
  font-weight: 400;
}

.hero .body-copy {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.muted {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero .tags,
.hero .cta-row {
  justify-content: center;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--tag-bg);
  color: var(--text);
  font-size: 0.82rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--btn-bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover {
  background: #d2c7b1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface-alt);
  padding: 20px;
}

.card:hover {
  filter: brightness(0.985);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.role-title {
  margin-bottom: 2px;
}

.role-company {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.stack-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stack-icon {
  display: inline-flex;
  min-width: 28px;
  min-height: 24px;
  justify-content: center;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  line-height: 1;
}

.stack-icon i {
  font-size: 0.8rem;
}

.card .body-copy {
  margin-top: 0;
  margin-bottom: 14px;
}

.card .tags {
  margin-top: 10px;
}

.card .btn {
  margin-top: auto;
}

.other-experience-block {
  margin-top: 18px;
  border: 2px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface-alt);
  padding: 12px;
}

.other-experience-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.other-experience-toggle i {
  transition: transform 180ms ease;
}

.other-experience-block:not(.collapsed) .other-experience-toggle i {
  transform: rotate(180deg);
}

.other-experience-block .card-grid {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.other-experience-block.collapsed .card-grid {
  display: none;
}

.other-exp-item {
  padding: 14px;
}

.other-exp-item .role-title {
  font-size: 1rem;
  margin-bottom: 4px;
}

.other-exp-item .role-company {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.other-exp-item .btn {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--body-text);
}

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

.detail-panel {
  width: min(780px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border: 2px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
}

.detail-panel::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

#detailBody {
  padding: 0 22px 22px;
}

#detailBody > h2 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--text);
}

.detail-company {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.detail-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0 -22px 16px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  border-radius: 20px 20px 0 0;
  background: var(--surface-alt);
}

.detail-section {
  margin: 0;
  padding: 16px 0;
}

.detail-section + .detail-section {
  border-top: 2px solid var(--border);
}

.detail-section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.detail-section .body-copy {
  margin: 0;
  max-width: none;
  color: var(--body-text);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-icon {
  display: inline-flex;
  min-width: 30px;
  min-height: 24px;
  justify-content: center;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.contact-icon i {
  font-size: 0.85rem;
}

.testimonial-card .body-copy {
  margin-bottom: auto;
}

.testimonial-meta {
  margin: 0;
  color: var(--body-text);
  font-weight: 500;
}

.testimonial-footer {
  margin-top: 10px;
}

.testimonial-footer .testimonial-meta + .testimonial-meta {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .app-header {
    gap: 8px;
    padding: 10px;
    justify-content: flex-start;
  }

  .view-nav {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 2px solid var(--border);
    background: var(--section-bg);
  }

  .mobile-bottom-item {
    flex: 0 0 auto;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 7px 12px;
    cursor: pointer;
  }

  .mobile-bottom-item[aria-pressed='true'] {
    background: var(--btn-bg);
  }

  .view-main {
    height: calc(100vh - 56px - 64px);
    padding: 16px 10px 10px;
  }

  .floating-contact {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(82px, calc(env(safe-area-inset-bottom) + 68px));
  }

  .floating-contact-btn {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }

  .floating-contact-menu a {
    width: 42px;
    height: 42px;
    font-size: 0.92rem;
  }

  .view-tab {
    font-size: 0.8rem;
    padding: 7px 10px;
  }

  .section {
    padding: 56px 16px 132px;
  }

  .panel-chrome {
    padding: 10px 12px;
  }

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

  .other-experience-block .card-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 40px;
  }

  .detail-panel {
    width: 100vw;
    max-width: 100vw;
    max-height: 84vh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    position: fixed;
    inset: auto 0 0;
    padding: 18px;
  }

  #detailBody {
    padding: 0 18px 18px;
  }

  .detail-chrome {
    margin: 0 -18px 14px;
    border-radius: 18px 18px 0 0;
  }
}
