/* =====================================================
   SHARED BASE CSS — Chang Family Personal Websites
   All persona-specific values are overridden in persona.css
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@300;400;600;800&family=JetBrains+Mono&display=swap');

:root {
  /* Colors — persona sets these */
  --color-bg:          #08080c;
  --color-bg-alt:      #0e0e13;
  --color-surface:     rgba(255, 255, 255, 0.03);
  --color-surface-2:   rgba(255, 255, 255, 0.05);
  --color-border:      rgba(255, 255, 255, 0.08);
  --color-text:        #f0f0f5;
  --color-text-muted:  #a1a1c1;
  --color-accent:      #6c63ff;
  --color-accent-2:    #a78bfa;
  --color-accent-glow: rgba(108, 99, 255, 0.3);

  /* Typography */
  --font-body:         'Inter', sans-serif;
  --font-display:      'Outfit', sans-serif;
  --font-mono:         'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* Transitions */
  --ease:       cubic-bezier(0.23, 1, 0.32, 1);
  --duration:   400ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Layout Elements ---------- */
.container {
  width: min(1200px, 100% - 4rem);
  margin-inline: auto;
}

section { padding-block: var(--space-xl); }

/* ---------- Navigation (Glassmorphism) ---------- */
.nav {
  position: fixed;
  top: 1.5rem; left: 50%;
  transform: translateX(-50%);
  width: min(1140px, 95%);
  height: 64px;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  display: flex;
  align-items: center;
  padding-inline: 2rem;
  transition: all var(--duration) var(--ease);
}
.nav.scrolled {
  top: 0;
  width: 100%;
  border-radius: 0;
  background: rgba(8, 8, 12, 0.9);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--duration) var(--ease);
}
.nav-link:hover { color: var(--color-text); }

/* ---------- Hero (Visual Punch) ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, var(--color-accent-glow) 0%, transparent 40%);
  z-index: -1;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(760px, 100% - 4rem);
  margin-inline: auto;
  gap: 2.5rem;
}
.hero-title-main {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-accent-2);
  font-weight: 600;
  margin: 0 0 3rem 0;
  width: 100%;
  max-width: 100%;
  letter-spacing: 0.02em;
}
.hero-description {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  width: 100%;
  margin: 0;
  text-align: justify;
  hyphens: auto;
}
.hero-description p { 
  margin-bottom: 1.2rem;
  width: 100%;
}
.hero-description p:last-child { margin-bottom: 0; }

.hero-img-wide-centered {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5);
  margin: 0;
  display: block;
}
.hero-actions { display: flex; gap: 1.5rem; justify-content: center; }

.btn {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 10px 20px -5px var(--color-accent-glow);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px var(--color-accent-glow);
}
.btn-secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover { background: var(--color-surface-2); }

.hero-image-wrapper {
  position: relative;
}
.hero-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.6s var(--ease);
}
.hero-img:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}
.hero-img-centered {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-surface-2);
  margin-bottom: 2.5rem;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  display: block;
}

/* ---------- About (Centered) ---------- */
.about-body-centered {
  display: flex;
  justify-content: center;
}
.about-text-centered {
  max-width: 760px;
  text-align: center;
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}
.about-text-centered p {
  margin-bottom: 1.5rem;
}

/* ---------- Highlights (Expertise Cards) ---------- */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.highlight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2.5rem;
  border-radius: 20px;
  transition: all var(--duration) var(--ease);
}
.highlight-card:hover {
  background: var(--color-surface-2);
  border-color: var(--color-accent);
  transform: translateY(-8px);
}
.highlight-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}
.highlight-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.highlight-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- List Pages (Blogs/Books) ---------- */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  align-items: center; /* Center items vertically */
  text-align: center;  /* Center text within items */
}
.list-item {
  transition: transform var(--duration) var(--ease);
  width: 100%;
  max-width: 760px;
}
.list-link { 
  display: block; 
  text-decoration: none; /* Removed global underlining */
}
.list-link:hover .list-item-title {
  color: var(--color-accent);
}
.list-item-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--color-text); /* Title color */
  transition: color var(--duration) var(--ease);
}
.list-item-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  opacity: 0.6; /* Muted color for meta info */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.list-item-summary {
  color: var(--color-text-muted) !important;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 760px;
  text-align: justify;
  hyphens: auto;
}

/* ---------- Content Pages ---------- */
.content-page {
  padding-top: 160px;
  width: min(760px, 100% - 4rem);
  margin-inline: auto;
  text-align: center;
}
.page-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}
.page-body h2 { color: #fff; margin-block: 2.5rem 1rem; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 4rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero-content { text-align: center; }
  .hero-actions { justify-content: center; }
  .nav-menu { display: none; }
}
