/* ─────────────────────────────────────────────
   PORTFOLIO PREMIUM — Global Styles
   Domenico Punzo
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --primary:       #557DD1;
  --primary-dark:  #4671CD;
  --primary-light: #7A9DDC;
  --primary-glow:  rgba(85, 125, 209, 0.25);
  --primary-glow2: rgba(70, 113, 205, 0.15);

  --bg:            #07070F;
  --bg-2:          #0C0C1C;
  --bg-3:          #111126;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-glass:      rgba(12,12,28,0.7);

  --text:          #F0F2FA;
  --text-muted:    rgba(240,242,250,0.55);
  --text-subtle:   rgba(240,242,250,0.30);

  --border:        rgba(255,255,255,0.07);
  --border-blue:   rgba(85,125,209,0.25);
  --border-hover:  rgba(85,125,209,0.5);

  --radius:        14px;
  --radius-lg:     22px;
  --radius-xl:     32px;
  --radius-full:   9999px;

  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-expo:     cubic-bezier(0.16, 1, 0.3, 1);

  --shadow:        0 8px 48px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 80px rgba(85,125,209,0.12);
  --shadow-card:   0 2px 20px rgba(0,0,0,0.3);

  --nav-h:         70px;
  --section-pad:   clamp(80px, 10vw, 140px);
  --container:     1280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── Custom Cursor ── */
.cursor {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(85,125,209,0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.12s var(--ease);
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 14px; height: 14px; }
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring { width: 52px; height: 52px; border-color: var(--primary); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.15; }

.display { font-size: clamp(48px, 7vw, 96px); font-weight: 800; letter-spacing: -2px; }
.headline { font-size: clamp(36px, 5vw, 64px); font-weight: 700; letter-spacing: -1.5px; }
.title { font-size: clamp(24px, 3vw, 40px); font-weight: 600; letter-spacing: -0.5px; }
.subtitle { font-size: clamp(16px, 2vw, 20px); font-weight: 400; color: var(--text-muted); }
.label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); }
.body-lg { font-size: 18px; line-height: 1.75; color: var(--text-muted); }
.body { font-size: 15px; line-height: 1.7; color: var(--text-muted); }

/* ── Layout ── */
.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}
.section { padding-block: var(--section-pad); }

