/* Galen563's Home - Liquid Glass Personal Site */

:root {
  --g-blur: 24px;
  --header-pad-y: 8px;
  --header-pad-x: 18px;
}

html {
  transition: background-color 0.55s ease, color 0.55s ease;
}

body {
  min-height: 100vh;
  background: transparent !important;
  overflow-x: hidden;
  transition: background-color 0.55s ease;
}

#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
}

.nebula-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(40, 60, 120, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(60, 30, 90, 0.1) 0%, transparent 55%);
  opacity: 0.8;
}

.light .nebula-overlay {
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(100, 140, 220, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(140, 100, 200, 0.07) 0%, transparent 55%);
  opacity: 0.65;
}

/* Header shorter */
.header { padding: 10px 0 !important; }
.header.scrolled { padding: 6px 0 !important; }

.header-inner {
  max-width: 1280px;
  padding: var(--header-pad-y) var(--header-pad-x) !important;
  border-radius: 999px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--g-text-primary);
  font-weight: 600;
  font-size: 1.02rem;
}

.logo-img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.18);
}

.nav { display: flex; align-items: center; gap: 2px; }

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--g-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.22s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover,
.nav-link.active {
  color: var(--g-text-primary);
  background: rgba(255,255,255,0.08);
}
.light .nav-link:hover,
.light .nav-link.active { background: rgba(0,0,0,0.06); }

.nav-chevron {
  display: inline-flex;
  width: 12px; height: 12px;
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0.7;
}
.nav-chevron svg { width: 100%; height: 100%; }

.nav-item:hover .nav-chevron,
.nav-item.open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown — controlled by .open class for reliable close */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 130px;
  padding: 5px;
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 200;
}

.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--g-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.18s ease;
}
.dropdown-menu a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--g-text-primary);
}
.light .dropdown-menu a:hover { background: rgba(0,0,0,0.06); }

