/* ============================================
   Jérôme Schmid — jeromeschmid.ch
   Retrofuturiste · Monospace · Terminal
   ============================================ */

:root {
  --color-bg: #0c0c0c;
  --color-block: #141414;
  --color-block-hover: #1c1c1c;
  --color-accent: #6ec8e4;
  --color-accent-light: #a0e0f0;
  --color-accent-dark: #3a9bbf;
  --color-green: #4af626;
  --color-text: #d4d4d4;
  --color-text-muted: #707070;
  --color-dark: #0a0a0a;
  --color-white: #f0f0f0;
  --color-border: #2a2a2a;
  --font-heading: 'Space Mono', 'Courier New', monospace;
  --font-body: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --sidebar-width: 280px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-pill: 9999px;
  --border: 1px solid var(--color-border);
  --glow: 0 0 12px rgba(110, 200, 228, 0.15);
  --transition: 0.3s ease;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-size: 17px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

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

a:hover {
  color: var(--color-accent-light);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-white);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-bottom: 1rem; }
h3 { font-size: 1rem; margin-bottom: 0.5rem; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-block);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 100;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 2rem;
}

.sidebar-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius);
  border: 2px solid var(--color-accent-dark);
  margin: 0 auto 1rem;
  filter: grayscale(20%) contrast(1.05);
  transition: filter var(--transition), border-color var(--transition);
}

.sidebar-photo:hover {
  filter: grayscale(0%) contrast(1.1);
  border-color: var(--color-accent);
}

.sidebar-header h1 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.05em;
}

