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

:root {
  --burgundy:      #810020;
  --burgundy-dark: #600018;
  --bg:            #FAFAFA;
  --text:          #1A1A1A;
  --gray-900:      #111827;
  --gray-600:      #4B5563;
  --gray-500:      #6B7280;
  --gray-400:      #9CA3AF;
  --gray-300:      #D1D5DB;
  --gray-200:      #E5E7EB;
  --gray-50:       #F9FAFB;
  --white:         #FFFFFF;
  --header-h:      5rem;
  --max-w:         72rem;
  --serif:         'Playfair Display', Georgia, serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease:          200ms ease;
}

::selection {
  background: var(--burgundy);
  color: var(--white);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--sans); }
ul { list-style: none; }

/* =========================================
   HEADER
   ========================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  cursor: pointer;
  transition: color var(--ease);
  user-select: none;
}
.logo:hover { color: var(--burgundy); }

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) { .main-nav { display: flex; } }

.nav-btn {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gray-500);
  cursor: pointer;
  transition: color var(--ease);
  position: relative;
  padding: 0.25rem 0;
}
.nav-btn:hover { color: var(--burgundy); }
.nav-btn.active { color: var(--burgundy); }
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--burgundy);
  border-radius: 50%;
}

/* Hamburger */
.hamburger {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-900);
  padding: 0.25rem;
}
@media (min-width: 768px) { .hamburger { display: none; } }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  gap: 0.125rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-btn { text-align: left; padding: 0.5rem 0; }
.mobile-nav .nav-btn.active::after { display: none; }

/* =========================================
   MAIN LAYOUT
   ========================================= */
#main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}
@media (min-width: 768px) { #main-content { padding: 2.5rem 1.5rem 5rem; } }

/* Tab visibility + entrance animation */
.tab-section { display: none; }
.tab-section.active {
  display: block;
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* =========================================
   HOME
   ========================================= */
.home-layout {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 768px) {
  .home-layout {
    flex-direction: row;
  }
}

/* Left text */
.home-text {
  flex: 1;
  max-width: 42rem;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.eyebrow-line {
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--burgundy);
  flex-shrink: 0;
}
.eyebrow-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.home-headline {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  color: var(--gray-900);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.hl-italic {
  font-style: italic;
  font-weight: 400;
  color: var(--gray-400);
  padding-right: 0.4rem;
}
.hl-burgundy { color: var(--burgundy); }

.home-desc {
  font-size: 1.1rem;
  color: var(--gray-600);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 32rem;
}

.home-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-900);
  cursor: pointer;
  transition: color var(--ease);
}
.cta-primary:hover { color: var(--burgundy); }
.cta-line {
  display: block;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  transition: width 300ms ease;
  flex-shrink: 0;
}
.cta-primary:hover .cta-line { width: 2.5rem; }

.cta-secondary {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
  transition: color var(--ease);
}
.cta-secondary:hover { color: var(--burgundy); }

/* Right visual */
.home-visual {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: flex-end;
  cursor: pointer;
}

.frame-bg {
  position: absolute;
  bottom: -1.5rem;
  left: 0;
  width: 85%;
  height: 100%;
  border: 1px solid var(--gray-200);
  pointer-events: none;
  transition: transform 500ms ease;
}
@media (min-width: 768px) { .frame-bg { left: -3rem; } }
.home-visual:hover .frame-bg { transform: translate(8px, -8px); }

.frame-main {
  width: 85%;
  aspect-ratio: 4 / 5;
  background: #E8E8E8;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.frame-overlay {
  position: absolute;
  inset: 0;
  background: rgba(129, 0, 32, 0);
  transition: background 500ms ease;
  pointer-events: none;
}
.home-visual:hover .frame-overlay { background: rgba(129, 0, 32, 0.05); }

.frame-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* =========================================
   ABOUT
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 5fr 7fr;
    gap: 6rem;
    align-items: start;
  }
}

@media (min-width: 768px) {
  .about-sticky {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

.about-headline {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 4vw, 3rem);
  color: var(--gray-900);
  line-height: 1.3;
}
.about-headline em { font-style: italic; }
.em-burgundy { color: var(--burgundy); }

.about-body p {
  color: var(--gray-600);
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.about-lead {
  font-size: 1.1rem !important;
  color: var(--gray-900) !important;
  font-weight: 500 !important;
  margin-bottom: 2rem !important;
}

.timeline { margin-top: 4rem; }

.timeline-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.timeline-item:hover .timeline-year { color: var(--burgundy); }

.timeline-year {
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--gray-400);
  padding-top: 0.2rem;
  transition: color var(--ease);
  white-space: nowrap;
}
.timeline-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gray-900);
}
.timeline-sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* =========================================
   WORKS
   ========================================= */
