/* ============================================================
   enap.dev — style_new.css
   Aesthetic: Industrial terminal meets modern data engineer
   Dark background, monospace accents, gold signal color
   ============================================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
  --bg-primary: #0d0f11;
  --bg-secondary: #141618;
  --bg-card: #191c1f;
  --bg-card-hover: #1f2326;
  --border: #2a2d31;
  --border-accent: #CEB15A40;
  --text-primary: #e8e9ea;
  --text-secondary: #8a9099;
  --text-muted: #555c66;
  --accent: #CEB15A;
  --accent-dim: #CEB15A30;
  --accent-mid: #CEB15A70;
  --green: #4ade80;
  --red: #f87171;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;
  --radius: 8px;
  --radius-sm: 4px;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 24px rgba(206,177,90,0.08);
}

/* --- LIGHT MODE --- */
[data-theme="light"] {
  --bg-primary: #f4f3f0;
  --bg-secondary: #ffffff;
  --bg-card: #f9f8f6;
  --bg-card-hover: #f0ede8;
  --border: #e2e0db;
  --border-accent: #CEB15A60;
  --text-primary: #1a1c1e;
  --text-secondary: #4a5058;
  --text-muted: #8a9099;
  --accent: #b8922a;
  --accent-dim: #CEB15A20;
  --accent-mid: #CEB15A80;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-accent: 0 0 24px rgba(206,177,90,0.12);
}

[data-theme="light"] body {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
}

[data-theme="light"] .mapbox iframe {
  filter: grayscale(0.2) brightness(1);
}

[data-theme="light"] .de-gradient {
  background: linear-gradient(135deg, #dff0e4 0%, #d8eaf5 100%);
}

[data-theme="light"] .iot-gradient {
  background: linear-gradient(135deg, #ecdff0 0%, #d8e4f0 100%);
}

[data-theme="light"] .sc-gradient {
  background: linear-gradient(135deg, #f0eedd 0%, #ddf0ee 100%);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  /* Subtle grid texture */
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
address { font-style: normal; }

/* --- TYPOGRAPHY --- */
.h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.h5 { font-size: 0.85rem; font-weight: 500; }

/* --- LAYOUT --- */
main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  align-items: start;
}

/* --- SIDEBAR --- */
.sidebar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
  overflow: hidden;
}

/* Top accent line on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.sidebar-info { text-align: center; }

.avatar-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.avatar-box img { width: 100%; height: 100%; object-fit: cover; }

.name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.title-prefix {
  color: var(--accent);
  margin-right: 0.25rem;
}

.info_more-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem auto 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.info_more-btn:hover { color: var(--accent); }

.sidebar-info_more {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.sidebar.active .sidebar-info_more { max-height: 600px; }

@media (min-width: 1024px) {
  .sidebar-info_more { max-height: none !important; }
  .info_more-btn { display: none; }
}

.separator {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* CONTACTS */
.contacts-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }

.contact-item { display: flex; align-items: flex-start; gap: 0.75rem; }

.icon-box {
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.9rem;
}

.contact-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-link, .contact-item address {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  line-height: 1.3;
}

.contact-link:hover { color: var(--accent); }

/* SOCIAL */
.social-list { display: flex; gap: 0.75rem; justify-content: center; list-style: none; }

.social-link {
  width: 34px; height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--accent-dim);
  border-color: var(--accent-mid);
  color: var(--accent);
}

/* STACK BADGE */
.stack-badge {
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.stack-tags {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}

.stack-tags span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.2rem 0.5rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 2px;
  color: var(--accent);
}

/* --- MAIN CONTENT --- */
.main-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 600px;
  overflow: hidden;
}

/* --- NAVBAR --- */
.navbar {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  background: var(--bg-primary);
}

