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

:root {
  --bg: #eceff1;
  --surface: rgba(255, 255, 255, 0.78);
  --border: rgba(25, 25, 112, 0.1);
  --text: #0a0a0a;
  --text-muted: #5a6373;
  --blue: #191970;
  --blue-hover: #12124f;
  --accent: var(--blue);
  --accent-contrast: #ffffff;
  --radius: 10px;
  --radius-sm: 8px;
  --nav-height: 72px;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(25, 25, 112, 0.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

/* Navbar — floating pill */
.navbar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  padding: 0 16px;
}

.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 100%;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  padding: 3px 14px;
  border-radius: 999px;
}

.nav-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  gap: 2px;
  padding: 0 4px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.nav-tab-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .nav-tab-icon {
    display: none;
  }
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.nav-tab-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 4px;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-icon:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

/* Burger (mobile only) */
.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  position: relative;
  margin-left: 2px;
}

.nav-burger:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-burger span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 4px));
}

.nav-burger span:nth-child(2) {
  transform: translate(-50%, calc(-50% + 4px));
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-burger[aria-expanded="true"] span:nth-child(2) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Mobile menu (drops under the pill) */
.mobile-menu {
  pointer-events: auto;
  display: none;
  flex-direction: column;
  margin-top: 8px;
  padding: 8px;
  width: min(320px, calc(100% - 16px));
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04);
}

.mobile-menu[data-open="true"] {
  display: flex;
}

.mobile-menu a {
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  border-radius: 10px;
}

.mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.mobile-menu-socials {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-top: 10px;
}

.mobile-menu-socials a {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 10px 12px;
}

@media (max-width: 640px) {
  .navbar {
    padding: 0 10px;
  }
  .nav-pill {
    padding: 4px;
    gap: 2px;
  }
  .nav-brand {
    padding: 2px 6px;
  }
  .nav-name {
    font-size: 12px;
  }
  .nav-tabs {
    padding: 0 2px;
  }
  .nav-tab {
    padding: 5px 8px;
    font-size: 11.5px;
  }
  .nav-socials {
    padding-left: 2px;
  }
  .nav-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 360px) {
  .nav-tabs,
  .nav-socials {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Layout utilities */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  line-height: 1.15;
}

/* Accent word — just color, nothing else */
.hl {
  color: var(--hl-color, var(--blue));
  font-weight: inherit;
}

.hl-blue { --hl-color: var(--blue); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s ease, background 0.15s ease,
    transform 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: #ffffff;
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.03);
}

.btn-papillon {
  background: #16a34a;
  color: #fff;
}

.btn-papillon:hover {
  opacity: 0.9;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: calc(var(--nav-height) + 72px) 0 32px;
}

