/* ============================================================
   Jan Lems — Portfolio
   Restrained, corporate one-page design.
   Palette: deep teal/petrol + neutral grays. Original, not a logo.

   Structure of this file:
     1. Design tokens (colors, spacing, type) — tweak the look here
     2. Base / reset
     3. Layout helpers (sections, headings)
     4. Header / nav
     5. Hero
     6. Skills -> Strengths matrix (centerpiece)
     7. Experience timeline
     8. Tools & systems
     9. About
    10. Contact
    11. Footer
    12. Responsive breakpoints
    13. Accessibility (focus, reduced motion)
   ============================================================ */

/* ===== 1. DESIGN TOKENS ===================================== */
:root {
  /* Brand */
  --petrol:        #0b5563;   /* primary deep teal/petrol */
  --petrol-dark:   #083f4a;   /* hovers, headings on light */
  --petrol-deep:   #062f38;   /* hero background base */
  --accent:        #1c8a92;   /* lighter teal accent */
  --accent-soft:   #e3f1f1;   /* tinted fills */

  /* Neutrals */
  --ink:           #1f2933;   /* primary text */
  --muted:         #52606d;   /* secondary text */
  --faint:         #7b8794;   /* tertiary / labels */
  --line:          #dbe3e8;   /* borders, dividers */
  --surface:       #ffffff;   /* cards */
  --bg:            #f7f9fa;   /* page background */
  --bg-alt:        #eef3f4;   /* alternating section tint */

  /* Type */
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing & shape */
  --maxw: 1040px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(8, 63, 74, 0.06), 0 6px 20px rgba(8, 63, 74, 0.06);
  --shadow-hover: 0 2px 4px rgba(8, 63, 74, 0.10), 0 12px 28px rgba(8, 63, 74, 0.12);
}

/* ===== 2. BASE / RESET ===================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.18; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--petrol); text-decoration: none; }
a:hover { color: var(--petrol-dark); }

/* ===== 3. LAYOUT HELPERS =================================== */
main { display: block; }

section {
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
}
section > * { max-width: var(--maxw); margin-inline: auto; }

/* Alternate section backgrounds for gentle rhythm */
.matrix { background: var(--bg-alt); }
.tools  { background: var(--bg-alt); }

.section__head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--petrol-dark);
  position: relative;
  padding-bottom: 0.75rem;
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 3rem; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section__lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
}

/* ===== 4. HEADER / NAV ===================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
}
.nav__brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--petrol-dark);
  letter-spacing: 0.01em;
}
.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.nav__list a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__list a:hover { color: var(--petrol-dark); border-bottom-color: var(--accent); }

/* ===== 5. HERO ============================================= */
.hero {
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(28, 138, 146, 0.35), transparent 60%),
    linear-gradient(160deg, var(--petrol) 0%, var(--petrol-deep) 100%);
  color: #eaf4f4;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.hero__inner { max-width: var(--maxw); margin-inline: auto; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9fd6d9;
  margin-bottom: 0.85rem;
}
.hero__name {
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: #ffffff;
  margin-bottom: 0.4rem;
}
.hero__role {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 500;
  color: #cfe8e9;
  margin-bottom: 1.4rem;
}
.hero__statement {
  max-width: 60ch;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #e7f3f3;
  margin-bottom: 1.75rem;
}

/* Language proficiency badge */
.lang-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.lang-badge__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.95rem;
  min-width: 6.5rem;
}
.lang-badge__lvl {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}
.lang-badge__lang {
  font-size: 0.82rem;
  color: #aed7d9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Buttons */
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn--primary {
  background: #ffffff;
  color: var(--petrol-dark);
}
.btn--primary:hover { background: var(--accent-soft); color: var(--petrol-dark); transform: translateY(-1px); }
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; transform: translateY(-1px); }

