/* ============================================================
   IMPORTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ============================================================
   CSS VARIABLES — LIGHT THEME (default)
   ============================================================ */
:root {
  --bg:          #f8f5f0;
  --bg-nav:      rgba(248, 245, 240, 0.92);
  --surface:     #ffffff;
  --border:      #e0d9ce;
  --border-accent: #c8a96e;
  --text-primary: #0d0d0d;
  --text-secondary: #5a5550;
  --text-muted:  #9a9390;
  --accent:      #c8a96e;
  --accent-hover: #b8934f;
  --tag-bg:      #f0ece4;
  --tag-text:    #5a5550;
  --card-bg:     #ffffff;
  --card-border: #e0d9ce;
  --live-bg:     #e8f5e9;
  --live-text:   #2e7d32;
  --placeholder-bg: #f5f2ed;
  --shadow:      0 2px 12px rgba(13,13,13,0.06);
  --shadow-hover: 0 8px 32px rgba(13,13,13,0.12);
}

/* DARK THEME */
[data-theme="dark"] {
  --bg:          #0d0d0d;
  --bg-nav:      rgba(13, 13, 13, 0.92);
  --surface:     #161614;
  --border:      #2a2820;
  --border-accent: #c8a96e;
  --text-primary: #f0ece4;
  --text-secondary: #b0a99e;
  --text-muted:  #6a6460;
  --accent:      #c8a96e;
  --accent-hover: #d9bc83;
  --tag-bg:      #1e1c18;
  --tag-text:    #b0a99e;
  --card-bg:     #161614;
  --card-border: #2a2820;
  --live-bg:     #0a1f0d;
  --live-text:   #66bb6a;
  --placeholder-bg: #1a1814;
  --shadow:      0 2px 12px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 400;
}

.body-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.theme-toggle .icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* Nav hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.25s ease;
  border-radius: 2px;
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--text-primary);
}

/* ============================================================
   TEXT CTAs (link-style, not buttons)
   ============================================================ */
.text-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.text-cta:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.text-cta--accent {
  color: var(--accent);
}

.text-cta--accent:hover {
  color: var(--accent-hover);
}

.cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cta-divider {
  color: var(--text-muted);
  font-size: 0.9rem;
  user-select: none;
}

/* ============================================================
   TAGS / BADGES
   ============================================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
}

.tag--live {
  background: var(--live-bg);
  color: var(--live-text);
  border-color: transparent;
  font-weight: 600;
}

.tag--live::before {
  content: '● ';
  font-size: 0.6rem;
}

/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 5rem;
  align-items: center;
  width: 100%;
}

.hero-bio {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.75;
}

.hero-ctas {
  margin-top: 2rem;
}

.hero-contact-line {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-contact-line a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.hero-contact-line a:hover {
  color: var(--accent);
}

.hero-contact-line .li-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Profile photo placeholder */
.profile-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 2px dashed var(--border-accent);
  border-radius: 4px;
  background: var(--placeholder-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: 340px;
}

/* ============================================================
   WORK / PROJECT CARDS
   ============================================================ */
.work-section {
  border-top: 1px solid var(--border);
}

.work-header {
  margin-bottom: 3.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

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

.card-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.12;
  line-height: 1;
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  user-select: none;
  pointer-events: none;
}

.card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.card-problem {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  flex: 1;
}

.card-explore {
  flex-shrink: 0;
}

.card-footer .tags {
  flex: 1;
  gap: 0.4rem;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 640px;
}

.contact-text {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.contact-ctas {
  margin-top: 2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   EXPERIENCE PAGE
   ============================================================ */
.experience-page {
  padding-top: 8rem;
  padding-bottom: 6rem;
}

.experience-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.experience-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.resume-section {
  margin-top: 3rem;
}

.resume-section + .resume-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.resume-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.resume-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Experience items */
.exp-item {
  margin-bottom: 2.5rem;
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.exp-company {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.exp-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.exp-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exp-bullets li {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 1.2rem;
  position: relative;
}

.exp-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* Education */
.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.edu-item:first-child {
  border-top: 1px solid var(--border);
}

.edu-degree {
  font-weight: 600;
  font-size: 0.925rem;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.edu-year {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Skills */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-chip {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================================
   PROJECT PAGES
   ============================================================ */
.project-page {
  padding-top: 8rem;
  padding-bottom: 6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.project-hero {
  margin-bottom: 3.5rem;
}

.project-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.project-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 1rem;
}

.project-teaser {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-section {
  margin-top: 3.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
}

.project-section-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.project-section h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 1.5rem;
}

.project-section p {
  font-size: 0.975rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 680px;
}

.project-section p:last-child {
  margin-bottom: 0;
}

/* Screenshot placeholders */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--border-accent);
  border-radius: 6px;
  background: var(--placeholder-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.github-cta {
  margin-top: 2rem;
}

/* Download PDF button */
.download-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--accent);
  color: #0d0d0d;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.download-pdf-btn:hover {
  background: var(--accent-hover);
  color: #0d0d0d;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ============================================================
   DIVIDERS & UTILITIES
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .profile-photo-placeholder {
    max-width: 220px;
    margin: 0 auto;
  }

  .hero {
    padding-top: 8rem;
    min-height: auto;
  }

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

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  section {
    padding: 4rem 0;
  }

  .container,
  .container--narrow {
    padding: 0 1.25rem;
  }

  .nav-inner {
    padding: 0 1.25rem;
  }

  .footer-inner {
    padding: 0 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .project-card {
    padding: 1.5rem;
  }

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

/* ============================================================
   PRINT STYLES (experience.html)
   ============================================================ */
@media print {
  .site-nav,
  .nav-mobile,
  .download-btn,
  .download-pdf-btn,
  .site-footer,
  .fade-in {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .experience-page {
    padding-top: 1rem;
    padding-bottom: 0;
  }

  .experience-header {
    margin-bottom: 1.5rem;
  }

  .resume-section + .resume-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }

  .exp-item {
    margin-bottom: 1.25rem;
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  h1, h2, h3 {
    color: #000 !important;
  }

  .resume-section-title,
  .project-number,
  .exp-bullets li::before {
    color: #666 !important;
  }
  .profile-photo {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  }
}
