/*======================================================================
  cv-style.css — Fixed Sidebar Dashboard Layout for Curriculum Vitae
  Matching the 2-column sidebar design of CV.dc.html
  ====================================================================*/

:root {
  --bg: #f3f2f2;
  --ink: #201f1d;
  --muted: #605d5d;
  --accent: #b68235;
  --accent-deep: #7d5411;
  --rule: rgba(32, 31, 29, 0.16);
  --heading: "Cormorant Garamond", Georgia, serif;
  --body: "Lora", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --ink: #eceae7;
    --muted: #a49f98;
    --accent: #d7a55a;
    --accent-deep: #e1b878;
    --rule: rgba(236, 234, 231, 0.16);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  width: 100%;
  max-width: none;
}

/* ---- Layout Container -------------------------------------------- */
.cv-grid {
  display: block;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* ---- Fixed Left Sidebar (Dashboard) ------------------------------ */
.cv-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 236px;
  height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
  border-right: 1px solid var(--rule);
  padding: 44px 24px;
  z-index: 100;
  background: var(--bg);
}

.cv-nav-id {
  margin-bottom: 26px;
}

.cv-nav-name {
  font-family: var(--heading);
  font-size: 23px;
  line-height: 1.08;
  font-weight: 600;
  color: var(--ink);
}

.cv-nav-title {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.cv-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: block;
  font-size: 13.5px;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  border: 0 !important;
  transition: color 0.15s;
}

.toc-link:hover {
  color: var(--accent);
  border: 0 !important;
}

.toc-link.active,
.toc-link[aria-current='true'] {
  color: var(--accent-deep);
  font-weight: 600;
  border: 0 !important;
}

.toc-link.active::before,
.toc-link[aria-current='true']::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
}

.cv-nav-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-nav-foot a {
  font-size: 12.5px;
  color: var(--accent-deep);
  text-decoration: none;
  border: 0 !important;
}

/* ---- Main Column (Scrollable Right Content) --------------------- */
.cv-main {
  margin-left: 236px;
  padding: 48px 56px;
  max-width: 900px;
  width: calc(100% - 236px);
  min-width: 0;
  box-sizing: border-box;
}

.cv-header {
  margin-bottom: 44px;
}

.cv-header h1 {
  font-family: var(--heading);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.012em;
  margin: 0;
  line-height: 1.06;
}

.cv-header-rule {
  width: 46px;
  height: 1px;
  background: var(--accent);
  margin: 18px 0;
}

.cv-header-meta {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.cv-header-meta a {
  color: var(--accent-deep);
}

.meta-sep {
  color: var(--muted);
  opacity: 0.5;
}

.meta-updated {
  font-style: italic;
}

/* ---- Section Headings with Rule & Note -------------------------- */
.sectionHead,
.likesectionHead {
  display: flex !important;
  align-items: center !important;
  gap: 14px;
  margin: 2.4rem 0 1rem !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
  scroll-margin-top: 24px;
}

.cv-sec-label {
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  white-space: nowrap;
}

.cv-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.cv-sec-note {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  white-space: nowrap;
}

.cv-sec-note a {
  font-style: normal;
  font-weight: 600;
}

/* ---- Flex Entry Rows (Title left, Date/Place right) --------------- */
.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.35rem 0;
  width: 100%;
}

.entry-row.indent-entry {
  padding-left: 1.25rem;
}

.entry-note {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  margin-top: 2px;
}

.entry-title {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  margin-right: 0.5rem;
}

.entry-dates {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-align: right;
  margin-left: 0.75rem;
}

/* ---- Publications Ordered List (Matching CV.dc.html) ------------ */
ol.pub-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

li.pub-item {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.pub-num {
  flex: none;
  width: 1.8em;
  text-align: right;
  font-family: var(--heading);
  font-size: 18px;
  color: var(--accent-deep);
  font-weight: 600;
}

.pub-body {
  font-size: 14.5px;
  line-height: 1.55;
  flex: 1;
}

.pub-links {
  display: inline-flex;
  gap: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.pub-link-btn {
  font-size: 12px !important;
  color: var(--accent-deep) !important;
  border: 0 !important;
  background: rgba(182, 130, 53, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  text-decoration: none !important;
  transition: background 0.15s;
}

.pub-link-btn:hover {
  background: rgba(182, 130, 53, 0.2);
}

/* ---- Advising Cards --------------------------------------------- */
.advising-card {
  margin-bottom: 0.8rem;
}

.advising-card .entry-dates {
  white-space: normal;
  text-align: right;
  max-width: 60%;
}

.advising-desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.advising-first {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Body Typography -------------------------------------------- */
p {
  margin: 0.2rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

p.indent {
  text-indent: 0;
  padding-left: 1.25rem;
}

.rm-lmbx-10,
.rm-lmbx-9 {
  font-weight: 600;
}

.rm-lmri-10 {
  font-style: italic;
}

.rm-lmcsc-10 {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

.rm-lmtt-10,
a .rm-lmtt-10 {
  font-family: var(--body) !important;
  font-size: 1em !important;
  word-break: break-all;
}

/* ---- Links ------------------------------------------------------ */
a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(182, 130, 53, 0.35);
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---- Lists ------------------------------------------------------ */
ul.itemize1 {
  list-style: none;
  margin: 0.4rem 0;
  padding: 0;
}

ul.itemize1 > li.itemize {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.5rem 0;
}

ul.itemize1 > li.itemize::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.42rem;
  height: 1px;
  background: var(--accent);
}

/* ---- Tables Responsiveness -------------------------------------- */
table.tabular,
table.longtable {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
}

table.tabular td,
table.longtable td {
  padding: 0.3rem 0.6rem 0.3rem 0;
  vertical-align: top;
  border: 0;
}

table.tabular td:first-child,
table.longtable td:first-child {
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 9rem;
}

/* ---- Responsive Mobile/Tablet Breakpoints ----------------------- */
@media (max-width: 960px) {
  .cv-nav {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: auto;
    max-height: 60vh;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    z-index: 100;
    background: var(--bg);
    padding: 12px 18px;
  }

  .cv-nav-id {
    display: none;
  }

  .cv-nav-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .toc-link {
    padding: 4px 0;
    white-space: nowrap;
  }

  .toc-link.active::before,
  .toc-link[aria-current='true']::before {
    display: none;
  }

  .cv-nav-foot {
    display: none;
  }

  .cv-main {
    margin-left: 0;
    padding: 24px 20px;
    width: 100%;
  }

  .cv-header h1 {
    font-size: 32px;
  }

  .entry-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .entry-dates {
    white-space: normal;
    text-align: left;
    margin-left: 0;
  }
}

@media print {
  .cv-nav {
    display: none !important;
  }

  .cv-main {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: none;
    width: 100% !important;
  }

  a {
    border: 0;
    color: var(--ink);
  }
}
