:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --ink: #14213d;
  --muted: #55607a;
  --accent: #7d9bb8;      /* jacket blue */
  --accent-soft: #dfe8f1;
  --line: #d5dae5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1626;
    --card: #18223a;
    --ink: #eef1f6;
    --muted: #a3adc4;
    --accent-soft: #24324f;
    --line: #2a3555;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}
main { max-width: 480px; margin: 0 auto; padding: 24px 20px 64px; }

/* Language toggle */
.lang {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 3px;
  background: var(--accent-soft);
  border-radius: 999px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: #0f1626; }

/* Header */
.hero { text-align: center; }
.avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 20px;
  border: 4px solid var(--card);
  box-shadow: 0 0 0 3px var(--accent);
}
h1 {
  margin: 0 0 4px;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.job { margin: 0 0 14px; font-weight: 600; font-size: 1.05rem; }
.bio { margin: 0 auto 20px; max-width: 40ch; color: var(--muted); font-size: 1.05rem; }
.contact {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.contact a {
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.contact a:hover { background: var(--accent); color: #0f1626; }

/* Links */
.links-heading {
  margin: 40px 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.link-card {
  display: block;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: transform 0.15s ease;
}
.link-card:hover { transform: translateY(-2px); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent), var(--ink)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-title { padding: 14px 16px; font-weight: 600; font-size: 1.05rem; }

html { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Sticky mini header (nav-ready) */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
@supports (background: color-mix(in srgb, red, blue)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.site-header.stuck { border-bottom-color: var(--line); }
.site-header-inner {
  max-width: 480px; margin: 0 auto; min-height: 56px;
  padding: 10px 20px;
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; letter-spacing: -0.01em;
  visibility: hidden; opacity: 0;
  transition: opacity 0.2s ease;
}
.brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.site-header.brand-on .brand,
.site-header:not([data-brand="auto"]) .brand { visibility: visible; opacity: 1; }
.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
/* Single-page mode: menu starts at the left edge, name appears centred on scroll */
.site-header[data-brand="auto"] .brand { position: absolute; left: 50%; transform: translateX(-50%); }
.site-header .lang { margin-left: auto; }
@media (min-width: 600px) { .site-nav { display: block; } }

/* Hamburger menu (phones, only when the nav has 2+ links) */
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: -8px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn .icon-close { display: none; }
.site-header.menu-open .icon-open { display: none; }
.site-header.menu-open .icon-close { display: block; }
.site-header.has-menu .menu-btn { display: inline-flex; }
@media (min-width: 600px) { .site-header.has-menu .menu-btn { display: none; } }
@media (max-width: 599px) {
  .site-header.menu-open .site-nav {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    padding: 4px 20px 12px;
  }
  .site-header.menu-open .site-nav ul { flex-direction: column; gap: 0; max-width: 480px; margin: 0 auto; }
  .site-header.menu-open .site-nav a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .site-header.menu-open .site-nav li:last-child a { border-bottom: 0; }
}

/* See more */
.links[hidden] { display: none; }
.links-more { margin-top: 20px; }
.more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.see-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border: 1.5px solid var(--accent); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.see-more:hover { background: var(--accent); color: #0f1626; }
.see-more svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.see-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.see-more[aria-expanded="true"] .t-more,
.see-more[aria-expanded="false"] .t-less { display: none; }

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.fine { margin: 20px 0 0; color: var(--muted); font-size: 0.85rem; }
.fine + .fine { margin-top: 4px; }
.social {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: 12px;
}
.social a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.social a:hover { background: var(--accent); color: #0f1626; }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* Tablet + desktop: photo/bio left, two columns of links right */
@media (min-width: 768px) {
  .site-header-inner { max-width: 1100px; padding: 10px 40px; }
  main {
    max-width: 1100px;
    padding: 32px 40px 64px;
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    column-gap: 40px;
    grid-template-areas:
      "hero   work"
      "footer footer";
    grid-template-rows: auto auto;
  }
  .hero { grid-area: hero; align-self: start; position: sticky; top: 88px; text-align: left; }
  .avatar { margin-left: 0; }
  .bio { margin-left: 0; }
  .contact { justify-content: flex-start; }
  .work { grid-area: work; }
  .links-heading { margin: 0 0 20px; text-align: left; }
  .links { grid-template-columns: repeat(2, 1fr); align-content: start; }
  footer { grid-area: footer; margin-top: 56px; }
}
@media (min-width: 1024px) {
  main { column-gap: 64px; }
  .avatar { width: 160px; height: 160px; }
}

a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .link-card { transition: none; }
  .link-card:hover { transform: none; }
}
