/* ===== Design tokens ===== */
:root {
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --text-main: #111111;
  --text-secondary: #5f6368;
  --border: #e8e8e8;
  --accent-green: #52e08a;
  --tint-green: #eef8f2;
  --accent-blue: #58cff2;
  --tint-blue: #eef8fc;
  --accent-purple: #c98bff;
  --tint-purple: #f7f1fc;
  --btn-bg: #000000;
  --btn-text: #ffffff;
  --status-available: #33c759;
  --sidebar-width: 248px;
  --shell-gap: 28px;
  --shell-pad: 22px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Layout ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: calc(var(--sidebar-width) + var(--shell-pad) + var(--shell-gap));
  padding: var(--shell-pad) var(--shell-pad) var(--shell-pad) 0;
  max-width: 960px;
}

/* ===== Sidebar (bento card) ===== */
.sidebar {
  position: fixed;
  top: var(--shell-pad);
  left: var(--shell-pad);
  width: var(--sidebar-width);
  height: calc(100vh - var(--shell-pad) * 2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.1rem;
  z-index: 100;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  flex-shrink: 0;
  background: var(--bg-page);
}

.sidebar-profile-text {
  min-width: 0;
}

.sidebar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-available);
  flex-shrink: 0;
}

/* Nav */
.sidebar-nav {
  list-style: none;
  flex: 1;
  padding: 0.5rem 0;
}

.sidebar-nav li {
  margin-bottom: 0.1rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.sidebar-nav a span:not(.nav-active-dot) {
  flex: 1;
}

.sidebar-nav a:hover {
  color: var(--text-main);
  background: var(--bg-page);
}

.sidebar-nav a.active {
  color: var(--text-main);
  font-weight: 600;
  background: transparent;
}

.sidebar-nav a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-main);
  flex-shrink: 0;
}

/* Sidebar quick links (bottom) */
.sidebar-quick {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-quick-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.sidebar-quick-link:hover {
  color: var(--text-main);
  background: var(--bg-page);
}

.sidebar-quick-link svg {
  flex-shrink: 0;
}

/* Page quick buttons (contact etc.) */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  transition: var(--transition);
}

.quick-btn:hover {
  background: var(--bg-page);
}

.quick-btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

.quick-btn--primary:hover {
  background: #222;
  border-color: #222;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-page);
  color: var(--text-main);
  cursor: pointer;
}

.sidebar-close svg {
  width: 20px;
  height: 20px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}

