:root {
  /* light default */
  --bg: #ffffff;
  --panel: #f7f8fb;
  --text: #0b1020;
  --muted: #5b6274;
  --primary: #95165c;
  --primary-600: #95165c;
  --glass: rgba(0,0,0,0.04);
  --card-bg: #fff;
  --border-color: #e5e7eb;
}
[data-theme="dark"] {
  --bg: #0b0b12;
  --panel: #101018;
  --text: #eef1f5;
  --muted: #a6adbb;
  --glass: rgba(255,255,255,0.06);
  --card-bg: #23232b;
  --border-color: #444;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}
.no-scroll { overflow: hidden; }

.site-shell { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; overflow-x: hidden; }

.site-header { position: sticky; top: 0; z-index: 1200; backdrop-filter: blur(8px); background: linear-gradient(180deg, rgba(10,10,16,.85), rgba(10,10,16,.35)); border-bottom: 1px solid rgba(255,255,255,.06); }
[data-theme="light"] .site-header, :root:not([data-theme="dark"]) .site-header { backdrop-filter: none; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88)); border-bottom: 1px solid rgba(0,0,0,.08); }
.site-header .inner { max-width: 1200px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 18px rgba(149,22,92,.25); }
.brand .title { font-weight: 700; letter-spacing: .3px; }
.brand .tag { color: var(--muted); font-size: .9rem; }

/* public nav */
.public-nav { display:flex; gap:.4rem; align-items:center; white-space: nowrap; }
.public-nav a { color: var(--text); text-decoration:none; padding:.35rem .55rem; border-radius:.5rem; }
.public-nav a:hover { background: var(--glass); }
.public-sub { position: relative; }
.public-submenu { position:absolute; top: calc(100% + 6px); left:0; min-width: 200px; background: var(--panel); border:1px solid rgba(0,0,0,.08); border-radius:.65rem; display:none; padding:.4rem; box-shadow: 0 10px 28px rgba(0,0,0,.12); z-index: 1250; }
.public-sub:hover .public-submenu { display:block; }
.public-submenu a { display:block; padding:.45rem .6rem; }
.public-actions { display:flex; gap:.4rem; }
.icon-btn { display:inline-grid; place-items:center; width:34px; height:34px; border:1px solid rgba(0,0,0,.12); background:transparent; color: var(--text); border-radius:.5rem; }
[data-theme="dark"] .icon-btn { border-color: rgba(255,255,255,.18); }

/* Mobile drawer similar to app */
.hamburger { display:none; border:1px solid rgba(0,0,0,.12); background:transparent; color: var(--text); border-radius:.5rem; padding:.35rem .6rem; }
[data-theme="dark"] .hamburger { border-color: rgba(255,255,255,.18); }
.drawer { position: fixed; inset: 0 0 0 auto; width: 80vw; max-width: 360px; background: var(--bg); border-left: 1px solid rgba(0,0,0,.08); transform: translateX(100%); transition: transform .25s ease-out; z-index: 1301; display: flex; flex-direction: column; pointer-events: none; }
[data-theme="dark"] .drawer { border-color: rgba(255,255,255,.15); }
.drawer.open { transform: translateX(0); pointer-events: auto; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid rgba(0,0,0,.08); }
.drawer-menu { padding: .5rem; display: grid; gap: .25rem; overflow: auto; }
.drawer-menu a { display: flex; align-items: center; justify-content: space-between; padding: .6rem .75rem; border-radius: .55rem; text-decoration: none; color: var(--text); }
.drawer-menu a.active { background: var(--glass); }
.drawer-close { border:1px solid rgba(0,0,0,.12); background:transparent; color: var(--text); border-radius:.5rem; padding:.35rem .6rem; }

@media (max-width: 980px){
  .public-nav { display: none; }
  .hamburger { display: inline-flex; }
  .public-actions .theme-btn { display:none; }
  .public-actions a.theme-btn { display:none; }
}

@media (max-width: 1280px){
  .brand .tag { display:none; }
  .public-nav a { padding:.3rem .5rem; }
}
@media (max-width: 1100px){
  .public-nav { gap:.2rem; }
  .public-nav a { padding:.25rem .45rem; font-size: .95rem; }
}

.drawer-backdrop { position: fixed; inset:0; background: rgba(0,0,0,.35); opacity:0; pointer-events:none; transition: opacity .2s ease; z-index: 1300; }
.drawer-backdrop.open { opacity:1; pointer-events:auto; }

.drawer-group { border-bottom: 1px solid rgba(0,0,0,.06); padding: .4rem .6rem; }
[data-theme="dark"] .drawer-group { border-color: rgba(255,255,255,.12); }
.drawer-item { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.6rem .75rem; border-radius:.65rem; text-decoration:none; color: var(--text); background: transparent; }
.drawer-item:hover { background: var(--glass); }
.drawer-item.indent-1 { margin-left: .4rem; }
.drawer-item.indent-2 { margin-left: 1.2rem; }
.drawer-caret { border:none; background:transparent; color: var(--muted); width:28px; height:28px; display:grid; place-items:center; border-radius:.35rem; }
.drawer-item:hover .drawer-caret { color: var(--text); }
.drawer-caret svg { width:14px; height:14px; transition: transform .18s ease; }
.drawer-caret[aria-expanded="true"] svg { transform: rotate(90deg); }
.drawer-children { display:none; padding-left:.6rem; }
.drawer-children.open { display:block; }



