/* ═══════════════════════════════════════════════════
   CV DOCUMENT — Print-Inspired Curriculum Vitae
   A paper-first, typography-driven design
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Source+Code+Pro:wght@300;400;500&display=swap');

:root {
  --paper: #f5f1eb;
  --paper-warm: #f0ebe3;
  --paper-dark: #e8e2d8;
  --ink: #1a1a18;
  --ink-medium: #3d3b36;
  --ink-light: #6b6860;
  --ink-faint: #9e9a92;
  --ink-ghost: #c8c4bb;
  --accent: #8b2500;
  --accent-light: rgba(139, 37, 0, 0.08);
  --rule: #c8c4bb;
  --rule-light: #ddd9d1;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'EB Garamond', 'Georgia', serif;
  --font-mono: 'Source Code Pro', 'Menlo', monospace;

  --page-width: 780px;
  --page-margin: 3.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background: #d6d1c8;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

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

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #d6d1c8;
}

::-webkit-scrollbar-thumb {
  background: var(--ink-ghost);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════
   PAGE CONTAINER — The "paper"
═══════════════════════════════════════════════════ */
.cv-page {
  max-width: var(--page-width);
  margin: 2rem auto;
  background: var(--paper);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Paper texture via pseudo */
.cv-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ═══════════════════════════════════════════════════
   CV HEADER
═══════════════════════════════════════════════════ */
.cv-header {
  padding: var(--page-margin);
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.cv-header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: var(--page-margin);
  right: var(--page-margin);
  height: 1px;
  background: var(--ink);
}

.cv-name {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.1s forwards;
}

.cv-name span {
  font-weight: 600;
}

.cv-title-line {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-medium);
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.2s forwards;
}

.cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
  font-size: 0.82rem;
  color: var(--ink-light);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.3s forwards;
}

.cv-contact-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cv-contact-item::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cv-contact-item:first-child::before {
  display: none;
}

/* ═══════════════════════════════════════════════════
   NAV — Minimal
═══════════════════════════════════════════════════ */
.cv-nav {
  padding: 0.8rem var(--page-margin);
  border-bottom: 1px solid var(--rule-light);
  display: flex;
  gap: 1.8rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  overflow-x: auto;
}

.cv-nav a {
  color: var(--ink-faint);
  border-bottom: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.cv-nav a:hover {
  color: var(--accent);
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════════════════ */
.cv-section {
  padding: 2.2rem var(--page-margin);
  border-bottom: 1px solid var(--rule-light);
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.cv-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.cv-section:last-of-type {
  border-bottom: none;
}

.cv-section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.cv-section-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════
   ABOUT / PROFILE
═══════════════════════════════════════════════════ */
.cv-profile-text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--ink-medium);
  max-width: 620px;
}

.cv-profile-text em {
  font-style: italic;
  color: var(--accent);
}

.cv-profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem 2rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--rule-light);
  font-size: 0.82rem;
}

.cv-detail {
  display: flex;
  gap: 0.4rem;
}

.cv-detail-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  min-width: 60px;
}

.cv-detail-value {
  color: var(--ink-medium);
}

/* ═══════════════════════════════════════════════════
   EXPERIENCE
═══════════════════════════════════════════════════ */
.cv-exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-exp-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px dotted var(--rule-light);
}

.cv-exp-item:last-child {
  border-bottom: none;
}

.cv-exp-item:hover {
  background: var(--accent-light);
  margin: 0 calc(-1 * var(--page-margin));
  padding-left: var(--page-margin);
  padding-right: var(--page-margin);
  transition: background 0.3s ease, margin 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.cv-exp-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  padding-top: 0.15rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.cv-exp-company {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.cv-exp-role {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-bottom: 0.3rem;
}

.cv-exp-desc {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--ink-medium);
  margin-top: 0.3rem;
}

.cv-exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.cv-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  background: var(--paper-dark);
  color: var(--ink-light);
}

/* ═══════════════════════════════════════════════════
   EDUCATION
═══════════════════════════════════════════════════ */
.cv-edu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-edu-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px dotted var(--rule-light);
}

.cv-edu-item:last-child {
  border-bottom: none;
}

.cv-edu-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  padding-top: 0.1rem;
}

