/* ===========================
   Portfolio - Custom Styles
   =========================== */

/* ---------- Font Faces ---------- */
/* Fonts loaded via <link> tags in <head> for faster discovery by browser preload scanner. */


/* ---------- Custom Properties ---------- */
:root {
  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Fluid type scale */
  --text-h1: clamp(2rem, 3vw + 1rem, 3rem);
  --text-h2: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  --text-h3: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  --text-body: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);

  /* Smooth expand/collapse for <details> */
  interpolate-size: allow-keywords;
}

/* Aspect ratio helper */
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* ---------- Base Styles ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
}

h1 { font-size: var(--text-h1); line-height: 1.1; }
h2 { font-size: var(--text-h2); line-height: 1.2; }
h3 { font-size: var(--text-h3); line-height: 1.3; }

/* ---------- Collapsible Card Animation ---------- */
details .details-content {
  overflow: hidden;
  block-size: 0;
  transition: block-size 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

details[open] .details-content {
  block-size: auto;
  opacity: 1;
}

/* Summary marker removal */
details summary {
  list-style: none;
  cursor: pointer;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::marker {
  display: none;
  content: '';
}

/* Chevron rotation */
details summary .chevron-icon {
  transition: transform 0.3s ease;
}

details[open] summary .chevron-icon {
  transform: rotate(180deg);
}

/* ---------- Dark Mode Transition ---------- */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- Navigation Active Indicator ---------- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Light mode indicator */
.nav-link:hover::after,
.nav-link.active::after {
  background-color: #F97316; /* orange-500 */
}

/* Dark mode indicator */
.dark .nav-link:hover::after,
.dark .nav-link.active::after {
  background-color: #FB923C; /* orange-400 */
}

/* ---------- Skill Badge ---------- */
.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ---------- Avatar Placeholder ---------- */
.avatar-placeholder {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  user-select: none;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
