/* ═══════════════════════════════════════════════
   Philip Pagliughi — Shared Stylesheet
   ═══════════════════════════════════════════════ */

:root {
  --deep: #08306b;
  --deep-dark: #041d44;
  --accent-cyan: #67e8f9;
  --accent-emerald: #6ee7b7;
  --accent-blue: #93c5fd;
  --text-primary: #f0f6ff;
  --text-secondary: rgba(191, 219, 254, 0.85);
  --text-muted: rgba(147, 197, 253, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  background: var(--deep);
  touch-action: manipulation;
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(6, 95, 70, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(30, 64, 175, 0.15), transparent),
    radial-gradient(ellipse 90% 70% at 50% 50%, rgba(8, 48, 107, 0.9), transparent),
    var(--deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background ─── */
.bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M0 30h60M30 0v60' stroke='%23ffffff' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* ─── Floating Nav ─── */
.floating-nav {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  width: fit-content;
  margin: 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: rgba(4, 29, 68, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.4s;
}
.floating-nav.visible { opacity: 1; }
.floating-nav a {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.floating-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}
.floating-nav .nav-cta {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.floating-nav .nav-cta:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

/* ─── Layout ─── */
.page-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

/* ─── Hero ─── */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
  position: relative;
}
@media (max-width: 767px) {
  .hero { min-height: 75vh; }
}

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-top: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #bfdbfe 40%, #67e8f9 70%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.35s forwards;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.6s forwards;
}
.hero-location::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.7s forwards;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(30, 64, 175, 0.55);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-green {
  background: linear-gradient(135deg, #047857, #059669);
  color: white;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.35);
}
.btn-green:hover {
  box-shadow: 0 6px 28px rgba(6, 78, 59, 0.5);
  transform: translateY(-1px);
}

.hero-contact {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.85s forwards;
}
.hero-contact a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.hero-contact a:hover { color: var(--accent-cyan); }

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}
.scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.scroll-chevron {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: bounceDown 1.8s ease-in-out infinite;
}
.scroll-chevron svg { opacity: 0.5; }
.scroll-chevron svg:first-child { opacity: 0.3; }

/* ─── Section Headers ─── */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-subtitle {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  font-size: 1rem;
  max-width: 500px;
}

/* ─── About ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.about-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}
.about-text p + p { margin-top: 1.25rem; }

.highlight-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  transition: all 0.3s;
}
.highlight-card:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
.highlight-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.highlight-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Experience Timeline ─── */
.timeline {
  position: relative;
  margin-top: 3rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-emerald), transparent);
  border-radius: 2px;
}
@media (min-width: 768px) {
  .timeline::before { left: 1.5rem; }
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 3rem;
}
@media (min-width: 768px) {
  .timeline-item { padding-left: 4.5rem; }
}

.timeline-dot {
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--deep);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.3);
  z-index: 2;
  transition: all 0.3s;
}
@media (min-width: 768px) {
  .timeline-dot { left: calc(1.5rem - 5px); }
}

.timeline-item:hover .timeline-dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.5);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all 0.3s;
}
.timeline-card:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
}
.timeline-card:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}
.timeline-card:focus:not(:focus-visible) { outline: none; }
.timeline-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}
.timeline-card.expanded {
  border-color: rgba(103, 232, 249, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.timeline-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.timeline-card .role {
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 500;
  margin-top: 0.2rem;
}
.timeline-card .summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 0.75rem;
}
.timeline-card .expand-label {
  margin-top: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.expand-arrow {
  display: inline-block;
  transition: transform 0.3s;
  font-size: 0.55rem;
}
.timeline-card.expanded .expand-arrow { transform: rotate(180deg); }

.bullet-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.timeline-card.expanded .bullet-list {
  max-height: 900px;
  opacity: 1;
}
.bullet-list li {
  display: flex;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.bullet-list li::before {
  content: '';
  margin-top: 0.55rem;
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  opacity: 0.6;
}

/* ─── Skills ─── */
.skills-section { padding-bottom: 5rem; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

.skill-group h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}
.skill-group .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.25s;
}
.pill:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(103, 232, 249, 0.25);
  transform: translateY(-1px);
}

/* ─── Education ─── */
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}
.edu-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.4), rgba(6, 95, 70, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.edu-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}
.edu-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* ─── Consulting callout ─── */
.consulting-callout {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all 0.3s;
}
.consulting-callout:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
}
.consulting-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.35), rgba(14, 116, 144, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.consulting-callout h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.consulting-callout p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.consulting-services {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.consulting-services span {
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Footer ─── */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-inner p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-inner a:hover { color: var(--accent-cyan); }

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ─── Divider ─── */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--glass-border), transparent);
  margin: 0;
}

/* ─── Utility ─── */
@media (max-width: 767px) {
  .hidden-mobile { display: none; }
}


@supports (-webkit-touch-callout: none) {
  html, body {
    background-attachment: scroll;
  }

  .bg-layer {
    position: absolute;
  }
}
