/* ============================================
   Aurora UI — CV Portfolio
   chiararelandini.github.io
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #0080FF;
  --magenta: #FF1493;
  --cyan:    #00FFFF;
  --bg:      #08080f;
  --surface: #0f0f1a;
  --surface2:#161625;
  --border:  rgba(255,255,255,0.08);
  --text:    #e8e8f0;
  --muted:   #8888aa;
  --radius:  0.75rem;
  --max-w:   1280px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Aurora mesh background --- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-bg::before,
.aurora-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: aurora-drift 10s ease-in-out infinite alternate;
}
.aurora-bg::before {
  width: 700px; height: 700px;
  top: -200px; left: -150px;
  background: radial-gradient(circle, var(--blue), transparent 70%);
}
.aurora-bg::after {
  width: 600px; height: 600px;
  bottom: -100px; right: -100px;
  background: radial-gradient(circle, var(--magenta), transparent 70%);
  animation-delay: -5s;
}

@keyframes aurora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}

/* --- Container --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* --- Nav --- */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  height: 60px;
}
.nav-logo {
  font-size: 1rem; font-weight: 700; letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.03em;
  transition: color 200ms;
}
.nav-links a:hover { color: var(--text); }

/* --- Hamburger (mobile) --- */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); margin: 5px 0;
  transition: transform 200ms, opacity 200ms;
}

/* --- Sections --- */
section { padding: clamp(4rem, 8vw, 8rem) 0; }
section:first-of-type { padding-top: calc(60px + clamp(4rem, 8vw, 6rem)); }

/* --- Hero --- */
#hero { min-height: 100dvh; display: flex; align-items: center; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.hero-eyebrow {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan);
  margin-bottom: 1rem;
}
.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero-name .gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--cyan) 40%, var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title {
  font-size: 1.125rem; color: var(--muted);
  font-weight: 400; margin-bottom: 0.5rem;
}
.hero-location {
  font-size: 0.875rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: transform 200ms, box-shadow 200ms, background 200ms;
  cursor: pointer; border: none;
}
.btn-primary {
  background: var(--blue); color: #fff;
}
.btn-primary:hover {
  background: #0070e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,128,255,0.35);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
}

/* Hero visual — animated orb stack */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative; height: 400px;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.35;
  animation: orb-pulse 8s ease-in-out infinite alternate;
}
.hero-orb.o1 { width:320px; height:320px; background: var(--blue); }
.hero-orb.o2 { width:220px; height:220px; background: var(--magenta); animation-delay: -4s; right: 20px; top: 40px; }
.hero-orb.o3 { width:180px; height:180px; background: var(--cyan); animation-delay: -2s; bottom: 40px; left: 20px; }

.hero-card-float {
  position: relative; z-index: 1;
  background: rgba(15,15,26,0.75);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem; text-align: center;
  min-width: 260px;
}
.hero-card-float .initials {
  font-size: 3rem; font-weight: 700;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
  margin-bottom: 0.75rem;
}
.hero-card-float .card-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.hero-card-float .card-role { font-size: 0.8rem; color: var(--muted); }

@keyframes orb-pulse {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.15) translate(10px, -10px); }
}

/* --- Section headers --- */
.section-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: 2.25rem; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.section-lead {
  font-size: 1.05rem; color: var(--muted);
  max-width: 60ch; line-height: 1.7;
}
.section-header { margin-bottom: 3rem; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border-color: rgba(0,128,255,0.25);
}

/* --- About pillars --- */
.pillars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pillar-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.pillar-icon.blue  { background: rgba(0,128,255,0.15); }
.pillar-icon.pink  { background: rgba(255,20,147,0.15); }
.pillar-icon.cyan  { background: rgba(0,255,255,0.12); }
.pillar-icon svg   { width: 22px; height: 22px; }
.pillar-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.pillar-body  { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* --- Experience timeline --- */
.timeline { display: flex; flex-direction: column; gap: 2.5rem; }

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0 1.5rem;
}

/* Left column: dot + line */
.timeline-marker {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 0.3rem;
}
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue); box-shadow: 0 0 0 3px rgba(0,128,255,0.2);
  z-index: 1;
}
.timeline-line {
  width: 2px; flex: 1;
  background: linear-gradient(to bottom, rgba(0,128,255,0.6), rgba(255,20,147,0.3), transparent);
  margin-top: 6px;
}
.timeline-item:last-child .timeline-line { display: none; }

/* Right column: content */
.timeline-content { min-width: 0; }