/* ===== Typography & sections ===== */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.page-more-links {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.page-more-links a {
  font-weight: 600;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
}

.section-title .see-all:hover {
  background: var(--bg-page);
  color: var(--text-main);
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card-grid--2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ===== Home hero ===== */
.hero {
  margin-bottom: 2.5rem;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 200px;
}

.hero-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill--tint {
  background: var(--tint-green);
  border-color: transparent;
}

.btn-book {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-book:hover {
  background: #222;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 640px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* Page top bar (About, Stack, Contact) */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.page-top h1,
.page-top .section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-top--compact {
  margin-bottom: 1rem;
}

.page-top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.page-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 720px;
  margin-bottom: 1.75rem;
}

.text-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.text-link:hover {
  color: var(--text-main);
}

/* Service cards — fixed height, slide-up reveal */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.service-card {
  position: relative;
  height: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.service-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

.service-card.is-open {
  border-color: #d0d0d0;
}

.service-card__toggle {
  width: 100%;
  height: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  padding: 1.25rem;
  position: relative;
}

.service-card__glow {
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.service-card.is-open .service-card__glow {
  opacity: 0.85;
}

.service-card--green .service-card__glow {
  background: radial-gradient(circle, var(--tint-green) 0%, transparent 70%);
}

.service-card--blue .service-card__glow {
  background: radial-gradient(circle, var(--tint-blue) 0%, transparent 70%);
}

.service-card--purple .service-card__glow {
  background: radial-gradient(circle, var(--tint-purple) 0%, transparent 70%);
}

.service-card__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.service-card__top {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.is-open .service-card__top {
  flex: 0 0 auto;
  justify-content: flex-start;
}

.service-card__icon {
  margin-bottom: auto;
  transition: margin 0.4s ease, opacity 0.35s ease;
}

.service-card__icon svg {
  width: 52px;
  height: 52px;
  transition: width 0.4s ease, height 0.4s ease;
}

.service-card.is-open .service-card__icon {
  margin-bottom: 0.4rem;
}

.service-card.is-open .service-card__icon svg {
  width: 40px;
  height: 40px;
}

.service-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.service-card__head h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.service-card__chevron {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card__chevron svg {
  width: 18px;
  height: 18px;
}

.service-card.is-open .service-card__chevron {
  transform: rotate(180deg);
}

.service-card__body {
  flex: 0 0 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  border-top: 1px solid transparent;
  pointer-events: none;
  transition:
    opacity 0.4s ease 0.06s,
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    border-color 0.35s ease;
}

.service-card__body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.service-card.is-open .service-card__body {
  flex: 1 1 auto;
  max-height: 7.5rem;
  opacity: 1;
  padding-top: 0.7rem;
  margin-top: 0.15rem;
  border-top-color: var(--border);
  pointer-events: auto;
}

/* Hero enhanced */
.hero--enhanced {
  margin-bottom: 2.5rem;
}

.hero-banner {
  padding: 1.75rem 1.85rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--tint-green) 120%);
}

.hero-banner__top {
  margin-bottom: 0.75rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.hero-banner__intro {
  margin-bottom: 1.25rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-stat--link {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  margin: -0.35rem -0.5rem;
  transition: var(--transition);
}

.hero-stat--link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.hero-stat--link:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.block-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.block-label__hint {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.home-about__links {
  display: flex;
  gap: 1rem;
}

/* About grid (2x2) */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.about-grid--preview {
  grid-template-columns: repeat(2, 1fr);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.about-card__icon {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.about-card__icon svg {
  width: 22px;
  height: 22px;
}

.about-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.about-card__head h3 {
  margin-bottom: 0;
}

/* Timeline list inside about cards */
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  border-left: 1px solid var(--border);
}

.timeline-list__item {
  position: relative;
  padding: 0 0 1.1rem 0.85rem;
}

.timeline-list__item:last-child {
  padding-bottom: 0;
}

.timeline-list__item::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.35rem;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-secondary);
}

.timeline-list__title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.timeline-list__date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-list__item.hidden-item {
  display: none;
}

.modal-timeline .timeline-list__item {
  display: block;
  padding-bottom: 1rem;
}

.home-about {
  margin-top: 2rem;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hidden,
.hidden-item,
.is-hidden {
  display: none !important;
}

/* Pill switch (segmented control) */
.pill-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 100%;
}

.pill-switch--wide {
  display: flex;
  width: fit-content;
  flex-wrap: nowrap;
}

.pill-switch--compact .pill-switch__btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.pill-switch__indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--btn-bg);
  border-radius: 999px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}

.pill-switch__btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.pill-switch__btn.is-active {
  color: var(--btn-text);
  font-weight: 600;
}

.pill-switch__btn:not(.is-active):hover {
  color: var(--text-main);
}

.tab-panels {
  min-height: 120px;
}

.tab-panel {
  animation: tabFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Interactive about cards */
.about-card--interactive .about-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.about-card--interactive .about-card__row h3 {
  margin-bottom: 0;
}

.about-card__toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-page);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.about-card__toggle:hover {
  background: var(--text-main);
  color: var(--btn-text);
  border-color: var(--text-main);
}

.about-card__more {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.25s ease;
}

.about-card__more p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-top: 0;
}

.about-card.is-expanded .about-card__more {
  max-height: 100px;
  opacity: 1;
  margin-top: 0.75rem;
}

.about-card.is-expanded .about-card__toggle {
  transform: rotate(45deg);
}

.about-card__teaser {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.link-btn {
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

/* Filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip.is-active,
.filter-chip:hover {
  background: var(--text-main);
  color: var(--btn-text);
  border-color: var(--text-main);
}

/* Alternating centered timeline */
.timeline-alt {
  position: relative;
  padding: 2.5rem 1.25rem 2rem;
  max-width: 720px;
  margin: 0 auto;
  overflow: visible;
}

.timeline-alt__rail {
  position: absolute;
  left: 50%;
  top: 2rem;
  bottom: 2rem;
  width: 3px;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

.timeline-alt__line {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 4px;
}

.timeline-alt__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #111111 0%, #5f6368 100%);
  border-radius: 4px;
  transition: height 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: height;
}

.timeline-alt__list {
  position: relative;
  z-index: 2;
}

.timeline-alt__step {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem 1rem;
  align-items: center;
  margin-bottom: 2.25rem;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--step-i, 0) * 0.05s);
}

.timeline-alt__step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-alt__step--left .timeline-alt__card {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.timeline-alt__step--left .timeline-alt__node {
  grid-column: 2;
}

.timeline-alt__step--right .timeline-alt__card {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}

.timeline-alt__step--right .timeline-alt__node {
  grid-column: 2;
}

.timeline-alt__card {
  max-width: 280px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.timeline-alt__step.is-visible .timeline-alt__card {
  border-color: #e0e0e0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.timeline-alt__step--left.is-visible .timeline-alt__card {
  transform: translateX(-4px);
}

.timeline-alt__step--right.is-visible .timeline-alt__card {
  transform: translateX(4px);
}

.timeline-alt__badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.timeline-alt__step--left .timeline-alt__badge {
  float: right;
}

.timeline-alt__card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  clear: both;
}

.timeline-alt__meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.timeline-alt__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.timeline-alt__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  z-index: 3;
}

.timeline-alt__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border);
  transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s ease;
}

.timeline-alt__step.is-visible .timeline-alt__dot {
  border-color: var(--text-main);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
  transform: scale(1.06);
}

.timeline-alt__year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .timeline-alt__step {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .timeline-alt__step--left .timeline-alt__card,
  .timeline-alt__step--right .timeline-alt__card {
    grid-column: 2;
    justify-self: stretch;
    text-align: left;
    max-width: none;
  }

  .timeline-alt__step--left .timeline-alt__node,
  .timeline-alt__step--right .timeline-alt__node {
    grid-column: 1;
    grid-row: 1;
  }

  .timeline-alt__rail {
    left: 7px;
    transform: none;
  }

  .timeline-alt__step--left .timeline-alt__badge {
    float: none;
  }
}

/* Certificate image grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cert-card-img {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  padding: 0;
  text-align: left;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.cert-card-img:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cert-card-img__view {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.cert-card-img__live {
  margin: 0 0.75rem 0.75rem;
  align-self: flex-start;
}

.cert-card-img img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.cert-card-img__info {
  padding: 0.85rem 1rem;
}

.cert-card-img__info strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.cert-card-img__info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cert-lightbox__img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

.cert-lightbox__meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Interactive projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card-interactive {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.project-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.project-card-interactive__img {
  height: 160px;
  overflow: hidden;
  background: var(--bg-page);
}

.project-card-interactive__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-card-interactive__body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.project-card-interactive__body h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.project-card-interactive__body > p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.project-modal__img {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  object-fit: cover;
  object-position: top center;
}

.project-modal__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-open-live,
.card-open-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.card-open-live {
  margin-top: 0.85rem;
}

.btn-open-live:hover,
.card-open-live:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-open-live--secondary {
  background: transparent;
  color: var(--text-primary);
}

.btn-open-live--secondary:hover {
  background: var(--bg-page);
}

.timeline-list__item--live {
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.link-open-live {
  flex: 1 0 100%;
  width: fit-content;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
}

.link-open-live:hover {
  opacity: 0.75;
}

.modal--wide {
  max-width: 720px;
}

.testimonial--interactive {
  transition: var(--transition);
}

.testimonial--interactive:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

/* Testimonials carousel — 2 cards visible */
.testimonials-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonials-carousel__viewport {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius);
}

.testimonials-carousel__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonials-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0.15rem;
  box-sizing: border-box;
}

