/* ==========================================================================
   MINIMALIST MONOCHROME PORTFOLIO
   High-contrast, responsive, ultra-fast typography & modal system
   ========================================================================== */

:root {
  --color-bg: #f6f3ea;
  --color-surface: #ede8dc;
  --color-surface-hover: #e3dccf;
  --color-border: #ded7c6;
  --color-border-dark: #121214;
  
  --color-text-primary: #121214;
  --color-text-secondary: #4a463e;
  --color-text-muted: #7d786d;
  
  --color-btn-bg: #000000;
  --color-btn-text: #ffffff;
  --color-btn-hover-bg: #222222;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Charter', 'Bitstream Charter', 'Sitka Text', 'Cambria', Georgia, serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --shadow-subtle: 0 4px 20px rgba(45, 40, 30, 0.05);
  --shadow-modal: 0 24px 60px rgba(45, 40, 30, 0.18), 0 4px 16px rgba(45, 40, 30, 0.08);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #f6f3ea;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.5) 0%, rgba(240, 235, 222, 0.75) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--color-text-primary);
  line-height: 1.6;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem);
  overflow-x: hidden;
}

/* Lock scroll when modal is active */
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.75;
}

.inline-link {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.inline-link:hover {
  opacity: 0.65;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  color: var(--color-text-primary);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.page-wrapper {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - clamp(2.5rem, 8vw, 6rem));
  justify-content: space-between;
  gap: clamp(2.5rem, 6vh, 5rem);
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.brand-identity {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.brand-meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #000000;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.36rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: #121214;
  background-image: 
    radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #242427 0%, #151518 45%, #0b0b0d 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 
    inset 0 1px 0.8px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.85),
    0 1.8px 0 0 #050506,
    0 3px 8px -1px rgba(0, 0, 0, 0.24),
    0 8px 16px -2px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1.5px);
  box-shadow: 
    inset 0 1px 1.2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 2.5px 0 0 #050506,
    0 5px 12px -1px rgba(0, 0, 0, 0.3),
    0 12px 22px -3px rgba(0, 0, 0, 0.16);
  opacity: 1;
}

.nav-link:active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 1.5px 4px 0 rgba(0, 0, 0, 0.85),
    0 1px 0 0 rgba(255, 255, 255, 0.7),
    0 0.8px 0 0 #050506,
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

/* ==========================================================================
   MAIN HERO & SUMMARY SECTION
   ========================================================================== */

.hero-section {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vh, 3rem);
  padding: clamp(1.5rem, 4vh, 3.5rem) 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 880px;
}

