/* ==========================================================================
   Home-only styles (loaded on / route)
   ========================================================================== */

/* ==========================================================================
   Layout — home shell and shared home helpers
   ========================================================================== */

.portfolio-wrapper {
  font-family: var(--ifm-font-family-base);
  background-color: var(--port-bg-primary);
  background-image: linear-gradient(180deg, var(--port-bg-layer-top) 0%, var(--port-bg-layer-bottom) 100%);
  color: var(--port-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  transition: background-color var(--port-transition-fast), color var(--port-transition-fast);
}

.portfolio-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, var(--port-gradient-start) 0, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--port-gradient-end)   0, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.portfolio-container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-inline: auto;
  padding-inline: 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.sample-card > * {
  position: relative;
  z-index: 1;
}

.portfolio-h1,
.sample-card h3,
.sample-meta,
.samples-h2 {
  font-family: var(--ifm-font-family-base);
}

.sample-card p,
.welcome-contact-link,
.welcome-text {
  color: var(--port-text-secondary);
}

.sample-card h3,
.welcome-contact-links {
  display: flex;
  align-items: center;
}

.welcome-contact-icon,
.welcome-contact-link {
  display: inline-flex;
  align-items: center;
}

.portfolio-wrapper.home-initial-enter .portfolio-header {
  animation: homeFadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portfolio-wrapper.home-initial-enter .portfolio-content {
  animation: homeFadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

.route-shell--enter-0 .samples-h2,
.route-shell--enter-1 .samples-h2 {
  animation: pageFadeInOnly 400ms ease-out both;
}

.route-shell--enter-0 .sample-card,
.route-shell--enter-1 .sample-card {
  animation: pageFadeInOnly 400ms ease-out both;
  animation-delay: var(--doc-card-enter-delay, 180ms);
}

.route-shell--enter-0 .sample-card:nth-child(1),
.route-shell--enter-1 .sample-card:nth-child(1) {
  --doc-card-enter-delay: 60ms;
}

.route-shell--enter-0 .sample-card:nth-child(2),
.route-shell--enter-1 .sample-card:nth-child(2) {
  --doc-card-enter-delay: 120ms;
}

.route-shell--enter-0 .sample-card:nth-child(3),
.route-shell--enter-1 .sample-card:nth-child(3) {
  --doc-card-enter-delay: 180ms;
}

.route-shell--enter-0 .sample-card:nth-child(n + 4),
.route-shell--enter-1 .sample-card:nth-child(n + 4) {
  --doc-card-enter-delay: 180ms;
}

/* ==========================================================================
   Portfolio Sections — header, welcome bio, contact links, page footer
   ========================================================================== */

/* — Header --------------------------------------------------------------- */
.portfolio-header {
  padding: 3.5rem 0 1.05rem;
}

.portfolio-h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--port-text-primary);
}

/* — Welcome / bio -------------------------------------------------------- */
.welcome-section {
  padding: 0.9rem 0 2.3rem;
}