/* ===== 6. SKILLS -> STRENGTHS MATRIX (centerpiece) ========= */
.matrix__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}
.matrix__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "from arrow"
    "to   to";
  gap: 0.4rem 1rem;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.matrix__card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #c2d6da;
}
/* Highlighted priority card (languages) */
.matrix__card--priority {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
.matrix__card--priority::before {
  content: "Strongest match";
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.1rem;
}

.matrix__from { grid-area: from; }
.matrix__arrow {
  grid-area: arrow;
  align-self: center;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}
.matrix__to {
  grid-area: to;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
  margin-top: 0.4rem;
}
.matrix__label, .matrix__req {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}
.matrix__label { color: var(--faint); margin-bottom: 0.3rem; }
.matrix__skill {
  font-size: 1.08rem;
  color: var(--ink);
}
.matrix__req { color: var(--petrol); margin-bottom: 0.45rem; }
.matrix__text { color: var(--muted); font-size: 0.96rem; }

/* ===== 7. EXPERIENCE TIMELINE ============================== */
.timeline__list {
  position: relative;
  border-left: 2px solid var(--line);
  margin-left: 0.5rem;
  display: grid;
  gap: 2rem;
}
.timeline__item {
  position: relative;
  padding-left: 1.75rem;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px; top: 0.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.timeline__date {
  font-weight: 700;
  color: var(--petrol-dark);
  font-size: 0.95rem;
}
.timeline__place { color: var(--faint); font-size: 0.9rem; }
.timeline__role {
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.timeline__points {
  display: grid;
  gap: 0.35rem;
}
.timeline__points li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.96rem;
}
.timeline__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== 8. TOOLS & SYSTEMS ================================== */
.tools__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.tools__col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}
.tools__col-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--petrol);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.tools__list { display: grid; gap: 0.5rem; }
.tools__list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink);
  font-size: 0.96rem;
}
.tools__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.tools__note {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

/* ===== 8b. PROJECTS (additive — same card language as above) === */
.projects__grid { display: grid; gap: 1.25rem; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #c2d6da; }
.project-card__media { display: block; background: var(--bg-alt); line-height: 0; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card__body { padding: 1.4rem 1.5rem; }
.project-card__title { font-size: 1.25rem; color: var(--petrol-dark); margin-bottom: 0.5rem; }
.project-card__desc { color: var(--muted); font-size: 0.98rem; margin-bottom: 0.9rem; }
.project-card__tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem;
}
.project-card__tags li {
  font-size: 0.76rem; font-weight: 600; color: var(--petrol);
  background: var(--accent-soft); border-radius: 999px; padding: 0.2rem 0.7rem;
}
.project-card__links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.project-card__links .btn { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
/* Primary button sits on a light card here, so fill it with petrol */
.project-card__links .btn--primary { background: var(--petrol); color: #fff; }
.project-card__links .btn--primary:hover { background: var(--petrol-dark); color: #fff; }
/* Ghost buttons sit on a light surface here, so darken their outline/text */
.project-card__links .btn--ghost { border: 1px solid var(--line); color: var(--petrol-dark); }
.project-card__links .btn--ghost:hover { background: var(--accent-soft); color: var(--petrol-dark); }

/* Side-by-side on wider screens */
@media (min-width: 720px) {
  .project-card { grid-template-columns: 42% 1fr; align-items: stretch; }
  .project-card__media { height: 100%; }
}

/* ===== 9. ABOUT =========================================== */
.about__body {
  display: grid;
  gap: 1.1rem;
  max-width: 70ch;
  font-size: 1.06rem;
  color: var(--ink);
}
.about__body p { color: var(--muted); }

/* ===== 10. CONTACT ======================================== */
.contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.contact__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.contact__label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.contact__value {
  font-size: 1rem;
  color: var(--ink);
  word-break: break-word;
}
a.contact__value { color: var(--petrol); font-weight: 500; }
a.contact__value:hover { color: var(--petrol-dark); text-decoration: underline; }

/* ===== 11. FOOTER ========================================= */
.site-footer {
  background: var(--petrol-deep);
  color: #aecccf;
  text-align: center;
  padding: 1.75rem 1.5rem;
  font-size: 0.88rem;
}

/* ===== 12. RESPONSIVE ===================================== */
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: flex-start; }
  .nav__list { gap: 0.85rem 1rem; }
  .matrix__card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "from"
      "arrow"
      "to";
  }
  .matrix__arrow { justify-self: start; transform: rotate(90deg); }
}

/* ===== 13. ACCESSIBILITY ================================== */
/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--petrol-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
