/* =========================================================
   Bibek Bhandari — Personal Site
   Theme: Dark / Techy
   ========================================================= */

:root {
  --bg: #0a0e1a;
  --bg-elevated: #111827;
  --bg-card: #131a2a;
  --border: #1f2937;
  --border-hover: #2dd4bf;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;
  --accent: #2dd4bf;        /* teal */
  --accent-2: #818cf8;      /* indigo */
  --accent-3: #f472b6;      /* pink for highlights */
  --code-bg: #0f172a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --max-width: 1100px;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* subtle grid background */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.08), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(129, 140, 248, 0.08), transparent 40%);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-2);
}

code, .mono {
  font-family: var(--mono);
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 14, 26, 0.75);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand .prompt {
  color: var(--accent);
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-dim);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
}

/* =========================================================
   Layout
   ========================================================= */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section {
  margin-bottom: 4rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section-title .accent {
  color: var(--accent);
}

p {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

p strong {
  color: var(--text);
}

/* =========================================================
   Hero (home)
   ========================================================= */
.hero {
  padding: 4rem 0 3rem;
  text-align: left;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-greeting .cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.05;
}

.hero-name .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.hero-meta {
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.hero-meta span {
  color: var(--accent);
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.15);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

/* =========================================================
   Cards & Grids
   ========================================================= */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { 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.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.card-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

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

.card-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.5rem;
}

.card-link::after {
  content: " →";
  transition: transform 0.2s ease;
  display: inline-block;
}

.card:hover .card-link::after {
  transform: translateX(3px);
}

/* =========================================================
   Tags / Pills
   ========================================================= */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 4px;
}

.tag.alt {
  background: rgba(129, 140, 248, 0.08);
  color: var(--accent-2);
  border-color: rgba(129, 140, 248, 0.25);
}

/* =========================================================
   About / Profile
   ========================================================= */
.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.profile-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 4rem;
  font-weight: 700;
  color: var(--bg);
  box-shadow: var(--shadow);
}

.profile-info h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.profile-info .role {
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 1rem;
}

/* =========================================================
   Skills
   ========================================================= */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.skill-group h3 {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-group li {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding-left: 1rem;
  position: relative;
}

.skill-group li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =========================================================
   Timeline (Journey)
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.timeline-date {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.timeline-place {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

/* =========================================================
   Blog / Article list
   ========================================================= */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  color: inherit;
}

.post-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  color: inherit;
}

.post-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}

.post-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.post-item:hover .post-title {
  color: var(--accent);
}

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

/* =========================================================
   Contact / Form
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-card h3 {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 1.2em;
  margin-top: 0.5rem;
}

/* =========================================================
   Code-style box
   ========================================================= */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  overflow-x: auto;
  line-height: 1.7;
}

.code-block .comment { color: var(--text-faint); }
.code-block .keyword { color: var(--accent-3); }
.code-block .string  { color: var(--accent); }
.code-block .var     { color: var(--accent-2); }

/* =========================================================
   Footer
   ========================================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 0.75rem;
  }
  .nav-links.open { display: flex; }
  .nav-inner { flex-wrap: wrap; }

  main { padding: 2rem 1.25rem; }
  .hero { padding: 2rem 0; }

  .profile {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-avatar {
    margin: 0 auto;
    width: 140px;
    height: 140px;
    font-size: 3rem;
  }

  .contact-grid { grid-template-columns: 1fr; }
  .place-detail { grid-template-columns: 1fr; }
  .place-photo { width: 100%; }
  .reading-item { flex-wrap: wrap; }
}

/* =========================================================
   Section label — typewriter animation
   ========================================================= */
.section-label {
  display: inline-block;
  min-height: 1.2em;
  position: relative;
}
.section-label::after {
  content: '_';
  margin-left: 2px;
  color: var(--accent);
  opacity: 0;
}
.section-label.typing::after,
.section-label.typed::after {
  opacity: 1;
  animation: blink 1.1s steps(2, start) infinite;
}

/* Subtle fade-in on viewport entry */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Clickable cards (linked to a page)
   ========================================================= */
a.card {
  color: inherit;
  text-decoration: none;
}
.card-cta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.5rem;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
a.card:hover .card-cta {
  opacity: 1;
  transform: translateX(3px);
}

/* =========================================================
   Tabs (Updates / Writing / Notes)
   ========================================================= */
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}
.tab {
  font-family: var(--mono);
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--accent); }
.tab.active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.3);
}
.tab .count {
  color: var(--text-faint);
  margin-left: 0.4rem;
  font-size: 0.75rem;
}

/* =========================================================
   Search + tag filter
   ========================================================= */
.search-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 220px;
  padding: 0.7rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.search-count {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  align-self: center;
}

.tag-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.tag-chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: rgba(45, 212, 191, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.tag-chip:hover { color: var(--accent); border-color: var(--accent); }
.tag-chip.active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--accent);
}
.tag-chip-clear {
  color: var(--text-faint);
  border-style: dashed;
}

/* =========================================================
   Post meta enhancements
   ========================================================= */
