/* ==========================================================================
   Alexios Kola — resume
   A resume that reads like a code editor. Dark by default, full light theme,
   display preferences panel (theme / text size / motion). No external assets.
   ========================================================================== */

:root {
  --bg: #0d1117;
  --bg-deep: #010409;
  --panel: #161b22;
  --panel-2: #21262d;
  --border: #30363d;

  --text: #e6edf3;
  --muted: #a5b0bd;
  --faint: #8b949e;

  /* syntax palette (GitHub-dark flavoured) */
  --kw: #ff7b72;    /* keywords */
  --str: #7ee787;   /* strings */
  --fn: #d2a8ff;    /* functions / roles */
  --prop: #79c0ff;  /* properties */
  --com: #8b949e;   /* comments */
  --num: #ffa657;   /* numbers / markers */
  --op: #8b949e;    /* operators */

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* ---------- light theme (panel toggle, persisted) ---------- */
html[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-deep: #ffffff;
  --panel: #ffffff;
  --panel-2: #eaeef2;
  --border: #d0d7de;

  --text: #1f2328;
  --muted: #4a5360;
  --faint: #57606a;

  --kw: #cf222e;
  --str: #1a7f37;
  --fn: #6f42c1;
  --prop: #0550ae;
  --com: #4a5360;
  --num: #953800;
  --op: #57606a;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(210,168,255,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(126,231,135,0.05), transparent 55%);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-theme="light"] body { background-image: none; }

::selection { background: var(--kw); color: var(--bg); }
:focus-visible { outline: 2px solid var(--prop); outline-offset: 3px; border-radius: 2px; }

a { color: var(--str); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--str) 45%, transparent); }
a:hover { border-bottom-style: solid; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 1.5rem 3rem;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  z-index: 10;
  background: var(--prop);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- syntax tokens ---------- */
.tok-kw   { color: var(--kw); }
.tok-str  { color: var(--str); }
.tok-fn   { color: var(--fn); }
.tok-prop { color: var(--prop); }
.tok-com  { color: var(--com); }
.tok-num  { color: var(--num); }
.tok-op   { color: var(--op); }
.tok-var  { color: var(--text); }
.tok-punc { color: var(--faint); }

/* ---------- terminal hero ---------- */
.terminal {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 2px 6px rgba(1,4,9,0.4), 0 24px 60px rgba(1,4,9,0.5);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
html[data-theme="light"] .terminal {
  box-shadow: 0 1px 3px rgba(31,35,40,0.08), 0 16px 40px rgba(31,35,40,0.10);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dots i:nth-child(1) { background: #ff5f56; }
.dots i:nth-child(2) { background: #ffbd2e; }
.dots i:nth-child(3) { background: #27c93f; }
.term-file { flex: 1; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-lang { color: var(--faint); }

.term-body { padding: clamp(1.5rem, 4vw, 2.6rem); }
.prompt { font-family: var(--mono); font-size: 0.95rem; color: var(--faint); margin: 0 0 1.1rem; }
.p-path { color: var(--fn); }
.p-dir { color: var(--kw); margin-left: 0.5rem; }

.name {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 0.3rem;
  color: var(--text);
}
.role {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: var(--fn);
  margin: 0 0 1.6rem;
}
.role::after {
  content: "▊";
  color: var(--str);
  margin-left: 0.4rem;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

pre.code {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-x: auto;
  color: var(--text);
}
.code code { font-family: inherit; }
.code code a { border-bottom-color: color-mix(in srgb, var(--str) 35%, transparent); }

/* download button */
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--str);
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}
.btn-dl:hover { filter: brightness(1.08); }

/* ---------- sections ---------- */
.block { margin: 0 0 2.75rem; }
.sect {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text);
}
.sect .tok-com { color: var(--com); }

.lead { max-width: 72ch; color: var(--muted); font-size: 1.02rem; margin: 0; }

.ai-line {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--str) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--str) 22%, transparent);
  border-left: 3px solid var(--str);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin: 1.1rem 0 0;
}

/* skills */
.skill-group { margin-bottom: 1.15rem; }
.skill-title { font-family: var(--mono); font-size: 0.82rem; font-weight: 600; margin: 0 0 0.55rem; color: var(--prop); }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.skills li {
  font-family: var(--mono);
  font-size: 0.84rem;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}
.skills li .tok-com { color: var(--com); }

/* experience */
.job { margin-bottom: 1.7rem; padding-bottom: 1.7rem; border-bottom: 1px solid var(--border); }
.job:last-of-type { border-bottom: 0; margin-bottom: 1.3rem; padding-bottom: 0; }
.job-role { font-family: var(--mono); font-size: 1.02rem; font-weight: 600; margin: 0 0 0.2rem; color: var(--text); }
.job-co { color: var(--faint); font-size: 0.88rem; margin: 0 0 0.8rem; }
.bullets { margin: 0; padding-left: 1.25rem; color: var(--muted); }
.bullets li { margin-bottom: 0.4rem; }
.bullets li::marker { color: var(--num); }
.earlier { font-family: var(--mono); font-size: 0.84rem; color: var(--faint); margin: 1rem 0 0; }

/* education + plain lists */
.plain { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.plain li { margin-bottom: 0.65rem; }
.plain strong { color: var(--text); font-weight: 600; }
.plain .tok-com { color: var(--com); }

/* footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* ---------- display preferences panel ---------- */
.a11y-fab {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1.1rem + env(safe-area-inset-bottom));
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--prop);
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(1,4,9,0.35), 0 10px 28px rgba(1,4,9,0.3);
}
.a11y-fab:hover { border-color: var(--prop); transform: translateY(-2px); }
.a11y-fab[aria-expanded="true"] { background: var(--prop); color: var(--bg); border-color: var(--prop); }

.a11y-panel {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(4.8rem + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(320px, calc(100vw - 2rem));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(1,4,9,0.35), 0 24px 60px rgba(1,4,9,0.4);
  padding: 1.2rem 1.35rem 1.35rem;
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.a11y-panel[hidden] {
  display: block;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
}

.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.3rem; }
.a11y-title { font-family: var(--mono); font-size: 1.02rem; font-weight: 600; margin: 0; color: var(--text); }
.a11y-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem;
  color: var(--text);
  cursor: pointer;
  line-height: 0;
  display: grid;
  place-items: center;
}
.a11y-close:hover { border-color: var(--prop); color: var(--prop); }

.a11y-group { margin-top: 1.05rem; }
.a11y-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
  margin-bottom: 0.5rem;
}