/* Blinking cursor after name */
.sidebar-header h1::after {
  content: '_';
  color: var(--color-accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.sidebar-header .subtitle {
  font-family: var(--font-body);
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* --- Navigation sidebar --- */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.55rem 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-nav a::before {
  content: '> ';
  color: var(--color-accent-dark);
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-nav a:hover {
  background: rgba(110, 200, 228, 0.05);
  color: var(--color-accent-light);
  border-color: var(--color-border);
}

.sidebar-nav a:hover::before {
  opacity: 1;
}

.sidebar-nav a.active {
  background: rgba(110, 200, 228, 0.08);
  color: var(--color-accent);
  border-color: var(--color-accent-dark);
}

.sidebar-nav a.active::before {
  opacity: 1;
  color: var(--color-accent);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-nav a.nav-sub {
  max-height: 0;
  overflow: hidden;
  margin-left: 1rem;
  font-size: 0.72rem;
  opacity: 0;
  padding: 0 0.8rem;
  border-width: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.nav-group:hover a.nav-sub,
.sidebar-nav a.nav-sub.active {
  max-height: 3rem;
  opacity: 1;
  padding: 0.55rem 0.8rem;
  border-width: 1px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: var(--border);
  text-align: center;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* --- Panels --- */
.panel {
  position: absolute;
  inset: 0;
  padding: 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.panel.active {
  opacity: 1;
  visibility: visible;
}

/* Scrollbar terminal */
.panel::-webkit-scrollbar {
  width: 4px;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel::-webkit-scrollbar-thumb {
  background: var(--color-accent-dark);
  border-radius: 2px;
}

.panel-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================
   BENTO GRID (Accueil)
   ============================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  grid-auto-rows: minmax(140px, auto);
}

.bento-item {
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: var(--border);
  background: var(--color-block);
}

.bento-item:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent-dark);
  box-shadow: var(--glow);
}

/* Tailles */
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

/* Variantes */
.bento-block {
  background: var(--color-block);
}

.bento-accent {
  background: var(--color-block);
  border-color: var(--color-accent-dark);
}

.bento-dark {
  background: var(--color-dark);
}

/* Label */
.bento-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
}

/* Gros chiffres */
.bento-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 20px rgba(110, 200, 228, 0.2);
}

.bento-caption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Texte */
.bento-item h2 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.bento-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.bento-item p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Tags bento */
.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.bento-tags span {
  background: rgba(110, 200, 228, 0.1);
  color: var(--color-accent);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 400;
  border: 1px solid rgba(110, 200, 228, 0.2);
}

/* Photo bento */
.bento-photo {
  padding: 0;
  border-color: var(--color-border);
}

.bento-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-photo:hover img {
  transform: scale(1.05);
}

.bento-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.bento-photo-overlay .bento-label {
  color: var(--color-accent);
}

.bento-photo-overlay p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

/* CTA bento */
.bento-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bento-cta h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

/* Organic bento — varied sizes */
.bento-organic {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 0.6rem;
}

.bento-organic .bento-tall {
  grid-row: span 2;
  min-height: 280px;
}

/* Responsive bento */
@media (max-width: 900px) {
  .bento,
  .bento-organic {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
}

@media (max-width: 550px) {
  .bento,
  .bento-organic {
    grid-template-columns: 1fr;
  }

  .bento-wide { grid-column: span 1; }

  .bento-tall {
    grid-row: span 1;
    min-height: 250px;
  }

  .bento-cta {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ============================================
   PANEL: PRO
   ============================================ */
.pro-section {
  margin-bottom: 0.5rem;
}

.pro-section p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.pro-section p:last-child {
  margin-bottom: 0;
}

.pro-section strong {
  color: var(--color-white);
}

.pro-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

/* Stats grid */
.pro-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.pro-stat {
  text-align: center;
}

.pro-stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 15px rgba(110, 200, 228, 0.2);
}

.pro-stat-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Machine tags */
.pro-machines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.pro-machine {
  background: rgba(110, 200, 228, 0.08);
  color: var(--color-text);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  border: 1px solid rgba(110, 200, 228, 0.15);
  transition: border-color var(--transition);
}

.pro-machine:hover {
  border-color: var(--color-accent);
}

/* Photo gallery */
.pro-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.pro-gallery-item {
  background: var(--color-block);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pro-gallery-item:hover {
  border-color: var(--color-accent-dark);
  box-shadow: var(--glow);
}

.pro-gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--color-dark);
  padding: 0.5rem;
}

.pro-gallery-item[data-lightbox] {
  cursor: pointer;
}

.pro-gallery-caption {
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.pro-series-badge {
  display: inline-block;
  background: rgba(110, 200, 228, 0.15);
  color: var(--color-accent);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.65rem;
  margin-left: 0.4rem;
  border: 1px solid rgba(110, 200, 228, 0.3);
}

@media (max-width: 900px) {
  .pro-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .pro-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 550px) {
  .pro-stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PAGE LINKS (organic navigation)
   ============================================ */
.page-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.page-links-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-right: 0.5rem;
}

.page-links-label::before {
  content: '~ ';
  color: var(--color-accent-dark);
}

.page-links a {
  display: inline-block;
  background: rgba(110, 200, 228, 0.06);
  color: var(--color-accent);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  border: 1px solid rgba(110, 200, 228, 0.15);
  transition: all var(--transition);
}

.page-links a::before {
  content: '[[';
  opacity: 0.4;
  margin-right: 0.15rem;
}

.page-links a::after {
  content: ']]';
  opacity: 0.4;
  margin-left: 0.15rem;
}

.page-links a:hover {
  background: rgba(110, 200, 228, 0.12);
  border-color: var(--color-accent);
  color: var(--color-accent-light);
}

/* --- Section titles --- */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.4rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 0.8rem auto 0;
  box-shadow: 0 0 8px rgba(110, 200, 228, 0.3);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent-dark);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-dark);
  box-shadow: 0 0 20px rgba(110, 200, 228, 0.3);
}

.btn-outline {
  border: 1px solid var(--color-accent-dark);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(110, 200, 228, 0.1);
  border-color: var(--color-accent);
}

/* ============================================
   PANEL: PARCOURS (timeline)
   ============================================ */
.block-card {
  background: var(--color-block);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: var(--border);
  margin-bottom: 2rem;
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-accent-dark);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2.5rem - 3.5px);
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(110, 200, 228, 0.4);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-item h3 {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-white);
}

.timeline-company {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.timeline-item p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.timeline-links {
  margin-top: 0.5rem;
}

.timeline-links a {
  display: inline-block;
  font-size: 0.78rem;
  margin-right: 1rem;
  color: var(--color-accent);
  border-bottom: 1px dotted rgba(110, 200, 228, 0.3);
}

.timeline-links a:hover {
  color: var(--color-accent-light);
  border-bottom-color: var(--color-accent-light);
}

/* Video thumbnail */
.video-thumb {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
  text-decoration: none;
}

.video-thumb img {
  width: 100%;
  display: block;
  transition: transform var(--transition), filter var(--transition);
  filter: brightness(0.7);
}

.video-thumb:hover img {
  transform: scale(1.03);
  filter: brightness(0.85);
}

.video-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--color-accent);
  background: rgba(12, 12, 12, 0.7);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(110, 200, 228, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-thumb:hover .video-thumb-play {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 20px rgba(110, 200, 228, 0.4);
}

.video-thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(transparent, rgba(12, 12, 12, 0.9));
  color: var(--color-text);
  font-size: 0.8rem;
  font-family: var(--font-body);
}

/* ============================================
   PANEL: COMPÉTENCES
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--color-block);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: var(--border);
  border-left: 3px solid var(--color-accent-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-left-color: var(--color-accent);
  box-shadow: var(--glow);
}

.skill-card h3 {
  color: var(--color-accent);
  margin-bottom: 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  background: rgba(110, 200, 228, 0.08);
  color: var(--color-text);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  border: 1px solid rgba(110, 200, 228, 0.15);
}

/* ============================================
   PANEL: CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  text-align: center;
}

.contact-item {
  background: var(--color-block);
  padding: 2rem;
  border-radius: var(--radius);
  border: var(--border);
  transition: border-color var(--transition);
}

.contact-item:hover {
  border-color: var(--color-accent-dark);
}

.contact-icon {
  font-size: 1.3rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.contact-item h3 {
  color: var(--color-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-item p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.contact-item a {
  color: var(--color-accent);
}

/* ============================================
   PANEL: PORTFOLIO
   ============================================ */
.portfolio-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  max-width: 650px;
  margin: -1.5rem auto 2rem;
  line-height: 1.6;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(110, 200, 228, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.6rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  aspect-ratio: 4/3;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition);
}

.gallery-item:hover {
  border-color: var(--color-accent-dark);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 0.8rem;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay span {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition), color var(--transition);
}

.lightbox-close:hover {
  opacity: 1;
  color: var(--color-accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(110, 200, 228, 0.1);
  border: 1px solid var(--color-accent-dark);
  color: var(--color-accent);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all var(--transition);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
}

.lightbox-nav:hover {
  opacity: 1;
  background: rgba(110, 200, 228, 0.2);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-header {
  display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: var(--color-block);
    border-bottom: var(--border);
    z-index: 400;
  }

  .mobile-logo {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.05em;
  }

  .mobile-logo span {
    color: var(--color-accent);
  }

  .mobile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
  }

  .mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-accent);
    margin: 4px 0;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 450;
  }

  .mobile-overlay.active {
    display: block;
  }

  .main {
    height: calc(100vh - 50px);
  }

  .panel {
    padding: 2rem 1.2rem;
  }

  .block-card {
    padding: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
  }

  .filters {
    gap: 0.3rem;
  }

  .filter-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.68rem;
  }
}
