:root {
  --bg: #050507;
  --bg-2: #0a0a0f;
  --surface: #0e0e13;
  --surface-2: #14141b;
  --text: #e7e7ea;
  --text-dim: #a1a1aa;
  --text-mute: #6b6b75;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --brand: #f97316;
  --brand-soft: #fb923c;
  --brand-glow: rgba(249, 115, 22, 0.25);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.2);
  --purple: #a855f7;
  --green: #10b981;
  --red: #ef4444;

  --glass-bg: linear-gradient(135deg, rgba(20, 20, 27, 0.45) 0%, rgba(10, 10, 14, 0.55) 100%);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --glass-highlight: radial-gradient(800px circle at var(--mx, 50%) var(--my, 50%), 
    rgba(255, 255, 255, 0.06) 0%, transparent 40%);

  --radius-lg: 2.5rem;
  --radius-md: 2rem;
  --radius-sm: 1.5rem;

  --font: 'Vazir', 'IranSans', Tahoma, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

html.light {
  --bg: #f5f6f8;
  --bg-2: #eceef2;
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --text: #18181b;
  --text-dim: #52525b;
  --text-mute: #8a8a93;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);

  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(240, 240, 245, 0.75) 100%);
  --glass-border: rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --glass-highlight: radial-gradient(800px circle at var(--mx, 50%) var(--my, 50%), 
    rgba(255, 255, 255, 0.12) 0%, transparent 40%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: #fff; }

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

.icon {
  width: 1.4em; height: 1.4em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ===================== Background FX ===================== */
.bg-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-fx::before {
  content: ""; position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  opacity: 0.5;
}
.bg-fx .blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.bg-fx .blob.b1 { width: 460px; height: 460px; top: -120px; left: -120px; background: radial-gradient(circle, var(--brand-glow), transparent 70%); }
.bg-fx .blob.b2 { width: 420px; height: 420px; bottom: -140px; right: -100px; background: radial-gradient(circle, var(--cyan-glow), transparent 70%); }
.bg-fx .scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 4px);
  mix-blend-mode: overlay; opacity: 0.6;
}

/* ===================== Layout ===================== */
.container {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: 1.25rem;
}
main { position: relative; z-index: 10; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 4rem; }
.section { margin-top: 6rem; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.2;
  color: var(--text);
}
.section-head p { color: var(--text-dim); font-size: 0.95rem; max-width: 40rem; margin: 0.75rem auto 0; }

/* ===================== Liquid Glass / Card ===================== */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  position: relative;
  isolation: isolate;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--glass-highlight);
  opacity: 0.3; pointer-events: none; z-index: 1;
  transition: opacity 0.4s var(--ease);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 50%);
  opacity: 0; pointer-events: none; z-index: 1;
  transition: opacity 0.4s var(--ease);
}
.glass:hover::before { opacity: 0.5; }
.glass:hover::after { opacity: 0.25; }
.glass > * { position: relative; z-index: 2; }

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: 2rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
  position: relative; overflow: hidden; isolation: isolate;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--glass-highlight);
  opacity: 0.2; pointer-events: none; z-index: 1;
  transition: opacity 0.4s var(--ease);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 50%);
  opacity: 0; pointer-events: none; z-index: 1;
  transition: opacity 0.4s var(--ease);
}
.card:hover { transform: scale(1.02); border-color: var(--border-strong); }
.card:hover::before { opacity: 0.45; }
.card:hover::after { opacity: 0.35; }
.card > * { position: relative; z-index: 2; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 800; font-size: 0.85rem; padding: 0.9rem 1.6rem;
  border-radius: 999px; transition: all 0.3s var(--ease); white-space: nowrap;
}
.btn-brand {
  background: linear-gradient(135deg, var(--brand-soft), var(--brand));
  color: #fff; border: 1px solid #ea580c;
  box-shadow: 0 6px 18px var(--brand-glow);
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--brand-glow); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }

