/*! PORTFOLIO */
.port-hero {
  padding: 84px 0 52px;
  background: radial-gradient(
      900px 520px at 18% 18%,
      rgba(194, 106, 46, 0.18) 0%,
      rgba(194, 106, 46, 0.08) 50%,
      rgba(194, 106, 46, 0.03) 100%
    ),
    linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.96) 100%);
}

.port-hero-inner {
  text-align: center;
  max-width: 860px;
}

.port-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

.port-title {
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: var(--ink);
}

.port-sub {
  margin: 12px auto 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.port-section {
  padding: 52px 0;
}

.port-section:nth-of-type(even) {
  background: rgba(15, 23, 42, 0.02);
}

.port-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.port-h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 900;
  color: var(--ink);
}

.port-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.port-card {
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.06);

  cursor: pointer;
  padding: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.port-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.port-card-body {
  padding: 14px 14px 16px;
}

.port-card-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.port-card-meta {
  margin: 6px 0 0;
  color: rgba(15, 23, 42, 0.65);
  font-weight: 700;
  font-size: 13px;
}

.port-card:hover {
  transform: translateY(-3px);
  border-color: rgba(194, 106, 46, 0.35);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.12);
}

.port-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(194, 106, 46, 0.18),
    0 24px 60px rgba(2, 6, 23, 0.12);
}

/* Modal */
.port-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.port-modal.is-open {
  display: block;
}

.port-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
}

.port-modal-panel {
  position: relative;
  width: min(980px, calc(100% - 32px));
  margin: 6vh auto 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.35);

  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.port-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 18px;
}

.port-modal-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.port-modal-body {
  padding: 22px 22px 24px;
}

.port-modal-kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

.port-modal-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 900;
  color: var(--ink);
}

.port-modal-meta {
  margin: 8px 0 12px;
  color: rgba(15, 23, 42, 0.7);
  font-weight: 800;
  font-size: 13px;
}

.port-modal-desc {
  margin: 0 0 14px;
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.7;
}

.port-modal-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(15, 23, 42, 0.8);
  font-weight: 700;
}

.port-modal-cta {
  margin-top: 16px;
}

/*! MODAL STYLES AND SCROLL */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

.port-modal-panel {
  max-height: calc(100vh - 48px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.port-modal-close {
  position: sticky;
  top: 10px;
  margin-left: auto;
  z-index: 5;
}

/*! MOBILE */
@media (max-width: 920px) {
  .port-grid {
    grid-template-columns: 1fr;
  }
  .port-card img {
    height: 220px;
  }
  .port-modal-panel {
    grid-template-columns: 1fr;
  }
  .port-modal-media img {
    min-height: 260px;
  }
  .port-modal-panel {
    margin: 16px auto;
    width: calc(100% - 24px);
    max-height: calc(100vh - 32px);
    border-radius: 20px;
  }

  .port-modal-body {
    padding-bottom: 22px;
  }
}
