/* =============================================================
   MOBILE RESPONSIVE — COMPLETE PROFESSIONAL OVERHAUL
   Breakpoints: 1024px (tablet), 768px (mobile), 480px (small)
   Strategy: Fix-first, override conflicts, clean layouts
   ============================================================= */

/* ── 0. GLOBAL: prevent horizontal overflow everywhere ───────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* ── 1. CURSOR: hide on touch devices (no hover = pointless) ── */
@media (hover: none) {
  #cursor-dot,
  #cursor-outline {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* =============================================================
   TABLET  (≤ 1024px)
   ============================================================= */
@media (max-width: 1024px) {

  /* NAV */
  .nav-container { padding: 0 1.5rem; }
  #menu { gap: 1.25rem; }
  .nav-link { font-size: 0.8rem; }

  /* HERO */
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 2rem 4rem;
    gap: 3rem;
    min-height: auto;
  }

  .hero-visual {
    display: none; /* hide floating code widget on tablet */
  }

  .hero-title {
    font-size: clamp(2.8rem, 7vw, 4.5rem) !important;
  }

  /* ABOUT */
  .about-grid {
    grid-template-columns: 280px 1fr;
    gap: 3rem;
  }

  /* SERVICES */
  .about-services {
    grid-template-columns: 1fr 1fr;
  }

  .about-service-item {
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .about-service-item:nth-child(2n) { border-right: none; }
  .about-service-item:nth-child(3),
  .about-service-item:nth-child(4)  { border-bottom: none; }
}

/* =============================================================
   MOBILE  (≤ 768px)
   ============================================================= */
@media (max-width: 768px) {

  /* ─── NAV: hide desktop menu, show hamburger ──────────────── */
  .nav { padding: 1rem 0; }
  .nav-container { padding: 0 1.25rem; }

  #menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(80vw, 300px);
    height: 100dvh;
    background: #0e0e14;
    border-left: 1px solid rgba(255,255,255,0.07);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    padding: 3rem 2rem;
    transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 999;
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  }

  #menu.open { right: 0; }

  .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.875rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #c8c5dc;
    flex-direction: row;
    gap: 0.6rem;
  }

  .nav-link:last-child { border-bottom: none; }
  .nav-link::after { display: none; }
  .nav-index { font-size: 0.7rem; opacity: 0.4; }

  .nav-cta { display: none; } /* resume btn hidden in mobile nav area */
  .mobile-menu-btn { display: flex !important; }

  /* Overlay behind nav drawer */
  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
  }

  /* ─── HERO ────────────────────────────────────────────────── */
  .hero {
    grid-template-columns: 1fr !important;
    padding: 6rem 1.25rem 3rem !important;
    gap: 2rem !important;
    min-height: 100svh;
    align-content: center;
  }

  .hero-visual { display: none !important; }

  .hero-content { gap: 1.25rem; }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.875rem;
  }

  .hero-greeting .greeting-text {
    font-size: 0.95rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 11vw, 3.5rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.03em !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-description {
    font-size: 0.95rem !important;
    max-width: 100% !important;
    line-height: 1.7 !important;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    border-radius: 10px !important;
  }

  .hero-socials { margin-top: 0.5rem; }

  .social-label { font-size: 0.75rem; }

  .social-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  .social-link svg { width: 14px; height: 14px; }
  .social-link span { display: none; } /* icon only on mobile */

  .scroll-indicator { display: none; }

  /* ─── MARQUEE ─────────────────────────────────────────────── */
  .tech-marquee { padding: 1.25rem 0; }
  .marquee-item { font-size: 1rem; gap: 0.5rem; }

  /* ─── ABOUT ───────────────────────────────────────────────── */
  .about-section { padding: 4rem 0 3rem; }
  .about-label   { margin-bottom: 2rem; }

  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }

  .about-photo-wrap {
    aspect-ratio: 4 / 5;
    max-width: 260px;
    margin: 0 auto;
    border-radius: 16px;
  }

  .about-stats {
    max-width: 260px;
    margin: 0 auto;
  }

  .about-stat strong { font-size: 1.4rem; }
  .about-stat span   { font-size: 0.6rem; }

  .about-title {
    font-size: 1.9rem !important;
    line-height: 1.1 !important;
  }

  .about-bio p { font-size: 0.9rem; line-height: 1.8; }

  .about-info-grid { grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }

  .about-services {
    grid-template-columns: 1fr 1fr;
    border-radius: 14px;
  }

  .about-service-item { padding: 1.25rem 1rem; gap: 0.875rem; }
  .about-service-item h4 { font-size: 0.82rem; }
  .about-service-item p  { font-size: 0.75rem; }
  .about-service-icon { width: 34px; height: 34px; font-size: 0.85rem; }

  /* ─── SECTION HEADINGS (general) ─────────────────────────── */
  .sec { padding-top: 6rem; padding-bottom: 6rem; }
  .head { margin-bottom: 2rem; }
  .head h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  /* ─── EXPERIENCE TIMELINE ─────────────────────────────────── */
  .tl {
    padding-left: 1.25rem;
    margin-left: 0.5rem;
  }

  .card.sp.job { padding: 1.25rem; }
  .card.sp.job ul { padding-left: 0.5rem; }
  .card.sp.job li { font-size: 0.85rem; }

  .when { font-size: 0.75rem; }
  .org  { font-size: 0.85rem; }

  /* ─── PROJECTS GRID ───────────────────────────────────────── */
  .pg {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .proj .im { height: 180px; }
  .proj .bd { padding: 1.25rem; }

  /* ─── SKILLS ──────────────────────────────────────────────── */
  .sk ul { margin-top: 1rem; }
  .sk .t { font-size: 0.8rem; }

  /* ─── CONTACT ─────────────────────────────────────────────── */
  #contact .sec-inner,
  .contact-grid,
  .ct-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  /* ─── FOOTER ──────────────────────────────────────────────── */
  .foot,
  footer {
    padding: 2rem 1.25rem;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .foot nav,
  footer nav {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  /* ─── GENERAL CARD PADDING ────────────────────────────────── */
  .card.sp { padding: 1.25rem; border-radius: 14px; }
}

/* =============================================================
   SMALL MOBILE  (≤ 480px)
   ============================================================= */
@media (max-width: 480px) {

  /* Containers */
  .wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Hero */
  .hero { padding: 5.5rem 1rem 2.5rem !important; }

  .hero-title {
    font-size: clamp(2.2rem, 12vw, 3rem) !important;
  }

  .hero-actions {
    flex-direction: column;
  }

  /* About info + services */
  .about-info-grid {
    grid-template-columns: 1fr !important;
    gap: 0.875rem;
  }

  .about-services {
    grid-template-columns: 1fr !important;
  }

  .about-service-item {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  }

  .about-service-item:last-child {
    border-bottom: none !important;
  }

  /* Stats strip */
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  /* Nav drawer full width on very small */
  #menu { width: 100%; }

  /* Projects */
  .proj .im { height: 160px; }

  /* Skills bar label */
  .sk .t span:last-child { font-size: 0.7rem; }
}

/* =============================================================
   MOBILE NAV DRAWER: JS toggle class hook
   ============================================================= */

/* When hamburger is clicked, JS should add .open to #menu */
/* and .nav-open to body — these styles handle the visual state */

/* Hamburger: always visible on mobile */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
}

/* =============================================================
   MISC: prevent transition flicker on load
   ============================================================= */
.preload * {
  transition: none !important;
}

/* -- Mobile Nav: Resume link special style -------------------- */
@media (max-width: 768px) {
  .nav-resume-mobile {
    margin-top: 1rem;
    padding-top: 1.25rem !important;
    border-top: 1px solid rgba(167,139,250,0.2) !important;
    border-bottom: none !important;
    color: #a78bfa !important;
    font-weight: 600 !important;
  }

  .nav-resume-mobile .nav-index {
    color: #a78bfa;
    opacity: 1;
  }
}

/* -- Desktop: hide mobile-only resume link in drawer ----------- */
@media (min-width: 769px) {
  .nav-resume-mobile {
    display: none !important;
  }
}

/* -- Safe area padding for notched phones ---------------------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .hero {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
  footer, .foot {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

/* -- Touch: increase tap target sizes ------------------------- */
@media (hover: none) {
  .nav-link,
  .btn-primary,
  .btn-secondary,
  .btn-resume,
  .social-link,
  .about-cv-btn {
    min-height: 44px;
  }
}

/* =============================================================
   HERO PORTRAIT � Professional Clean Design
   ============================================================= */

/* Hero grid: left content, right portrait */
.hero {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: center;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* -- Portrait container -------------------------------------- */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-portrait {
  position: relative;
  width: 100%;
  max-width: 420px;
}

/* -- Photo frame --------------------------------------------- */
.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  background: #0e0e14;
}

/* Thin accent border */
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  pointer-events: none;
  z-index: 2;
}