/* ===================== Pills / Chips ===================== */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 800; padding: 0.45rem 0.95rem;
  border-radius: 999px;
}
.pill-status { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: led 1.8s infinite; }
@keyframes led { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.chip {
  font-size: 0.62rem; font-weight: 900; padding: 0.35rem 0.8rem; border-radius: 999px; letter-spacing: 0.02em; margin-bottom: 10px;
}
.chip-amber { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.chip-cyan { background: rgba(34,211,238,0.12); color: var(--cyan); border: 1px solid rgba(34,211,238,0.25); }
.chip-emerald { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.chip-purple { background: rgba(168,85,247,0.12); color: var(--purple); border: 1px solid rgba(168,85,247,0.25); }
.tag {
  font-size: 0.7rem; font-weight: 700; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}

/* ===================== Header / Nav ===================== */
.site-header {
  position: fixed; top: 1.1rem; left: 0; right: 0; z-index: 50;
  padding-inline: 1rem;
}
.nav-bar {
  max-width: 64rem; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 0.85rem; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 0.65rem; transition: opacity 0.3s; }
.brand:hover { opacity: 0.85; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #f59e0b);
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.1rem;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 4px 12px var(--brand-glow);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 900; font-size: 0.85rem; letter-spacing: 0.02em; }

.nav-links { display: flex; gap: 0.25rem; padding: 0.2rem; border-radius: 999px; background: rgba(0,0,0,0.22); border: 1px solid var(--border); }
.nav-link {
  font-size: 0.8rem; font-weight: 800; padding: 0.5rem 1rem; border-radius: 999px;
  color: var(--text-dim); transition: all 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--brand); background: rgba(249,115,22,0.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
}
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.icon-btn:hover { color: var(--text); transform: scale(1.06); border-color: var(--border-strong); background-color: rgba(249, 115, 29, 0.05); }
.icon-btn .icon { width: 1.1em; height: 1.1em; }
html:not(.light) .i-moon { display: none; }
html.light .i-sun { display: none; }
.cta-header { display: none; }
@media (min-width: 768px) {
  .cta-header {
    display: inline-flex; gap: 0.5rem; align-items: center;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand)); color: #fff;
    font-weight: 800; font-size: 0.75rem; padding: 0.65rem 1.2rem; border-radius: 999px;
    box-shadow: 0 6px 18px var(--brand-glow); transition: all 0.3s var(--ease);
  }
  .cta-header:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--brand-glow); }
}

/* ===================== Hero ===================== */
.hero { border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 4rem); position: relative; overflow: hidden; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); }
.hero .glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.hero .glow.g1 { width: 280px; height: 280px; top: -80px; left: -80px; background: var(--brand-glow); }
.hero .glow.g2 { width: 280px; height: 280px; bottom: -80px; right: -80px; background: var(--cyan-glow); }
.hero-grid { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 7fr 5fr; } }
@media (max-width: 1023px) {
  .hero-grid { gap: 1.5rem; }
  #view-home .hero-visual { order: -1; max-width: 360px; margin-inline: auto; padding: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  #view-home .hero-visual .frame { border-radius: inherit; }
  #view-home .hero-visual img { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  #view-home .hero-visual .corner.tl { top: 10px; left: 10px; }
  #view-home .hero-visual .corner.br { bottom: 10px; right: 10px; }
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 900; line-height: 1.15; margin: 1.4rem 0;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--brand), #f59e0b, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--text-dim); font-size: clamp(0.95rem, 1.5vw, 1.05rem); max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  border-radius: var(--radius-sm); padding: 1.25rem 1rem; text-align: center;
  background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(14px);
  transition: transform 0.4s var(--ease);
}
.stat:hover { transform: scale(1.04); }
.stat .num { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; color: var(--brand); line-height: 1; }
.stat .lbl { font-size: 0.62rem; font-weight: 800; color: var(--text-dim); margin-top: 0.4rem; }

.hero-visual {
  position: relative; width: 100%; max-width: 380px; margin-inline: auto;
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border); padding: 1rem; box-shadow: var(--glass-shadow);
  will-change: transform; transition: transform 0.2s var(--ease);
}
.hero-visual2 {
  position: relative; width: 100%; max-width: 400px; max-height: 400px; margin-inline: auto;
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border); padding: 1rem; box-shadow: var(--glass-shadow);
  will-change: transform; transition: transform 0.2s var(--ease);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 1rem); filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35)); }
