:root {
  --ink: #071526;
  --ink-2: #0b1f3a;
  --ink-3: #123556;
  --surface: #0e2a4a;
  --text: #f4f7fb;
  --muted: #a8bdd4;
  --accent: #00e5c0;
  --accent-2: #ffb020;
  --accent-soft: rgba(0, 229, 192, 0.14);
  --line: rgba(126, 234, 219, 0.18);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font-body: 'Heebo', system-ui, sans-serif;
  --font-display: 'Rubik', 'Heebo', system-ui, sans-serif;
  --wrap: min(1120px, calc(100% - 2.5rem));
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(0, 229, 192, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 176, 32, 0.1), transparent 50%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 45%, #06111f 100%);
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-size: 0.9em;
  color: var(--accent);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Career visible only with ?career=1 (or ?carrer=1) — toggled via html.show-career */
html:not(.show-career) #career,
html:not(.show-career) [data-career-nav] {
  display: none !important;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: var(--accent);
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  min-height: 2.35rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}

.btn-primary:hover {
  background: #5ff0d4;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 21, 38, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav {
  display: none;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.header-cta {
  display: none;
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset-inline-end: -8%;
  top: 10%;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 192, 0.28), transparent 68%);
  animation: pulse-glow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.hero-inner {
  position: relative;
  max-width: 46rem;
}

.hero-kicker {
  animation: fade-up 0.7s ease both;
}

.hero-name {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #fff 20%, var(--accent) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up 0.8s ease 0.08s both;
}

.hero-tagline {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 36rem;
  animation: fade-up 0.8s ease 0.16s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fade-up 0.8s ease 0.24s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 760px) {
  .section-head {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 0.7fr 1.3fr;
    gap: 3rem;
    align-items: start;
  }
}

.lead {
  margin: 0 0 0.85rem;
  font-size: 1.08rem;
  color: #d7e4f3;
}

.about-copy .lead:last-of-type {
  margin-bottom: 1.5rem;
}

.about-linkedin {
  margin-top: 0.25rem;
}

/* Career */
.career-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.career-item {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(14, 42, 74, 0.55);
}

@media (min-width: 760px) {
  .career-item {
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
    align-items: start;
  }
}

.career-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.career-period {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}

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

.career-body h3 {
  margin-bottom: 0.25rem;
}

.career-company {
  margin: 0 0 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
}

.career-body ul {
  margin: 0;
  padding-inline-start: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.4rem;
}

.career-body li::marker {
  color: var(--accent);
}

/* Skills */
.skills-section {
  background: linear-gradient(180deg, transparent, rgba(0, 229, 192, 0.05), transparent);
}

.skills-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.skill-chip {
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.skill-chip:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 192, 0.22);
  transform: translateY(-2px);
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 760px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(14, 42, 74, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 192, 0.55);
}

.project-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.2rem 1.35rem;
  flex: 1;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.tech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-list li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.28);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

/* Contact */
.contact {
  text-align: center;
}

.contact .wrap {
  max-width: 44rem;
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(0, 229, 192, 0.16), transparent 70%),
    rgba(11, 31, 58, 0.85);
}

.contact-lede {
  color: var(--muted);
  margin: 0.85rem auto 1.5rem;
  max-width: 30rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.contact-links a {
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 21, 38, 0.55);
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.75rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.skill-chip.reveal.is-visible {
  transition-delay: calc(var(--i, 0) * 40ms);
}

/* 404 */
.not-found {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.75rem;
  padding: 4rem 0;
}

.not-found p {
  color: var(--muted);
  margin: 0 0 0.5rem;
}

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

  .hero-glow,
  .hero-kicker,
  .hero-name,
  .hero-tagline,
  .hero-actions,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
