/* =========================================================
   Dual view: "board" (editorial, light) and "engineer" (dark dev).
   styles.css is the engineer theme; this file adds the switch
   and re-skins everything when html[data-view="board"].
   ========================================================= */

[data-view="board"] .eng-only { display: none !important; }
[data-view="engineer"] .board-only { display: none !important; }
[data-view="engineer"] .at::before { content: "@ "; }
/* source text is proper case for the board view; engineer view keeps its lowercase dev style */
[data-view="engineer"] h2, [data-view="engineer"] .stack-card h3, [data-view="engineer"] .creds h3 { text-transform: lowercase; }

/* ---------- view switch ---------- */
.switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-2); border-radius: 999px; padding: 3px;
  background: var(--surface); flex-shrink: 0;
}
.switch button {
  position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer;
  font: 500 .8rem var(--sans); color: var(--muted); padding: 6px 14px; border-radius: 999px;
  white-space: nowrap; transition: color .25s;
}
.switch button[aria-pressed="true"] { color: var(--switch-on, #04140c); }
.switch-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--green);
  transition: transform .35s cubic-bezier(.3, .8, .3, 1), background .35s;
}
[data-view="engineer"] .switch-pill { transform: translateX(100%); }

.nav-inner { gap: 20px; }
.nav-links { margin-left: auto; min-width: 0; }
.brand { flex-shrink: 0; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .brand { display: inline !important; }
  .nav-inner { justify-content: space-between !important; }
}

/* ---------- view transition (circular reveal from the switch) ---------- */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: reveal .6s cubic-bezier(.4, 0, .2, 1); }
@keyframes reveal {
  from { clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 28px)); }
  to   { clip-path: circle(150vmax at var(--vt-x, 90%) var(--vt-y, 28px)); }
}

/* =========================================================
   BOARD THEME
   ========================================================= */
[data-view="board"] {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --border: #e2ddd1;
  --border-2: #cfc8b8;
  --text: #2b2f36;
  --text-strong: #14171c;
  --muted: #646a75;
  --green: #1d3a5c;        /* accent → deep navy */
  --blue: #1d3a5c;
  --accent-2: #8a5520;     /* warm bronze for numbers (≥4.5:1 on the paper background) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", Georgia, Cambria, serif;
  --switch-on: #ffffff;
  color-scheme: light;
}
[data-view="board"] body { font-size: 17px; }
[data-view="board"] #bg { display: none; }
[data-view="board"] ::selection { background: rgba(29, 58, 92, .15); }

[data-view="board"] .nav { background: rgba(246, 244, 239, .85); }
[data-view="board"] .brand { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
[data-view="board"] .nav a:not(.brand) { font-family: var(--sans); font-size: .88rem; }
[data-view="board"] .nav a.active { background: transparent; color: var(--text-strong); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
[data-view="board"] .nav a.active::before { content: none; }

/* hero */
[data-view="board"] .hero { padding-top: 88px; }
@media (min-width: 900px) {
  [data-view="board"] .hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; padding-top: 120px; }
}
[data-view="board"] .eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  color: var(--accent-2); font-weight: 600; margin-bottom: 22px;
}
[data-view="board"] h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; margin-bottom: 22px;
}
[data-view="board"] .lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.4; color: var(--text-strong); margin-bottom: 14px; }
[data-view="board"] .lede em { border-bottom: 0; font-style: italic; color: var(--green); }
[data-view="board"] .lede-2 { color: var(--muted); max-width: 36em; margin: 0 0 30px; }

[data-view="board"] .btn { border-radius: 4px; background: transparent; border-color: var(--border-2); color: var(--text-strong); }
[data-view="board"] .btn:hover { border-color: var(--green); transform: none; }
[data-view="board"] .btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
[data-view="board"] .btn.primary:hover { background: #2a4f7a; }

.glance { border-top: 2px solid var(--text-strong); padding-top: 14px; }
.glance-title { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 4px; }
.glance dl { margin: 0; }
.glance dt { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.glance dd { margin: 2px 0 0; color: var(--text-strong); font-size: .98rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* section headings */
[data-view="board"] .section { padding-top: 96px; }
[data-view="board"] h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  letter-spacing: -.01em; margin-bottom: 14px;
  padding-top: 18px; border-top: 1px solid var(--border-2);
}
[data-view="board"] h2 .hash, [data-view="board"] h2 .small { display: none; }
[data-view="board"] h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.section-intro { color: var(--muted); margin: 0 0 36px; max-width: 40em; }
[data-view="board"] #about h2, [data-view="board"] #experience h2, [data-view="board"] #stack h2, [data-view="board"] #contact h2 { margin-bottom: 36px; }

/* impact ledger */
.ledger { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border); }
@media (min-width: 720px) { .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
@media (min-width: 1000px) { .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ledger li { padding: 26px 0 28px; border-bottom: 1px solid var(--border); }
.ledger b { display: block; font-family: var(--serif); font-weight: 500; font-size: 2.1rem; line-height: 1.1; color: var(--accent-2); margin-bottom: 10px; }
.ledger h3 { margin-bottom: 8px; }
.ledger p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.6; }

/* about */
[data-view="board"] .about { grid-template-columns: minmax(0, 1fr); }
[data-view="board"] .about-body { columns: 1; max-width: 46em; }
[data-view="board"] .about-body p { font-size: 1.08rem; max-width: none; }
[data-view="board"] blockquote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.8vw, 1.8rem); line-height: 1.35;
  border-left: 3px solid var(--accent-2); color: var(--text-strong); margin: 30px 0; padding-left: 22px;
}

