:root {
  --bg: #071011;
  --bg-strong: #0d1a1b;
  --surface: rgba(8, 17, 18, 0.72);
  --surface-strong: rgba(10, 22, 23, 0.88);
  --text: #eff7f3;
  --muted: #aec2be;
  --line: rgba(230, 244, 239, 0.14);
  --accent: #57b4a7;
  --accent-strong: #a9ebe1;
  --accent-soft: rgba(87, 180, 167, 0.16);
  --highlight: #c79569;
  --shadow: 0 30px 80px rgba(2, 7, 7, 0.46);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --font-sans: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(4, 9, 10, 0.34) 0%, rgba(4, 9, 10, 0.72) 100%),
    radial-gradient(circle at 14% 18%, rgba(87, 180, 167, 0.18), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(199, 149, 105, 0.16), transparent 24%),
    url("background.png");
  background-position: center, left top, right top, center;
  background-size: auto, auto, auto, cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 92%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(6, 14, 14, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  color: #041011;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

main {
  display: grid;
  gap: 26px;
}

.hero,
.intro-grid,
.section,
.contact-section {
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 42px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(8, 19, 20, 0.9), rgba(9, 16, 17, 0.76)),
    linear-gradient(120deg, rgba(87, 180, 167, 0.12), rgba(199, 149, 105, 0.08));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 36% 64% 48% 52% / 49% 35% 65% 51%;
  background: radial-gradient(circle at 30% 30%, rgba(87, 180, 167, 0.24), transparent 58%);
}

.eyebrow,
.section-tag,
.timeline,
.timeline-date,
.timeline-place,
.status-label,
.status-meta {
  font-family: var(--font-mono);
}

.eyebrow,
.section-tag {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.intro-grid h2,
.contact-card h2 {
  margin: 0;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.08;
}

.hero-text {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #88d8cb);
  color: #031010;
  box-shadow: 0 16px 32px rgba(87, 180, 167, 0.28);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-panel,
.panel,
.project-card,
.timeline-card,
.contact-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  position: relative;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px;
  border-radius: calc(var(--radius-xl) - 8px);
}

.status-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(87, 180, 167, 0.16), rgba(9, 18, 19, 0.92));
}

.status-label,
.status-meta,
.timeline,
.timeline-date,
.timeline-place {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.status-value {
  margin: 8px 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.hero-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-facts div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.hero-facts div:last-child {
  border-bottom: 0;
}

.hero-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-facts dd {
  margin: 0;
  font-weight: 700;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.panel,
.timeline-card,
.contact-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.panel h2,
.section h2,
.contact-card h2 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.panel h3,
.project-card h3,
.timeline-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.panel p,
.project-card p,
.timeline-card p,
.contact-card p {
  color: var(--muted);
  line-height: 1.7;
}

.panel-large {
  min-height: 100%;
}

.check-list,
.chip-list,
.language-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.section {
  padding: 8px 0 0;
}

.section-heading {
  margin-bottom: 22px;
}

.cards-grid,
.skills-grid,
.timeline-list {
  display: grid;
  gap: 20px;
}

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

.project-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.pill-accent {
  background: rgba(87, 180, 167, 0.18);
  color: var(--accent-strong);
}

.section-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.check-list {
  display: grid;
  gap: 14px;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
}

.timeline-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-journey {
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.timeline-card {
  position: relative;
}

.timeline-journey .timeline-card {
  min-height: 100%;
  padding-top: 42px;
}

.timeline-journey .timeline-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  box-shadow: 0 0 0 6px rgba(87, 180, 167, 0.16);
}

.timeline-arrow {
  position: relative;
  align-self: start;
  height: 2px;
  margin: 42px 10px 0;
  background: linear-gradient(90deg, rgba(87, 180, 167, 0.75), rgba(199, 149, 105, 0.82));
}

.timeline-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--highlight);
  border-right: 2px solid var(--highlight);
  transform: translateY(-50%) rotate(45deg);
}

.timeline-date {
  margin-bottom: 12px;
  color: var(--highlight);
}

.timeline-place {
  margin-bottom: 12px;
}

.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list li {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.language-list {
  display: grid;
  gap: 14px;
}

.language-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.language-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.language-list strong {
  color: var(--accent-strong);
}

.contact-section {
  padding-top: 8px;
}

.contact-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 18, 18, 0.96), rgba(8, 15, 16, 0.84)),
    linear-gradient(120deg, rgba(87, 180, 167, 0.12), rgba(199, 149, 105, 0.1));
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 149, 105, 0.2), transparent 70%);
}

.contact-links a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .site-header,
  .hero,
  .intro-grid,
  .section-split,
  .cards-grid,
  .timeline-list,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline-journey {
    gap: 20px;
  }

  .timeline-journey .timeline-card {
    padding-top: 28px;
  }

  .timeline-journey .timeline-card::before,
  .timeline-arrow {
    display: none;
  }

  .site-header {
    position: static;
    border-radius: 24px;
  }

  .hero {
    padding: 28px;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .site-header,
  .hero,
  .panel,
  .project-card,
  .timeline-card,
  .contact-card {
    padding: 20px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a,
  .button,
  .contact-links a {
    width: 100%;
    justify-content: center;
  }

  .hero-actions,
  .contact-links {
    width: 100%;
  }

  .brand-text {
    display: none;
  }
}