.testimonials-carousel__slide .testimonial {
  height: 100%;
  margin: 0;
}

.testimonials-carousel__nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

.testimonials-carousel__nav:hover:not(:disabled) {
  background: var(--text-main);
  color: var(--btn-text);
  border-color: var(--text-main);
}

.testimonials-carousel__nav svg {
  width: 18px;
  height: 18px;
}

.testimonials-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.testimonials-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.testimonials-carousel__dot.is-active {
  background: var(--text-main);
  transform: scale(1.15);
}

@media (max-width: 700px) {
  .testimonials-carousel__slide {
    grid-template-columns: 1fr;
  }
}

/* Stack page — accordion */
.stack-panel {
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
}

.stack-panel__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.stack-panel__head h2 {
  font-size: 0.95rem;
  font-weight: 700;
}

.stack-panel__chevron {
  transition: transform 0.25s ease;
  color: var(--text-secondary);
}

.stack-panel__chevron svg {
  width: 20px;
  height: 20px;
}

.stack-panel.is-open .stack-panel__chevron {
  transform: rotate(180deg);
}

.stack-panel__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack-panel.is-open .stack-panel__body {
  grid-template-rows: 1fr;
}

.stack-panel__inner {
  overflow: hidden;
}

.stack-panel__inner .stack-tools-grid {
  padding: 0 1.5rem 1.5rem;
}