.hero-title {
  font-size: clamp(32px, 5.2vw, 60px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 900px;
}

.hero-title-muted {
  color: var(--text-muted);
  font-weight: 500;
}

.hero-subtitle {
  margin-top: 24px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-strip {
  margin-top: 64px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-strip-company {
  color: var(--text);
  font-weight: 600;
  margin-left: 4px;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  display: block;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.project-cover {
  height: 180px;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.project-cover img {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  display: block;
}

.project-cover-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-cover-label {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.project-cover-papillon {
  background: transparent;
}

.project-cover-proxmox {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pb-mock {
  width: 100%;
  max-width: 260px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  color: #0f172a;
  font-family: "Inter", system-ui, sans-serif;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 24px rgba(15, 23, 42, 0.08);
}

.pb-mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pb-mock-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  color: #0f172a;
}

.pb-mock-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #f97316;
  color: #fff;
}

.pb-mock-x svg {
  width: 10px;
  height: 10px;
}

.pb-mock-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: #16a34a;
  font-weight: 600;
}

.pb-mock-live span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pb-pulse 1.8s ease-out infinite;
}

@keyframes pb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-mock-live span {
    animation: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
  }
}

.pb-mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 8px;
}

.pb-mock-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pb-mock-stat-head {
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.pb-mock-stat-ico {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.pb-ico-cpu { background: #60a5fa; }
.pb-ico-ram { background: #a78bfa; }
.pb-ico-disk { background: #34d399; }

.pb-mock-stats strong {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1;
}

.pb-mock-bar {
  display: block;
  height: 3px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.pb-mock-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  background: var(--blue);
  border-radius: 2px;
}

.pb-stat-cpu .pb-mock-bar::after { background: #60a5fa; }
.pb-stat-ram .pb-mock-bar::after { background: #a78bfa; }
.pb-stat-disk .pb-mock-bar::after { background: #34d399; }

.pb-mock-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pb-mock-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #334155;
  font-weight: 500;
}

.pb-mock-row em {
  font-style: normal;
  margin-left: auto;
  font-size: 8px;
  color: #16a34a;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

.pb-mock-row-off em {
  color: #dc2626;
}

.pb-mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

.pb-mock-row-off .pb-mock-dot {
  background: #cbd5e1;
}

.project-cover-c {
  background: linear-gradient(135deg, #ddd6fe, #8b5cf6 60%, #4338ca);
}

.project-body {
  padding: 16px 18px 20px;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.project-name {
  font-weight: 600;
  font-size: 15px;
}

.project-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 8px;
  border-radius: 999px;
}

.project-desc {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.project-role {
  font-size: 13px;
  color: var(--text-muted);
}

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

.skill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  color: #fff;
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-icon-ts { background: #3178c6; }
.skill-icon-react { background: #087ea4; }
.skill-icon-php { background: #777bb4; }
.skill-icon-node { background: #5fa04e; }
.skill-icon-git { background: #f05032; }
.skill-icon-figma { background: #1e1e1e; }

.skill-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.skill-name {
  font-weight: 600;
  font-size: 14px;
}

.skill-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 16px;
}

.about-text p:first-of-type {
  font-size: 17px;
}

.about-text strong {
  font-weight: 600;
}

.about-photo {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

/* Polaroid */
.polaroid {
  background: #fff;
  padding: 12px 12px 16px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04);
  max-width: 320px;
  display: inline-block;
}

.polaroid-1 { transform: rotate(2deg); }
.polaroid-2 { transform: rotate(-2deg); }

.polaroid-1 .polaroid-img { aspect-ratio: 3 / 4; }

.polaroid-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue), #4f46e5, #7c7cff);
  border-radius: 2px;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  display: block;
  margin-top: 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* Timeline (formation) */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}

.timeline-dates {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.timeline-place {
  font-weight: 600;
  font-size: 14px;
}

.timeline-city {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.timeline-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* XP list */
.xp-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 780px;
}

.xp-item {
  padding-left: 20px;
  border-left: 2px solid var(--border);
}

.xp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.xp-company {
  font-weight: 600;
  font-size: 14px;
}

.xp-dates {
  font-size: 12px;
  color: var(--text-muted);
}

.xp-role {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.xp-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Featured project */
.featured {
  background: linear-gradient(180deg, #ecfdf5, transparent 80%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

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

.featured-name {
  display: block;
  height: 28px;
  width: auto;
}

.featured-tagline {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 8px 0 20px;
  letter-spacing: -0.01em;
}

.featured-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  max-width: 520px;
  margin-bottom: 24px;
}

/* Soft skills */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.soft-card {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.soft-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.soft-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

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

.contact-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact-desc {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 16px;
}

.contact-email {
  display: inline-block;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--text);
  margin-bottom: 32px;
}

.contact-email:hover {
  color: var(--blue);
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.footer p {
  margin: 2px 0;
}

/* Responsive */
@media (max-width: 900px) {
  .projects-grid,
  .skills-grid,
  .timeline-grid,
  .soft-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid,
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-photo,
  .featured-photo {
    order: -1;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }
  .section-title {
    margin-bottom: 28px;
  }
  .hero {
    padding: calc(var(--nav-height) + 40px) 0 24px;
  }
  .hero-title br {
    display: none;
  }
  .hero-title-muted {
    display: block;
    margin-top: 4px;
  }
  .projects-grid,
  .skills-grid,
  .timeline-grid,
  .soft-grid {
    grid-template-columns: 1fr;
  }
}
