:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #1a1a1a;
  --muted: #5a6573;
  --brand: #a31a55;
  --brand-700: #094acc;
  --accent: #E3A8AA;
  --line: #e7ecf2;
  --maxw: 980px;
  --timeline-x: 150px;
  --timeline-circle: #8b0000; /* dark red */
}

* { box-sizing: border-box; }
html { 
  margin: 0; 
  padding: 0; 
  overflow-y: scroll; /* Force scrollbar to prevent layout shift */
}
body { 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background: rgb(239, 239, 234);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  background: white;
  margin: 0 auto;
  max-width: var(--maxw);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  min-height: 70vh;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(239, 239, 234, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.site-header .container {
  background: rgb(239, 239, 234);
  margin: 0 auto;
  max-width: var(--maxw);
}
.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 16px 0; 
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-initials {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(11, 95, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-initials:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 95, 255, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-link { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.2px; font-size: 22px; }
.brand-tagline { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.site-nav { position: relative; }
.nav-toggle { display: none; background: transparent; color: var(--text); border: 1px solid var(--line); padding: 6px 10px; border-radius: 6px; }
.nav-list { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.nav-list li { position: relative; }
.nav-list a { 
  color: var(--muted); 
  text-decoration: none; 
  font-weight: 500; 
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
  display: block;
}
.nav-list a:hover { 
  color: var(--brand-700); 
  background: linear-gradient(135deg, #f8fafc 0%, #eef7ff 100%);
  transform: translateY(-1px);
}
.nav-list a[aria-current="page"] {
  color: #1e3a8a;
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  /* box-shadow: 0 2px 8px rgba(16,24,40,.06); */
  /* border: 1px solid var(--line); */
  font-weight: 600;
}
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 2px;
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }
  .header-inner {
    padding: 14px 0;
    min-height: 56px;
  }
  .brand-initials {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .brand-link {
    font-size: 20px;
  }
  .nav-toggle { display: inline-block; }
  .nav-list { 
    position: absolute; 
    right: 0; 
    top: 48px; 
    background: rgb(239, 239, 234); 
    padding: 16px; 
    border: 1px solid var(--line); 
    border-radius: 16px; 
    display: none; 
    flex-direction: column; 
    gap: 4px; 
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(16,24,40,.12);
    z-index: 1001;
  }
  .nav-list.open { display: flex; }
  .nav-list a {
    padding: 12px 16px;
    border-radius: 12px;
    margin: 2px 0;
  }
  .nav-list a[aria-current="page"]::after {
    bottom: 4px;
    right: 8px;
    left: auto;
    transform: none;
    width: 3px;
    height: 20px;
  }
}

.section { 
  padding: 56px 0; 
}
.section.alt { background: #f8fafc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hero { padding-top: 84px; }
.eyebrow { color: var(--brand-700); text-transform: uppercase; font-size: 12px; letter-spacing: 1.2px; margin: 0 0 10px 0; font-weight: 600; }
.quote { 
  color: var(--brand-700); 
  font-style: italic; 
  margin: 0 0 32px 0; 
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  padding: 24px 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef7ff 100%);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.08);
  position: relative;
}
.quote::before {
  content: "\201C";
  font-size: 48px;
  color: var(--brand);
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: Georgia, serif;
  opacity: 0.6;
}
.quote::after {
  content: "\201D";
  font-size: 48px;
  color: var(--brand);
  position: absolute;
  bottom: -8px;
  right: 16px;
  font-family: Georgia, serif;
  opacity: 0.6;
}
.hero-intro {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 24px;
}
.hero-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.hero-image:hover {
  transform: translateY(-2px);
}
.hero-text {
  flex: 1;
}
.hero-title { font-size: 36px; line-height: 1.2; margin: 10px 0 12px 0; font-weight: 700; }
.lead { font-size: 18px; color: var(--text); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 10px 0; }
h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 30px; margin-bottom: 18px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 22px; margin-top: 10px; font-weight: 600; }
p { margin: 0 0 14px 0; color: var(--text); }
ul { margin: 0 0 12px 20px; }

.link-list { list-style: disc; }
.link-list a { color: var(--brand); text-decoration: none; font-weight: 600; }
.link-list a:hover { color: var(--brand-700); text-decoration: underline; }

/* Buttons */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 10px 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s, border .2s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; border: 1px solid var(--brand-700); }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { background: #fff; color: var(--brand-700); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* Cards and grids */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.card-link { text-decoration: none; color: inherit; }
.card { 
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%); 
  border: 1px solid var(--line); 
  border-radius: 16px; 
  padding: 24px; 
  box-shadow: 0 2px 8px rgba(16,24,40,.06); 
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; 
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}
.card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 12px 24px rgba(16,24,40,.12); 
  border-color: var(--brand); 
}
.card h3 { 
  margin: 0 0 12px 0; 
  color: #931223; 
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.card p { 
  color: var(--muted); 
  margin: 0; 
  line-height: 1.6;
  font-size: 15px;
}

@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { 
  .cards { grid-template-columns: 1fr; }
  .hero-intro {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .hero-image {
    max-width: 200px;
    margin: 0 auto;
  }
  .quote {
    font-size: 18px;
    padding: 20px 24px;
  }
  .quote::before,
  .quote::after {
    font-size: 36px;
  }
}

/* Prose */
.prose { color: var(--text); }
.prose p { margin: 0 0 16px 0; }
.prose p + p { margin-top: 8px; }
.prose ul { margin: 8px 0 16px 22px; }
.prose li { margin-bottom: 6px; }
.prose .image-container { margin: 20px 0 30px 0; overflow: hidden; }
.prose .image-right { float: right; margin: 5px 0 10px 20px; max-width: 40%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.prose .image-left { float: left; margin: 5px 20px 10px 0; max-width: 40%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.prose .caption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; font-style: italic; }

/* Forms (Contact) */
.form { display: grid; gap: 12px; }
.form label { font-weight: 600; margin-bottom: 4px; display: inline-block; }
.form input, .form textarea { width: 100%; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,95,255,.12); }
.form textarea { min-height: 140px; resize: vertical; }
.form-help { color: var(--muted); font-size: 13px; }
.btn-submit { background: var(--brand); color: #fff; border: 1px solid var(--brand-700); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.btn-submit:hover { background: var(--brand-700); }

/* Resume timeline */
.timeline { display: grid; gap: 16px; }
.timeline { position: relative; isolation: isolate; }
.timeline::before { content: ""; position: absolute; left: var(--timeline-x); top: 6px; bottom: 6px; width: 2px; background: #dfe6ee; z-index: 1; pointer-events: none; }
.timeline .item { 
  position: relative; 
  display: grid; 
  grid-template-columns: 160px 1fr; 
  gap: 18px; 
  align-items: start; 
  z-index: 2;
  padding: 0;
  margin-bottom: 18px;
  border: none;
  background: none;
}
.timeline .item::before { 
  content: ""; 
  position: absolute; 
  left: calc(var(--timeline-x) - 6px); 
  top: 24px; 
  width: 12px; 
  height: 12px; 
  background: var(--timeline-circle); 
  border-radius: 50%; 
  box-shadow: 0 0 0 3px rgba(139,0,0,.15); 
  z-index: 5; /* Higher z-index to appear in front */
}
.timeline .when {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  padding: 0;
  display: inline-block;
  text-align: right;
  padding-right: 50px;
  white-space: nowrap;
  margin-top: 20px;
  width: 100%;
}
.timeline .what { 
  line-height: 1.55; 
  background: transparent;
  padding: 16px 20px;
  border-radius: 0;
  border: none;
}
@media (max-width: 720px) { 
  :root { --timeline-x: 110px; }
  .timeline .item { grid-template-columns: 140px 1fr; }
  .timeline .when { padding-right: 30px; font-size: 14px; }
}

.tabs { margin-top: 16px; }
.tab-list { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-list [role="tab"] {
  background: linear-gradient(135deg, #f8fafc 0%, #eef7ff 100%);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  font-size: 14px;
}
.tab-list [role="tab"]:hover {
  color: var(--brand-700);
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.08);
}
.tab-list [role="tab"][aria-selected="true"] {
  color: #1e3a8a;
  border-color: var(--brand);
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.12);
}
.tab-list [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 2px;
}
.tab-panels { 
  border: 1px solid var(--line); 
  border-radius: 16px; 
  padding: 24px; 
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%); 
  box-shadow: 0 2px 8px rgba(16,24,40,.06); 
}

.site-footer { 
  border-top: 1px solid var(--line); 
  padding: 22px 0; 
  color: var(--muted); 
  background: white;
  margin: 0 auto;
  max-width: var(--maxw);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  margin-top: 0;
}


