/* ==========================================================================
   Alex Bugna — Instrument Fitter · design system
   ========================================================================== */

:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface-2: #1d1d1f;
  --text: #e8e8ea;
  --muted: #9a9aa0;
  --silver: #b9bcc2;
  --accent: #1b5fbf;
  --accent-deep: #0b5394;
  --border: rgba(255, 255, 255, 0.08);
  --glow: 0 0 24px rgba(27, 95, 191, 0.25);
  --radius: 12px;
  --maxw: 960px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.25;
}

/* Skip link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.nav-brand img {
  border-radius: 50%;
}

.nav-name {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--silver);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--surface-2);
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-toggle button {
  background: transparent;
  color: var(--muted);
  border: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--accent-deep);
  color: #fff;
}

.lang-toggle button:hover:not([aria-pressed="true"]) {
  color: var(--text);
}

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 1rem clamp(3rem, 8vw, 5rem);
  text-align: center;
}

.hero-logo {
  position: relative;
  width: min(420px, 78vw);
  margin: 0 auto;
  background: radial-gradient(circle at center, #111 0%, var(--bg) 72%);
}

/* Feather the logo's baked-in square background into the page */
.hero-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 64px 48px var(--bg);
  pointer-events: none;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--silver);
  margin-top: 0.5rem;
}

.hero-tagline {
  margin-top: 0.6rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-lead {
  margin: 1.2rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

/* Sections
   -------------------------------------------------------------------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 1rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--silver);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1rem;
}

.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}

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

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--silver);
  letter-spacing: 0.04em;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Experience timeline
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(27, 95, 191, 0.08));
}

.timeline-item {
  position: relative;
  padding: 0 0 1.8rem 1rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  margin-left: 0.3rem;
  transform: translateX(-4px);
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.tl-period {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.tl-body h3 {
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.tl-project {
  color: var(--silver);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.tl-location {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Certificates & skills
   -------------------------------------------------------------------------- */
.cert-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cert-card:hover {
  border-color: var(--accent-deep);
  box-shadow: var(--glow);
}

.cert-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-size: 0.9rem;
}

.cert-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.skills-line {
  margin-top: 1.8rem;
  color: var(--silver);
  font-size: 0.95rem;
  max-width: 44rem;
}

.lang-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.lang-badges li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.lang-badges strong {
  color: var(--silver);
  letter-spacing: 0.05em;
}

/* Contact
   -------------------------------------------------------------------------- */
.contact-lead {
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.contact-icon {
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.contact-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.contact-value {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--silver);
  word-break: break-word;
}

.contact-address {
  margin-top: 2rem;
  font-style: normal;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer img {
  margin: 0 auto 0.8rem;
  border-radius: 50%;
}

.footer-links {
  margin-top: 0.4rem;
}

.footer-links a {
  color: var(--silver);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Focus visibility
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .nav {
    justify-content: space-between;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 0.4rem;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }

  .stats,
  .cert-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
