/* Modern Pure CSS for Uray Meiviar Portfolio & CV
   Zero external dependencies - Fast, accessible, print-ready
*/
@font-face {
  font-family: 'BB Strata ML';
  src: url('BBStrataML.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; 
}

@font-face {
  font-family: 'Sans';
  src: url('Supreme-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; 
}

@font-face {
  font-family: 'Inria';
  src: url('InriaSerif-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; 
}

:root {
  --bg-primary: #070a12;
  --bg-secondary: #0d1322;
  --bg-card: #00000055;
  --bg-card-hover: #7dabff45;
  --bg-glass: rgb(38 54 93 / 50%);
  
  --border-subtle: rgba(255, 255, 255, 0.15);
  --border-active: rgba(59, 130, 246, 0.4);
  --border-glow: rgba(0, 212, 255, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #c6deffbd;
  --text-dim: #5f7aa1;

  --accent-cyan: #00d4ff;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --font-serif: 'Inria', 'Bitstream Charter', 'Sitka Text', 'Cambria', Georgia, serif;
  --font-sans: 'Sans', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'BB Strata ML', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgb(86 115 218 / 60%);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  background-image: linear-gradient(120deg, #061327 0%, #5a6e99 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

code {
  font-family: var(--font-mono);
  font-weight:900;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #67e8f9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand span.accent {
  color: var(--accent-cyan);
}

.brand span.sub,
.brand a.sub {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 400;
  text-decoration: none;
  transition: color var(--transition);
}

.brand a.sub:hover {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.5rem 0.25rem;
}

.nav-links a:hover {
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #030712;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
  color: #000;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-actions .btn {
  height: 36px;
  padding: 0 0.85rem;
  font-size: 0.825rem;
  line-height: 1;
  white-space: nowrap;
}

/* Hero Section */
.hero {
  padding: 2rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Profile Showcase */
.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
}

.avatar-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.avatar-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(7, 10, 18, 0.95), transparent);
  padding: 1.5rem 0.75rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.avatar-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(7, 10, 18, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.4;
  transition: var(--transition);
  z-index: 5;
}

.avatar-wrapper:hover .avatar-nav-btn {
  opacity: 0.85;
}

.avatar-nav-btn:hover {
  opacity: 1 !important;
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
  transform: translateY(-50%) scale(1.08);
}

.avatar-prev {
  left: 10px;
}

.avatar-next {
  right: 10px;
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #34d399;
  width: fit-content;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.hero-profile-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  min-height: 3.1625rem;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 800px;
  text-align: justify;
}

.hero-bio-quote {
  font-family: var(--font-serif);
  color: var(--text-main);
  text-shadow: 1px 1px 15px #000000ba;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

/* Engineering Memoir Banner */
.memoir-banner {
  background: linear-gradient(135deg, rgba(13, 19, 34, 0.95), rgba(18, 26, 45, 0.95));
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin: 1.75rem 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.memoir-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
}

.memoir-banner-content {
  flex: 1;
}

.memoir-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.memoir-banner h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.memoir-banner p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.memoir-btn {
  white-space: nowrap;
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .memoir-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
  }
}

/* Competency Grid */
.competency-section {
  padding: 2rem 0 3.5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.stat-desc {
  font-size: 0.775rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Section Common */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: block;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  max-width: 650px;
}

/* Experience Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), rgba(59, 130, 246, 0.2));
}

.timeline-item {
  position: relative;
  padding-left: 55px;
}

.timeline-marker {
  position: absolute;
  left: 13px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.timeline-content {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    /* background: rgba(255, 255, 255, 0.04); */
    /* padding: 0.25rem 0.6rem; */
    padding: 0.5rem 0.5rem 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  line-height: 1.75;
}

.timeline-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* Filter Controls */
.filter-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-wrapper.is-open {
  border-color: var(--border-active);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.filter-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
  gap: 1rem;
}

.filter-toggle-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filter-toggle-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.filter-toggle-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.filter-summary-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.filter-summary-badge.has-filter {
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 212, 255, 0.35);
  font-weight: 500;
}

.filter-clear-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.filter-clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  border-color: #ef4444;
}

.filter-toggle-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.filter-chevron {
  color: var(--accent-cyan);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-wrapper.is-open .filter-chevron {
  transform: rotate(180deg);
}

.filter-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-wrapper.is-open .filter-body-wrapper {
  grid-template-rows: 1fr;
}

.filter-body-inner {
  overflow: hidden;
}

.filter-body {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.15);
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  min-width: 80px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-active);
}

.filter-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  font-weight: 600;
}

/* Category Pills */
.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

/* Tag Pills */
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.tag-btn {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: #93c5fd;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn:hover {
  background: rgba(0, 212, 255, 0.15);
  color: #fff;
  border-color: var(--accent-cyan);
}

.tag-btn.active {
  background: var(--accent-cyan);
  color: #030712;
  font-weight: 700;
  border-color: var(--accent-cyan);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-card);
}

