/* Portfolio — plain CSS, no build step. Colors follow the one-page CV. */
:root {
  --navy: #17365d;
  --accent: #2b6cb0;
  --accent-soft: #e9f0f8;
  --ink: #1f2d3d;
  --muted: #5b6b7d;
  --line: #dde4ec;
  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --radius: 0.6rem;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; color: var(--navy); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.1rem; }
.muted { color: var(--muted); }

/* Fluid width: grows with the window, stays readable when zoomed */
.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-block: 0.75rem;
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--navy); text-decoration: none; }
.brand span { color: var(--accent); font-weight: 500; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
nav a:hover { color: var(--accent); }
nav .nav-cta {
  color: #fff; background: var(--accent); padding: 0.35rem 0.9rem; border-radius: 999px;
}
nav .nav-cta:hover { color: #fff; background: var(--navy); }

/* Hero */
.hero {
  padding-block: clamp(3rem, 8vw, 6.5rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(43, 108, 176, 0.12), transparent 45%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.5vw, 4rem); letter-spacing: -0.01em; }
.headline {
  margin: 0.5rem 0 0; font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); font-weight: 600; color: var(--accent);
}
.headline .amp { color: var(--muted); font-weight: 400; }
/* Hero centered */
.hero .wrap { text-align: center; }
.hero .lede { margin-inline: auto; }
.hero .facts { max-width: 60rem; margin-inline: auto; }
.hero .facts li { align-items: center; }
.lede { max-width: 42em; font-size: 1.15rem; color: var(--muted); margin: 1.25rem 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.3rem; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 1.5px solid var(--accent); color: var(--accent); background: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-soft); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }

.facts {
  list-style: none; padding: 0; margin: 2.75rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem;
}
.facts li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; flex-direction: column;
}
.facts strong { font-size: 1.5rem; color: var(--navy); }
.facts span { color: var(--muted); font-size: 0.95rem; }

/* Sections */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin-bottom: 0.25rem; }
.section-head p { margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 2rem 4rem; }
@media (min-width: 52rem) {
  .two-col { grid-template-columns: 1fr 1fr; }
  #about .two-col { grid-template-columns: 1fr 2.5fr; }
}
.prose p { margin: 0 0 1rem; max-width: 42em; }

.details { margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }
.details div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.details dt { font-weight: 600; color: var(--navy); }
.details dd { margin: 0; }
@media (max-width: 34rem) { .details div { grid-template-columns: 1fr; gap: 0; } }

/* Experience */
.employer { margin-bottom: 2.5rem; }
.employer:last-child { margin-bottom: 0; }
.employer-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  padding-bottom: 0.75rem; border-bottom: 2px solid var(--navy); margin-bottom: 0.5rem;
}
.employer-head h3 { font-size: 1.35rem; }
.chip {
  display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 0.2rem 0.65rem; border-radius: 999px;
}
.job {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 1.5rem;
  padding-block: 1.25rem; border-bottom: 1px solid var(--line);
}
.job:last-child { border-bottom: 0; }
.job-when { font-weight: 600; color: var(--muted); font-size: 0.95rem; padding-top: 0.1rem; }
.job-where { margin: 0.25rem 0 0; }
.job-context { margin: 0.25rem 0 0.5rem; color: var(--muted); font-style: italic; }
.job ul { margin: 0; padding-left: 1.2rem; }
.job li { margin-bottom: 0.25rem; }
.job li::marker { color: var(--accent); }
@media (max-width: 40rem) { .job { grid-template-columns: 1fr; } }

/* Skills */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem;
  background: #fff; border-top: 3px solid var(--accent);
}
.card h3 { margin-bottom: 0.6rem; }
.card .card-h-next { margin-top: 1.25rem; }
.card-sub { margin: 0.6rem 0 0.35rem; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 0.4rem; padding: 0.15rem 0.55rem; font-size: 0.92rem; }
.langs { list-style: none; padding: 0; margin: 0; }
.langs li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.langs li:last-child { border-bottom: 0; }
.langs li span:last-child { color: var(--muted); }