/* ── Section Header ── */
.section-header { margin-bottom: 64px; }
.section-header .label { margin-bottom: 12px; }
.section-header .headline { margin-bottom: 16px; }
.section-header .subtitle { max-width: 520px; }

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 20px;
}
.nav-monogram {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  color: #fff;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-link {
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg-card); }
.nav-cta {
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-switch {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}
.nav-switch:hover { border-color: var(--primary); color: var(--primary); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

/* ── Hero ── */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 40%, var(--primary-glow), transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 70%, var(--primary-glow2), transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  opacity: 0.4;
}
.hero-inner {
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.hero-badge-dot {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.hero-name { margin-bottom: 16px; }
.hero-role {
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-role span { color: var(--primary); font-weight: 600; }
.hero-tagline {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 48px;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--text-subtle); letter-spacing: 1.5px; text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  font-size: 15px; font-weight: 600;
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 24px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--primary-glow); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-2px); }
.btn-ghost {
  color: var(--primary);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-full);
  padding: 11px 24px;
}
.btn-ghost:hover { background: var(--primary-glow); }
.btn svg { width: 18px; height: 18px; }

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}
.about-photo-wrap {
  position: relative;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  background: var(--bg-3);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; color: var(--primary); opacity: 0.3;
}
.about-photo-card {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.about-photo-card .label { margin-bottom: 4px; }
.about-photo-card p { font-size: 20px; font-weight: 700; }
.about-content .label { margin-bottom: 12px; }
.about-content .title { margin-bottom: 20px; }
.about-content .body { margin-bottom: 16px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-tag {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.about-tag:hover { border-color: var(--primary); color: var(--primary); }

/* ── Timeline ── */
.timeline { position: relative; max-width: 800px; margin-inline: auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--primary), var(--primary), transparent);
  transform: translateX(-50%);
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}
.timeline-item:nth-child(odd) .timeline-content { grid-column: 1; text-align: right; }
.timeline-item:nth-child(odd) .timeline-dot { grid-column: 2; }
.timeline-item:nth-child(odd) .timeline-spacer { grid-column: 3; }
.timeline-item:nth-child(even) .timeline-spacer { grid-column: 1; }
.timeline-item:nth-child(even) .timeline-dot { grid-column: 2; }
.timeline-item:nth-child(even) .timeline-content { grid-column: 3; }
.timeline-dot {
  width: 12px; height: 12px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--border-blue);
  position: relative; z-index: 1;
  flex-shrink: 0;
}
.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.3s;
}
.timeline-content:hover { border-color: var(--border-blue); }
.timeline-year {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 6px;
}
.timeline-content h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.timeline-content p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Projects Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  position: relative;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-blue);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.project-card-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-3);
  overflow: hidden;
  position: relative;
}
.project-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project-card:hover .project-card-thumb img { transform: scale(1.05); }
.project-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}
.project-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,7,15,0.8), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-card-cta {
  position: absolute; bottom: 16px; right: 16px;
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(8px);
  transition: all 0.3s var(--ease-expo);
  color: #fff;
}
.project-card:hover .project-card-cta { opacity: 1; transform: translateY(0); }
.project-card-body { padding: 24px; }
.project-card-category {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.project-card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.project-card-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.project-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.tag-blue {
  background: rgba(85,125,209,0.12);
  border-color: rgba(85,125,209,0.2);
  color: var(--primary-light);
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
  display: grid; place-items: center;
  padding: 20px;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s var(--ease-expo);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: sticky; top: 0;
  display: flex; justify-content: flex-end;
  padding: 20px 24px 0;
  z-index: 10;
}
.modal-close-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--bg-card-hover); color: var(--text); }
.modal-gallery {
  position: relative;
  margin-bottom: 0;
}
.modal-gallery-main {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  overflow: hidden;
}
.modal-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.modal-gallery-thumbs {
  display: flex; gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
}
.modal-gallery-thumb {
  flex-shrink: 0;
  width: 80px; height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.modal-gallery-thumb.active { border-color: var(--primary); }
.modal-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 32px; }
.modal-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.modal-category {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary);
}
.modal-title { font-size: clamp(22px, 4vw, 32px); font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.modal-desc { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 32px; }
.modal-section { margin-bottom: 28px; }
.modal-section h4 { font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.modal-section p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-pdf {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color 0.2s;
}
.modal-pdf:hover { border-color: var(--primary); }
.modal-pdf-icon { font-size: 24px; }
.modal-pdf-name { font-size: 14px; font-weight: 600; }
.modal-pdf-size { font-size: 12px; color: var(--text-subtle); }

/* ── Filters (Academic) ── */
.filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 48px;
  justify-content: center;
}
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-sep { width: 1px; height: 32px; background: var(--border); align-self: center; }
.filter-btn {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.filter-btn:hover { border-color: var(--border-blue); color: var(--primary); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
}

/* ── Skills ── */
.skills-list { display: flex; flex-direction: column; gap: 2px; }
.skill-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}
.skill-item:hover { border-color: var(--border-blue); }
.skill-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}
.skill-header-left { display: flex; align-items: center; gap: 16px; }
.skill-number {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-glow2);
  border: 1px solid var(--border-blue);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
