:root {
  --bg: #ffffff;
  --bg-secondary: #f3f4f6;
  --text-primary: #121212;
  --text-secondary: rgba(18, 18, 18, 0.48);
  --text-tertiary: rgba(18, 18, 18, 0.24);
  --muted: rgba(18, 18, 18, 0.045);
  --muted-dark: rgba(18, 18, 18, 0.12);
  --accent: #2196f3;
  --accent-contrast: #ffffff;
  --modal-header-raised-bg: rgba(255, 255, 255, 0.8);
  --modal-header-raised-border: var(--muted-dark);
  --modal-header-raised-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow: 0 0 0 rgba(0, 0, 0, 0);
  --modal-progress: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #242424;
    --bg-secondary: #121212;
    --text-primary: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.32);
    --muted: rgba(255, 255, 255, 0.05);
    --muted-dark: rgba(255, 255, 255, 0.12);
    --accent: #2196f3;
    --accent-contrast: #ffffff;
    --modal-header-raised-bg: rgba(18, 18, 18, 0.85);
    --modal-header-raised-border: rgba(255, 255, 255, 0.16);
    --modal-header-raised-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  }
  
  .experience-modal__header.is-raised {
    background: rgba(18, 18, 18, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.layout {
  min-height: 100vh;
  padding: 16px;
  display: flex;
  gap: 72px;
  overflow: visible;
  align-items: flex-start;
}

.sidebar {
  position: sticky;
  top: 16px;
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
}

.logo-symbol {
  width: 32px;
  height: 32px;
  display: block;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.intro {
  display: flex;
  flex-direction: column;
}

.intro-title {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.72px;
  font-weight: 600;
}

.intro-description {
  margin: 16px 0 32px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  font-weight: 400;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  opacity: 1;
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.85;
}

.btn-primary {
  min-height: 36px;
  padding: 0 16px;
  background: #2196f3;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  min-height: 36px;
  padding: 0 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.section-groups {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-groups__columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.section-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.section-group__title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-group__title-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  color: inherit;
}

.section-title {
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
}

.section-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.section-items span {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  text-decoration: none;
  cursor: default;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-tertiary);
}

.brand-logo {
  display: inline-flex;
  width: auto;
  height: 24px;
  color: inherit;
}

.brand-logo path {
  fill: currentColor;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.footer-id {
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-id:hover,
.footer-id:focus-visible {
  text-decoration: underline;
}

.gallery {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-list {
  flex: 1;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.gallery-cta {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.gallery-cta .btn-secondary {
}

.gallery-cta .btn-icon {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 721px) {
  .gallery-cta {
    padding: 8px 0;
  }

  .gallery-cta .btn-secondary {
    width: 100%;
  }
}

.card {
  position: relative;
  border-radius: 16px;
  width: 100%;
  min-height: clamp(320px, 45vw, 740px);
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.card--with-cover {
  align-items: stretch;
  justify-content: stretch;
}

.card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  text-decoration: none;
  cursor: default;
}

@media (max-width: 900px) {
  .layout {
    gap: 40px;
  }

  .sidebar {
    flex-basis: 310px;
  }
}

@media (max-width: 721px) {
  .layout {
    flex-direction: column;
    gap: 32px;
    height: auto;
  }

  .sidebar {
    position: static;
    flex-basis: auto;
    height: auto;
  }

  .cta {
    gap: 16px;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .section-groups {
    margin-top: 40px;
    gap: 24px;
  }

  .section-group {
    flex: 1 1 0;
    min-width: 0;
  }

  .gallery-list {
    padding-right: 0;
    gap: 8px;
  }

  .card {
    width: 100%;
  }

  .gallery {
    width: 100%;
  }
}

.experience-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.experience-modal.is-visible {
  visibility: visible;
  pointer-events: auto;
}

.experience-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.68);
  opacity: var(--modal-progress);
  transition:
    opacity 0.5s ease,
    backdrop-filter 0.5s ease,
    -webkit-backdrop-filter 0.5s ease;
  backdrop-filter: blur(calc(4px + 20px * var(--modal-progress)));
  -webkit-backdrop-filter: blur(calc(4px + 20px * var(--modal-progress)));
  cursor: pointer;
}

.experience-modal__sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(
    -50%,
    calc(
      (1 - var(--modal-progress)) * 100%
    )
  );
  width: 100vw;
  border-radius: 0;
  background: var(--bg);
  color: var(--text-primary);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  pointer-events: auto;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: none;
  overscroll-behavior: contain;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@supports (height: 100dvh) {
  .experience-modal__sheet {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.experience-modal__sheet::-webkit-scrollbar {
  display: none;
}

.experience-modal.is-dragging .experience-modal__sheet {
  transition: none;
}

.experience-modal__header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 16px 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: 1;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-modal-drag-zone] {
  cursor: grab;
  touch-action: none;
}

.experience-modal.is-dragging [data-modal-drag-zone] {
  cursor: grabbing;
}

.experience-modal__content {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}

.modal-large-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 48px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.modal-large-title h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.experience-modal__sheet.is-condensed .modal-large-title {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
}

.experience-modal__title {
  width: 100%;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  padding: 0 96px 0 16px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
}

.experience-modal__header.is-raised {
  background: var(--modal-header-raised-bg);
  border-bottom-color: var(--modal-header-raised-border);
  box-shadow: var(--modal-header-raised-shadow);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.experience-modal__sheet.is-condensed .experience-modal__title {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.experience-modal__title h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.experience-modal__close {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.experience-modal__close:hover,
.experience-modal__close:focus-visible {
  opacity: 0.85;
}

.experience-modal__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-modal__role {
  padding: 16px 0;
  border-top: 1px solid var(--muted-dark);
}

.experience-modal__role:first-of-type {
  border-top: none;
  padding-top: 0;
}

.experience-modal__role-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.experience-modal__role-company {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.experience-modal__role-period {
  margin: 12px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.experience-modal__role-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

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

.experience-modal__pills li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--muted);
  color: var(--text-primary);
}

.case-modal__sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.case-modal__section-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.case-modal__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-modal__section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
}

.case-modal__section ul {
  padding-left: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0px;
}

.case-modal__section li {
}

.case-modal__media {
  background: var(--bg-secondary);
}

.case-modal__media img {
  width: 100%;
  height: auto;
  display: block;
}

.case-modal__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.case-modal__link:hover,
.case-modal__link:focus-visible {
  text-decoration: underline;
}

.case-modal__full-bleed {
  margin: 0;
}

.case-modal__full-bleed img {
  width: calc(100vw - 32px);
  max-width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  display: block;
  height: auto;
}

.case-modal__separator {
  width: 100%;
  height: 1px;
  background: var(--text-tertiary);
}

@media (max-width: 600px) {
  .experience-modal__sheet {
    width: 100%;
    border-radius: 0;
  }

  .experience-modal__title h2 {
    font-size: 16px;
  }

  .experience-modal__header {
    padding: 16px 0;
  }

  .experience-modal__close {
    right: 16px;
  }

  .experience-modal__content {
    padding: 0 16px calc(32px + env(safe-area-inset-bottom));
  }

  .modal-large-title h2 {
    font-size: 26px;
  }
}

@media (max-width: 1024px) {
  .case-modal__full-bleed img {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}