.depth-backdrop {
  position: absolute; inset: -6rem -12rem; background:
    radial-gradient(1200px 600px at 10% 20%, rgba(149,22,92,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 40%, rgba(55,120,246,.18), transparent 60%);
  filter: blur(40px) saturate(1.2);
  z-index: 0;
}

.site-footer { padding: 2rem 1rem; border-top: 1px solid rgba(0,0,0,.08); background: var(--panel); color: var(--text); }
[data-theme="dark"] .site-footer { border-top-color: rgba(255,255,255,.12); }
.site-footer .inner { max-width: var(--container, 1100px); margin: 0 auto; text-align: center; }
.footer-grid { max-width: var(--container, 1100px); margin: 0 auto; display: grid; gap: 1.25rem; grid-template-columns: 1.1fr 1fr 1.2fr; align-items:start; }
.footer-grid .col h4 { margin: 0 0 .5rem; }
.footer-grid .col p { margin: .3rem 0; color: var(--muted); }
.footer-grid a { color: inherit; text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #0f0f16, #0c0c12); }
.contact-list { list-style:none; padding:0; margin:.25rem 0 0; }
.contact-list li { display:flex; align-items:center; gap:.55rem; margin:.35rem 0; }
.contact-list .ico { color: var(--text); opacity:.85; display:inline-grid; place-items:center; width:24px; height:24px; }
.links-list { list-style:none; padding:0; margin:.25rem 0 0; display:grid; gap:.25rem; }
.links-list a { color: var(--text); opacity:.9; }
.links-list a:hover { color: var(--primary-600); }
.social-links { display:flex; gap:.5rem; margin-top:.5rem; }
.social-links .chip { width:32px; height:32px; display:grid; place-items:center; border:1px solid rgba(0,0,0,.12); border-radius:.5rem; background: var(--glass); color: var(--text); }
[data-theme="dark"] .social-links .chip { border-color: rgba(255,255,255,.18); }
@media (max-width: 720px){
  .slider {
    height: clamp(410px, 90vh, 620px);
    padding: clamp(.6rem, 6vw, 1.4rem);
  }
  .slide {
    --side-offset: clamp(24vw, 30vw, 190px);
  }
  .slide > .card {
    width: clamp(230px, 86vw, 420px);
    aspect-ratio: 3 / 4;
    max-height: min(88vh, 600px);
  }
  .slide .media-picture { padding: clamp(.55rem, 4.5vw, 1.1rem); }
  .slide .media-blur.desktop { display:none; }
  .slide .media-blur.mobile { display:block; }
 .col-about { order: 3; } .col-links { order:2; } .col-contact { order:1; } }
[data-theme="dark"] .social-links a { border-color: rgba(255,255,255,.18); }
@media (max-width: 720px){
  .slider {
    height: clamp(410px, 90vh, 620px);
    padding: clamp(.6rem, 6vw, 1.4rem);
  }
  .slide {
    --side-offset: clamp(24vw, 30vw, 190px);
  }
  .slide > .card {
    width: clamp(230px, 86vw, 420px);
    aspect-ratio: 3 / 4;
    max-height: min(88vh, 600px);
  }
  .slide .media-picture { padding: clamp(.55rem, 4.5vw, 1.1rem); }
  .slide .media-blur.desktop { display:none; }
  .slide .media-blur.mobile { display:block; }
 }

@media (max-width: 720px){
  .slider {
    height: clamp(410px, 90vh, 620px);
    padding: clamp(.6rem, 6vw, 1.4rem);
  }
  .slide {
    --side-offset: clamp(24vw, 30vw, 190px);
  }
  .slide > .card {
    width: clamp(230px, 86vw, 420px);
    aspect-ratio: 3 / 4;
    max-height: min(88vh, 600px);
  }
  .slide .media-picture { padding: clamp(.55rem, 4.5vw, 1.1rem); }
  .slide .media-blur.desktop { display:none; }
  .slide .media-blur.mobile { display:block; }


}

/* Activities Section - 3D Library Style */
.activities-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 100%);
}

.activities-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.activities-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.country-tabs {
  position: relative;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn {
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 2;
}

.nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.tabs-container {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  padding: 0 2rem;
  display: flex;
  gap: 0.5rem;
  max-width: 800px;
}

.tab-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  background: var(--panel);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tab-link.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.debug-panel {
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  perspective: 1000px;
}

.project-card {
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  position: relative;
}

.project-card:hover {
  transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  line-height: 1.3;
}

.card-location,
.card-price {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.view-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  align-self: flex-start;
  box-shadow: 0 4px 8px rgba(149,22,92,0.3);
}

.view-btn:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(149,22,92,0.4);
}

.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 2rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .activities-section h2 {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card:hover {
    transform: none;
  }
  
  .nav-btn {
    display: none;
  }
  
  .tabs-container {
    padding: 0;
  }
  
  .tab-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}
