:root {
  --primary: #00a0ff;
  --primary-dark: #00629f;
  --on-primary: #ffffff;
  --background: #f9f9f9;
  --on-background: #1b1b1b;
  --surface: #ffffff;
  --surface-container: #f5f5f7;
  --surface-container-low: #f3f3f3;
  --on-surface-variant: #3f4852;
  --outline-variant: #dadada;
  --sidebar-width: 260px;

  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --row-gap: 48px;
  --gutter: 24px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--on-background);
}

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

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--outline-variant);
  padding: var(--margin-desktop) 24px;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar .brand h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 40px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 6px;
  color: var(--on-surface-variant);
  font-size: 15px;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.sidebar nav a:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

.sidebar nav a.active {
  color: var(--primary-dark);
  background: var(--surface-container-low);
  font-weight: 700;
  border-right: 3px solid var(--primary);
}

/* Bottom nav (mobile only) */
.bottom-nav {
  display: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 600;
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

/* Main */
main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.btn {
  height: 52px;
  padding: 0 32px;
  border-radius: 6px;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: scale(1.03); }

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

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

.btn-outline {
  background: transparent;
  color: var(--on-background);
  border: 1px solid var(--on-background);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-bg.active { opacity: 1; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right top;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(249,249,249,0) 0%, rgba(249,249,249,0) 30%, var(--background) 62%, var(--background) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px var(--margin-desktop) var(--row-gap);
}

.work-preview {
  margin-top: 40px;
}

.hero-eyebrow {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero h2 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 700px;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero .actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Rows / shelves */
.shelf {
  padding: var(--row-gap) var(--margin-desktop);
  max-width: 1400px;
  margin: 0 auto;
}

.shelf h3,
.work-preview h3,
.contact-inner h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.row {
  display: flex;
  gap: var(--gutter);
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  cursor: grab;
}

.row.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.row::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 240px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.card-media {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  font-size: 13px;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-tag {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--on-surface-variant);
  margin: 0;
  line-height: 1.5;
}

.about-text {
  max-width: 640px;
  color: var(--on-surface-variant);
  font-size: 17px;
  line-height: 1.7;
}

.about-text p {
  margin: 0 0 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.services-carousel {
  margin: 0 0 16px;
}

.services-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.services-track {
  display: flex;
  transition: transform 0.35s ease;
}

.services-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.services-arrow {
  border: none;
  background: transparent;
  color: var(--on-background);
  font-size: 26px;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
}

.services-arrow:hover {
  color: var(--primary-dark);
}

.services-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.services-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--outline-variant);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.services-dot.active {
  width: 22px;
  background: var(--primary);
}

.service-slide {
  flex: 0 0 100%;
}

.service-slide-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}

.service-package {
  background: var(--surface-container-low);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
}

.service-package-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin: 0 0 8px;
}

.service-package-price {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 4px;
}

.service-package-price span {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

.service-package-detail {
  font-size: 15px;
  color: var(--on-surface-variant);
  margin: 0;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 32px;
  padding: 0;
}

.skills-list li {
  background: var(--surface-container-low);
  color: var(--on-background);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
}

.contact-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin: 16px 0 32px;
}

.contact-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 32px;
}

.contact-social {
  padding-top: 24px;
  border-top: 1px solid var(--outline-variant);
}

.contact-social-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 12px;
}

.contact-social a {
  display: inline-block;
  color: var(--primary-dark);
  font-weight: 600;
  margin-right: 20px;
}

.contact-social a:hover {
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,27,27,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 100;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 8px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--on-background);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#modalClose {
  color: #fff;
}

.modal-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-container-low);
  overflow: hidden;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body { padding: 32px; }

.modal-body h3 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
}

.modal-copy {
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin: 0 0 28px;
}

.modal-copy p {
  margin: 0 0 16px;
}

.modal-copy p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .hero-bg { display: none; }
  .sidebar { display: none; }
  main { margin-left: 0; padding-bottom: 80px; }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--outline-variant);
    justify-content: space-around;
    align-items: center;
    z-index: 50;
  }
  .hero-inner, .shelf { padding-left: var(--margin-mobile); padding-right: var(--margin-mobile); }
  .hero h2 { font-size: 36px; }
  .modal-overlay { padding: 12px; }
  .modal-body { padding: 20px; }
  .modal-close {
    width: 44px;
    height: 44px;
  }
  .btn {
    font-size: 13px;
    min-width: 140px;
    padding: 0 20px;
  }
}