.hero-tagline {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.hero-summary {
  font-size: clamp(1.85rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--color-text-primary);
}

.hero-bio {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 760px;
}

/* ==========================================================================
   INTERACTIVE BUTTONS (EXPANDERS / MODAL TRIGGERS)
   Black background, white text, high contrast
   ========================================================================== */

.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-interactive {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background-color: #121214;
  background-image: 
    radial-gradient(ellipse at 50% -15%, rgba(255, 255, 255, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, #232326 0%, #151518 45%, #0b0b0d 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  color: #ffffff;
  padding: 0.58rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    /* Top chamfer / ambient overhead highlight */
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0.5px 0 0 rgba(255, 255, 255, 0.5),
    /* Bottom inner shadow for physical cushion */
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.8),
    /* Physical 3D thickness / bottom edge */
    0 1px 0 0 rgba(255, 255, 255, 0.85),
    0 2.2px 0 0 #050506,
    /* Soft layered ambient elevation popping off the textured page */
    0 4px 10px -2px rgba(0, 0, 0, 0.28),
    0 10px 22px -4px rgba(0, 0, 0, 0.18),
    0 20px 38px -8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
}

.btn-interactive:hover {
  background-image: 
    radial-gradient(ellipse at 50% -15%, rgba(255, 255, 255, 0.25) 0%, transparent 70%),
    linear-gradient(180deg, #2b2b30 0%, #19191d 45%, #0e0e11 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px) scale(1.008);
  box-shadow: 
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.48),
    inset 0 0.5px 0 0 rgba(255, 255, 255, 0.65),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.8),
    0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 3px 0 0 #050506,
    0 7px 16px -2px rgba(0, 0, 0, 0.34),
    0 16px 32px -4px rgba(0, 0, 0, 0.24),
    0 28px 48px -10px rgba(0, 0, 0, 0.14);
}

.btn-interactive:active {
  transform: translateY(1.5px) scale(0.995);
  box-shadow: 
    inset 0 2px 5px 0 rgba(0, 0, 0, 0.85),
    inset 0 -0.5px 0 0 rgba(255, 255, 255, 0.2),
    0 1px 0 0 rgba(255, 255, 255, 0.7),
    0 1px 0 0 #050506,
    0 3px 8px rgba(0, 0, 0, 0.25);
}

.btn-interactive:focus-visible {
  outline: 3px solid #111113;
  outline-offset: 4px;
}

.btn-label-group {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.52rem;
  border-radius: var(--radius-pill);
  background-color: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-interactive:hover .btn-badge {
  background-color: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-icon {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-interactive:hover .btn-icon {
  transform: translateX(4px);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   MODAL / POPUP OVERLAY SYSTEM
   Fast, accessible, mobile-drawer & desktop dialog
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
  padding: 1rem;
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 24px 64px rgba(0, 0, 0, 0.22), 
    0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.96) translateY(12px);
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.modal-backdrop.is-active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  flex-shrink: 0;
  padding: 1.5rem 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.modal-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background-color: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #121214;
  background-image: 
    radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.2) 0%, transparent 70%),
    linear-gradient(180deg, #242427 0%, #151518 45%, #0b0b0d 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 1px 0.8px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.85),
    0 1.8px 0 0 #050506,
    0 3px 8px -1px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.modal-close-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1.5px) rotate(90deg);
  box-shadow: 
    inset 0 1px 1.2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 2.4px 0 0 #050506,
    0 5px 12px -1px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.modal-close-btn:active {
  transform: translateY(1px) rotate(90deg);
  box-shadow: 
    inset 0 1.5px 4px 0 rgba(0, 0, 0, 0.85),
    0 1px 0 0 rgba(255, 255, 255, 0.7),
    0 0.8px 0 0 #050506,
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-close-btn svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

/* Filter controls inside modal */
.modal-filters {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.modal-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.3rem 0.76rem;
  min-height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
  color: var(--color-text-secondary);
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.95),
    0 1.2px 0 0 rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.filter-btn:hover {
  border-color: rgba(0, 0, 0, 0.32);
  color: var(--color-text-primary);
  transform: translateY(-1px);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 1),
    0 1.8px 0 0 rgba(0, 0, 0, 0.12),
    0 3px 6px rgba(0, 0, 0, 0.06);
}

.filter-btn.active {
  background-color: #121214;
  background-image: 
    radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #242427 0%, #151518 45%, #0b0b0d 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 
    inset 0 1px 0.8px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.85),
    0 1.8px 0 0 #050506,
    0 3px 8px -1px rgba(0, 0, 0, 0.22);
}

.filter-btn.active:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1.2px);
  box-shadow: 
    inset 0 1px 1.2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 2.2px 0 0 #050506,
    0 5px 10px -1px rgba(0, 0, 0, 0.26);
}

.filter-btn:active {
  transform: translateY(1px);
}

/* Modal Body / Scrollable Content */
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Custom Minimal Scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #d8d8d8;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #adadad;
}

/* ==========================================================================
   EXPANDABLE LIST ITEMS
   ========================================================================== */

.item-card {
  padding: 1.45rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: #fcfbf7;
  box-shadow: 0 1px 3px rgba(45, 40, 30, 0.04), 0 4px 12px rgba(45, 40, 30, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.item-card:hover {
  border-color: #000000;
  box-shadow: 0 4px 18px rgba(45, 40, 30, 0.09);
}

.item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.item-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.item-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.item-meta-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.item-gpa-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  box-shadow: 0 1px 2px rgba(45, 40, 30, 0.04);
}

.item-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.item-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: -0.25rem;
}