/* Left vertical accent line */
.portrait-frame::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: linear-gradient(to bottom, transparent, #a78bfa, transparent);
  z-index: 3;
  border-radius: 0 3px 3px 0;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.5s ease;
  filter: contrast(1.05) brightness(0.95);
}

.portrait-frame:hover .portrait-img {
  transform: scale(1.03);
  filter: contrast(1.02) brightness(1);
}

/* Bottom gradient for name card readability */
.portrait-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(
    to top,
    rgba(8, 8, 12, 0.92) 0%,
    rgba(8, 8, 12, 0.5) 50%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* -- Floating name card (bottom) ----------------------------- */
.portrait-card {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.portrait-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: hero-pulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
}

@keyframes hero-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
  }
  60% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }
}

.portrait-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.portrait-card-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0eeff;
  letter-spacing: -0.01em;
  line-height: 1;
}

.portrait-card-role {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: #6b687e;
  letter-spacing: 0.03em;
}

/* -- Year badge (top right) ---------------------------------- */
.portrait-year {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 10, 14, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.875rem;
  gap: 0.1rem;
}

.portrait-year span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  color: #4a4860;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portrait-year strong {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #c4b5fd;
  line-height: 1;
}

/* -- Scroll indicator ---------------------------------------- */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3e3c4c;
}

