/* ═══════════════════════════════════════════════════════════════════
   VLAD CAINAMISIR — Personal Site
   Aesthetic: IBM Technical Report · Bell Labs Monograph · Los Alamos
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --bg:        #F9F8F5;       /* warm off-white — aged paper */
  --surface:   #FFFFFF;
  --text:      #141414;
  --text-2:    #2E2E2E;
  --muted:     #7A7A7A;
  --accent:    #CC1A1A;       /* IBM heritage red */
  --border:    #D6D2CA;
  --border-2:  #E8E4DC;

  --f-mono:    'IBM Plex Mono', 'Courier New', monospace;
  --f-sans:    'IBM Plex Sans', 'Arial', sans-serif;

  --sz-xs:     10px;
  --sz-sm:     12px;
  --sz-md:     13px;
  --sz-body:   15px;

  --max-w:     960px;
  --pad-x:     48px;
  --nav-h:     52px;

  --section-gap: 60px;
}

/* ─── BASE ───────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.12s ease;
}
a:hover { color: var(--accent); }

strong { font-weight: 600; }
em     { font-style: italic; }

/* ─── HEADER / NAVIGATION ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  /* subtle blur so content reads underneath */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(249, 248, 245, 0.92);
}

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

.header-logo {
  font-size: var(--sz-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text);
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  font-size: var(--sz-xs);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.header-nav a:hover,
.header-nav a.is-active { color: var(--text); }

/* ─── MAIN CONTAINER ─────────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--nav-h) var(--pad-x) var(--section-gap);
}

/* ─── HERO ───────────────────────────────────────────────────────── */
.hero {
  padding: 64px 0 52px;
}

/* top meta row: looks like a report cover header */
.hero-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 14px;
}

