/* ==========================================
   MIKE WONG — Personal Website
   Clean editorial aesthetic
   ========================================== */

:root {
  --bg: #faf9f7;
  --sidebar-bg: #1a1a1a;
  --sidebar-width: 240px;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #9a9a9a;
  --accent: #c8a96e;
  --accent-light: #f0e8d8;
  --border: #e8e4de;
  --card-bg: #ffffff;
  --footer-bg: #1a1a1a;
  --footer-text: #e8e4de;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 32px 0;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 0 24px 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #1a1a1a;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.logo-name {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-links {
  list-style: none;
  padding: 24px 0;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-item a,
.nav-item .dropdown-toggle {
  display: flex;
  align-items: center;
  padding: 11px 24px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2px;
  transition: color 0.2s, background 0.2s;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  gap: 8px;
  justify-content: space-between;
}

.nav-item a:hover,
.nav-item .dropdown-toggle:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
}

.nav-item.active > a {
  color: var(--accent);
  font-weight: 500;
}

.nav-item.active > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.chevron.open {
  transform: rotate(180deg);
}

.dropdown {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.2);
}

.dropdown.open {
  max-height: 200px;
}

.dropdown li a {
  padding: 9px 24px 9px 38px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.dropdown li a:hover {
  color: rgba(255,255,255,0.8);
}

.sidebar-footer-links {
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 16px;
}

.sidebar-contact {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
  border-radius: 4px;
}

.sidebar-contact:hover {
  color: var(--accent);
}

.sidebar-contact svg {
  width: 18px;
  height: 18px;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main-content {
  flex: 1;                     /* Takes up all remaining space outside the sidebar */
  min-height: 100vh;
  background: var(--bg);
  padding: 80px 40px;          /* Clean breathing room on the sides */
  
  /* ADD THESE THREE LINES TO CENTER THE CONTENT */
  display: flex;
  flex-direction: column;
  align-items: center;         /* Horizontally centers everything inside the main area */
}

/* ==========================================
   HEADER
   ========================================== */

.page-header {
  padding: 72px 64px 56px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  max-width: 1200px;
  position: relative;
}

.header-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.header-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.header-title em {
  font-style: italic;
  color: var(--accent);
}

.header-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ==========================================
   BODY SECTION
   ========================================== */

.body-section {
  padding: 48px 64px 64px;
  flex: 1;
}

.body-inner {
  max-width: 1200px;
}

.body-text {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 52px;
  font-weight: 300;
  max-width: 850px
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
}

.card-content {
  flex: 1;
}

.card-content h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.card-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}

.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ==========================================
   FOOTER
   ========================================== */

.page-footer {
  background: var(--footer-bg);
  padding: 56px 64px;
  color: var(--footer-text);
}

.footer-inner {
  max-width: 1200px;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 36px;
}

.contact-links {
  display: flex;
  gap: 32px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--footer-text);
  transition: color 0.2s;
}

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

.contact-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.contact-item:hover .contact-icon {
  background: rgba(200, 169, 110, 0.15);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2px;
}

.contact-value {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================
   PAGE SHELLS (Resume, Teddy, Work Samples)
   ========================================== */

.page-shell {
  width: 100%;
  max-width: 1200px;           /* Matches your updated wide layout constraint */
  display: flex;
  flex-direction: column;
  align-items: center;         /* Centers elements like h1, subheadings, and grids */
  text-align: center;          /* Centers titles and block intro typography */
}

.page-shell-header {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;         /* Keeps tags and headings stacked beautifully in the middle */
}

.page-shell-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-shell h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.page-shell-line {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.page-shell p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  font-weight: 300;
}

.placeholder-box {
  margin-top: 48px;
  padding: 48px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   HAMBURGER / MOBILE
   ========================================== */

.hamburger {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--sidebar-bg);
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .page-header {
    padding: 80px 24px 40px;
  }

  .body-section {
    padding: 32px 24px 48px;
  }

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

  .page-footer {
    padding: 40px 24px;
  }

  .contact-links {
    flex-direction: column;
    gap: 20px;
  }

  .page-shell {
    padding: 80px 24px 48px;
  }
}
/* ==========================================
   RESUME PDF EMBED STYLES
   ========================================== */

.resume-embed-container {
  margin-top: 32px;
  width: 100%;
  max-width: 850px; /* Standard resume layout width */
  height: 90vh; /* Takes up 80% of the viewport height */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.resume-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Mobile fallback layout - shown only on small screens */
.resume-mobile-fallback {
  display: none;
  margin-top: 24px;
  text-align: center;
  padding: 32px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.resume-mobile-fallback p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.download-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--sidebar-bg);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.download-btn:hover {
  background: var(--accent);
  color: #1a1a1a;
}

/* Responsive adjustment for mobile viewports */
@media (max-width: 768px) {
  .resume-embed-container {
    display: none; /* Hide the iframe on mobile because mobile browsers often struggle to render inline PDFs */
  }
  
  .resume-mobile-fallback {
    display: block; /* Show a clean, dedicated tap-to-view button instead */
  }
}

/* ==========================================
   HORIZONTAL FORECAST PDF EMBED
   ========================================== */

.forecast-embed-container {
  margin-top: 40px;
  width: 100%;
  max-width: 1200px; /* Aligns perfectly with your expanded layout */
  height: 0;
  padding-bottom: 56.25%; /* Magic trick for a perfect 16:9 horizontal aspect ratio */
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.forecast-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Mobile fallback for wide assets */
.forecast-mobile-fallback {
  display: none;
  margin-top: 24px;
  text-align: center;
  padding: 32px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.forecast-mobile-fallback p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  /* On smaller laptop or tablet screens, adjust ratio to give it more height if needed */
  .forecast-embed-container {
    padding-bottom: 70%; 
  }
}

@media (max-width: 768px) {
  .forecast-embed-container {
    display: none; /* Hide the cramped landscape iframe on tiny mobile views */
  }
  
  .forecast-mobile-fallback {
    display: block; /* Serve a clean link to open the PDF cleanly in full screen */
  }
}