/* ===============================
   DeepSemaphore – custom aesthetic
   =============================== */

:root {
  /* Typography */
  --font-heading: "Chivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Core palette: deep indigo with teal + warm accent */
  --bg: #020518;
  --bg-alt: #04071b;
  --bg-elevated: #070b24;

  --card-bg: rgba(8, 12, 34, 0.96);
  --card-bg-soft: rgba(6, 10, 30, 0.92);

  --accent: #3fe0c5;
  --accent-strong: #15b3a0;
  --accent-soft: rgba(63, 224, 197, 0.12);
  --accent-warm: #f6b26b;

  --text: #f9fafb;
  --muted: #9caacd;
  --border-subtle: rgba(148, 163, 184, 0.28);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 20px 55px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 14px 40px rgba(3, 7, 18, 0.9);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Atmosphere: layered gradients + subtle grid overlay */

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, rgba(63, 224, 197, 0.12) 0, transparent 52%),
    radial-gradient(circle at 120% 0, rgba(96, 165, 250, 0.16) 0, transparent 60%),
    linear-gradient(145deg, #020617, #020518 40%, #020617 100%);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Subtle grid */
body::before {
  content: "";
  position: fixed;
  inset: -40px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.6;
  mix-blend-mode: soft-light;
  z-index: -1;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===============================
   Header / Navigation
   =============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.95),
    rgba(2, 6, 23, 0.88),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  gap: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 8px 18px rgba(15, 118, 110, 0.7));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.86rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-1px);
}

.nav-cta {
  border-color: rgba(63, 224, 197, 0.5);
  color: var(--text);
}

/* ===============================
   Hero section
   =============================== */

.hero {
  padding: 3.4rem 0 2.7rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 2.7rem;
  align-items: center;
}

.hero-text {
  opacity: 0;
  animation: rise-fade 0.7s ease-out 0.08s forwards;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 3.2vw, 3.1rem);
  line-height: 1.05;
  margin: 0 0 0.9rem;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 0.7rem;
}

.hero-id {
  font-size: 0.95rem;
  color: #cbd5ff;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.08s ease,
    box-shadow 0.18s ease;
}

.btn-primary {
  background: radial-gradient(circle at 10% 0, #5df0d9, #1f9fd6 60%);
  color: #020617;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 26px 60px rgba(15, 118, 110, 0.9);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text);
  background: rgba(15, 23, 42, 0.5);
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Hero side card */

.hero-side {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background:
    radial-gradient(circle at top left, rgba(63, 224, 197, 0.14), transparent 55%),
    var(--card-bg);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.6rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: rise-fade 0.7s ease-out 0.18s forwards;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 120% 0, rgba(246, 178, 107, 0.18), transparent 55%);
  mix-blend-mode: soft-light;
  opacity: 0.8;
  pointer-events: none;
}

.hero-card h2 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.hero-card ul {
  padding-left: 1.15rem;
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.hero-card li + li {
  margin-top: 0.34rem;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--muted);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.6rem 0.8rem;
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

/* ===============================
   Generic sections
   =============================== */

.section {
  padding: 2.7rem 0;
}

.section-alt {
  background: radial-gradient(circle at 0 0, rgba(63, 224, 197, 0.08), transparent 55%),
    linear-gradient(to bottom, #030617, #020518 60%, #020617);
}

.section h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.section h2::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.section-intro {
  color: var(--muted);
  max-width: 40rem;
  font-size: 0.96rem;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.3rem;
  margin-top: 1.7rem;
}

.card {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 14px 30px rgba(3, 7, 18, 0.75);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: rise-fade 0.75s ease-out forwards;
}

.section .cards .card:nth-child(1) { animation-delay: 0.08s; }
.section .cards .card:nth-child(2) { animation-delay: 0.14s; }
.section .cards .card:nth-child(3) { animation-delay: 0.2s; }
.section .cards .card:nth-child(4) { animation-delay: 0.26s; }
.section .cards .card:nth-child(5) { animation-delay: 0.32s; }

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(63, 224, 197, 0.14), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.card p {
  font-size: 0.93rem;
  color: #e5e7f5;
}

.card ul {
  margin: 0.2rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
}

.card-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.7rem;
}

.card-project p {
  font-size: 0.93rem;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 224, 197, 0.7);
}

/* Talks */

.section-cta {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-cta a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(63, 224, 197, 0.7);
}

/* Book */

.book-block {
  margin-top: 1.5rem;
}

.book-info ul {
  padding-left: 1.15rem;
  font-size: 0.9rem;
}

.book-note {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr);
  gap: 1.8rem;
  margin-top: 1.3rem;
}

.about-note {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Contact */

.section-contact {
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.9rem;
  margin-top: 1.5rem;
}

.contact-info ul {
  padding-left: 1.15rem;
  font-size: 0.9rem;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-note ol {
  padding-left: 1.15rem;
  font-size: 0.9rem;
}

.contact-note p {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

/* ===============================
   Footer
   =============================== */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.1rem 0 1.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 1));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===============================
   Motion: keyframes & small touches
   =============================== */

@keyframes rise-fade {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ===============================
   Responsive tweaks
   =============================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-side {
    justify-content: flex-start;
  }

  .about-grid,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 2.3rem;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