.stack-panel__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.stack-tool {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin: -0.5rem;
  transition: background var(--transition);
}

.stack-tool:hover {
  background: var(--bg-page);
}

.stack-tool__chevron {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  transition: transform 0.2s ease;
}

.stack-tool__detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  padding-left: calc(52px + 0.85rem);
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, margin 0.35s ease;
}

.stack-tool.is-open .stack-tool__detail {
  max-height: 120px;
  opacity: 1;
  margin-top: 0.35rem;
}

.stack-tool.is-open .stack-tool__chevron {
  transform: rotate(45deg);
}

.stack-panel__head {
  transition: background 0.2s ease;
}

.stack-panel__head:hover {
  background: var(--bg-page);
}

.stack-panel {
  transition: box-shadow 0.3s ease;
}

.stack-panel.is-open {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stack-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2rem;
}

.stack-tool__row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.stack-tool__icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.stack-tool__icon--framer { color: #111; }
.stack-tool__icon--figma { color: #a259ff; }
.stack-tool__icon--ps { color: #31a8ff; }
.stack-tool__icon--canva { color: #00c4cc; }
.stack-tool__icon--js { color: #f7df1e; background: #3a3a3a; color: #f7df1e; }
.stack-tool__icon--react { color: #61dafb; }

.stack-tool h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.stack-tool p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 0;
}

/* Contact page */
.contact-page .page-top {
  align-items: flex-start;
}

.contact-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.contact-quick-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.contact-quick-card--wide {
  grid-column: 1 / -1;
}

.contact-quick-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.contact-quick-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-quick-card__icon svg {
  width: 22px;
  height: 22px;
}

.contact-quick-card__icon--email svg { stroke: var(--text-secondary); }
.contact-quick-card__icon--call svg { stroke: #e8b923; }

.contact-quick-card__label {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}

.contact-quick-card__arrow {
  margin-left: auto;
  color: var(--text-secondary);
  opacity: 0.5;
}

.contact-quick-card__arrow svg {
  width: 16px;
  height: 16px;
}

.contact-form-card {
  padding: 1.5rem 1.75rem 1.75rem;
}

.contact-form-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form .form-field {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: #f3f3f3;
  color: var(--text-main);
  transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #9aa0a6;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--border);
  background: #fafafa;
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.form-agree-row {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  cursor: pointer;
  width: 100%;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0.1rem 0 0 0;
  accent-color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox__text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.form-checkbox__text a {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-checkbox__text a:hover {
  color: #333;
}

.form-agree-row.has-error {
  border-color: #e53935;
  background: #fff5f5;
}

.contact-form .form-field {
  margin-bottom: 0;
}

.contact-form .form-field--full {
  margin-bottom: 1rem;
}

.legal-page h1 {
  font-size: 1.75rem;
  margin: 1rem 0 0.5rem;
}

.legal-content h2 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

.legal-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.btn-send-full {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-send-full:hover {
  background: #222;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--text-main);
  margin-left: -1px;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.timeline-item .meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== Education & experience lists ===== */
.list-entry {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.list-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.list-entry:first-child {
  padding-top: 0;
}

.list-entry__date {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 110px;
}

.list-entry__body h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.list-entry__body .subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.list-entry__body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== Tech stack ===== */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stack-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

.stack-tag.hidden-item {
  display: none;
}

.stack-tag.visible-all {
  display: inline-flex;
}

/* ===== Certificates ===== */
.cert-card {
  text-align: center;
  padding: 1rem;
}

.cert-card.hidden-item {
  display: none;
}

.cert-card.visible-all {
  display: block;
}

.cert-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  background: var(--tint-purple);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cert-card h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cert-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== Testimonials ===== */
.testimonial {
  position: relative;
  padding-top: 0.5rem;
}

.testimonial::before {
  content: "\201C";
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-purple);
  opacity: 0.4;
  position: absolute;
  top: -0.5rem;
  left: 0;
}

.testimonial blockquote {
  font-size: 0.95rem;
  color: var(--text-main);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  padding-left: 1.5rem;
}

.testimonial cite strong {
  display: block;
}

.testimonial cite span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ===== Projects ===== */
.project-card {
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.project-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--tint-green), var(--tint-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: -1.25rem -1.5rem 1rem;
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tags span {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-page);
  border-radius: 4px;
  color: var(--text-secondary);
}

.project-links {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Blog ===== */
.blog-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.blog-date {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-page);
  border-radius: 8px;
  min-width: 56px;
}

.blog-date .day {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.blog-date .month {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.blog-card h3 a:hover {
  text-decoration: underline;
}

.blog-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.contact-info-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: var(--bg-page);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text-main);
  background: var(--bg-card);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: #222;
}

.about-section {
  margin-bottom: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* ===== Modal (expanded view) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.15rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-page);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border);
}

.modal-body.stack-grid {
  gap: 0.75rem;
}

.modal-body.card-grid .cert-card {
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .service-cards {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .about-grid--preview {
    grid-template-columns: 1fr;
  }

  .stack-tools-grid {
    grid-template-columns: 1fr;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --shell-pad: 14px;
    --shell-gap: 0;
  }

  .menu-toggle {
    display: flex;
  }

  body.nav-open .menu-toggle {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-close {
    display: flex;
  }

  .sidebar {
    top: 0;
    left: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .sidebar-profile {
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .sidebar-nav li {
    margin-bottom: 0;
  }

  .sidebar-nav a {
    padding: 0.42rem 0.5rem;
    font-size: 0.84rem;
  }

  .sidebar-quick {
    flex-shrink: 0;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    gap: 0;
  }

  .sidebar-quick-link {
    padding: 0.38rem 0.5rem;
    font-size: 0.8rem;
  }

  .main-content {
    margin-left: 0;
    padding: 3.75rem var(--shell-pad) 2rem;
    max-width: none;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }

  .service-card {
    height: auto;
    min-height: 200px;
  }

  .hero-top {
    flex-direction: column;
  }

  .hero-top-actions {
    width: 100%;
  }
}