.hero-visual2 img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 1rem); filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35)); }
.hero-visual .frame { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.hero-visual .corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--brand); opacity: 0.7; }
.hero-visual .corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.hero-visual .corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* ===================== Focus areas ===================== */
.cards-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.feature .ico {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 1.4rem;
  background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
}
.feature .ico .icon { width: 1.7em; height: 1.7em; }
.feature.hw .ico { color: var(--brand); }
.feature.sw .ico { color: var(--cyan); }
.feature.mm .ico { color: var(--purple); }
.feature h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.6rem; color: var(--text); }
.feature p { font-size: 0.88rem; color: var(--text-dim); }

/* ===================== Projects ===================== */
.project-card { display: flex; flex-direction: column; justify-content: space-between; }
.project-card .thumb {
  width: 100%; height: 150px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center;
}
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.project-card:hover .thumb img { transform: scale(1.06); }
.thumb-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--text-mute); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}
.thumb-ph::after { content: attr(data-label); opacity: 0.6; }
.project-card h3 { font-size: 1.1rem; font-weight: 800; margin: 1rem 0 0.5rem; color: var(--text); transition: color 0.3s; }
.project-title-link { color: inherit; text-decoration: none; display: inline-block; transition: color 0.3s; }
.project-card:hover .project-title-link { color: var(--brand); }
.project-card .desc { font-size: 0.8rem; color: var(--text-dim); flex-grow: 1; }
.project-card .foot {
  margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.project-card .foot .meta { font-size: 0.62rem; font-weight: 800; color: var(--text-mute); }
.link-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 800; color: var(--text-dim); padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); transition: all 0.3s var(--ease); }
.link-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(249, 115, 29, 0.05); }
.link-btn .icon { width: 0.9em; height: 0.9em; }

.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.filter-btn {
  font-size: 0.72rem; font-weight: 800; padding: 0.6rem 1.3rem; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-dim);
  transition: all 0.3s var(--ease); backdrop-filter: blur(8px);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active { background: var(--brand); color: #fff; border-color: #ea580c; box-shadow: 0 6px 16px var(--brand-glow); }

/* ===================== Project detail ===================== */
.detail-back { margin-bottom: 2rem; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 4fr 8fr; } }
.detail-side .row { margin: 1rem 0; }
.detail-side .row .k { font-size: 0.68rem; font-weight: 800; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-side .row .v { font-size: 0.9rem; color: var(--text); font-weight: 600; margin-top: 0.25rem; }
.detail-side .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.detail-hero {
  width: 100%; height: 220px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 1.5rem;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-body h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; margin-bottom: 0.5rem; }
.detail-body .summary { color: var(--text-dim); font-size: 0.95rem; }
.schematic-wrap { margin-top: 2rem; }
.schematic-wrap h4, .pinout-wrap h4 { font-size: 0.85rem; font-weight: 800; color: var(--text-dim); margin-bottom: 0.75rem; }
.schematic { width: 100%; height: auto; background: #07070a; border: 1px solid #1f1f29; border-radius: var(--radius-sm); display: block; }
html.light .schematic { background: #0b0b10; }

/* ===================== Pinout ===================== */
.pinout-wrap { margin-top: 2rem; }
.pinout-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
@media (min-width: 640px) { .pinout-layout { grid-template-columns: 1.4fr 1fr; } }
.pinout { width: 100%; height: auto; background: #07070a; border: 1px solid #1f1f29; border-radius: var(--radius-sm); }
html.light .pinout { background: #0b0b10; }
.pin { cursor: pointer; }
.pin rect.body { fill: #16161e; stroke: #2a2a36; stroke-width: 1; transition: all 0.2s; }
.pin:hover rect.body, .pin.active rect.body { fill: var(--brand); stroke: var(--brand-soft); }
.pin text { fill: #c7c7d1; font-size: 7px; font-weight: 700; pointer-events: none; }
.pinout-readout {
  border-radius: var(--radius-sm); padding: 1.25rem; background: var(--surface-2); border: 1px solid var(--border);
  min-height: 90px;
}
.pinout-readout .pin-name { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--brand); }
.pinout-readout .pin-desc { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.4rem; }

/* ===================== Media / Reels ===================== */
.reel-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .reel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reel-grid { grid-template-columns: repeat(3, 1fr); } }
.reel {
  position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); aspect-ratio: 16 / 10; background: var(--surface-2);
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease);
}
.reel:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.reel .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.4s; }
.reel:hover .poster { transform: scale(1.07); filter: brightness(0.7); }
.reel .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.8)); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem; }
.reel .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.85);
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(249,115,22,0.9); color: #fff; opacity: 0; transition: all 0.4s var(--ease);
  box-shadow: 0 8px 24px var(--brand-glow);
}
.reel:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.reel .play .icon { width: 1.5em; height: 1.5em; }
.reel .r-tag { font-size: 0.6rem; font-weight: 900; color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase; }
.reel .r-title { font-size: 0.92rem; font-weight: 800; color: #fff; margin-top: 0.2rem; }
.reel .bar { position: absolute; bottom: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), var(--cyan)); transition: width 0.5s var(--ease); }
.reel:hover .bar { width: 100%; }

