:root {
  --bg: #f7f4ed;
  --paper: #fffdf8;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #d8d2c6;
  --blue: #2f6df6;
  --purple: #8d4df3;
  --green: #00a676;
  --orange: #ff8a3d;
  --red: #ef476f;
  --shadow: 0 24px 70px rgba(17, 17, 17, 0.08);
  --radius: 28px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(47, 109, 246, 0.08), transparent 32rem),
    linear-gradient(180deg, var(--bg), #ece7dc);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

h1 {
  max-width: 960px;
  font-size: clamp(2.35rem, 8.5vw, 5.8rem);
  line-height: 1;
  overflow-wrap: break-word;
}

h2 {
  max-width: 820px;
  font-size: clamp(1.8rem, 6vw, 4.4rem);
  line-height: 1;
  overflow-wrap: break-word;
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 2.2rem);
}

.section-shell {
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(7rem, 12vw, 10rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  min-height: 100svh;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.hero-copy {
  text-align: center;
  transform: translateY(clamp(-3rem, -4vh, -1.25rem));
}

.hero-name {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.1;
  text-transform: uppercase;
  transform: translateY(-0.45rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 720px;
  margin: 0.85rem auto 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero-text {
  max-width: 670px;
  margin: 1.1rem auto 0;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.next-grid {
  display: grid;
  gap: 1rem;
}

.next-card {
  display: grid;
  min-height: 84px;
  padding: 1rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 24px;
  place-items: center;
  color: var(--paper);
  text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.next-card:hover {
  transform: translate(4px, 4px);
  box-shadow: 4px 4px 0 var(--ink);
}

.next-card span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.next-card strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.muted-card {
  cursor: default;
}

.muted-card:hover {
  transform: none;
  box-shadow: 8px 8px 0 var(--ink);
}

.accent-blue {
  background: var(--blue);
}

.accent-purple {
  background: var(--purple);
}

.accent-green {
  background: var(--green);
}

.accent-orange {
  background: var(--orange);
}

.accent-red {
  background: var(--red);
}

.project-section,
.map-section,
.contact-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 1.2rem;
  align-items: center;
}

.feature-card,
.work-card,
.map-copy {
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
}

.feature-card {
  position: sticky;
  top: 120px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.project-kicker,
.work-card span {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0;
}

.tag-list span {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.text-link {
  display: inline-flex;
  margin-top: 0.4rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.4rem;
}

.project-links .text-link {
  margin-top: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 1.4rem;
}

.project-card {
  display: grid;
  grid-template-rows: minmax(3.4rem, auto) minmax(2.7rem, auto) minmax(5.6rem, 1fr) auto;
  gap: 0;
}

.work-card h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}

.project-card h3 {
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

.project-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.4;
}

.project-card p {
  margin: 0;
  line-height: 1.7;
}

.project-card .project-links,
.project-card > .text-link {
  margin-top: auto;
}

.experience-card h3,
.education-card h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

.role-meta {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.role-meta span {
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}

.role-meta span:first-child {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.role-meta span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.65fr);
  gap: 1.2rem;
  align-items: stretch;
}

.map-board {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  box-shadow: 12px 12px 0 var(--ink);
}

.route-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-lines path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-dasharray: 12 13;
  stroke-linecap: round;
}

.route-lines marker path {
  fill: var(--ink);
  stroke: none;
}

.city {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  gap: 0.4rem;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.city-dot {
  width: 22px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 0 0 8px rgba(17, 17, 17, 0.08);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.city:hover .city-dot,
.city:focus-visible .city-dot {
  transform: scale(1.2);
  background: var(--blue);
}

.city-name {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8rem;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.8rem);
  width: min(260px, 70vw);
  padding: 1rem;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.tooltip strong {
  display: block;
  margin-bottom: 0.35rem;
}

.city:hover .tooltip,
.city:focus-visible .tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.city-brest {
  left: 11%;
  top: 72%;
}

.city-evry {
  left: 42%;
  top: 43%;
}

.city-lannion {
  left: 21%;
  top: 27%;
}

.city-munich {
  left: 78%;
  top: 35%;
}

.city-seoul {
  left: 69%;
  top: 11%;
}

.city-madrid {
  left: 45%;
  top: 78%;
}

.map-copy {
  display: grid;
  align-content: end;
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.map-copy p {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.map-copy p + p {
  margin-top: 1.4rem;
}

.contact-section {
  display: grid;
  min-height: 80vh;
  align-content: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1.2rem;
  margin-top: 2rem;
}

.contact-card {
  display: grid;
  min-height: 170px;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: var(--radius);
  align-content: space-between;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 80px rgba(17, 17, 17, 0.12);
}

.social-card {
  width: fit-content;
  min-width: 0;
}

a.contact-card,
a.contact-card * {
  cursor: pointer;
}

.contact-card span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-card strong {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  letter-spacing: -0.06em;
  line-height: 1;
  overflow-wrap: anywhere;
  user-select: text;
  cursor: text;
}

.contact-icon {
  width: 0.9em;
  height: 0.9em;
  flex: 0 0 auto;
  fill: currentColor;
}

.linkedin-mark,
.social-mark {
  align-self: end;
}

.linkedin-mark .contact-icon,
.social-mark .contact-icon {
  width: clamp(3rem, 8vw, 5rem);
  height: clamp(3rem, 8vw, 5rem);
}

.linkedin-icon {
  color: #0a66c2;
}

.github-icon {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.footer-links a {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

@media (max-width: 980px) {
  .hero,
  .project-layout,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .feature-card {
    position: static;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .section-shell {
    width: min(calc(100% - 20px), var(--max-width));
    min-height: auto;
    padding: 5rem 0;
  }

  .hero {
    min-height: 100svh;
    align-content: center;
    gap: 2rem;
  }

  .next-card {
    min-height: 84px;
    padding: 1rem;
  }

  .next-card strong {
    font-size: 1.12rem;
  }

  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .map-board {
    min-height: 520px;
  }

  .city-name {
    font-size: 0.72rem;
  }

  .tooltip {
    width: 220px;
  }

  .city-brest {
    left: 5%;
  }

  .city-munich {
    left: 69%;
  }
}