.cv-edu-degree {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.cv-edu-school {
  font-size: 0.85rem;
  color: var(--ink-light);
  font-style: italic;
}

.cv-edu-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   CERTIFICATIONS / AWARDS — Grouped cards
═══════════════════════════════════════════════════ */
.cv-cert-group {
  margin-bottom: 1.6rem;
}

.cv-cert-group:last-child {
  margin-bottom: 0;
}

.cv-cert-group-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dotted var(--rule-light);
}

.cv-cert-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-cert-card {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0 0.7rem 1rem;
  border-left: 2px solid var(--rule-light);
  border-bottom: 1px dotted var(--rule-light);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.cv-cert-card:last-child {
  border-bottom: none;
}

.cv-cert-card:hover {
  border-left-color: var(--accent);
  background: var(--accent-light);
}

.cv-cert-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.cv-cert-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.cv-cert-name--mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.cv-cert-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.cv-cert-issuer {
  font-size: 0.78rem;
  color: var(--ink-light);
  font-style: italic;
  margin-top: 0.1rem;
}

.cv-cert-note {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

/* ─── CVE severity badges ─── */
.cv-cert-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

.cv-cert-badge--medium {
  background: rgba(180, 140, 20, 0.1);
  color: #9a7b15;
  border: 1px solid rgba(180, 140, 20, 0.25);
}

.cv-cert-badge--high {
  background: rgba(200, 90, 20, 0.1);
  color: #b05a14;
  border: 1px solid rgba(200, 90, 20, 0.25);
}

.cv-cert-badge--critical {
  background: rgba(180, 30, 20, 0.1);
  color: var(--accent);
  border: 1px solid rgba(180, 30, 20, 0.25);
}

/* CVE card left-border color by severity */
.cv-cert-card--cve[data-severity="medium"] {
  border-left-color: #c8a82c;
}

.cv-cert-card--cve[data-severity="high"] {
  border-left-color: #d06a1a;
}

.cv-cert-card--cve[data-severity="critical"] {
  border-left-color: var(--accent);
}

/* ═══════════════════════════════════════════════════
   SKILLS — Inline tags
═══════════════════════════════════════════════════ */
.cv-skill-group {
  margin-bottom: 1rem;
}

.cv-skill-group:last-child {
  margin-bottom: 0;
}

.cv-skill-group-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.cv-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cv-skill-tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--rule);
  color: var(--ink-medium);
  transition: all 0.25s ease;
}

.cv-skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ═══════════════════════════════════════════════════
   WORKS / PROJECT LIST
═══════════════════════════════════════════════════ */
.cv-works-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-work-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px dotted var(--rule-light);
}

.cv-work-item:last-child {
  border-bottom: none;
}

.cv-work-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-ghost);
  padding-top: 0.2rem;
}

.cv-work-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.cv-work-desc {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-top: 0.15rem;
  line-height: 1.6;
}

.cv-work-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════ */
.cv-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 2rem;
}

.cv-contact-entry {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0;
}

.cv-contact-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  min-width: 55px;
}

.cv-contact-value {
  font-size: 0.88rem;
  color: var(--ink-medium);
}

/* ═══════════════════════════════════════════════════
   NOTES PAGE — Lined notebook
═══════════════════════════════════════════════════ */
.cv-notes-page {
  max-width: var(--page-width);
  margin: 0 auto 2rem;
  background: var(--paper-warm);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Red margin line */
.cv-notes-page::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--page-margin) + 20px);
  width: 1px;
  background: rgba(200, 60, 60, 0.2);
  z-index: 1;
}

.cv-notes-header {
  padding: var(--page-margin);
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}

.cv-notes-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.cv-notes-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.cv-notes-body {
  padding: 0 var(--page-margin) var(--page-margin);
  position: relative;
  z-index: 2;
}

.cv-notes-lines {
  list-style: none;
}

.cv-note-line {
  padding: 0.55rem 0 0.55rem 2.5rem;
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-medium);
  position: relative;
  min-height: 2.2rem;
}

.cv-note-line:last-child {
  border-bottom: none;
}

/* Bullet marker */
.cv-note-line::before {
  content: attr(data-marker);
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-ghost);
}

.cv-note-line em {
  font-style: italic;
  color: var(--accent);
}

.cv-note-line strong {
  font-weight: 600;
  color: var(--ink);
}

