@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&display=swap");

.portfolio-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  width: min(1180px, calc(100% - 2 * clamp(1.25rem, 4vw, 4rem)));
  margin: 0 auto clamp(1.25rem, 2.5vw, 1.75rem);
  padding: 0;
}

.portfolio-section-head__copy {
  min-width: 0;
  max-width: 38rem;
}

.portfolio-section-head__title {
  margin: 0 0 0.85rem;
  color: #fff;
  font-family: "Urbanist", "Inter", sans-serif;
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.portfolio-section-head__lead {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.55;
}

.portfolio-explore-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 28px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.02) 48%,
      rgba(0, 0, 0, 0.35) 100%
    ),
    rgba(18, 18, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 28px rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-explore-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-explore-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 34px rgba(255, 255, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.4);
}

.portfolio-explore-btn:hover::after {
  opacity: 1;
}

.portfolio-explore-btn svg {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .portfolio-section-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .portfolio-explore-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

.portfolio-hero {
  --background: 0 0% 100%;
  --foreground: 210 14% 17%;
  --primary: 210 14% 17%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 96%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96%;
  --muted-foreground: 184 5% 55%;
  --accent: 239 84% 67%;
  --accent-foreground: 0 0% 100%;
  --border: 0 0% 90%;
  --ring: 239 84% 67%;
  --radius: 0.5rem;
  --font-display: "Instrument Serif", serif;
  --font-body: "Inter", sans-serif;
  --shadow-dashboard: 0 25px 80px -12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.06);

  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  margin: 0 clamp(0.75rem, 2vw, 1.5rem) clamp(2.5rem, 5vw, 4.5rem);
  border: 1px solid hsl(var(--border));
  border-radius: 28px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  isolation: isolate;
}

.portfolio-hero *,
.portfolio-hero *::before,
.portfolio-hero *::after {
  box-sizing: border-box;
}

.portfolio-hero__video,
.portfolio-hero__veil {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.portfolio-hero__video {
  object-fit: cover;
}

.portfolio-hero__veil {
  z-index: -1;
  background: linear-gradient(
    180deg,
    hsl(var(--background) / 0.88) 0%,
    hsl(var(--background) / 0.78) 45%,
    hsl(var(--background) / 0.9) 100%
  );
  backdrop-filter: blur(3px);
}

.portfolio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.portfolio-button:hover {
  transform: translateY(-1px);
}

.portfolio-button--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.portfolio-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: clamp(30px, 5vh, 62px) 24px 0;
}

.portfolio-hero h2 {
  max-width: 650px;
  margin: 0;
  color: hsl(var(--foreground));
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
}

.portfolio-hero h2 em {
  font-style: italic;
  font-weight: 400;
}

.portfolio-hero__subhead {
  max-width: 620px;
  margin: 18px 0 0;
  color: hsl(var(--foreground) / 0.72);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 450;
  line-height: 1.6;
  text-align: center;
  text-wrap: pretty;
}

.portfolio-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.portfolio-button--play {
  width: 44px;
  height: 44px;
  padding: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.portfolio-button--play:hover {
  background: hsl(var(--background) / 0.8);
}

.portfolio-button--play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

[data-portfolio-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.portfolio-dashboard-shell[data-portfolio-reveal] {
  transform: translateY(30px);
}

.portfolio-hero.is-visible [data-portfolio-reveal] {
  animation: portfolio-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--delay) forwards;
}

.portfolio-hero.is-visible .portfolio-dashboard-shell {
  animation-duration: 0.8s;
}

@keyframes portfolio-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-dashboard-shell {
  width: 100%;
  max-width: 1024px;
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  padding: 12px;
  box-shadow: var(--shadow-dashboard);
  backdrop-filter: blur(18px);
}

.portfolio-dashboard {
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 11px;
  user-select: none;
  pointer-events: none;
}

.portfolio-dashboard button {
  font: inherit;
}

.portfolio-dashboard__topbar {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.9fr) 1fr;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid hsl(var(--border));
  padding: 0 14px;
}

.portfolio-dashboard__identity,
.portfolio-dashboard__profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portfolio-dashboard__mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: hsl(var(--foreground));
  color: hsl(var(--primary-foreground));
  font-family: var(--font-display);
  font-size: 15px;
}

.portfolio-dashboard__search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  border-radius: 7px;
  background: hsl(var(--secondary));
  padding: 0 9px;
  color: hsl(var(--muted-foreground));
}

.portfolio-dashboard__search kbd {
  margin-left: auto;
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  background: hsl(var(--background));
  padding: 2px 5px;
  font: inherit;
}

.portfolio-dashboard__profile {
  justify-content: flex-end;
}

.portfolio-dashboard__profile button {
  border: 0;
  border-radius: 999px;
  background: hsl(var(--foreground));
  padding: 7px 12px;
  color: hsl(var(--primary-foreground));
}