.timeline-period {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 0.35rem;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.timeline-company { font-size: 0.9rem; color: var(--blue); font-weight: 600; margin-bottom: 0.75rem; }
.timeline-body { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.timeline-body ul { padding-left: 1.25rem; }
.timeline-body li { margin-bottom: 0.35rem; }

/* --- Speaking --- */
.speaking-grid { display: grid; gap: 1.5rem; }
.speaking-card { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; }
.event-badge {
  background: linear-gradient(135deg, rgba(0,128,255,0.2), rgba(0,255,255,0.1));
  border: 1px solid rgba(0,128,255,0.3);
  border-radius: 0.5rem; padding: 0.75rem 1rem;
  text-align: center; min-width: 80px;
}
.event-badge .event-year {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cyan);
}
.event-badge .event-abbr {
  font-size: 1rem; font-weight: 700; color: var(--text);
  display: block; margin-top: 0.15rem;
}
.event-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.event-meta { font-size: 0.8rem; color: var(--blue); font-weight: 600; margin-bottom: 0.5rem; }
.event-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.event-highlight {
  border-color: rgba(255,20,147,0.25);
  background: linear-gradient(135deg, var(--surface), rgba(255,20,147,0.04));
}
.event-highlight .event-badge {
  background: linear-gradient(135deg, rgba(255,20,147,0.2), rgba(255,20,147,0.1));
  border-color: rgba(255,20,147,0.3);
}
.event-highlight .event-abbr { color: var(--magenta); }
.event-highlight .event-year { color: var(--magenta); }

/* --- Skills --- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.skill-group-title {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 0.9rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-block; padding: 0.3rem 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 2rem; font-size: 0.8rem; color: var(--text);
  transition: border-color 200ms, color 200ms;
}
.tag:hover { border-color: var(--blue); color: var(--cyan); }
.tag.accent { border-color: rgba(0,128,255,0.4); color: var(--blue); }

/* --- Education & Certs --- */
.edu-certs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.edu-item { margin-bottom: 2rem; }
.edu-degree { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.edu-school { font-size: 0.9rem; color: var(--blue); font-weight: 600; margin-bottom: 0.2rem; }
.edu-period { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }
.edu-grade {
  display: inline-block; padding: 0.2rem 0.65rem;
  background: rgba(0,255,255,0.1); border: 1px solid rgba(0,255,255,0.2);
  border-radius: 2rem; font-size: 0.75rem; font-weight: 600; color: var(--cyan);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.edu-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }

.cert-list { list-style: none; }
.cert-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.cert-item:last-child { border-bottom: none; }
.cert-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0; margin-top: 0.45rem;
}
.cert-name { font-size: 0.875rem; color: var(--text); line-height: 1.4; }

/* --- Languages --- */
.lang-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.lang-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 1.1rem;
}
.lang-name { font-weight: 600; font-size: 0.9rem; }
.lang-level { font-size: 0.78rem; color: var(--muted); }

/* --- Interests --- */
.interests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.interest-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
  font-size: 0.875rem;
}
.interest-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,128,255,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.interest-icon svg { width: 16px; height: 16px; stroke: var(--blue); }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}
footer a { color: var(--muted); text-decoration: none; transition: color 200ms; }
footer a:hover { color: var(--text); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  display: flex; align-items: center; gap: 0.4rem;
  font-weight: 500;
}
.footer-links a svg { width: 16px; height: 16px; }

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease-out, transform 480ms ease-out;
}
.reveal.visible { opacity: 1; transform: none; }

/* --- Monospace accents --- */
.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
}

/* --- Divider --- */
.section-divider {
  height: 1px; background: var(--border);
  margin: 0 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .skills-grid   { grid-template-columns: 1fr; }
  .edu-certs-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .nav-links { display: none; flex-direction: column; gap: 1rem; padding: 1rem 1.5rem 1.5rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .speaking-card { grid-template-columns: 1fr; }
  .event-badge { display: none; }
  .section-title { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
  .lang-row { flex-direction: column; }
}

/* --- Event / article link chips --- */
.event-links {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem;
}
.event-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--blue); text-decoration: none;
  padding: 0.3rem 0.75rem;
  background: rgba(0,128,255,0.08);
  border: 1px solid rgba(0,128,255,0.25);
  border-radius: 2rem;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.event-link:hover {
  background: rgba(0,128,255,0.18);
  border-color: rgba(0,128,255,0.5);
  color: var(--cyan);
}
.event-link svg { flex-shrink: 0; stroke: currentColor; }

/* ============================================
   BUSINESS CARD
   ============================================ */
.biz-card {
  position: relative;
  z-index: 1;
  width: 420px;
  background: rgba(13, 13, 26, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  padding: 1.75rem 1.75rem 1.25rem;
  box-shadow:
    0 0 0 1px rgba(0,128,255,0.08),
    0 8px 40px rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.06) inset;
  transition: box-shadow 300ms, transform 300ms;
}
.biz-card:hover {
  box-shadow:
    0 0 0 1px rgba(0,128,255,0.2),
    0 16px 56px rgba(0,0,0,0.6),
    0 1px 0 rgba(255,255,255,0.08) inset;
  transform: translateY(-3px);
}

/* Gradient top stripe */
.biz-stripe {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 1rem 1rem 0 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan) 50%, var(--magenta));
}