.welcome-text {
  margin-top: 0;
  margin-bottom: 1.65rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

/* — Contact links -------------------------------------------------------- */
.welcome-contact-links {
  flex-wrap: wrap;
  gap: 1.35rem;
  margin-top: 0;
}

.welcome-contact-link {
  gap: 0.42rem;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1;
  transition:
    color   var(--port-transition-fast),
    opacity var(--port-transition-fast);
}

.welcome-contact-link:hover {
  color: var(--port-accent);
  text-decoration: none;
  opacity: 1;
}

.welcome-contact-link:focus-visible {
  outline: 0;
  color: var(--port-accent);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.welcome-contact-icon {
  justify-content: center;
  width: 1.08rem;
  height: 1.08rem;
  color: currentColor;
  opacity: 0.9;
}

.welcome-contact-icon .email-icon {
  transform: scale(1.12);
  transform-origin: center;
}

/* — Page footer ---------------------------------------------------------- */


/* ==========================================================================
   Cards — sample grid, card layout, meta badge
   ========================================================================== */

/* — Section wrapper ------------------------------------------------------ */
.samples-section {
  padding: 1.35rem 0 5rem;
}

.samples-h2 {
  margin-top: 0;
  margin-bottom: 2.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--port-text-primary);
}

/* — Grid ----------------------------------------------------------------- */
.sample-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* — Card ----------------------------------------------------------------- */
.sample-card {
  --sample-card-padding: 2rem;
  position: relative;
  display: block;
  overflow: hidden;
  padding: var(--sample-card-padding);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(241, 247, 255, 0.74) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(226, 232, 240, 0.5),
    0 6px 16px -16px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

[data-theme='dark'] .sample-card {
  background: linear-gradient(145deg, rgba(9, 24, 38, 0.92) 0%, rgba(8, 20, 33, 0.98) 100%);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, 0.12),
    0 10px 24px -18px rgba(2, 9, 18, 0.75);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* — Card hover ----------------------------------------------------------- */
.sample-card:hover {
  border-color: rgba(61, 125, 210, 0.34);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(235, 245, 255, 0.82) 100%);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(203, 213, 225, 0.45),
    0 8px 18px -14px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(0, 102, 204, 0.1);
}

[data-theme='dark'] .sample-card:hover {
  border-color: rgba(61, 158, 255, 0.22);
  background: linear-gradient(145deg, rgba(11, 30, 47, 0.96) 0%, rgba(8, 22, 35, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(143, 203, 255, 0.16),
    0 16px 30px -18px rgba(1, 8, 16, 0.9),
    0 0 0 1px rgba(61, 158, 255, 0.1);
}

/* — Card internals ------------------------------------------------------- */
.sample-card h3 {
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--port-text-primary);
  transition: color 0.25s ease;
}

.sample-card:hover h3 {
  color: #0f0f0f;
}

[data-theme='dark'] .sample-card:hover h3 {
  color: #ffffff;
}

.sample-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
}

/* — Read-time badge ------------------------------------------------------ */
.sample-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 0.95rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(236, 244, 253, 0.62) 100%);
  color: #556071;
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

[data-theme='dark'] .sample-meta {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.22);
  color: #c6d2e2;
}


/* ==========================================================================
   Glass Card — frosted-glass utility card
   ========================================================================== */

.glass-card:not(.sample-card) {
  background: var(--port-glass-bg);
  border: 1px solid var(--port-glass-border);
  border-radius: 16px;
  box-shadow: var(--port-glass-shadow);
  backdrop-filter: var(--port-glass-filter);
  -webkit-backdrop-filter: var(--port-glass-filter);
  transition:
    transform     var(--port-transition-fast),
    box-shadow    var(--port-transition-fast),
    background    var(--port-transition-fast),
    border-color  var(--port-transition-fast);
}

.glass-card:not(.sample-card):hover {
  transform: translateY(-5px);
  box-shadow: var(--port-glass-shadow-strong);
  background: var(--port-glass-bg-strong);
  border-color: color-mix(in srgb, var(--port-glass-border) 62%, var(--port-accent) 38%);
}

@media (max-width: 1024px) {
  .portfolio-container {
    padding-inline: clamp(2.6rem, 6.5vw, 3.6rem);
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    padding-inline: 1.4rem;
  }

  .portfolio-h1 {
    font-size: 1.8rem;
  }

  .portfolio-header {
    padding: 2.85rem 0 0.95rem;
  }

  .welcome-section {
    padding: 0.75rem 0 1.85rem;
  }

  .welcome-text {
    margin-bottom: 1.35rem;
  }

  .samples-section {
    padding-top: 1.1rem;
  }

  .samples-h2 {
    margin-bottom: 1.9rem;
  }

  .welcome-contact-links {
    gap: 1.1rem;
  }

  .welcome-contact-link {
    font-size: 0.9rem;
  }

  .sample-card {
    --sample-card-padding: 1.6rem;
  }

  .sample-meta {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
  }

  .sample-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
  }
}

@media (min-width: 700px) and (max-width: 1024px) {
  .portfolio-container {
    padding-inline: 2.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-wrapper.home-initial-enter .portfolio-header,
  .portfolio-wrapper.home-initial-enter .portfolio-content,
  .route-shell--enter-0 .samples-h2,
  .route-shell--enter-0 .sample-card,
  .route-shell--enter-1 .samples-h2,
  .route-shell--enter-1 .sample-card {
    transition: none !important;
    animation: none !important;
  }
}