.project-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.project-card.featured {
  border-color: rgba(0, 212, 255, 0.35);
}

.project-thumb {
  position: relative;
  width: 100%;
  height: 210px;
  background: #000;
  overflow: hidden;
}

.project-thumb-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.project-thumb-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.project-thumb img,
.project-thumb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  display: block;
  filter: saturate(0.5) brightness(0.5);
}

.project-card:hover .project-thumb img,
.project-card:hover .project-thumb-slide img {
  transform: scale(1.05);
  filter: saturate(1) brightness(1);
}

.project-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b1528, #050a14);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.project-thumb-placeholder svg {
  width: 32px;
  height: 32px;
  color: var(--accent-cyan);
}

.project-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
}

.project-photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 5;
  pointer-events: none;
}

.project-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  font-family: var(--font-mono);
}

.project-role-line {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.project-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.card-tag {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.project-footer {
  padding: 0.85rem 1.25rem;
  background: rgb(0 0 0 / 50%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Gallery */
.modal-gallery {
  position: relative;
  background: #000;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  pointer-events: none;
}

.gallery-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-btn:hover {
  background: var(--accent-blue);
}

.gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #fff;
}

.modal-content-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-header-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.modal-summary {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
}

.modal-section-title {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.modal-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-highlights li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Message Modal */
.message-modal-container {
  max-width: 560px;
  padding: 2.25rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  position: relative;
}

.message-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.message-modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.message-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: #ef4444;
}

.form-label .optional {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.04);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.form-feedback {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}

.form-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.contact-success {
  text-align: center;
  padding: 2.5rem 1rem;
}

.success-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.contact-success h3 {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.contact-success p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-email-link:hover {
  color: var(--accent-cyan);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  padding: 1rem 0 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 1.15rem;
}

.footer-links {
  display: flex;
  gap: 1.0rem;
}

.footer-copy {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-profile-col {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  .profile-card {
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-subtitle {
    min-height: auto;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.1rem;
    white-space: normal;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Stylesheet for Instant CV Export */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
  .site-header,
  .location-switcher,
  .hero-ctas,
  .filter-wrapper,
  .modal-overlay,
  .site-footer,
  .project-footer,
  .hero-status-badge,
  .cat-bar,
  #cat-bar,
  #tag-bar,
  .memoir-banner,
  .photo-nav-btn {
    display: none !important;
  }
  .hero-title {
    font-size: 1.25rem !important;
    white-space: normal !important;
  }
  .hero-grid {
    grid-template-columns: 140px 1fr !important;
  }
  .profile-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .avatar-container {
    width: 140px !important;
    height: 140px !important;
  }
  .avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    border-radius: 8px !important;
  }
  .timeline::before {
    background: #000 !important;
  }
  .timeline-marker {
    border-color: #000 !important;
  }
  .timeline-content,
  .stat-card,
  .project-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .stat-number,
  .timeline-company,
  .hero-subtitle {
    color: #000 !important;
  }
  .project-thumb {
    height: 140px !important;
    overflow: hidden !important;
    display: block !important;
  }
  .project-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