.a11y-sizes { display: flex; gap: 0.4rem; }
.a11y-size {
  flex: 1;
  padding: 0.4rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.a11y-size:hover { border-color: var(--prop); color: var(--prop); }
.a11y-size[aria-pressed="true"] { background: var(--prop); color: var(--bg); border-color: var(--prop); }

.a11y-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.a11y-switch-name { font-family: var(--mono); font-size: 0.88rem; color: var(--text); }
.a11y-track {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  transition: background 0.25s, border-color 0.25s;
}
.a11y-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
}
.a11y-switch[aria-checked="true"] .a11y-track { background: var(--prop); border-color: var(--prop); }
.a11y-switch[aria-checked="true"] .a11y-track::after { transform: translateX(16px); border-color: var(--prop); }

.a11y-reset {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.45rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.a11y-reset:hover { border-color: var(--prop); color: var(--prop); }

/* root-level preference classes */
html.a11y-nomotion .role::after { animation: none; }
html[data-a11y-text="1"] { font-size: 112.5%; }
html[data-a11y-text="2"] { font-size: 125%; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .role::after { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .term-lang { display: none; }
  pre.code { font-size: 0.78rem; }
  .foot { flex-direction: column; gap: 0.4rem; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .terminal { border: 1px solid #ccc; box-shadow: none; }
  .term-bar { display: none; }
  .name, .role, .lead, .job-role, .job-co, .bullets, .plain, .skills li, .ai-line, .foot { color: #000; }
  .tok-kw, .tok-str, .tok-fn, .tok-prop, .tok-com, .tok-num, .tok-op, .tok-punc { color: #000; }
  .tok-com { color: #555; }
  a { color: #000; border-bottom: 1px solid #999; }
  .skills li { background: none; border-color: #ccc; }
  .ai-line { background: none; border-color: #ccc; }
  .role::after { animation: none; content: ""; }
  .a11y-fab, .a11y-panel, .btn-dl, .skip-link { display: none !important; }
}
