/* Modern CSS for Desmond Ong's website - 2026 redesign */

/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */
:root {
  /* UT Austin Colors */
  --burnt-orange: #bf5700;
  --warm-orange: #e87511;
  --light-orange: #f8971f;
  --teal-accent: #00a9b7;

  /* Neutrals */
  --dark: #1a1a2e;
  --text: #333f48;
  --text-light: #6b7280;
  --text-muted: #9ca3af;

  /* Backgrounds */
  --bg-cream: #faf8f5;
  --bg-light: #f7f7f7;
  --bg-white: #ffffff;

  /* Borders */
  --border: #e5e7eb;
  --border-light: #f3f4f6;

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

  /* Typography */
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Merriweather', Georgia, serif;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-white);
  line-height: 1.7;
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--teal-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--burnt-orange);
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--bg-cream);
}

.section-dark {
  background: var(--dark);
  color: var(--bg-white);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-lg);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--burnt-orange);
  border-bottom-color: var(--burnt-orange);
}

.nav-cta {
  background: var(--burnt-orange);
  color: var(--bg-white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--warm-orange);
  border-bottom: none !important;
}

/* Mobile menu toggle (hidden by default, shown on mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero-img {
  width: 270px;
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.hero-subtitle strong {
  color: var(--burnt-orange);
  font-weight: 600;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: var(--space-lg);
  max-width: 600px;
}

.hero-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--burnt-orange);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: var(--warm-orange);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--burnt-orange);
  color: var(--burnt-orange);
}

.btn-ghost {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--bg-white);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--bg-white);
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   CARDS
   ============================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

.card-link {
  display: inline-block;
  margin-top: var(--space-sm);
  color: var(--burnt-orange);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.card-link:hover {
  text-decoration: underline;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  color: var(--dark);
  margin-bottom: 0;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================
   DUAL AUDIENCE CARDS (from Mockup B)
   ============================================ */
.dual-audience {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
  color: var(--bg-white);
  padding: var(--space-2xl) 0;
}

.dual-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.audience-card {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.audience-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--light-orange);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.audience-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--bg-white);
}

.audience-card p {
  opacity: 0.85;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* ============================================
   PUBLICATIONS
   ============================================ */
.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-year {
  font-size: 0.8rem;
  color: var(--burnt-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pub-title {
  font-weight: 600;
  color: var(--dark);
  margin: 0.25rem 0;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-light);
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.hangingindent {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
}

/* ============================================
   NEWS ITEMS
   ============================================ */
.news-item {
  padding: var(--space-md);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.news-date {
  font-size: 0.8rem;
  color: var(--burnt-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.news-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.news-item p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--dark);
  color: var(--bg-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--bg-white);
  opacity: 0.7;
  font-size: 0.9rem;
}

.footer-links a:hover {
  opacity: 1;
}

.footer p {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  :root {
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-xl) 0;
    gap: var(--space-lg);
  }

  .hero-img {
    margin: 0 auto;
    width: 180px;
    height: 240px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-links {
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    gap: 0;
    padding: var(--space-md) 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-bottom: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--bg-light);
    border-bottom: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.active {
    color: var(--burnt-orange);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .dual-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* ============================================
   CODE HACKS & CODE STYLING
   ============================================ */
.code-hacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

code {
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 0.15em 0.4em;
  color: #c7254e;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