.scroll-arrow svg {
  width: 18px;
  height: 18px;
  stroke: #4a4860;
  fill: none;
  stroke-width: 1.5;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(4px); opacity: 1; }
}

/* =============================================================
   RESPONSIVE: Portrait on mobile
   ============================================================= */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 380px;
    gap: 3rem;
  }
  .hero-portrait { max-width: 340px; }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr !important;
    padding: 6rem 1.25rem 4rem !important;
  }

  /* On mobile: show portrait ABOVE content */
  .hero-visual {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .hero-portrait {
    max-width: 220px;
  }

  .portrait-frame {
    aspect-ratio: 3 / 4;
    border-radius: 18px;
  }

  .portrait-frame::before { display: none; }

  .portrait-card {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    gap: 0.6rem;
  }

  .portrait-card-name { font-size: 0.8rem; }
  .portrait-card-role { font-size: 0.65rem; }
  .portrait-card-dot  { width: 6px; height: 6px; }

  .portrait-year {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: 9px;
  }

  .portrait-year strong { font-size: 1rem; }
  .portrait-year span   { font-size: 0.55rem; }

  .scroll-indicator { display: none; }
}

@media (max-width: 480px) {
  .hero-portrait { max-width: 180px; }
}

/* =============================================================
   FIX: Override the earlier hero-visual display:none
   The new portrait design SHOULD show on mobile (order: -1)
   ============================================================= */

/* Desktop: side by side */
@media (min-width: 769px) {
  .hero-visual {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
  }
}

/* Mobile: show portrait above text */
@media (max-width: 768px) {
  .hero-visual {
    display: flex !important;
    order: -1;
    justify-content: center;
  }
}

/* Fix portrait image: shift up so face is fully visible on load */
.portrait-img {
  object-position: center 5% !important;
}

/* Desktop: nudge the hero visual up so image is higher in viewport */
@media (min-width: 769px) {
  .hero {
    align-items: flex-start;
    padding-top: 6rem;
  }

  .hero-visual {
    margin-top: -1rem;
  }

  .hero-portrait {
    max-width: 400px;
  }
}

/* =============================================================
   HERO MOBILE: Center-align everything + professional badge
   ============================================================= */