/* Fixed mobile controls — hidden on desktop */
.theme-toggle-fixed {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 150;
  place-items: center;
  width: 40px; height: 40px;
  color: var(--text-muted);
  font-size: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.theme-toggle-fixed:hover { color: var(--accent); background: var(--accent-dim); border-color: var(--border-accent); }

/* Hamburger — fixed top-left, hidden on desktop */
.nav-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 150;
  place-items: center;
  width: 40px; height: 40px;
  color: var(--text-muted);
  font-size: 1.3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav-menu-btn:hover { color: var(--accent); background: var(--accent-dim); border-color: var(--border-accent); }

/* Nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.nav-drawer.active { display: block; }

.nav-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.nav-drawer-panel {
  position: absolute;
  top: 0; left: 0;
  width: 72vw;
  max-width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 0.25rem;
  animation: drawerIn 0.22s ease;
}

@keyframes drawerIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.nav-drawer-close {
  align-self: flex-end;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  transition: color var(--transition), background var(--transition);
}

.nav-drawer-close:hover { color: var(--accent); background: var(--accent-dim); }

.nav-drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-drawer-link {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-drawer-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-drawer-link.active { color: var(--accent); background: var(--accent-dim); }

.nav-drawer-theme {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-drawer-theme:hover { color: var(--accent); background: var(--accent-dim); }

.navbar-list {
  display: flex;
  list-style: none;
  gap: 0;
}

.navbar-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1rem 1.1rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.navbar-link:hover { color: var(--text-primary); }
.navbar-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* THEME TOGGLE */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.theme-toggle:hover { color: var(--accent); background: var(--accent-dim); }


/* show sun in dark mode, moon in light mode */
.icon-light { display: none; }
.icon-dark  { display: block; }

[data-theme="light"] .icon-light { display: block; }
[data-theme="light"] .icon-dark  { display: none; }

/* --- ARTICLE / PAGES --- */
article { display: none; padding: 2rem; animation: fadeUp 0.3s ease; }
article.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-title {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.article-title::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 40px; height: 1px;
  background: var(--accent);
}

/* --- ABOUT TEXT --- */
.about-text p {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* SLOGAN BLOCK */
.slogan-block {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.slogan-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  font-style: italic;
  letter-spacing: -0.01em;
}

/* SERVICE TAGS */
.service-tags {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  margin-top: 0.75rem;
}

.service-tags span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.18rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* SERVICES CTA */
.services-cta {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.services-cta p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cta-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.cta-link:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

/* --- SERVICE / WHAT I BUILD --- */
.service { margin-top: 2rem; }

.service-title { margin-bottom: 1.25rem; }

.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  list-style: none;
}

.service-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.service-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.service-icon-box { flex-shrink: 0; }

.service-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.service-item-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- TESTIMONIALS / RECOMMENDATIONS --- */
.testimonials { margin-top: 2rem; }

.testimonials-title { margin-bottom: 1rem; }

.testimonials-list {
  display: flex; gap: 1rem;
  list-style: none;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.has-scrollbar::-webkit-scrollbar { height: 4px; }
.has-scrollbar::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 2px; }
.has-scrollbar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.testimonials-item { min-width: 260px; }

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

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

.testimonials-avatar-box {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 0.75rem;
}

.testimonials-avatar-box img { width: 100%; height: 100%; object-fit: cover; }

.testimonials-item-title {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.testimonials-text p { font-size: 0.8rem; color: var(--text-muted); }

/* MODAL */
.modal-container {
  position: fixed; inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
}

.modal-container.active { display: grid; }

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.testimonials-modal {
  position: relative; z-index: 101;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 480px; width: 90%;
  box-shadow: var(--shadow);
}

.modal-close-btn {
  position: absolute; top: 1rem; right: 1rem;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color var(--transition);
}
.modal-close-btn:hover { color: var(--accent); }

.modal-img-wrapper { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.modal-avatar-box { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); }
.modal-avatar-box img { width: 100%; height: 100%; object-fit: cover; }

.modal-title { font-size: 1rem; margin-bottom: 0.25rem; }

[data-modal-text] p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

/* --- CERTIFICATIONS --- */
.clients { margin-top: 2rem; }
.clients-title { margin-bottom: 1rem; }

.clients-list {
  display: flex; gap: 1.25rem;
  list-style: none;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  align-items: center;
}

.clients-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  min-width: 100px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.clients-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.clients-item img { height: 28px; width: auto; filter: brightness(0.7) grayscale(0.3); transition: filter var(--transition); }
.clients-item:hover img { filter: brightness(1) grayscale(0); }

/* --- RESUME / TIMELINE --- */
.timeline { margin-bottom: 2.5rem; }

.title-wrapper {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.title-wrapper .icon-box {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

.timeline-list { list-style: none; padding-left: 1.25rem; border-left: 2px solid var(--border); }

.timeline-item {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 6px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-mid);
}

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

.accent { color: var(--accent) !important; }

.timeline-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 0.25rem 0 0.75rem;
}

.timeline-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.timeline-text strong { color: var(--text-primary); font-weight: 600; }

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

.timeline-tags span {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* --- SKILLS --- */
.skill { margin-top: 1rem; }
.skills-title { margin-bottom: 1.25rem; }

.skills-list {
  display: flex; flex-direction: column; gap: 1.25rem;
  list-style: none;
  padding: 1.5rem;
}

.skills-item { }

.title-wrapper {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
}

.skill-progress-bg {
  height: 3px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.skill-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  border-radius: 2px;
  transition: width 1s ease;
}

.tools-used {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
}

.tools-used span {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  padding: 0.18rem 0.5rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 2px;
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* --- PORTFOLIO --- */
.filter-list {
  display: flex; gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-list button {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--transition);
}

.filter-list button:hover,
.filter-list button.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

.filter-select-box { display: none; }

@media (max-width: 640px) {
  .filter-list { display: none; }
  .filter-select-box { display: block; margin-bottom: 1.25rem; }
  .filter-select {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
  }
  .select-list {
    display: none;
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: calc(100% - 4rem);
    z-index: 10;
    margin-top: 0.25rem;
  }
  .filter-select-box.active .select-list { display: block; }
  .select-item button {
    width: 100%; text-align: left; padding: 0.6rem 1rem;
    font-family: var(--font-mono); font-size: 0.72rem;
    color: var(--text-secondary);
  }
  .select-item button:hover { color: var(--accent); background: var(--accent-dim); }
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
}

.project-item { display: none; }
.project-item.active { display: flex; }

.project-item a {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.project-item a:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.project-item.flagship a {
  border-color: var(--border-accent);
  grid-column: 1 / -1;
}

.project-img { position: relative; overflow: hidden; }

.project-status-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
}

.project-item-icon-box {
  position: absolute; top: 0.75rem; right: 0.75rem;
  z-index: 2;
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-item a:hover .project-item-icon-box { opacity: 1; }

/* Project image placeholders */
.project-img-placeholder {
  width: 100%; height: 140px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.de-gradient {
  background: linear-gradient(135deg, #0d1f12 0%, #0a1a2a 100%);
  border-bottom: 1px solid var(--border-accent);
}

.iot-gradient {
  background: linear-gradient(135deg, #1a0d1f 0%, #0d1a2a 100%);
  border-bottom: 1px solid var(--border);
}

.sc-gradient {
  background: linear-gradient(135deg, #1a1a0d 0%, #0d1a1a 100%);
  border-bottom: 1px solid var(--border);
}

.pipeline-viz {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.pipe-node {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-accent);
  border-radius: 2px;
  color: var(--accent);
  background: var(--accent-dim);
}

.pipe-arrow { color: var(--text-muted); }

.project-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.85rem 1rem 0.25rem;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0 1rem 0.5rem;
}

.project-stack {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding: 0.25rem 1rem 0.5rem;
}

.project-stack span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.45rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
}

.project-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding: 0 1rem 1rem;
  flex: 1;
}

/* --- IMPACT STATS --- */
.impact-stats { margin-top: 2rem; }

.impact-title { margin-bottom: 1.25rem; }

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.stat-context {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- CONTACT --- */
.contact-intro {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-intro p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.contact-email-cta {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: letter-spacing var(--transition);
  display: inline-block;
}

.contact-email-cta:hover { letter-spacing: 0.05em; }

.mapbox { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.mapbox figure { margin: 0; }
.mapbox iframe { width: 100%; height: 220px; border: none; filter: grayscale(0.8) invert(0.9) brightness(0.85); display: block; }

.form-title { margin-bottom: 1rem; }

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

.input-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--accent-mid); }

textarea.form-input { min-height: 100px; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.field-error {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #e05a5a;
  min-height: 0.9rem;
}

.input-error {
  border-color: #e05a5a !important;
}

.field-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 0.9rem;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-left: auto;
}

.form-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: flex-end;
  transition: all var(--transition);
}

.form-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-btn:not(:disabled):hover {
  background: var(--bg-primary);
  color: var(--accent);
  outline: 1px solid var(--accent);
}

/* --- SNACKBAR --- */
.snackbar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 300;
  white-space: nowrap;
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.snackbar-error {
  border-color: #e05252;
  color: #e05252;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .sidebar {
    position: static;
  }

  .sidebar-info_more {
    max-height: 0;
    overflow: hidden;
  }

  .sidebar.active .sidebar-info_more {
    max-height: 600px;
  }

  .info_more-btn { display: flex; }

  .service-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .input-wrapper { grid-template-columns: 1fr; }
  .project-list { grid-template-columns: 1fr; }
  .project-item.flagship a { grid-column: auto; }

  .navbar { display: none; }

  .nav-menu-btn { display: grid; }
  .theme-toggle-fixed { display: grid; }
}