.skill-name { font-size: 17px; font-weight: 600; }
.skill-arrow {
  width: 24px; height: 24px;
  color: var(--text-muted);
  transition: transform 0.35s var(--ease-expo);
  flex-shrink: 0;
}
.skill-item.open .skill-arrow { transform: rotate(45deg); color: var(--primary); }
.skill-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-expo);
}
.skill-item.open .skill-body { grid-template-rows: 1fr; }
.skill-body-inner { overflow: hidden; }
.skill-body-content {
  padding: 0 24px 24px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.skill-body-content .body { color: var(--text-muted); font-size: 14px; }
.skill-level { margin-bottom: 12px; }
.skill-level-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--text-muted); }
.skill-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-expo);
}
.skill-item.open .skill-bar-fill { transform: scaleX(var(--level, 1)); }
.skill-projects { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── AC Tooltips (Academic) ── */
.ac-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-badge {
  position: relative;
  padding: 5px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  cursor: default;
  transition: all 0.2s;
}
.ac-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(85,125,209,0.08);
}
.ac-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg-2);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 200px;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s var(--ease);
  z-index: 50;
  white-space: normal;
}
.ac-badge:hover .ac-tooltip {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.ac-tooltip-code { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.ac-tooltip-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ac-tooltip-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── Tools Ticker ── */
.tools-section { overflow: hidden; padding-block: 60px; border-block: 1px solid var(--border); }
.tools-ticker { position: relative; }
.tools-ticker-label { text-align: center; margin-bottom: 32px; }
.tools-track-wrap { overflow: hidden; }
.tools-track {
  display: flex; gap: 0;
  animation: ticker 25s linear infinite;
}
.tools-track:hover { animation-play-state: paused; }
.tool-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 32px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
  border-right: 1px solid var(--border);
}
.tool-item:hover { color: var(--text); }
.tool-icon { font-size: 20px; }
.tool-name { white-space: nowrap; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info { }
.contact-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border-blue);
  overflow: hidden;
  margin-bottom: 24px;
}
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--primary); opacity: 0.5;
}
.contact-name { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.contact-role { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; }
.contact-availability {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  color: #4ade80;
  margin-bottom: 32px;
}
.contact-availability-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  transition: all 0.2s;
}
.contact-link:hover { border-color: var(--border-blue); background: var(--bg-card-hover); transform: translateX(4px); }
.contact-link-icon { color: var(--primary); }
.contact-form { }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 15px; font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-subtle); }
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-textarea { resize: vertical; min-height: 130px; }
.form-submit { width: 100%; padding: 15px; margin-top: 4px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 13px; color: var(--text-subtle); }
.footer-back {
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}
.footer-back:hover { border-color: var(--primary); color: var(--primary); }

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-expo), transform 0.7s var(--ease-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Animations ── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(2deg); }
  66% { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Nav Overlay ── */
.mobile-nav {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav .nav-link { font-size: 28px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo-wrap { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .timeline::before { left: 20px; }
  .timeline-item { grid-template-columns: auto 1fr; }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content { grid-column: 2; text-align: left; }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot { grid-column: 1; }
  .timeline-item:nth-child(odd) .timeline-spacer,
  .timeline-item:nth-child(even) .timeline-spacer { display: none; }
}
@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .nav-links, .nav-cta, .nav-switch { display: none; }
  .nav-hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .cursor, .cursor-ring { display: none; }
  .skill-body-content { grid-template-columns: 1fr; }
  .modal { max-height: 95vh; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .timeline-item { gap: 12px; }
  .timeline-content { padding: 16px; }
}

/* ── Skill Track — New Design ── */
.skills-track { border-top: 1px solid var(--border); }

.skill-track-item {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.skill-track-item:hover { background: rgba(255,255,255,0.015); }

.skill-track-header {
  display: grid;
  grid-template-columns: 52px 1fr 200px 64px;
  align-items: center;
  gap: 28px;
  padding: 26px 0;
  user-select: none;
}

.skill-track-num {
  font-size: 12px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.skill-track-item.active .skill-track-num { color: var(--primary); }

.skill-track-name {
  font-size: 20px; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  transition: color 0.3s var(--ease);
  line-height: 1.2;
}
.skill-track-item.active .skill-track-name { color: var(--primary); }
.skill-track-item:not(.active):hover .skill-track-name { color: var(--text); opacity: 0.75; }

.skill-track-progress {
  position: relative;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.skill-track-dot {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s var(--ease-bounce);
  box-shadow: 0 0 12px rgba(85,125,209,0.7);
}
.skills-track.in-view .skill-track-dot { transform: translate(-50%, -50%) scale(1); }

.skill-track-pct {
  text-align: right;
  font-size: 13px; font-weight: 600;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.skill-track-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s var(--ease-expo);
}
.skill-track-item.active .skill-track-body { grid-template-rows: 1fr; }
.skill-track-inner { overflow: hidden; }

.skill-track-content {
  padding: 0 0 28px 80px;
  display: flex; flex-direction: column; gap: 16px;
}

.skill-tool-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tool-badge {
  padding: 5px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  transition: all 0.2s;
  background: transparent;
}
.skill-tool-badge:hover { border-color: var(--primary); color: var(--primary); }

/* ── Modal extras ── */
.modal-hero-emoji {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}

.modal-reflection-block { }
.modal-refl-item { margin-bottom: 14px; }
.modal-refl-label {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 5px;
}
.modal-refl-item p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.modal-tools { margin-top: 4px; }

/* ── Responsive skill track ── */
@media (max-width: 900px) {
  .skill-track-header { grid-template-columns: 40px 1fr auto; gap: 16px; }
  .skill-track-progress { display: none; }
  .skill-track-content { padding-left: 56px; }
}
@media (max-width: 600px) {
  .skill-track-name { font-size: 16px; }
  .skill-track-content { padding-left: 16px; }
}

/* ── Particle Canvas ── */
#particleCanvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ── Bento Grid (About section) ── */
.bento-grid {
  display: grid;
  grid-template-columns: 260px 1fr 1fr;
  gap: 14px;
}
.bento-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
              transform 0.3s var(--ease);
}
.bento-cell:hover {
  border-color: var(--border-blue);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.bento-photo-cell {
  grid-row: 1 / 3;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.bento-photo-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.bento-small-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
}
.bento-value {
  font-size: 19px; font-weight: 700;
  color: var(--text);
}
.bento-stats-cell {
  grid-column: 2 / 4;
  display: flex; gap: 0; align-items: center;
}
.bento-stat {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 8px 0;
}
.bento-stat + .bento-stat {
  border-left: 1px solid var(--border);
}
.bento-stat-num {
  font-size: 40px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -2px; line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
}
.bento-stat-label {
  font-size: 12px; color: var(--text-muted);
  margin-top: 6px; text-align: center;
}
.bento-bio-cell {
  grid-column: 1 / 4;
}
.bento-bio-text {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 14px;
}
.bento-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,0.6);
  flex-shrink: 0;
  animation: bento-pulse 2s ease-in-out infinite;
}
@keyframes bento-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(74,222,128,0.5); }
  50%       { box-shadow: 0 0 22px rgba(74,222,128,0.9); }
}
.bento-badge-cell {
  background: linear-gradient(135deg, rgba(85,125,209,0.1), rgba(70,113,205,0.05));
  border-color: var(--border-blue);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; text-align: center;
}
.bento-badge-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--primary);
}
.bento-badge-sub {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
.bento-icon { font-size: 26px; }

/* ── 3D Card Tilt + light ── */
.project-card { position: relative; }
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    500px at var(--mx, 50%) var(--my, 50%),
    rgba(85,125,209,0.1), transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s;
}
.project-card:hover::after { opacity: 1; }