/* experience */
[data-view="board"] .timeline::before { display: none; }
[data-view="board"] .timeline > li { padding-left: 0; padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--border); }
[data-view="board"] .timeline > li:last-child { border-bottom: 0; }
[data-view="board"] .timeline > li::before { display: none; }
@media (min-width: 900px) { [data-view="board"] .timeline > li { grid-template-columns: 170px minmax(0, 1fr); gap: 40px; } }
[data-view="board"] .when { font-family: var(--sans); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); }
[data-view="board"] .what h3 { font-size: 1.3rem; }
[data-view="board"] .at { display: block; font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--green); margin-top: 2px; }
[data-view="board"] .what li::marker { content: "— "; color: var(--border-2); }
[data-view="board"] .sub { font-family: var(--sans); color: var(--text-strong); font-weight: 600; font-size: .85rem; }

[data-view="board"] .tags { gap: 0; margin-top: 10px; }
[data-view="board"] .tags span { border: 0; background: none; padding: 0; font-family: var(--sans); font-size: .82rem; color: var(--muted); }
[data-view="board"] .tags span + span::before { content: "·"; margin: 0 8px; color: var(--border-2); }

/* capabilities */
[data-view="board"] .card { box-shadow: none; }
[data-view="board"] .stack-card { border: 0; border-top: 2px solid var(--text-strong); border-radius: 0; background: transparent; padding: 16px 0 8px; }
[data-view="board"] .stack-card h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
[data-view="board"] .stack-card h3 .ok { color: var(--accent-2); margin-right: 6px; }
[data-view="board"] .creds .card { border-radius: 4px; }
[data-view="board"] .creds h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
[data-view="board"] .grid { column-gap: 48px; }

/* teaser + contact */
.teaser {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 24px 28px; border-radius: 4px; background: #14171c; color: #d6dbe2;
}
.teaser p { margin: 0; max-width: 34em; }
.teaser b { color: #fff; }
.teaser .btn { background: #5ee6a0 !important; border-color: #5ee6a0 !important; color: #04140c !important; font-family: var(--mono); font-size: .85rem; cursor: pointer; }
[data-view="board"] .contact { border-radius: 4px; padding: 32px; }
[data-view="board"] .footer { font-family: var(--sans); }

/* small screens: keep name on one line next to the switch */
.brand { white-space: nowrap; }
.name-short { display: none; }
@media (max-width: 420px) {
  .name-full { display: none; }
  .name-short { display: inline; }
  .switch button { padding: 6px 11px; }
}

/* ---------- print / save as PDF: a clean board-view one-pager ---------- */
@page { margin: 14mm 14mm 16mm; }
@media print {
  :root, [data-view] {
    --bg: #fff; --text: #222; --text-strong: #000; --muted: #555;
    --border: #ddd; --border-2: #bbb; --green: #1d3a5c; --accent-2: #8a5520;
  }
  html body { background: #fff !important; font-size: 9.5pt !important; line-height: 1.45 !important; }
  .about-body p { font-size: 9.5pt !important; margin-bottom: 6px !important; }
  .what p, .what li { margin-bottom: 3px !important; }
  .what h3 { font-size: 11.5pt !important; break-after: avoid; }
  .glance dd { font-size: 9.5pt !important; padding-bottom: 6px !important; }
  .glance dt { margin-top: 6px !important; }
  .lede-2 { margin-bottom: 0 !important; }
  .stack-card, .creds .card { break-inside: avoid; }
  #bg, .nav, .skip, .cta, .teaser, #shell, .eng-only, .footer .muted { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .wrap { max-width: none; padding: 0; }
  .hero { padding: 0 0 10px !important; gap: 14px; grid-template-columns: 1.3fr 1fr !important; align-items: start !important; }
  h1 { font-size: 26pt !important; margin-bottom: 6px !important; }
  .lede { font-size: 13pt !important; }
  .section { padding-top: 16px !important; }
  h2 { font-size: 15pt !important; margin-bottom: 10px !important; padding-top: 8px !important; break-after: avoid; }
  .ledger { grid-template-columns: repeat(3, 1fr) !important; column-gap: 18px !important; }
  .ledger li { padding: 10px 0 !important; break-inside: avoid; }
  .ledger b { font-size: 16pt !important; margin-bottom: 4px !important; }
  .ledger p { font-size: 9pt; }
  .timeline > li { grid-template-columns: 110px 1fr !important; gap: 16px !important; padding-bottom: 8px !important; margin-bottom: 8px !important; }
  blockquote { font-size: 13pt !important; margin: 10px 0 !important; }
  .grid, .creds { grid-template-columns: 1fr 1fr !important; gap: 10px 18px !important; }
  .card { border-color: #ddd !important; }
  #contact .card { padding: 10px 0 !important; border: 0 !important; }
  a { color: inherit; text-decoration: none; }
  #contact p::after { content: " linkedin.com/in/leonidaskontoulis"; font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
  .switch-pill, .switch button { transition: none; }
  ::view-transition-new(root) { animation: none; }
}