@media (max-width: 768px) {

  /* Center the whole content column on mobile */
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  /* Badge: remove pill look, use a simple left-line style */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    padding: 0;
    animation: none;
    justify-content: center;
  }

  .hero-badge .status-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .hero-badge span:last-child {
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #4a4860;
    text-transform: uppercase;
  }

  /* Greeting */
  .hero-greeting {
    width: 100%;
  }

  .hero-greeting .greeting-text {
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    color: #4a4860;
    font-style: normal;
  }

  /* Name */
  .hero-title {
    width: 100%;
    text-align: center;
  }

  /* Role subtitle */
  .hero-subtitle {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 1rem !important;
    color: #6b687e !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em;
  }

  /* Description */
  .hero-description {
    width: 100%;
    text-align: center;
    max-width: 340px;
    margin: 0 auto;
  }

  /* Buttons: center them */
  .hero-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Socials */
  .hero-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }

  .social-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3e3c4c;
    text-align: center;
  }

  .social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
  }

  /* Social icon-only pills */
  .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0;
    transition: background 0.25s, border-color 0.25s;
  }

  .social-link:hover {
    background: rgba(167,139,250,0.1);
    border-color: rgba(167,139,250,0.3);
  }

  .social-link svg {
    width: 16px;
    height: 16px;
    fill: #6b687e;
  }

  .social-link span { display: none; }
}

/* Desktop: clean up badge with proper spacing */
@media (min-width: 769px) {
  .hero-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.45rem 1.1rem !important;
    border-radius: 100px !important;
    animation: none !important;
  }

  .hero-badge span:last-child {
    font-family: "DM Sans", sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    text-transform: none !important;
  }

  .hero-badge .status-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }
}

/* =============================================================
   PORTRAIT � PROFESSIONAL UPGRADE (no year badge)
   ============================================================= */

/* Override old portrait styles with cleaner version */
.portrait-frame {
  border-radius: 20px !important;
  overflow: hidden;
  position: relative;
}

:root:not([data-theme="light"]) .portrait-frame {
  background: #0a0a10;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 32px 64px rgba(0,0,0,0.5),
    0 8px 16px rgba(0,0,0,0.3);
}

/* Remove the left accent line */
.portrait-frame::before {
  display: none !important;
}

/* Clean bottom fade */
:root:not([data-theme="light"]) .portrait-overlay {
  height: 55% !important;
  background: linear-gradient(
    to top,
    rgba(6,6,10,0.97) 0%,
    rgba(6,6,10,0.6) 40%,
    transparent 100%
  ) !important;
}

/* Name card: cleaner, more polished */
.portrait-card {
  bottom: 1.25rem !important;
  left: 1.25rem !important;
  right: auto !important;
  width: calc(100% - 2.5rem);
  gap: 0.625rem !important;
  align-items: flex-start;
}

.portrait-card-dot {
  margin-top: 0.35rem;
}

:root:not([data-theme="light"]) .portrait-card-name {
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  color: #ffffff !important;
  line-height: 1.15 !important;
}

.portrait-card-role {
  font-size: 0.7rem !important;
  color: #6b687e !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
}

/* Add a thin horizontal rule above the name card for polish */
.portrait-card::before {
  content: '';
  position: absolute;
  top: -0.875rem;
  left: 0;
  width: 32px;
  height: 1px;
  background: rgba(167,139,250,0.4);
}

/* Remove the portrait-year element globally */
.portrait-year { display: none !important; }

/* Subtle corner tag: "Flutter � Next.js" instead of year */
.portrait-stack-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.portrait-stack-tag span {
  display: inline-block;
  background: rgba(10,10,14,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b687e;
  padding: 0.25rem 0.5rem;
}

/* Image: position for best face visibility */
.portrait-img {
  object-position: center 8% !important;
  filter: contrast(1.04) brightness(0.96) saturate(0.95) !important;
}

.portrait-frame:hover .portrait-img {
  filter: contrast(1.01) brightness(1) saturate(1) !important;
}

/* Mobile: scale down nicely */
@media (max-width: 768px) {
  .portrait-card {
    bottom: 0.875rem !important;
    left: 0.875rem !important;
    width: calc(100% - 1.75rem);
  }

  .portrait-card-name { font-size: 0.85rem !important; }
  .portrait-card-role { font-size: 0.6rem !important; }
}