/* Empty lines for visual effect */
.cv-note-line.empty {
  color: transparent;
}

.cv-note-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-ghost);
  margin-top: 1rem;
  padding-top: 0.5rem;
  letter-spacing: 0.05em;
}

/* Handwriting style notes */
.cv-note-handwritten {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-light);
}

/* ═══════════════════════════════════════════════════
   NOTES NOTEBOOK PAGE — Full notebook
═══════════════════════════════════════════════════ */
.notes-notebook {
  max-width: var(--page-width);
  margin: 2rem auto 0;
}

/* ─── Notebook Header ─── */
.notes-nb-header {
  background: var(--paper);
  padding: var(--page-margin);
  padding-bottom: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
}

.notes-nb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dotted var(--rule-light);
}

.notes-nb-back {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  border-bottom: none !important;
  transition: color 0.3s ease;
}

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

.notes-nb-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
}

.notes-nb-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.3rem;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.1s forwards;
}

.notes-nb-subtitle {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-light);
  letter-spacing: 0.03em;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.2s forwards;
}

/* ─── Tab Navigation ─── */
.notes-nb-tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  display: flex;
  gap: 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  border-bottom: 2px solid var(--ink);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.notes-nb-tab {
  flex: 1;
  text-align: center;
  padding: 0.8rem 0.6rem;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.3s ease;
  letter-spacing: 0.04em;
}

.notes-nb-tab:hover {
  color: var(--ink-medium);
  background: var(--accent-light);
  border-bottom-color: transparent;
}

.notes-nb-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.notes-nb-tab-icon {
  margin-right: 0.3rem;
  font-size: 0.8rem;
}

/* ─── Notebook Sections ─── */
.notes-nb-section {
  background: var(--paper-warm);
  margin-top: 1px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.notes-nb-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Red margin line */
.notes-nb-section::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--page-margin) + 20px);
  width: 1px;
  background: rgba(200, 60, 60, 0.18);
  z-index: 1;
}

.notes-nb-section-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem var(--page-margin);
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 2;
}

.notes-nb-section-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notes-nb-section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}

.notes-nb-section-desc {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.notes-nb-section-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ─── Lined Notebook Body ─── */
.notes-nb-lines {
  list-style: none;
  padding: 0 var(--page-margin) var(--page-margin);
  position: relative;
  z-index: 2;
}

.notes-nb-line {
  padding: 0.6rem 0 0.6rem 2.5rem;
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink-medium);
  position: relative;
  min-height: 2.2rem;
}

.notes-nb-line:last-child {
  border-bottom: none;
}

.notes-nb-line::before {
  content: attr(data-marker);
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-ghost);
}

.notes-nb-line em {
  font-style: italic;
  color: var(--accent);
}

.notes-nb-line strong {
  font-weight: 600;
  color: var(--ink);
}

.notes-nb-line code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--paper-dark);
  padding: 0.1rem 0.35rem;
  color: var(--ink-medium);
  letter-spacing: 0;
}

.notes-nb-line.empty {
  color: transparent;
}

/* ─── Status Badges ─── */
.notes-nb-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.notes-nb-status.active {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.notes-nb-status.done {
  background: var(--paper-dark);
  color: var(--ink-faint);
  border: 1px solid var(--rule-light);
}

.notes-nb-status.pending {
  background: rgba(245, 166, 35, 0.1);
  color: #c77c00;
  border: 1px solid rgba(245, 166, 35, 0.25);
}

/* ═══════════════════════════════════════════════════
   NOTES DIRECTORY CARDS
═══════════════════════════════════════════════════ */
.notes-dir {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem var(--page-margin);
}

.notes-dir-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--rule-light);
  border-left: 3px solid var(--red-margin);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  position: relative;
}

.notes-dir-card:hover {
  background: #faf5ef;
  border-left-color: var(--ink);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.notes-dir-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 2.6rem;
  text-align: center;
}

.notes-dir-card-body {
  flex: 1;
  min-width: 0;
}

.notes-dir-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.notes-dir-card-desc {
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.notes-dir-card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.notes-dir-card-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-fade);
  letter-spacing: 0.03em;
}

.notes-dir-card-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.notes-dir-card-tags .cv-tag,
.notes-dir-card-tags .notes-nb-status {
  font-size: 0.6rem;
  padding: 0.15rem 0.45rem;
}

