/* =========================================================
   Raymond Beschieru — CV site
   Plain CSS, no build step. Bright, clean, modern.
   Order: tokens · reset · layout · nav · hero · sections ·
          cards · timeline · project · skills · contact ·
          footer · motion · responsive
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --surface: #ffffff;
  --border: #e4e9f0;
  --text: #142033;
  --text-soft: #566173;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e6edff;
  --warm-bg: #fff4e8;
  --warm-text: #b45309;
  --warm-border: #fed7aa;
  --ring: rgba(37, 99, 235, 0.32);
  --shadow-sm: 0 1px 2px rgba(20, 32, 51, 0.06), 0 1px 3px rgba(20, 32, 51, 0.05);
  --shadow-md: 0 10px 30px rgba(20, 32, 51, 0.10);
  --radius: 14px;
  --maxw: 1080px;
  --nav-h: 64px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--accent-strong); }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-120%);
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.nav__monogram {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.nav__name { font-family: var(--font-display); letter-spacing: -0.01em; }

.nav__menu ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__menu a:hover { color: var(--text); background: var(--bg-alt); }
.nav__menu a[aria-current="true"] { color: var(--accent-strong); background: var(--accent-soft); }
.nav__cta { color: #fff !important; background: var(--accent) !important; }
.nav__cta:hover { background: var(--accent-strong) !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}
.nav__toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 8vw, 5.5rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(440px 340px at 88% 6%, var(--accent-soft), transparent 70%),
    radial-gradient(380px 320px at 4% 96%, #ffe9d6, transparent 70%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.hero__tagline {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 1rem;
}
.hero__lede { color: var(--text-soft); max-width: 46ch; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }

/* Photo */
.hero__media { display: flex; justify-content: center; }
.photo {
  margin: 0;
  width: min(300px, 72vw);
  aspect-ratio: 1;
}
.photo img,
.photo__placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
  object-fit: cover;
}
.photo__placeholder {
  display: grid;
  place-content: center;
  gap: 0.3rem;
  text-align: center;
  background: linear-gradient(150deg, var(--accent-soft), #ffffff 58%, #ffe9d6);
  color: var(--text-soft);
}
.photo__initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--accent-strong);
  letter-spacing: 0.02em;
}
.photo__hint {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- About ---------- */
.about__text {
  max-width: 66ch;
  font-size: 1.05rem;
  color: var(--text);
}

.interests {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.interest {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem 0.5rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
  font-size: 0.92rem;
}
.interest__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.interest__icon svg { width: 100%; height: 100%; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card__sub {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0.3rem 0 0.85rem;
}
.card__at { color: var(--text-soft); font-weight: 500; }
.card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.tick {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.tick li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-soft);
}
.tick li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--warm-bg);
  color: var(--warm-text);
  border: 1px solid var(--warm-border);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Timeline (education + experience) ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.timeline__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.4rem;
  align-items: start;
}
.timeline__meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
  padding-top: 0.15rem;
}
.timeline__tag {
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 600;
}
.timeline .card { border-left: 3px solid var(--accent); }

/* ---------- Project ---------- */
.project {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.project__media { min-height: 240px; }
.project__placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: grid;
  place-content: center;
  background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 12px, #eef2f8 12px, #eef2f8 24px);
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project__body { padding: 1.6rem 1.6rem 1.6rem 0; }
.project__body > h3 { margin-bottom: 0.6rem; }
.project__note {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
}

.tags {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}
.skills__group h3 { margin-bottom: 0.4rem; }
.skills__group .tags { margin-top: 0.75rem; }
.skills__hint {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0.7rem 0 0;
}

/* ---------- Contact ---------- */
.contact { max-width: 640px; }
.contact__lede { font-size: 1.05rem; color: var(--text); }
.contact__list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.contact__list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.contact__label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.contact__value {
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
a.contact__value:hover { color: var(--accent-strong); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}
.footer p { margin: 0; }
.footer a { color: var(--text-soft); }
.footer a:hover { color: var(--accent-strong); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { justify-content: flex-start; }
  .project { grid-template-columns: 1fr; }
  .project__body { padding: 0 1.5rem 1.6rem; }
  .project__media { min-height: 200px; }
  .project__placeholder { min-height: 200px; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav__menu.is-open { max-height: 75vh; }
  .nav__menu ul { flex-direction: column; gap: 0; padding: 0.5rem; }
  .nav__menu a { display: block; padding: 0.75rem 0.9rem; }
  .nav__cta { text-align: center; margin-top: 0.25rem; }

  .timeline__item { grid-template-columns: 1fr; gap: 0.4rem; }
  .timeline__meta { padding-top: 0; }
  .contact__list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 420px) {
  .nav__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