.hero-meta-label {
  display: block;
  font-size: var(--sz-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.hero-meta-value {
  display: block;
  font-size: var(--sz-sm);
  color: var(--text-2);
}

.hero-meta-cell--right { text-align: right; }

/* ruled lines that bracket the name */
.hero-rule {
  height: 1px;
  background: var(--border);
}

/* the name block */
.hero-body {
  padding: 40px 0 28px;
}

.hero-name {
  font-size: clamp(52px, 8.5vw, 82px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  color: var(--text);
}

.hero-descriptor {
  font-size: var(--sz-sm);
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* abstract paragraph below second rule */
.hero-abstract {
  margin-top: 22px;
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: #3C3C3C;
  max-width: 580px;
}

/* ─── DOCUMENT SECTION TEMPLATE ──────────────────────────────────── */
.doc-section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

.doc-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 36px;
}

.doc-section-num {
  font-size: var(--sz-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  width: 28px;
}

.doc-section-title {
  font-size: var(--sz-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
}

/* thin rule that extends to the right of the section title */
.doc-section-rule {
  display: block;
  flex: 1;
  height: 1px;
  background: var(--border-2);
  position: relative;
  top: -1px;
}

/* ─── TWO-COLUMN (ABOUT) ─────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 188px;
  gap: 48px;
  align-items: start;
}

.col-prose p {
  font-family: var(--f-sans);
  font-size: var(--sz-body);
  font-weight: 400;
  line-height: 1.78;
  color: var(--text-2);
  margin-bottom: 18px;
}
.col-prose p:last-child { margin-bottom: 0; }

/* ─── BOOK LIST ──────────────────────────────────────────────────── */
.book-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.book-list li {
  font-size: var(--sz-sm);
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
  color: var(--text-2);
  font-style: italic;
}

.book-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-style: normal;
  font-weight: 300;
}

/* author name: small, upright, muted */
.book-list li span {
  font-style: normal;
  color: var(--muted);
  font-size: var(--sz-xs);
  letter-spacing: 0.04em;
  margin-left: 4px;
}

/* sidebar meta */
.col-meta {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.meta-key {
  font-size: var(--sz-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-val {
  font-size: var(--sz-sm);
  line-height: 1.5;
}

.meta-val a {
  display: block;
  color: var(--text-2);
}
.meta-val a:hover { color: var(--accent); }

/* ─── EXPERIENCE ─────────────────────────────────────────────────── */
.exp-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-2);
}
.exp-entry:first-child { padding-top: 0; }
.exp-entry:last-child  { border-bottom: none; padding-bottom: 0; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.exp-org {
  font-size: var(--sz-md);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.exp-role {
  font-size: var(--sz-xs);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.exp-date {
  font-size: var(--sz-xs);
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-list li {
  font-size: var(--sz-sm);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  color: var(--text-2);
}

.exp-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-weight: 300;
}

/* ─── EDUCATION ──────────────────────────────────────────────────── */
.edu-entry {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-2);
}
.edu-entry:first-child { padding-top: 0; }
.edu-entry:last-child  { border-bottom: none; padding-bottom: 0; }

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.edu-school {
  font-size: var(--sz-md);
  font-weight: 600;
}

.edu-year {
  font-size: var(--sz-xs);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.edu-degree {
  font-size: var(--sz-sm);
  margin-bottom: 8px;
}

.edu-detail {
  font-size: var(--sz-xs);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 4px;
}
.edu-detail:last-child { margin-bottom: 0; }

.edu-gpa {
  color: var(--text);
  font-weight: 500;
}

/* ─── RESEARCH / PROJECT GRID ────────────────────────────────────── */
/*
   Grid lines are achieved by setting 1px gaps on a parent whose
   background is var(--border), then giving each card a background.
   Classic technique from print-inspired web design.
*/
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg);
  padding: 28px 24px;
}

.project-card--alt {
  background: var(--surface);
}

.project-id {
  font-size: var(--sz-xs);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.project-name {
  font-size: var(--sz-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.project-tech {
  font-size: var(--sz-xs);
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.project-desc {
  font-size: var(--sz-sm);
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 14px;
}

.project-tags {
  font-size: var(--sz-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── SKILLS TABLE ───────────────────────────────────────────────── */
.skills-table {
  width: 100%;
  border-collapse: collapse;
}

.skills-table tr {
  border-bottom: 1px solid var(--border-2);
}
.skills-table tr:last-child { border-bottom: none; }

.skills-table th {
  font-family: var(--f-mono);
  font-size: var(--sz-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
  padding: 13px 28px 13px 0;
  width: 120px;
  white-space: nowrap;
}

.skills-table td {
  font-size: var(--sz-sm);
  padding: 13px 0;
  line-height: 1.65;
  color: var(--text-2);
}

/* ─── CONTACT ────────────────────────────────────────────────────── */
.contact-line {
  font-size: var(--sz-sm);
  line-height: 2.2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.contact-sep {
  color: var(--muted);
  margin: 0 12px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--pad-x);
  display: flex;
  justify-content: space-between;
  font-size: var(--sz-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── SELECTION COLOUR ───────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root {
    --pad-x:       24px;
    --section-gap: 48px;
  }

  .hero { padding: 44px 0 36px; }

  .hero-meta-row {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .hero-meta-cell--right { text-align: left; }

  .hero-name { font-size: 44px; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .col-meta {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 24px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px 32px;
  }

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

  .contact-line {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-sep { display: none; }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
    padding: 20px var(--pad-x);
  }

  .header-nav { gap: 18px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 36px; }

  .skills-table th {
    width: 80px;
    padding-right: 16px;
  }
}

/* ─── VIEW LINK (detail page link from index entries) ───────────── */
.exp-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.exp-view-link {
  font-size: var(--sz-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  border: 1px solid #2A9D8F;
  background: #2A9D8F;
  padding: 5px 10px;
  transition: background 0.12s, border-color 0.12s;
}
.exp-view-link:hover {
  background: #21867A;
  border-color: #21867A;
  color: #fff;
}

.hero-link {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.12s ease, text-decoration 0.12s ease, font-weight 0.12s ease;
  font-weight: normal;
}
.hero-link:hover {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* ─── PRINT ──────────────────────────────────────────────────────── */
@media print {
  .site-header { position: static; }
  main { padding-top: 0; }
  .hero { padding-top: 16px; }
}
