:root {
  --bg: #0a0a0f;
  --bg-alt: #12121a;
  --bg-card: #171722;
  --text: #e8e8f0;
  --text-dim: #9a9ab0;
  --neon-cyan: #00e5ff;
  --neon-purple: #b026ff;
  --neon-pink: #ff2d95;
  --neon-green: #39ff14;
  --neon-yellow: #ffe600;
  --border: #26263a;
  --radius: 14px;
  --font-display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ------- Animated background blobs ------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(176, 38, 255, 0.18), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(0, 229, 255, 0.14), transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(255, 45, 149, 0.14), transparent 55%),
    var(--bg);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
}

/* ------- Typography ------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.grad-text {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--neon-cyan);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 60ch;
}

/* ------- Nav ------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand-logo {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #0a0a0f;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-cyan);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-toggle button,
.lang-toggle a {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.lang-toggle button.active,
.lang-toggle a.active {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #0a0a0f;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ------- Hero ------- */
.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 1.5rem;
  position: relative;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 20, 0.4);
  background: rgba(57, 255, 20, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero .lead {
  font-size: 1.25rem;
  max-width: 54ch;
  margin-bottom: 2.2rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #0a0a0f;
  box-shadow: 0 4px 30px rgba(0, 229, 255, 0.25);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover { border-color: var(--neon-pink); box-shadow: 0 4px 24px rgba(255, 45, 149, 0.15); }

/* ------- Cards / grids ------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 8px 40px rgba(0, 229, 255, 0.08);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Tag chip */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.tag {
  font-size: 0.72rem;
  font-family: var(--font-display);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* ------- Team ------- */
.team-card { text-align: center; }
.team-avatar {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: #0a0a0f;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
}
.team-role {
  color: var(--neon-pink);
  font-size: 0.85rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.1rem;
}
.team-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-family: var(--font-display);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.team-link:hover {
  color: var(--neon-cyan);
  border-color: rgba(0, 229, 255, 0.5);
}
.team-link-icon { font-size: 0.9rem; line-height: 1; }

/* ------- Projects ------- */
.project-thumb {
  height: 9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(135deg, var(--thumb-a, #223), var(--thumb-b, #335));
}

/* ------- Events / timeline ------- */
.event {
  display: flex;
  gap: 1.4rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}
.event:last-child { border-bottom: none; }
.event-date {
  min-width: 5.5rem;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #0a0a0f;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.5rem 0;
  height: fit-content;
}
.event-date .day { font-size: 1.5rem; line-height: 1; }
.event-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
.event-body h4 { margin-bottom: 0.3rem; }
.event-body p { color: var(--text-dim); font-size: 0.95rem; }

/* ------- Blog ------- */
.blog-card h3 { font-size: 1.2rem; }
.blog-card .date { color: var(--text-dim); font-size: 0.8rem; font-family: var(--font-display); margin-bottom: 0.5rem; display: block; }
.blog-card a.read-more { color: var(--neon-cyan); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.blog-card a.read-more:hover { text-decoration: underline; }

/* ------- Empty states ------- */
.empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.6rem;
  max-width: 640px;
  text-align: center;
}
.empty-state .empty-icon { font-size: 2.2rem; display: block; margin-bottom: 0.7rem; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-dim); font-size: 0.95rem; max-width: 42ch; margin: 0 auto; }

/* ------- Contact ------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.form-note { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.9rem; }

.contact-list { list-style: none; margin-top: 1.2rem; }
.contact-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; color: var(--text-dim); }
.contact-list .ico { color: var(--neon-cyan); font-size: 1.2rem; width: 1.4rem; text-align: center; }

form label { display: block; font-family: var(--font-display); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 1rem 0 0.4rem; color: var(--text-dim); }
form input, form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
}
form input:focus, form textarea:focus { outline: none; border-color: var(--neon-cyan); }
form textarea { min-height: 8rem; resize: vertical; }

/* ------- Footer ------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.footer-social { display: flex; gap: 1rem; font-size: 1.3rem; }
.footer-social a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-social a:hover { color: var(--neon-cyan); }

/* ------- Page header ------- */
.page-header {
  padding: 6rem 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }

/* ------- Responsive ------- */
@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: min(75vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 99;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: block; }
}

/* Language visibility handled by JS via data-lang */
[hidden] { display: none !important; }

/* ------- Rendered markdown content ------- */
.post-content { line-height: 1.8; }
.post-content p { color: var(--text); }
.post-content h3,
.post-content h4 { margin: 1.5rem 0 0.5rem; }
.post-content ul,
.post-content ol { margin: 0.8rem 0 0.8rem 1.4rem; color: var(--text-dim); }
.post-content li { margin-bottom: 0.4rem; }

.prose p { color: var(--text-dim); font-size: 1.1rem; max-width: 60ch; }
.prose p + p { margin-top: 1rem; }