.portfolio-dashboard__bell {
  font-size: 16px;
}

.portfolio-dashboard__avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  font-size: 9px;
  font-weight: 600;
}

.portfolio-dashboard__body {
  display: flex;
  min-height: 430px;
}

.portfolio-dashboard__sidebar {
  width: 160px;
  flex: none;
  border-right: 1px solid hsl(var(--border));
  padding: 12px 9px;
}

.portfolio-dashboard__sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-dashboard__sidebar li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border-radius: 6px;
  padding: 0 8px;
  color: hsl(var(--muted-foreground));
}

.portfolio-dashboard__sidebar li.is-active {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-weight: 500;
}

.portfolio-dashboard__sidebar li b,
.portfolio-dashboard__sidebar li i {
  margin-left: auto;
  font-style: normal;
}

.portfolio-dashboard__sidebar li b {
  border-radius: 999px;
  background: hsl(var(--accent) / 0.12);
  padding: 2px 5px;
  color: hsl(var(--accent));
  font-size: 9px;
}

.portfolio-dashboard__sidebar > p {
  margin: 18px 8px 7px;
  color: hsl(var(--muted-foreground));
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-dashboard__main {
  min-width: 0;
  flex: 1;
  background: hsl(var(--secondary) / 0.3);
  padding: 18px;
}

.portfolio-dashboard__welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-dashboard__welcome h3,
.portfolio-transactions h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.portfolio-dashboard__welcome span {
  color: hsl(var(--muted-foreground));
}

.portfolio-dashboard__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.portfolio-dashboard__quick-actions button {
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--background));
  padding: 7px 11px;
  color: hsl(var(--foreground));
  font-size: 10px;
}

.portfolio-dashboard__quick-actions button.is-accent {
  border-color: hsl(var(--accent));
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.portfolio-dashboard__cards {
  display: flex;
  gap: 12px;
}

.portfolio-card {
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--background));
  padding: 14px;
}

.portfolio-dashboard__cards .portfolio-card {
  min-width: 0;
  flex: 1 1 0;
}

.portfolio-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: hsl(var(--muted-foreground));
}

.portfolio-card__heading b {
  color: hsl(var(--accent));
}

.portfolio-balance {
  position: relative;
  overflow: hidden;
  min-height: 170px;
}

.portfolio-balance__amount {
  margin: 12px 0 8px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.portfolio-balance__amount span {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.portfolio-balance__stats {
  display: flex;
  gap: 10px;
  font-size: 9px;
}

.portfolio-balance__stats span {
  color: hsl(var(--muted-foreground));
}

.portfolio-balance__stats strong {
  color: hsl(150 60% 38%);
}

.portfolio-balance__stats b {
  color: hsl(0 65% 56%);
}

.portfolio-chart {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
}

.portfolio-accounts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 8px;
  font-size: 12px;
}

.portfolio-accounts__row span {
  color: hsl(var(--muted-foreground));
}

.portfolio-transactions {
  margin-top: 12px;
  padding-bottom: 7px;
}

.portfolio-transactions table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  text-align: left;
}

.portfolio-transactions th,
.portfolio-transactions td {
  padding: 7px 6px;
}

.portfolio-transactions th {
  color: hsl(var(--muted-foreground));
  font-size: 9px;
  font-weight: 500;
}

.portfolio-transactions td {
  border-top: 1px solid hsl(var(--border));
}

.portfolio-transactions td span {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
}

.portfolio-transactions .is-pending {
  background: hsl(42 100% 92%);
  color: hsl(36 80% 34%);
}

.portfolio-transactions .is-complete {
  background: hsl(145 60% 93%);
  color: hsl(150 58% 32%);
}

@media (min-width: 768px) {
  .portfolio-dashboard-shell {
    padding: 16px;
  }
}

@media (max-width: 767px) {
  .portfolio-hero__content {
    padding-top: 24px;
  }

  .portfolio-dashboard-shell {
    width: calc(100% + 20px);
  }

  .portfolio-dashboard {
    min-width: 700px;
    transform-origin: top left;
  }

  .portfolio-dashboard__sidebar {
    width: 140px;
  }
}

@media (max-height: 820px) and (min-width: 768px) {
  .portfolio-hero__content {
    padding-top: 18px;
  }

  .portfolio-hero__subhead {
    margin-top: 10px;
  }

  .portfolio-hero__actions {
    margin-top: 28px;
  }

  .portfolio-dashboard-shell {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-portfolio-reveal],
  .portfolio-dashboard-shell[data-portfolio-reveal] {
    opacity: 1;
    transform: none;
  }

  .portfolio-hero.is-visible [data-portfolio-reveal] {
    animation: none;
  }
}