/* Education, training */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.list-when { font-weight: 700; color: var(--accent); }
.beyond { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.hobbies { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.hobbies li { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 0.9rem 1.1rem; color: var(--muted); }
.hobbies strong { display: block; color: var(--navy); }

/* Contact */
.contact { background: var(--navy); color: #fff; }
.contact h2 { color: #fff; }
.contact .lede { color: #c8dcf4; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: #c8dcf4; border-color: #c8dcf4; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.icon { width: 1.05em; height: 1.05em; flex: none; }

.contact-list {
  display: grid; gap: 1.25rem; margin-top: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}
.contact-card {
  background: #fff; color: var(--ink); border-radius: 0.9rem; padding: 1.4rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; gap: 1.2rem;
}
.contact-top { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.contact-top > div { min-width: 0; }
.contact-badge {
  flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.contact-badge .icon { width: 1.35rem; height: 1.35rem; }
.contact-label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-value { display: block; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); font-weight: 700; color: var(--navy); user-select: all; overflow-wrap: anywhere; }
.contact-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.6rem; }
[hidden] { display: none !important; }
.cbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.65rem 0.8rem; border-radius: 0.6rem; border: 1px solid var(--line);
  background: var(--bg-alt); color: var(--navy); font: inherit; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cbtn:hover, .cbtn:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Tooltips: shown on hover and keyboard focus */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 0.5rem);
  transform: translateX(-50%) translateY(0.25rem); white-space: nowrap;
  background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 500; line-height: 1.3;
  padding: 0.35rem 0.6rem; border-radius: 0.35rem; pointer-events: none;
  opacity: 0; transition: opacity 0.15s, transform 0.15s; z-index: 30;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (hover: none) { [data-tip]::after { display: none; } }
/* Buttons near the right edge: tooltip grows leftwards so it never leaves the window */
.contact-actions [data-tip]:last-child::after { left: auto; right: 0; transform: translateY(0.25rem); }
.contact-actions [data-tip]:last-child:hover::after, .contact-actions [data-tip]:last-child:focus-visible::after { transform: none; }
[data-tip]:not(:hover):not(:focus-visible)::after { visibility: hidden; }

/* Contact bar, always in view */
/* Floating cards: email, phone and CV, one row at the bottom center, always in view */
.dock {
  position: fixed; left: 50%; bottom: 1rem; z-index: 20;
  transform: translateX(-50%); width: min(100% - 1.5rem, 64rem);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.75rem;
  transition: opacity 0.2s, transform 0.2s;
}
.dock.hidden { opacity: 0; transform: translateX(-50%) translateY(1rem); pointer-events: none; }
.float-card {
  min-width: 0; padding: 0.85rem 1rem; gap: 0.7rem; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(23, 54, 93, 0.22);
}
.float-card .contact-badge { width: 2.3rem; height: 2.3rem; }
.float-card .contact-badge .icon { width: 1.1rem; height: 1.1rem; }
.float-card .contact-value { font-size: 1rem; }
.float-card .cbtn { padding: 0.5rem 0.5rem; font-size: 0.9rem; }
.dock [data-tip]::after { left: 50%; right: auto; transform: translateX(-50%) translateY(0.25rem); }
.dock [data-tip]:hover::after, .dock [data-tip]:focus-visible::after { transform: translateX(-50%); }
/* Narrower windows: compact cards, still one row */
@media (max-width: 52rem) {
  .dock { gap: 0.4rem; bottom: 0.5rem; width: calc(100% - 1rem); }
  .float-card { padding: 0.6rem; gap: 0.5rem; }
  .float-card .contact-badge { display: none; }
  .float-card .contact-value { font-size: 0.85rem; }
  .float-card .cbtn { padding: 0.4rem 0.25rem; font-size: 0.78rem; gap: 0.25rem; white-space: nowrap; }
}
/* Phones: three slim rows, one per item: label and value, then icon buttons */
@media (max-width: 34rem) {
  .dock { grid-auto-flow: row; grid-auto-columns: auto; gap: 0.3rem; }
  .float-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 0.4rem 0.45rem 0.4rem 0.75rem; }
  .float-card .contact-label { font-size: 0.62rem; }
  .float-card .contact-value { font-size: 0.9rem; }
  .float-card .contact-actions { flex: none; grid-auto-flow: column; gap: 0.3rem; }
  .float-card .cbtn { width: 2.5rem; height: 2.3rem; padding: 0; }
  .float-card .cbtn .icon { width: 1.1rem; height: 1.1rem; }
  .float-card .cbtn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.toast {
  position: fixed; left: 50%; bottom: 5rem; transform: translate(-50%, 0.5rem); z-index: 40;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0.5rem; font-size: 0.95rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 2rem);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { text-align: center; padding-block: 1.5rem; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); }

@media print {
  .topbar, .actions, .dock, .toast, .contact-actions { display: none; }
  .section, .hero { padding-block: 1rem; }
  .contact { background: none; color: var(--ink); }
}
