/* Portfolio — embedded website showcase */

.portfolio {
  position: relative;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgba(247, 119, 55, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #fafafa 0%, #ffffff 48%, #fff9f5 100%);
  border-top: 1px solid rgba(24, 24, 27, 0.06);
  overflow: hidden;
}

.portfolio__inner {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.portfolio__header {
  max-width: 42rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.portfolio__eyebrow {
  margin: 0 0 0.5rem;
  color: #f77737;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio__title {
  margin: 0;
  color: #09090b;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.portfolio__desc {
  margin: 0.85rem 0 0;
  color: #52525b;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.65;
}

.portfolio__footer {
  margin: 1rem 0 0;
}

.portfolio__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.portfolio__cta:hover,
.portfolio__cta:focus-visible {
  color: #1d4ed8;
  outline: none;
}

.portfolio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: start;
}

.portfolio__preview {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.portfolio__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.portfolio__counter {
  min-width: 3.5rem;
  color: #52525b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.portfolio__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #18181b;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.portfolio__arrow svg {
  width: 1rem;
  height: 1rem;
}

.portfolio__arrow:hover:not(:disabled),
.portfolio__arrow:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
  outline: none;
}

.portfolio__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.portfolio__browser {
  --portfolio-accent: #f77737;
  border-radius: 1.25rem;
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #fff;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  overflow: hidden;
}

.portfolio__browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(24, 24, 27, 0.06);
}

.portfolio__browser-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.portfolio__browser-dots span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
}

.portfolio__browser-dots span:nth-child(1) {
  background: #ff5f57;
}

.portfolio__browser-dots span:nth-child(2) {
  background: #febc2e;
}

.portfolio__browser-dots span:nth-child(3) {
  background: #28c840;
}

.portfolio__browser-url {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(24, 24, 27, 0.08);
  color: #52525b;
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio__browser-url::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--portfolio-accent);
  vertical-align: middle;
}

.portfolio__stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

.portfolio__frame {
  display: block;
  border: 0;
  transform-origin: top left;
  pointer-events: auto;
  background: #fff;
}

.portfolio__frame--pdf {
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
}

.portfolio__stage--pdf {
  background: #f8fafc;
}

.portfolio__browser--pdf .portfolio__browser-bar {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
}

.portfolio__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.portfolio__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 24, 27, 0.12);
  background: #fff;
  color: #18181b;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.portfolio__download:hover,
.portfolio__download:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(247, 119, 55, 0.35);
  background: #fff7ed;
  outline: none;
}

.portfolio__embed-note {
  margin: 0.75rem 0 0;
  color: #71717a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.portfolio__embed-note[hidden] {
  display: none;
}

.portfolio__live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.portfolio__live:hover,
.portfolio__live:focus-visible {
  transform: translateY(-2px);
  background: #27272a;
  outline: none;
}

.portfolio__meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.portfolio__meta-category {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(247, 119, 55, 0.1);
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portfolio__meta-kind {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 0.15rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio__meta-title {
  margin: 0;
  color: #09090b;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.portfolio__meta-subtitle {
  margin: 0.35rem 0 0;
  color: #52525b;
  font-size: 0.92rem;
  line-height: 1.55;
}

.portfolio__meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio__meta-tag {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 0.75rem;
  font-weight: 600;
}

.portfolio__solution {
  padding-top: 0.85rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(24, 24, 27, 0.08);
}

.portfolio__solution-title {
  margin: 0 0 0.45rem;
  color: #09090b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.portfolio__solution-text {
  margin: 0;
  color: #52525b;
  font-size: 0.9rem;
  line-height: 1.65;
}

.portfolio--page {
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 0;
  background: #fff;
}

@media (max-width: 960px) {
  .portfolio__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portfolio__browser-bar {
    flex-wrap: wrap;
  }

  .portfolio__browser-url {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio__arrow,
  .portfolio__live {
    transition: none;
  }
}
