:root {
  --bg: #09090b;
  --surface: #121216;
  --surface-soft: #17171d;
  --border: #292932;
  --border-strong: #3d3d4a;
  --text: #f2f2f5;
  --muted: #b4b4bf;
  --subtle: #858591;
  --accent: #8b8bff;
  --accent-strong: #6f6fff;
  --accent-soft: rgba(139, 139, 255, 0.12);
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 75% 0%, rgba(92, 92, 210, 0.16), transparent 30rem),
    radial-gradient(circle at 10% 30%, rgba(80, 80, 155, 0.08), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

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

.container {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(9, 9, 11, 0.86);
  backdrop-filter: blur(16px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  flex: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: #ccccd4;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

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

.nav a:hover::after {
  transform: scaleX(1);
}

.lang-btn {
  flex: none;
  min-width: 42px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.lang-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding-block: 116px 88px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: center;
  gap: 72px;
}

.hero-kicker,
.section-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin-top: 10px;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero-text h2 {
  max-width: 720px;
  margin-top: 22px;
  color: #d8d8ff;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 650;
  line-height: 1.4;
}

.hero-text > p:not(.hero-kicker) {
  max-width: 680px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(111, 111, 255, 0.22);
  color: white;
}

.btn-outline {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

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

.btn:hover {
  opacity: 0.92;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.photo-carousel {
  position: relative;
  width: min(100%, 290px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(139, 139, 255, 0.8);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 14px rgba(139, 139, 255, 0.05), 0 22px 70px rgba(89, 89, 210, 0.28);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.photo-carousel:hover {
  box-shadow: 0 0 0 14px rgba(139, 139, 255, 0.08), 0 24px 80px rgba(89, 89, 210, 0.4);
  transform: translateY(-4px);
}

.photo-carousel img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 600ms ease;
}

.photo-carousel img.active {
  opacity: 1;
}

/* Shared sections */
.section {
  padding-block: 88px;
  scroll-margin-top: 72px;
}

.section-header {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-header h2 {
  margin-top: 6px;
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-subtitle {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 0.98rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  align-items: start;
  gap: 36px;
  margin-bottom: 28px;
}

.about-text p {
  color: #c9c9d1;
  font-size: 1rem;
}

.about-text p + p {
  margin-top: 16px;
}

.about-focus {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(139, 139, 255, 0.1), rgba(255, 255, 255, 0.02));
}

.focus-title {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-focus ul {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  list-style: none;
}

.about-focus li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-focus li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

/* Experience */
.experience-listing {
  display: grid;
  gap: 20px;
}

.experience-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface-soft), var(--surface));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.experience-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.company-logo,
.company-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.company-logo {
  padding: 7px;
  object-fit: contain;
}

.company-logo-suportemi {
  padding: 0;
  object-fit: cover;
}

.company-mark {
  background: linear-gradient(135deg, rgba(139, 139, 255, 0.24), rgba(139, 139, 255, 0.06));
  color: #ddddff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.experience-title h3 {
  font-size: 1.12rem;
  line-height: 1.3;
}

.experience-meta {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 0.84rem;
}

.experience-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.experience-list li {
  position: relative;
  padding-left: 20px;
  color: #c7c7cf;
  font-size: 0.94rem;
}

.experience-list li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "•";
}

/* Skills */
.skills-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skills-group {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  transition: border-color 200ms ease, transform 200ms ease;
}

.skills-group-wide {
  grid-column: span 2;
}

.skills-group:hover {
  border-color: rgba(139, 139, 255, 0.55);
  transform: translateY(-3px);
}

.skills-group h3 {
  margin-bottom: 16px;
  color: #d5d5ff;
  font-size: 0.98rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-grid span {
  padding: 6px 10px;
  border: 1px solid #30303a;
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.5);
  color: #c8c8d0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.skills-grid .skill-learning {
  border-color: rgba(139, 139, 255, 0.36);
  background: rgba(139, 139, 255, 0.07);
  color: #c9c9f6;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 139, 255, 0.1), transparent 12rem),
    linear-gradient(160deg, var(--surface-soft), var(--surface));
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.project-card:hover {
  border-color: rgba(139, 139, 255, 0.58);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.project-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.project-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(139, 139, 255, 0.28);
  border-radius: 10px;
  background: var(--accent-soft);
  color: #cacaFF;
}

.project-icon svg {
  width: 17px;
  height: 17px;
}

.project-type {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-card h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.project-card > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
}

.project-tags span {
  color: #a5a5b0;
  font-size: 0.75rem;
}

.project-tags span:not(:last-child)::after {
  margin-left: 7px;
  color: #4e4e59;
  content: "•";
}

.project-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: 18px;
  color: #cacaFF;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.project-link svg {
  width: 15px;
  height: 15px;
  transition: transform 180ms ease;
}

.project-link:hover svg {
  transform: translate(2px, -2px);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  transition: border-color 200ms ease, transform 200ms ease;
}

.contact-card:hover {
  border-color: rgba(139, 139, 255, 0.55);
  transform: translateY(-3px);
}

.contact-card h3 {
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.contact-card a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #bfbfff;
  font-size: 0.84rem;
  text-decoration: none;
  word-break: break-word;
}

.contact-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--accent-soft);
  color: #d5d5ff;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-card a:hover .contact-icon {
  border-color: var(--accent);
  background: rgba(139, 139, 255, 0.18);
  transform: translateY(-1px);
}

.contact-card a:hover {
  color: #ddddff;
}

.contact-card svg,
.contact-icon svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}

/* Footer and motion */
.footer {
  margin-top: 30px;
  padding: 30px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #71717d;
  font-size: 0.8rem;
  text-align: center;
}

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

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .header .container {
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-block: 14px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: none;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 40px;
  }

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

@media (max-width: 720px) {
  .container {
    padding-inline: 20px;
  }

  .header .container {
    padding-inline: 20px;
  }

  .hero {
    padding-block: 76px 58px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 46px;
    text-align: left;
  }

  .hero-photo {
    justify-content: flex-start;
  }

  .photo-carousel {
    width: 210px;
  }

  .section {
    padding-block: 64px;
    scroll-margin-top: 112px;
  }

  .about-grid,
  .skills-groups,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skills-group-wide {
    grid-column: auto;
  }

  .experience-card,
  .project-card {
    padding: 22px;
  }

  .project-card {
    min-height: 280px;
  }
}

@media (max-width: 440px) {
  .hero-text h1 {
    font-size: 2.65rem;
  }

  .hero-text h2 {
    font-size: 1rem;
  }

  .hero-buttons {
    display: grid;
  }

  .hero-buttons a {
    width: 100%;
  }

  .experience-header {
    align-items: flex-start;
  }

  .contact-card a {
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