/* ===================== Team / Eama ===================== */
.team-card { border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 3rem); position: relative; overflow: hidden; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); }
.team-card .glow { position: absolute; top: -80px; left: -80px; width: 280px; height: 280px; border-radius: 50%; background: var(--brand-glow); filter: blur(90px); opacity: 0.3; }
.team-grid { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 1024px) { .team-grid { grid-template-columns: 8fr 4fr; } }
.avatars { display: flex; flex-direction: row-reverse; }
.avatars .av { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; border: 2px solid var(--bg); margin-left: -12px; background: var(--surface-2); display: grid; place-items: center; font-size: 0.7rem; font-weight: 900; color: var(--text-dim); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.avatars .av:first-child { border-color: var(--brand); }
.avatars .av img { width: 100%; height: 100%; object-fit: cover; }
.team-cta { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem; background: #e11d48; color: #fff; font-weight: 800; font-size: 0.8rem; padding: 0.9rem 1.4rem; border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(225,29,72,0.35); transition: all 0.3s var(--ease); }
.team-cta:hover { transform: translateY(-2px); background: #be123c; }

/* ===================== Contact ===================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: 72rem; margin-inline: auto; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; border-radius: var(--radius-md); min-width: 0; }
.contact-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.contact-card .ico .icon { width: 1.5em; height: 1.5em; }
.contact-card.c1 .ico { color: var(--brand); }
.contact-card.c2 .ico { color: var(--cyan); }
.contact-card.c3 .ico { color: var(--purple); }
.contact-card h4 { font-size: 0.85rem; font-weight: 800; }
.contact-card p { font-size: 0.72rem; color: var(--text-dim); }
.contact-card a { font-size: 0.82rem; font-weight: 700; color: var(--brand); display: inline-block; margin-top: 0.3rem; word-break: break-word; overflow-wrap: anywhere; }
.contact-card a:hover { text-decoration: underline; }

/* ===================== Timeline ===================== */
.timeline { position: relative; border-right: 3px solid var(--border); margin-right: 1rem; padding-right: 2rem; display: flex; flex-direction: column; gap: 2rem; }
.tl-node { position: relative; }
.tl-node .dot { position: absolute; right: -2.55rem; top: 1.5rem; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 4px solid var(--bg); display: grid; place-items: center; box-shadow: 0 0 0 1px var(--border); }
.tl-node .dot span { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.tl-node.alt .dot span { background: var(--cyan); }
.tl-card { padding: 1.5rem; border-radius: var(--radius-md); }
.tl-card .yr { font-size: 0.75rem; font-weight: 800; color: var(--brand); }
.tl-node.alt .tl-card .yr { color: var(--cyan); }
.tl-card h4 { font-size: 1.05rem; font-weight: 800; margin: 0.3rem 0; color: var(--text); }
.tl-card p { font-size: 0.85rem; color: var(--text-dim); }

/* ===================== Footer ===================== */
.site-footer { position: relative; z-index: 10; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); backdrop-filter: blur(10px); padding: 1rem 0; margin-top: 2rem; }
.site-footer .inner { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; }
@media (min-width: 768px) { .site-footer .inner { flex-direction: row; } }
.site-footer .copy { font-size: 0.72rem; font-weight: 800; color: var(--text-mute); }
.social { display: flex; gap: 0.6rem; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-bg); border: 1px solid var(--border); color: var(--text-dim); transition: all 0.3s var(--ease); backdrop-filter: blur(8px); }
.social a:hover { color: var(--text); transform: translateY(-2px); border-color: var(--border-strong);  background: rgba(249, 115, 29, 0.05);}
.social a .icon { width: 1em; height: 1em; }

/* ===================== Modal ===================== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.open { display: flex; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(6px); }
.modal .dialog { position: relative; width: 100%; max-width: 880px; border-radius: var(--radius-md); overflow: hidden; background: var(--glass-bg); border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: pop 0.35s var(--ease); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }
@keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .close { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; display: grid; place-items: center; transition: all 0.3s; }
.modal .close:hover { background: var(--red); transform: rotate(90deg); }
.modal .video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.modal .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal .m-body { padding: 1.25rem 1.5rem 1.75rem; }
.modal .m-body h3 { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.modal .m-body p { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.4rem; }

/* ===================== Reveal animations ===================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

.hero h1, .hero .lead, .hero .pill, .hero-actions, .stats { animation: rise 0.8s var(--ease) both; }
.hero .pill { animation-delay: 0.05s; }
.hero p.lead { animation-delay: 0.15s; }
.hero-actions { animation-delay: 0.25s; }
.hero .stats { animation-delay: 0.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ===================== Schematic animation ===================== */
.bus-packet { fill: #f59e0b; filter: drop-shadow(0 0 6px #f59e0b); }
.flow { stroke-dasharray: 6 6; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }

/* ===================== Utilities ===================== */
.hidden { display: none !important; }
.text-brand { color: var(--brand); }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 0.75rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ===================== About Me modules ===================== */
.about-wrap { display: flex; flex-direction: column; gap: 1.5rem; }
.about-hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 2.5rem); align-items: center; }
@media (min-width: 768px) { .about-hero { grid-template-columns: 280px 1fr; } }
.about-photo {
  width: 100%; max-width: 280px; margin-inline: auto; aspect-ratio: 1 / 1; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border); background: var(--surface-2);
  box-shadow: var(--glass-shadow);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-id .num { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 900; color: var(--brand); line-height: 1; }
.about-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.2rem; }
.about-stats > div { display: flex; flex-direction: column; }
.about-stats .lbl { font-size: 0.62rem; font-weight: 800; color: var(--text-dim); margin-top: 0.3rem; }