/* ── Responsive bento ── */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-photo-cell { grid-column: 1 / 3; grid-row: auto; min-height: 300px; }
  .bento-stats-cell { grid-column: 1 / 3; }
  .bento-bio-cell { grid-column: 1 / 3; }
}
@media (max-width: 600px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-photo-cell, .bento-stats-cell, .bento-bio-cell { grid-column: 1; }
  .bento-stats-cell { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════
   UPGRADE — Mix A + B + C
═══════════════════════════════════════════ */

/* ── (B) Scroll progress bar ── */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  z-index: 300; width: 0%; pointer-events: none;
}

/* ── (A) Section decorative numbers ── */
.section-header {
  position: relative;
  overflow: visible;
}
.section-num {
  position: absolute;
  top: -0.18em; left: -0.05em;
  font-size: clamp(88px, 12vw, 160px);
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  color: rgba(85,125,209,0.07);
  -webkit-text-stroke: 1.5px rgba(85,125,209,0.38);
  letter-spacing: -6px;
  pointer-events: none; user-select: none;
  line-height: 1; z-index: 0;
}

/* ── (C) Headline word-slide reveal ── */
.hw-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.1;
}
.hw {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease;
}
.hw.hw-in {
  transform: translateY(0);
  opacity: 1;
}

/* ── (A) Hero outline "Punzo" ── */
#heroLast {
  color: transparent;
  -webkit-text-stroke: 2px var(--primary);
}

/* ── (C) Cursor VIEW label ── */
.cursor-label {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9997;
  font-size: 9px; font-weight: 800;
  letter-spacing: 2.5px; color: #fff;
  text-transform: uppercase; opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s;
  font-family: 'Space Grotesk', sans-serif;
}
body.cursor-project .cursor {
  width: 62px; height: 62px;
  background: var(--primary);
  transition: width 0.22s var(--ease), height 0.22s var(--ease), background 0.22s;
}
body.cursor-project .cursor-ring { opacity: 0; }
body.cursor-project .cursor-label { opacity: 1; }

/* ── (B) Projects — grille 2 colonnes + 1ère carte featured ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Featured : 1ère carte pleine largeur, image gauche + texte droite */
.projects-grid .project-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 56% 44%;
  border-color: var(--border-blue);
  box-shadow: 0 0 0 1px rgba(85,125,209,0.1), var(--shadow-card);
}
.projects-grid .project-card:first-child .project-card-thumb {
  aspect-ratio: unset;
  min-height: 310px;
}
.projects-grid .project-card:first-child .project-card-body {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.projects-grid .project-card:first-child .project-card-title {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 16px;
}
.projects-grid .project-card:first-child .project-card-desc {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 24px;
}
.projects-grid .project-card:first-child .project-card-cta {
  width: 48px; height: 48px;
}
.projects-grid .project-card:first-child .project-card-year {
  top: 20px; right: 20px;
  font-size: 12px; padding: 5px 14px;
}

/* Responsive featured */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid .project-card:first-child { grid-template-columns: 1fr; }
  .projects-grid .project-card:first-child .project-card-thumb {
    min-height: 220px; aspect-ratio: 16/10;
  }
  .projects-grid .project-card:first-child .project-card-body { padding: 24px 28px; }
}