.notes-dir-card-arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--ink-fade);
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.25s ease;
}

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

/* ═══════════════════════════════════════════════════
   MARKDOWN CONVERTER
═══════════════════════════════════════════════════ */
.md-converter {
  padding: 0 0.5rem 1rem;
}

.md-converter-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 820px) {
  .md-converter-panels {
    grid-template-columns: 1fr;
  }
}

.md-converter-panel {
  display: flex;
  flex-direction: column;
}

.md-converter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-fade);
  margin-bottom: 0.4rem;
}

.md-converter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.md-converter-textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  padding: 1rem;
  border: 1px solid var(--rule-light);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  min-height: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.md-converter-textarea:focus {
  border-color: var(--red-margin);
}

.md-converter-preview {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.8;
  padding: 1rem;
  border: 1px solid var(--rule-light);
  background: #fefcf8;
  min-height: 220px;
  overflow-y: auto;
  color: var(--ink);
}

.md-converter-preview h1,
.md-converter-preview h2,
.md-converter-preview h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0.8em 0 0.4em;
  color: var(--ink);
}

.md-converter-preview h1 {
  font-size: 1.4rem;
}

.md-converter-preview h2 {
  font-size: 1.15rem;
}

.md-converter-preview h3 {
  font-size: 1rem;
}

.md-converter-preview p {
  margin: 0.5em 0;
}

.md-converter-preview code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}

.md-converter-preview pre {
  background: #2d2d2d;
  color: #f0f0f0;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.8em 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.md-converter-preview pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.md-converter-preview blockquote {
  border-left: 3px solid var(--red-margin);
  padding-left: 1rem;
  color: var(--ink-light);
  font-style: italic;
  margin: 0.6em 0;
}

.md-converter-preview ul,
.md-converter-preview ol {
  padding-left: 1.5rem;
  margin: 0.5em 0;
}

.md-converter-preview li {
  margin: 0.25em 0;
}

.md-converter-preview hr {
  border: none;
  border-top: 1px solid var(--rule-light);
  margin: 1em 0;
}

.md-converter-placeholder {
  color: var(--ink-fade);
  font-style: italic;
}

.md-converter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.md-converter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule-light);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.md-converter-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.md-converter-btn-accent {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.md-converter-btn-accent:hover {
  background: var(--red-margin);
  border-color: var(--red-margin);
}

.md-converter-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rule-light);
  background: transparent;
  color: var(--ink-fade);
  cursor: pointer;
  transition: all 0.2s;
}

.md-converter-copy:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Toast notification */
.md-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.md-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.cv-footer {
  max-width: var(--page-width);
  margin: 0 auto 3rem;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
}

.cv-footer a {
  color: var(--ink-faint);
  border-bottom: none;
}

.cv-footer a:hover {
  color: var(--accent);
}

.cv-footer-links {
  display: flex;
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════ */
@media print {
  body {
    background: #fff;
  }

  .cv-page {
    box-shadow: none;
    margin: 0;
    max-width: none;
  }

  .cv-nav {
    display: none;
  }

  .cv-section {
    opacity: 1;
    transform: none;
  }

  .cv-notes-page {
    break-before: page;
  }

  .notes-notebook {
    margin: 0;
  }

  .notes-nb-tabs {
    display: none;
  }

  .notes-nb-section {
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 820px) {

  .cv-page,
  .cv-notes-page,
  .notes-notebook,
  .notes-nb-header,
  .notes-nb-section {
    margin: 0;
    box-shadow: none;
  }

  .notes-nb-title {
    font-size: 1.8rem;
  }

  .notes-nb-tab {
    font-size: 0.6rem;
    padding: 0.6rem 0.3rem;
  }

  .notes-nb-tab-icon {
    display: none;
  }

  :root {
    --page-margin: 1.8rem;
  }

  .cv-name {
    font-size: 2.4rem;
  }

  .cv-exp-item,
  .cv-edu-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .cv-cert-grid {
    grid-template-columns: 1fr;
  }

  .cv-contact-grid {
    grid-template-columns: 1fr;
  }

  .cv-footer {
    padding: 1rem var(--page-margin);
  }

  .cv-exp-item:hover {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
}