/* Corner decoration marks */
.biz-corner {
  position: absolute; width: 10px; height: 10px;
  border-color: rgba(0,128,255,0.35); border-style: solid;
}
.biz-corner.tl { top: 10px;    left: 10px;    border-width: 1px 0 0 1px; }
.biz-corner.tr { top: 10px;    right: 10px;   border-width: 1px 1px 0 0; }
.biz-corner.bl { bottom: 10px; left: 10px;    border-width: 0 0 1px 1px; }
.biz-corner.br { bottom: 10px; right: 10px;   border-width: 0 1px 1px 0; }

/* Card body layout */
.biz-body {
  display: flex; align-items: flex-start; gap: 1.1rem;
  margin-top: 0.25rem;
}
.biz-initials {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,128,255,0.25), rgba(0,255,255,0.12));
  border: 1px solid rgba(0,128,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
  background-clip: padding-box;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

/* Text content */
.biz-name {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.15rem; letter-spacing: -0.01em;
}
.biz-role {
  font-size: 0.78rem; font-weight: 600;
  color: var(--blue); margin-bottom: 0.1rem;
  letter-spacing: 0.02em;
}
.biz-sub {
  font-size: 0.72rem; color: var(--muted);
  margin-bottom: 0.85rem;
}

/* Contact lines */
.biz-links {
  list-style: none; display: flex; flex-direction: column; gap: 0.35rem;
}
.biz-links li {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: var(--muted);
}
.biz-links li svg { flex-shrink: 0; stroke: var(--muted); opacity: 0.7; }
.biz-links a {
  color: var(--muted); text-decoration: none;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.7rem;
  transition: color 150ms;
}
.biz-links a:hover { color: var(--cyan); }

/* Copy button */
.biz-copy-btn {
  display: flex; align-items: center; gap: 0.4rem;
  margin-top: 1.1rem; margin-left: auto;
  background: none; border: 1px solid var(--border);
  border-radius: 2rem; padding: 0.3rem 0.9rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted); cursor: pointer;
  transition: border-color 200ms, color 200ms, background 200ms;
}
.biz-copy-btn:hover {
  border-color: rgba(0,128,255,0.4);
  color: var(--cyan);
  background: rgba(0,128,255,0.06);
}
.biz-copy-btn.copied {
  border-color: rgba(0,255,255,0.5);
  color: var(--cyan);
  background: rgba(0,255,255,0.06);
}

/* Hide old hero-card-float styles if any remain */
.hero-card-float { display: none; }

/* Lucide icon elements inside interest chips */
.interest-icon i[data-lucide],
.interest-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--blue);
  display: block;
}

/* ============================================
   FIREWORKS — copy button effect
   ============================================ */

/* Particle */
@keyframes fw-burst {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.fw-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: fw-burst 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  transform-origin: center;
  /* offset by half size so it bursts from center */
  margin-left: -4px;
  margin-top: -4px;
}

/* Toast message */
@keyframes fw-toast-in {
  0%   { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
  20%  { opacity: 1; transform: translate(-50%, 0)   scale(1); }
  80%  { opacity: 1; transform: translate(-50%, 0)   scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(0.95); }
}
.fw-toast {
  position: absolute;
  z-index: 9999;
  transform: translate(-50%, 0);
  background: rgba(13, 13, 26, 0.92);
  border: 1px solid rgba(0,255,255,0.35);
  border-radius: 2rem;
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 24px rgba(0,128,255,0.25);
  letter-spacing: 0.01em;
}
.fw-toast--show {
  animation: fw-toast-in 2.8s ease forwards;
}