/* Liquid Glass — semi-transparent */
.glass {
  background: rgba(12, 16, 27, 0.38) !important;
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(1.5);
  backdrop-filter: blur(var(--g-blur)) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.glass-strong {
  background: rgba(12, 16, 27, 0.52) !important;
  -webkit-backdrop-filter: blur(calc(var(--g-blur) + 6px)) saturate(1.55);
  backdrop-filter: blur(calc(var(--g-blur) + 6px)) saturate(1.55);
  border: 1px solid rgba(255,255,255,0.14);
}
.light .glass {
  background: rgba(255, 255, 255, 0.42) !important;
  border-color: rgba(255,255,255,0.65);
  box-shadow: 0 8px 32px rgba(30,50,100,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.light .glass-strong {
  background: rgba(255, 255, 255, 0.58) !important;
  border-color: rgba(255,255,255,0.75);
}
.header-inner.glass,
.header-inner.glass-strong {
  background: rgba(12, 16, 27, 0.45) !important;
}
.light .header-inner.glass,
.light .header-inner.glass-strong {
  background: rgba(255, 255, 255, 0.55) !important;
}

/* Main layout */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-banner .hero-content { position: relative; z-index: 2; }
.hero-banner h1 {
  font-size: 2.6rem;
  font-weight: 700;
  color: #f0f4ff;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  transition: color 0.45s ease;
}
.hero-banner p {
  font-size: 1.1rem;
  color: rgba(240,244,255,0.75);
  margin: 0;
  transition: color 0.45s ease;
}
.light .hero-banner h1 { color: #1a2035; text-shadow: none; }
.light .hero-banner p { color: #4a5578; }

.cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.feature-card {
  padding: 18px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 90px;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.feature-card .card-title { font-weight: 600; font-size: 0.92rem; }
.feature-card .card-desc { font-size: 0.78rem; opacity: 0.85; }
.card-purple { background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 100%); }
.card-amber { background: linear-gradient(135deg, #78350f 0%, #b45309 100%); }
.card-rose { background: linear-gradient(135deg, #7f1d1d 0%, #be123c 100%); }
.card-slate { background: linear-gradient(135deg, #1e293b 0%, #334155 100%); }

.content-area { display: flex; flex-direction: column; gap: 18px; }

.profile-card {
  position: sticky;
  top: 88px;
  padding: 22px 18px;
  border-radius: 18px;
  text-align: center;
}
.profile-avatar {
  width: 88px; height: 88px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 2px solid rgba(255,255,255,0.12);
  display: block;
}
.profile-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--g-text-primary);
  margin: 0 0 4px;
}
.profile-bio {
  font-size: 0.82rem;
  color: var(--g-text-muted);
  margin: 0 0 16px;
  min-height: 0.5em;
}
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 18px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.stat { text-align: center; }
.stat-num {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--g-text-primary);
  display: block;
}
.stat-label { font-size: 0.72rem; color: var(--g-text-muted); }
.profile-socials { display: flex; justify-content: center; gap: 8px; }
.profile-socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--g-text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}
.profile-socials a:hover {
  background: rgba(255,255,255,0.14);
  color: var(--g-text-primary);
  transform: translateY(-2px);
}
.profile-socials svg { width: 16px; height: 16px; }

/* ===== Ping page ===== */
.ping-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}
.ping-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.ping-title h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
  color: var(--g-text-primary);
}
.ping-title p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--g-text-muted);
}
.btn-all-test {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: #2dd4bf;
  color: #042f2e;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.btn-all-test:hover { background: #14b8a6; transform: translateY(-1px); }
.btn-all-test.canceling {
  background: #ef4444;
  color: #fff;
}
.btn-all-test.canceling:hover { background: #dc2626; }

.ping-add-row { display: flex; gap: 10px; margin-bottom: 18px; }
.ping-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--g-text-primary);
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.light .ping-input {
  background: rgba(255,255,255,0.5);
  border-color: rgba(0,0,0,0.1);
}
.ping-input:focus { border-color: #2dd4bf; }
.btn-add {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-add:hover { background: rgba(45, 212, 191, 0.35); }

.ping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
}

.ping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s;
}
.light .ping-item {
  background: rgba(255,255,255,0.4);
  border-color: rgba(0,0,0,0.06);
}

.ping-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: #1e293b;
}
.ping-icon-fallback {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: #334155;
}

.ping-name {
  flex: 1;
  font-size: 0.92rem;
  color: var(--g-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ping-latency {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
  color: var(--g-text-muted);
  font-weight: 600;
}
.ping-latency.good { color: #22c55e; }
.ping-latency.ok { color: #eab308; }
.ping-latency.bad { color: #ef4444; }

.btn-test {
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  background: #2dd4bf;
  color: #042f2e;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}
.btn-test:hover { background: #14b8a6; }
.btn-test:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-delete {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--g-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
}
.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.btn-delete svg { width: 15px; height: 15px; }

/* ===== Content / Posts page ===== */
.content-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.content-sidebar {
  position: sticky;
  top: 90px;
  padding: 12px;
  border-radius: 16px;
}
.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--g-text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  user-select: none;
}
.side-item:hover,
.side-item.active {
  background: rgba(255,255,255,0.08);
  color: var(--g-text-primary);
}
.side-item .arrow {
  transition: transform 0.25s;
  opacity: 0.6;
}
.side-item.open .arrow { transform: rotate(90deg); }

.content-main {
  padding: 24px 28px;
  border-radius: 18px;
  min-height: 400px;
}
.content-main h1 {
  font-size: 1.8rem;
  margin: 0 0 8px;
  color: var(--g-text-primary);
}
.content-meta {
  font-size: 0.85rem;
  color: var(--g-text-muted);
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.post-body {
  color: var(--g-text-secondary);
  line-height: 1.75;
  font-size: 1rem;
}
.post-body p { margin: 0 0 1em; }

/* ===== Timeline page ===== */
.timeline-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
.timeline-list {
  padding: 24px 28px;
  border-radius: 18px;
}
.timeline-year {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--g-text-primary);
  margin: 20px 0 12px;
  padding-left: 20px;
  position: relative;
}
.timeline-year::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--g-text-muted);
  transform: translateY(-50%);
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 10px 0 10px 20px;
  position: relative;
  border-left: 1px dashed rgba(255,255,255,0.12);
  margin-left: 4px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 18px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #64748b;
}
.timeline-date {
  flex-shrink: 0;
  width: 40px;
  font-size: 0.85rem;
  color: var(--g-text-muted);
  padding-top: 2px;
}
.timeline-title {
  color: var(--g-text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.timeline-title:hover { color: #2dd4bf; }

@media (max-width: 900px) {
  .page-wrap, .content-page, .timeline-page {
    grid-template-columns: 1fr;
  }
  .profile-card, .content-sidebar { position: static; }
  .cards-row { grid-template-columns: repeat(2, 1fr); }
  .hero-banner h1 { font-size: 1.9rem; }
}
@media (max-width: 520px) {
  .cards-row { grid-template-columns: 1fr; }
  .nav { display: none; }
  .ping-add-row { flex-direction: column; }
}

/* Dropdown closer + bridge so mouse can reach menu */
.dropdown-menu {
  top: calc(100% + 2px) !important;
  padding-top: 8px !important; /* invisible bridge area */
}

/* Profile stat hover interaction */
.profile-stats .stat {
  transition: color 0.2s ease;
  cursor: pointer;
}
.profile-stats .stat:hover .stat-num,
.profile-stats .stat:hover .stat-label {
  color: #2dd4bf !important;
}

/* Timeline tags */
.tl-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 1.3;
}
.tl-tag.daily {
  background: #f97316;
  color: #fff;
}
.tl-tag.dev {
  background: #3b82f6;
  color: #fff;
}

/* Content sidebar expandable */
.side-group { margin-bottom: 4px; }
.side-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 8px;
}
.side-group.open .side-children {
  max-height: 400px;
}
.side-child {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--g-text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: all 0.18s;
  margin: 2px 0;
}
.side-child:hover,
.side-child.active {
  background: rgba(255,255,255,0.08);
  color: var(--g-text-primary);
}

/* Easter egg modal */
.egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.egg-overlay.show {
  opacity: 1;
  visibility: visible;
}
.egg-box {
  max-width: 360px;
  padding: 28px 32px;
  border-radius: 18px;
  text-align: center;
  color: var(--g-text-primary);
}
.egg-box p {
  margin: 0 0 18px;
  line-height: 1.6;
  font-size: 1.05rem;
}
.egg-box button {
  padding: 8px 22px;
  border-radius: 999px;
  border: none;
  background: #2dd4bf;
  color: #042f2e;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Tools page */
.tools-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 120px 20px 80px;
  text-align: center;
}
.tools-page h1 {
  font-size: 2rem;
  color: var(--g-text-primary);
  margin: 0 0 40px;
}
.tools-card {
  display: inline-block;
  padding: 20px 36px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--g-text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tools-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