.works-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .works-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gray-900);
  line-height: 1.15;
}

.works-filters {
  display: flex;
  gap: 1.5rem;
}
.filter-btn {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  transition: color var(--ease);
}
.filter-btn.active { color: var(--burgundy); }
.filter-btn:hover:not(.active) { color: var(--gray-900); }

.works-list {
  border-top: 1px solid var(--gray-900);
}

.work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem 1rem;
  margin: 0 -1rem;
  transition: background var(--ease);
}
.work-item:hover { background: rgba(249, 250, 251, 0.6); }
.work-item.hidden { display: none; }

.work-item-body { flex: 1; }

.work-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.work-year {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--gray-400);
}
.work-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
}
.work-type {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.work-title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  color: var(--gray-900);
  line-height: 1.25;
  transition: color var(--ease);
}
.work-item:hover .work-title { color: var(--burgundy); }

.work-desc {
  color: var(--gray-500);
  font-weight: 300;
  margin-top: 0.75rem;
  max-width: 40rem;
}

.work-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  color: var(--gray-400);
  flex-shrink: 0;
  transition: background 300ms ease, border-color 300ms ease, color 300ms ease;
}
@media (min-width: 768px) { .work-arrow { display: flex; } }
.work-item:hover .work-arrow {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

/* =========================================
   WRITINGS
   ========================================= */
.writings-list {
  max-width: 48rem;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.writing-item { cursor: pointer; }

.writing-date {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}
.writing-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  transition: color var(--ease);
}
.writing-item:hover .writing-title { color: var(--burgundy); }

.writing-abstract {
  color: var(--gray-600);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.writing-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--burgundy);
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}
.gallery-sub {
  color: var(--gray-500);
  font-style: italic;
  display: none;
}
@media (min-width: 640px) { .gallery-sub { display: block; } }

.gallery-grid {
  columns: 1;
  column-gap: 1.5rem;
}
@media (min-width: 640px) { .gallery-grid { columns: 2; } }
@media (min-width: 768px) { .gallery-grid { columns: 3; } }

.gallery-item {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  background: var(--gray-200);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.gallery-accent { background: rgba(129, 0, 32, 0.1); }

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 300ms ease;
  z-index: 1;
}
.gallery-item::after {
  content: 'VIEW';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--white);
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 2;
}
.gallery-item:hover::before { background: rgba(0, 0, 0, 0.12); }
.gallery-item:hover::after  { opacity: 1; }

/* =========================================
   CV
   ========================================= */
.cv-wrapper { max-width: 56rem; margin: 0 auto; }

.cv-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) {
  .cv-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--burgundy);
  color: var(--white);
  border: none;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ease);
}
.cv-download-btn:hover { background: var(--burgundy-dark); }

.cv-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
@media (min-width: 768px) { .cv-card { padding: 4rem; } }

.cv-name-block {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}
@media (min-width: 640px) { .cv-name-block { text-align: left; } }

.cv-name {
  font-family: var(--serif);
  font-size: 1.875rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.cv-role {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}
@media (min-width: 640px) { .cv-contacts { justify-content: flex-start; } }
.cv-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
a.cv-contact-item {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}
a.cv-contact-item:hover { color: var(--burgundy); }

.cv-section { margin-bottom: 2.5rem; }

.cv-section-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--burgundy);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.cv-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.cv-entry-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-900);
}
.cv-entry-sub {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-top: 0.2rem;
}
.cv-entry-date {
  font-size: 0.875rem;
  color: var(--gray-400);
  white-space: nowrap;
}

.cv-bullets {
  list-style: disc;
  list-style-position: inside;
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
.cv-bullets li { margin-bottom: 0.25rem; }

.cv-skills {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.85;
}

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}
.social-link {
  color: var(--gray-400);
  display: flex;
  align-items: center;
  transition: color var(--ease);
}
.social-link:hover { color: var(--burgundy); }

/* =========================================
   PRINT  (Ctrl/Cmd + P — resume only)
   ========================================= */
@media print {
  /* Hide chrome and non-resume sections */
  #site-header,
  #site-footer,
  #mobile-nav,
  .hamburger,
  .cv-top {
    display: none !important;
  }

  /* Always print the resume, regardless of the active tab */
  .tab-section { display: none !important; }
  #tab-cv {
    display: block !important;
    padding: 0 !important;
  }

  body { background: #fff; }
  #main-content { padding: 0 !important; max-width: 100% !important; }

  .cv-wrapper { max-width: 100% !important; }
  .cv-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Keep entries from splitting awkwardly across pages */
  .cv-section,
  .cv-entry,
  .cv-bullets,
  .cv-name-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Links: drop underline/color, keep text only */
  a { color: inherit !important; text-decoration: none !important; }
}
