﻿:root {
  color-scheme: light;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --ink: #0f1d2e;
  --muted: #5f6b85;
  --accent: #3a6ff8;
  --accent-soft: #d6e4ff;
  --mint: #dff6f0;
  --sky: #cfe4ff;
  --shadow: 0 18px 35px rgba(13, 35, 82, 0.12);
  --radius: 22px;
  --radius-lg: 32px;
  --modal-max-width: 520px;
  --modal-max-height: 65vh;
  --modal-padding: 32px 30px 28px;
  --modal-mobile-max-height: 72vh;
  font-size: 16px;
}

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

body {
  background: radial-gradient(circle at top, #ffffff 0%, #eef3ff 45%, #e3eaf8 100%);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.hero {
  /* background: linear-gradient(140deg, #ffffff 0%, #edf3ff 55%, #dfe9ff 100%); */
  background: url("images/hero.png") right bottom / cover no-repeat;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 42px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  filter: blur(1px);
}

.hero::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #cde2ff 0%, transparent 70%);
  top: -220px;
  right: -120px;
}

.hero::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #f0f4ff 0%, transparent 70%);
  bottom: -160px;
  left: -120px;
}


.nav,
.hero-content {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  position: relative;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dbe4ff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(13, 35, 82, 0.08);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #1a2b4c;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a2b4c;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-button {
  border: 1px solid #dbe4ff;
  background: #fff;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--accent-soft);
  color: #1a2b4c;
  border-color: #c5d7ff;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

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

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-weight: 600;
  color: #5167a5;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  margin-bottom: 6px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  margin-bottom: 16px;
  color: #3d4b7a;
  font-weight: 600;
}

.lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
}

.hero-actions {
  margin: 28px 0 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #5a8bff 0%, #4a6dff 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(74, 109, 255, 0.28);
}

.btn.ghost {
  background: #fff;
  color: #4a6dff;
  border: 2px solid #b8c8ff;
}

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

.hero-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
}

.hero-metrics strong {
  display: block;
  font-size: 1.4rem;
  color: var(--ink);
}

.hero-card {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 24px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2b3655 0%, #3a6ff8 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.name {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent);
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.mini-card {
  background: var(--accent-soft);
  padding: 14px 16px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #1a2b4c;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}


.section-head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
  max-width: 680px;
  font-size: 0.98rem;
}

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

.card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.project-image {
  display: none;
}

.project-card {
  cursor: pointer;
}

.project-card:focus {
  outline: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(214, 228, 255, 0.5), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  background: var(--mint);
  padding: 4px 10px;
  border-radius: var(--radius);
  color: #137d65;
  font-weight: 600;
}

.card-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.projects-carousel {
  display: grid;
  gap: 16px;
}

.projects-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.projects-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #dbe4ff;
  background: #fff;
  color: #0f1d2e;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(13, 35, 82, 0.08);
}

.projects-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.projects-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.projects-track .card {
  scroll-snap-align: start;
  flex: 0 0 clamp(240px, 38vw, 360px);
}

.skills-card ul {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.skills-card-languages {
  grid-template-rows: auto 1fr;
}

.skills-card-languages ul {
  margin-top: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0;
}

.skills-card ul.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  row-gap: 14px;
}

.skills-card ul.skills-tags li {
  background: #cfe0f6;
  color: #111827;
  border-radius: 800px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 32, 0.6);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-radius: 0 !important;
  padding: var(--modal-padding);
  max-width: var(--modal-max-width);
  width: min(90vw, var(--modal-max-width));
  max-height: min(var(--modal-max-height), 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 29, 46, 0.35) transparent;
  scrollbar-gutter: stable;
  box-shadow: 0 24px 48px rgba(8, 20, 42, 0.24);
  position: relative;
  display: grid;
  gap: 14px;
  overscroll-behavior: contain;
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-panel::-webkit-scrollbar {
  width: 10px;
}

.modal-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 0;
}

.modal-panel::-webkit-scrollbar-thumb {
  background: rgba(15, 29, 46, 0.35);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #dde6fb;
  background: #f7f9ff;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover {
  background: #edf2ff;
  border-color: #cad8fb;
}

.modal-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
}

.modal-panel h3 {
  line-height: 1.3;
  padding-right: 42px;
}

