:root {
  --navy: #0f1a2e;
  --navy-2: #18253e;
  --blue: #1f5fd6;
  --blue-light: #8fb2f0;
  --bg: #f5f4f0;
  --white: #ffffff;
  --text: #1c2433;
  --muted: #5b6577;
  --line: #e2e1dc;
  --pill: #e3ebfa;
  --accent: #f5b83d;      /* amber, on dark backgrounds */
  --accent-ink: #a8540d;  /* burnt orange, for text on light backgrounds */
  --radius: 14px;
  --heading: "Space Grotesk", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  touch-action: manipulation;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; }

.container { width: min(1100px, 100% - 3rem); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.15; color: var(--navy); text-wrap: balance; }

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--navy); font-weight: 700;
  padding: 0.7rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 1.5rem; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 26, 46, 0.96);
  backdrop-filter: blur(6px);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { font-family: var(--heading); font-weight: 700; color: var(--white); text-decoration: none; font-size: 1.1rem; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { color: #c9d3e6; text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--white); }
.lang-switch { display: flex; border: 1px solid #3a4a68; border-radius: 999px; overflow: hidden; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 0 0.8rem;
  color: #c9d3e6; text-decoration: none; font: 600 0.85rem var(--body);
}
.lang-switch a:hover { color: var(--white); background: #22314c; }
.lang-switch a[aria-current="true"] { background: var(--blue); color: var(--white); }

.menu-toggle {
  display: none; margin-left: auto; min-height: 40px; padding: 0 1rem;
  background: none; color: var(--white); border: 1px solid #7d8db0; border-radius: 999px;
  font: 600 0.85rem var(--body); cursor: pointer;
}

/* Keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* Hero */
.hero {
  background: var(--navy) url("../assets/seismic.svg") center / cover no-repeat;
  color: var(--white); padding: 6rem 0 5rem; position: relative; isolation: isolate;
}
.hero::before {  /* fade the seismic traces behind the text */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(15, 26, 46, 0.97) 0%, rgba(15, 26, 46, 0.86) 45%, rgba(15, 26, 46, 0.7) 100%);
}
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.25em; font-weight: 600; font-size: 0.85rem; }
.hero h1 { color: var(--white); font-size: clamp(2.6rem, 7vw, 4.5rem); margin: 0.8rem 0 1rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: #c3cad8; max-width: 38rem; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3rem; }
.avatar {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--accent); background: var(--navy-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.btn {
  display: inline-block; padding: 0.75rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: #2a6ef0; }
.btn-ghost { border: 1px solid #7d8db0; color: var(--white); }
.btn-light { background: var(--white); color: var(--blue); }
.btn-ghost-light { border: 1px solid rgba(255, 255, 255, 0.6); color: var(--white); }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-intro { color: var(--muted); margin: -0.8rem 0 1.8rem; }

/* About */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: start; }
.about p { margin-bottom: 1rem; color: #364056; }
.about-photo {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 50%;
  border-radius: var(--radius); margin-top: 1rem; display: block;
}
.facts { list-style: none; display: grid; gap: 0.8rem; }
.facts li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; display: flex; flex-direction: column;
}
.facts strong { font-family: var(--heading); color: var(--accent-ink); font-size: 1.2rem; }
.facts span { color: var(--muted); font-size: 0.95rem; }

/* Cards */
.group-title { font-size: 1.4rem; margin: 2rem 0 1rem; }
.cards { display: grid; gap: 1.2rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
}
.card-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.price { font-family: var(--heading); font-size: 2.3rem; font-weight: 700; color: var(--accent-ink); margin: 0.3rem 0 0.6rem; font-variant-numeric: tabular-nums; }
.card p:last-child { color: var(--muted); }
.card-featured { background: var(--navy); border-color: var(--navy); }
.card-featured .card-label { color: var(--blue-light); }
.card-featured .price { color: var(--accent); }
.card-featured p:last-child { color: #c3cad8; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 1rem; }
.price-list { list-style: none; }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.price-list strong { display: block; color: var(--navy); }
.price-list span { color: var(--muted); font-size: 0.93rem; }
.price-list em { font-style: normal; font-weight: 600; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.5rem; }
.pills li { background: var(--pill); border-radius: 999px; padding: 0.5rem 1rem; font-weight: 600; font-size: 0.92rem; color: var(--navy); }

/* Projects */
.cards-projects { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.project { text-decoration: none; transition: border-color 0.15s, transform 0.15s; display: block; }
.project:hover { border-color: var(--blue); transform: translateY(-2px); }
.project h4 { font-family: var(--heading); color: var(--navy); font-size: 1.15rem; line-height: 1.2; margin-bottom: 0.4rem; }
.cards-projects + .group-title { margin-top: 2.5rem; }
.tags { color: var(--blue); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.6rem; }

/* Contact */
.contact { background: var(--blue); color: var(--white); }
.contact h2 { color: var(--white); }
.contact .lead { color: #dce6fb; }
.contact-email { margin-top: 1.2rem; color: #dce6fb; }

/* Footer */
.footer { background: var(--navy); color: #8d98ad; padding: 1.5rem 0; font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: #c9d3e6; }
.footer a:hover { color: var(--accent); }

/* Less motion for people who ask for it */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .project:hover { transform: none; }
}

/* Small screens */
@media (max-width: 820px) {
  .nav-inner { gap: 0.8rem; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--navy); padding: 0.5rem 1.5rem 1rem;
    border-bottom: 1px solid #2a3a58;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 0; font-size: 1.05rem; border-bottom: 1px solid #22314c; }
  .about, .two-col, .cards-3 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .avatar { width: 140px; height: 140px; order: -1; }
  .hero { padding: 4rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
}

/* Project card with several links (web app) */
.project-app:hover { transform: none; }
.project-app .badge { font-family: var(--body, inherit); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); border: 1px solid var(--accent-ink); border-radius: 4px; padding: 0.05rem 0.35rem; vertical-align: middle; margin-left: 0.3rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; }
.card .project-links a { color: var(--blue); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.card .project-links a:hover { text-decoration: underline; }
.card p.project-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.project-app > p:not(.tags):not(.project-links):not(.project-note) { color: var(--muted); }