.about-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
.info-card { padding: 1.75rem; }
.info-card .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.1rem; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--brand); }
.info-card:nth-child(2) .ico { color: var(--cyan); }
.info-card:nth-child(3) .ico { color: var(--purple); }
.info-card:nth-child(4) .ico { color: var(--green); }
.info-card .ico .icon { width: 1.5em; height: 1.5em; }
.info-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem; color: var(--text); }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.info-list li { font-size: 0.85rem; color: var(--text-dim); padding-right: 1.1rem; position: relative; line-height: 1.6; }
.info-list li::before { content: ""; position: absolute; right: 0; top: 0.6rem; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.info-list li a { color: var(--brand); }
.info-list li a:hover { text-decoration: underline; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { font-size: 0.72rem; font-weight: 700; padding: 0.4rem 0.85rem; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-dim); backdrop-filter: blur(6px); }
.about-bio { padding: clamp(1.5rem, 4vw, 2.5rem); }

.team-member { text-align: center; padding: 1.75rem; display: flex; flex-direction: column; align-items: center; }
.member-photo {
  width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin-bottom: 1.1rem;
  border: 2px solid var(--brand); box-shadow: 0 8px 20px rgba(0,0,0,0.35); background: var(--surface-2);
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member h3 { font-size: 1.1rem; font-weight: 800; margin: 0.2rem 0 0.6rem; color: var(--text); }
.team-member .desc { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.8rem; }
.team-member .chip { margin-bottom: 0.4rem; }

/* ===================== Responsive nav ===================== */
@media (max-width: 560px) {
  .nav-link { padding: 0.45rem 0.7rem; font-size: 0.72rem; }
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