.modal-list {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.no-scroll {
  overflow: hidden;
}

.timeline {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f7;
}

.timeline-list {
  margin-top: 8px;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

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

.time {
  font-weight: 600;
  color: var(--accent);
}

.education {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.muted {
  color: var(--muted);
}

.skills-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.skills-panel>div {
  padding: 24px 28px;
}

.skills-panel>div+div {
  border-left: 1px solid #edf0f7;
}

.skills-panel ul {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.contact {
  background: linear-gradient(135deg, #ecf2ff 0%, #ffffff 60%);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

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

.contact-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.resume-btn {
  margin-top: 20px;
}

.form {
  display: grid;
  gap: 12px;
}

input,
textarea {
  border: 1px solid #dde5f5;
  border-radius: 14px;
  padding: 10px 14px;
  font-family: inherit;
  background: #f9fbff;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(58, 111, 248, 0.2);
}

.availability {
  display: grid;
  gap: 12px;
}

.label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.section,
.hero {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.section:nth-of-type(1) {
  animation-delay: 0.1s;
}

.section:nth-of-type(2) {
  animation-delay: 0.2s;
}

.section:nth-of-type(3) {
  animation-delay: 0.3s;
}

.section:nth-of-type(4) {
  animation-delay: 0.4s;
}

.section:nth-of-type(5) {
  animation-delay: 0.5s;
}

@keyframes fadeUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    width: min(520px, 100%);
    background: #ffffff;
    border: 1px solid #e5ecff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 16px 28px rgba(13, 35, 82, 0.12);
  }

  .nav-links a {
    padding: 8px 10px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .skills-panel {
    grid-template-columns: 1fr;
  }

  .skills-panel>div+div {
    border-left: none;
    border-top: 1px solid #edf0f7;
  }

  .hero-illustration {
    width: 360px;
    height: 220px;
    top: auto;
    bottom: 120px;
    right: 24px;
  }
}

@media (max-width: 600px) {
  :root {
    font-size: 15px;
  }

  .page {
    padding: 44px 18px 48px;
    gap: 56px;
  }

  .nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
  }

  .logo,
  .nav-links,
  .nav-toggle {
    display: none;
  }

  .lang-switch {
    display: flex;
    margin-left: auto;
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dbe4ff;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 10px 18px rgba(13, 35, 82, 0.16);
  }

  body {
    background: url("images/mobile.png") center top / cover no-repeat;
  }

  .hero {
    padding: 28px 24px 40px;
    background: url("images/mobile.png") center / cover no-repeat;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-text {
    min-width: 0;
  }

  h1 {
    font-size: clamp(1.65rem, 7.2vw, 2.1rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
    hyphens: auto;
    max-width: 100%;
  }

  .lead,
  .card p,
  .timeline-list,
  .education .muted,
  .modal .muted,
  .modal-list {
    line-height: 1.75;
    font-size: 1rem;
  }

  .section-head h2 {
    margin-bottom: 2px;
  }

  .nav-links {
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
  }

  .lang-switch {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .lang-button {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-metrics {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 18px;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: left;
  }

  .hero-metrics > div {
    width: auto;
    max-width: none;
    margin-inline: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    text-align: left;
  }

  .hero-metrics strong,
  .hero-metrics span {
    width: auto;
    text-align: left;
  }

  .hero-illustration {
    display: none;
  }

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

  .projects-controls {
    justify-content: center;
  }

  .projects-track .card {
    flex-basis: 80vw;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 24px 14px 40px;
    gap: 48px;
  }

  .lang-switch {
    top: 8px;
    right: 10px;
  }

  .hero-metrics {
    gap: 12px;
  }

  .hero-metrics span {
    font-size: 0.88rem;
  }

  .modal {
    place-items: start center;
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .modal-panel {
    width: 100%;
    max-height: min(var(--modal-mobile-max-height), calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    margin: 0 auto;
    border-radius: 0 !important;
    padding: 28px 20px 20px;
  }

  .logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .hero {
    padding: 24px 18px 32px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .timeline,
  .education,
  .skills-panel>div,
  .contact {
    padding: 20px;
  }

  .card,
  .contact-card {
    padding: 20px;
  }

  .projects-track {
    gap: 16px;
  }

  .projects-track .card {
    flex-basis: 86vw;
  }
}