.item-specialization-sep {
  color: var(--color-text-muted);
  margin: 0 0.25rem;
}

.item-specialization {
  font-weight: 600;
  color: var(--color-text-primary);
}

.item-academic-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

.item-academic-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.item-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.item-field-value {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.item-field-value a.inline-link {
  color: var(--color-text-primary);
  font-weight: 600;
}

.item-thesis-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-top: 0.15rem;
}

.item-thesis-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
}

.item-thesis-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-primary);
  font-style: italic;
  text-align: center;
  max-width: 92%;
}

.item-thesis-summary {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.62;
  color: #3e3a35;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  width: 100%;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--color-border);
}

.item-thesis-summary strong {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--color-text-primary);
}

.item-thesis-action {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

/* Coursework Badges - visually distinct from tech tags */
.item-coursework-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--color-border);
}

.item-coursework-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.item-coursework-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.item-course-badge {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  color: #272420;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  box-shadow: 0 1px 2px rgba(45, 40, 30, 0.03);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.item-course-badge::before {
  content: "";
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background-color: #8a8377;
  display: inline-block;
  flex-shrink: 0;
}

.item-course-badge:hover {
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.item-course-badge.is-grad {
  border-color: rgba(132, 56, 24, 0.28);
}

.item-course-badge.is-grad::before {
  background-color: #843818;
}

.course-star {
  font-size: 0.85em;
  font-weight: 700;
  color: #843818;
  line-height: 0;
  position: relative;
  top: -0.22em;
  margin-left: 1.5px;
}

.item-coursework-note {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.4rem;
  padding-left: 0.15rem;
  line-height: 1.4;
}

.item-description {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.item-list-heading {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 0.65rem;
  margin-bottom: 0.15rem;
  text-align: left;
  letter-spacing: -0.01em;
}

.item-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.item-bullet-list li {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.item-bullet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

.item-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.item-subtag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-secondary);
}

.item-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.item-link-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.8rem;
  border-radius: var(--radius-pill);
  background-color: #121214;
  background-image: 
    radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #242427 0%, #151518 45%, #0b0b0d 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    inset 0 1px 0.8px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.85),
    0 1.6px 0 0 #050506,
    0 3px 7px -1px rgba(0, 0, 0, 0.22),
    0 6px 12px -2px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
  text-decoration: none;
}

.item-link-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1.2px);
  box-shadow: 
    inset 0 1px 1.2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 1.5px 0 rgba(0, 0, 0, 0.75),
    0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 2.2px 0 0 #050506,
    0 5px 10px -1px rgba(0, 0, 0, 0.28),
    0 10px 18px -2px rgba(0, 0, 0, 0.14);
}

.item-link-btn:active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 1.5px 4px 0 rgba(0, 0, 0, 0.85),
    0 1px 0 0 rgba(255, 255, 255, 0.7),
    0 0.8px 0 0 #050506,
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.item-link-btn svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 2.2;
  fill: none;
  transition: transform 0.18s ease;
}

.item-link-btn:hover svg {
  transform: translateX(2px);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile bottom-sheet drawer)
   ========================================================================== */

@media (max-width: 768px) {
  body {
    padding: 1.25rem 1.25rem 2rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-links {
    width: 100%;
    justify-content: flex-start;
  }

  .action-strip {
    flex-direction: column;
    width: 100%;
  }

  .btn-interactive {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .btn-interactive .btn-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .btn-interactive:hover .btn-icon {
    transform: translateY(-50%) translateX(4px);
  }

  /* Transform modal into mobile bottom drawer */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(100%);
  }

  .modal-backdrop.is-active .modal-dialog {
    transform: translateY(0);
  }

  .modal-header {
    padding: 1.25rem 1.25rem 1rem;
  }

  .modal-body {
    padding: 1.25rem;
  }
}