.post-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.post-type {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-type.update  { background: rgba(45, 212, 191, 0.15); color: var(--accent); }
.post-type.writing { background: rgba(129, 140, 248, 0.15); color: var(--accent-2); }
.post-type.note    { background: rgba(244, 114, 182, 0.15); color: var(--accent-3); }

.post-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.post-tags .t {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
.post-tags .t::before { content: '#'; color: var(--accent); margin-right: 1px; }

.empty-state {
  font-family: var(--mono);
  color: var(--text-faint);
  padding: 2rem 1rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* =========================================================
   Reading topic groups (research page)
   ========================================================= */
.reading-topic {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease;
}
.reading-topic:hover { border-color: rgba(45, 212, 191, 0.3); }
.reading-topic-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.reading-topic-head h3 {
  font-size: 1.15rem;
  color: var(--text);
}
.reading-topic-head .count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.15rem 0.55rem;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 4px;
}
.reading-list {
  display: flex;
  flex-direction: column;
}
.reading-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-top: 1px dashed var(--border);
  align-items: baseline;
}
.reading-item:first-child { border-top: none; padding-top: 0; }
.reading-type {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 70px;
  text-align: center;
}
.reading-type.paper   { background: rgba(45, 212, 191, 0.12); color: var(--accent); }
.reading-type.book    { background: rgba(129, 140, 248, 0.12); color: var(--accent-2); }
.reading-type.journal { background: rgba(244, 114, 182, 0.12); color: var(--accent-3); }
.reading-type.thesis  { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.reading-meta { flex: 1; }
.reading-meta .title {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.reading-meta .author {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.reading-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.reading-status.done { color: var(--accent); }
.reading-status.now { color: var(--accent-3); }

/* =========================================================
   Garden — sub-nav (Books / Places / Speeches / Poems)
   ========================================================= */
.subnav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem;
  margin-bottom: 2rem;
  position: sticky;
  top: 64px;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.subnav a {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.subnav a:hover {
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent);
}

/* =========================================================
   Places web (interactive node-graph)
   ========================================================= */
.places-web {
  position: relative;
  width: 100%;
  height: 460px;
  background:
    radial-gradient(circle at 30% 30%, rgba(45, 212, 191, 0.06), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(129, 140, 248, 0.06), transparent 50%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.places-web .web-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.places-web .web-svg line {
  stroke: rgba(45, 212, 191, 0.18);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.place-node {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18);
  transition: all 0.2s ease;
  border: 0;
  padding: 0;
}
.place-node:hover,
.place-node:focus,
.place-node.active {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.28);
  outline: none;
  z-index: 3;
}
.place-node-label {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  transform: translate(-50%, -185%);
  pointer-events: none;
  white-space: nowrap;
  background: rgba(10, 14, 26, 0.8);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.place-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  margin-bottom: 1rem;
  align-items: start;
  scroll-margin-top: 130px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.place-detail.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}
.place-photo {
  width: 220px;
  height: 150px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
}
.place-photo::after {
  content: 'placeholder image';
  position: absolute;
  bottom: 6px;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(10, 14, 26, 0.6);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.place-photo.alt-1 { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); }
.place-photo.alt-2 { background: linear-gradient(135deg, var(--accent-3), var(--accent)); }
.place-photo.alt-3 { background: linear-gradient(135deg, #fbbf24, var(--accent)); }
.place-photo.alt-4 { background: linear-gradient(135deg, #38bdf8, var(--accent-2)); }
.place-info h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.place-info .when {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.place-info p { font-size: 0.93rem; }

/* =========================================================
   Inspiration — quotes & poems
   ========================================================= */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem 2.25rem;
  position: relative;
  overflow: hidden;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 14px;
  font-size: 4.5rem;
  font-family: Georgia, serif;
  color: rgba(45, 212, 191, 0.18);
  line-height: 1;
}
.quote-text {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.quote-author {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.quote-context {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-top: 0.4rem;
  font-family: var(--mono);
}

.poem {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.poem-title {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.poem-author {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
}
.poem-body {
  color: var(--text-dim);
  white-space: pre-line;
  line-height: 1.85;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.98rem;
}

/* =========================================================
   Library — book cards
   ========================================================= */
.book-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}
.book-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.book-cover {
  width: 70px;
  height: 95px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--bg);
  text-align: center;
  padding: 0.35rem;
  line-height: 1.2;
}
.book-cover.b2 { background: linear-gradient(135deg, var(--accent-3), var(--accent-2)); }
.book-cover.b3 { background: linear-gradient(135deg, var(--accent), var(--accent-3)); }
.book-cover.b4 { background: linear-gradient(135deg, #fbbf24, var(--accent-3)); }
.book-cover.b5 { background: linear-gradient(135deg, #38bdf8, var(--accent)); }
.book-cover.b6 { background: linear-gradient(135deg, #a78bfa, var(--accent-3)); }
.book-info h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.book-info .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.book-info p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0;
}

/* =========================================================
   Certifications (security page)
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s ease;
}
.cert-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.cert-card.in-progress { border-left: 3px solid var(--accent); }
.cert-card.planned     { border-left: 3px solid var(--accent-2); }
.cert-card.done        { border-left: 3px solid #22c55e; }

.cert-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cert-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.cert-issuer {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.cert-status {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cert-status.in-progress { background: rgba(45, 212, 191, 0.15); color: var(--accent); }
.cert-status.planned     { background: rgba(129, 140, 248, 0.15); color: var(--accent-2); }
.cert-status.done        { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s ease;
}
.progress-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
}

/* =========================================================
   Hire-me callout (security page)
   ========================================================= */
.hire-callout {
  background: linear-gradient(135deg, rgba(45,212,191,0.08), rgba(129,140,248,0.08));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.hire-callout h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}
.hire-callout .roles {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem;
}
.role-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;
}

/* =========================================================
   Tool grid (security page)
   ========================================================= */
.tool-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.tool-cat h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}
.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tool-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}
.tool-pill.comfortable { color: var(--accent); border-color: rgba(45, 212, 191, 0.3); }
.tool-pill.learning    { color: var(--accent-2); border-color: rgba(129, 140, 248, 0.3); }
.tool-pill.curious     { color: var(--text-faint); }
.tool-pill::after {
  content: attr(data-level);
  font-size: 0.6rem;
  margin-left: 0.4rem;
  opacity: 0.6;
  text-transform: uppercase;
}

.framework-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.framework-pill {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  background: rgba(244, 114, 182, 0.08);
  color: var(--accent-3);
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 6px;
}

/* CTF badge cards */
.ctf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ctf-badge {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.7rem;
  text-align: center;
  flex-shrink: 0;
}
.ctf-badge.b2 { background: linear-gradient(135deg, var(--accent-3), var(--accent)); }
.ctf-badge.b3 { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); }
.ctf-info h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 0.15rem; }
.ctf-info .meta { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); }

/* =========================================================
   Suggestion forms
   ========================================================= */
.suggestion-toggle {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.15s ease;
}
.suggestion-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.suggestion-form {
  display: none;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.suggestion-form.open { display: block; }
.suggestion-form h4 {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.suggestion-form .topic-pin {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 1rem;
  display: block;
}
.suggestion-form .topic-pin strong { color: var(--accent); }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 540px) {
  .form-row-2 { grid-template-columns: 1fr; }
}
.suggestion-form select,
.suggestion-form input,
.suggestion-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.suggestion-form select { font-family: var(--mono); font-size: 0.85rem; }
.suggestion-form textarea { min-height: 80px; resize: vertical; }
.suggestion-form input:focus,
.suggestion-form select:focus,
.suggestion-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* =========================================================
   Downloads — cards + modal
   ========================================================= */
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all 0.2s ease;
}
.download-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.download-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.file-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
}
.file-icon.pdf { background: linear-gradient(135deg, #f87171, var(--accent-3)); }
.file-icon.md  { background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.file-icon.zip { background: linear-gradient(135deg, #fbbf24, var(--accent-3)); }
.file-name { font-weight: 600; color: var(--text); font-size: 0.98rem; }
.file-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}
.download-card p { margin-bottom: 0.5rem; flex: 1; }

.download-btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s ease;
}
.download-btn:hover {
  background: transparent;
  color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  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.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-content h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}
.modal-content h2 .file-target {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  display: block;
  margin-top: 0.25rem;
  word-break: break-word;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }

.consent-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1.25rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.consent-row input[type=checkbox] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.modal-actions .btn { width: auto; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* RSS link in footer */
.footer-links a.rss::before {
  content: '◉';
  margin-right: 4px;
  color: #f59e0b;
}

/* =========================================================
   Cyberscan — tools page
   ========================================================= */
.privacy-note {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-left: 3px solid #22c55e;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
}
.privacy-note strong { color: #22c55e; }

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.tool-card h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-card h3 .tool-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.tool-card .tool-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.tool-card details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.tool-card details summary {
  cursor: pointer;
  font-family: var(--mono);
  color: var(--accent-2);
  user-select: none;
}
.tool-card details[open] summary { margin-bottom: 0.5rem; }
.tool-card details p { margin: 0.5rem 0; font-size: 0.88rem; }

.tool-input-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.tool-input-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.tool-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.tool-input-row button {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tool-input-row button:hover {
  background: transparent;
  color: var(--accent);
}
.tool-input-row button.ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
}
.tool-input-row button.ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hash-display {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.75rem;
  word-break: break-all;
  letter-spacing: 0.02em;
}

.result-good, .result-bad, .result-info, .result-warn {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.93rem;
}
.result-good {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.result-good strong { color: #22c55e; }
.result-bad {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.result-bad strong { color: #ef4444; }
.result-info {
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: var(--text-dim);
}
.result-info strong { color: var(--accent); }
.result-warn {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fcd34d;
}

table.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.kv th, table.kv td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px dashed var(--border);
}
table.kv th {
  font-family: var(--mono);
  color: var(--text-faint);
  font-weight: normal;
  font-size: 0.8rem;
  width: 130px;
}
table.kv code {
  font-family: var(--mono);
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Educational glossary cards */
.gloss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.gloss {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.gloss h4 {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}
.gloss p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0;
}

