
:root {
  --bg: #081839;
  --panel: #071428;
  --muted: #98b2c9;
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
  --card: #071a2a;
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 14px;
  --max: 1200px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #04122a);
  color: #e6f0f6;
  line-height: 1.7;
  font-size: 1.1rem;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: #f8fafc;
}

h2 {
  font-size: 2.25rem;
  margin: 0 0 2rem 0;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

p {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Hero Section */
.hero {
  padding: 2rem 0 0.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: -2rem;
}

/* Stats Section */
.hero-stats {
  margin: 24px auto 0;
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 0 auto;
  width: 100%;
}

/* Projects Section Accent Line */
#projects.section {
  position: relative;
  padding-top: 3rem;
}

#projects.section::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  z-index: 1;
}

.hero-inner {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.hero-left {
  flex: 1;
  min-width: 0;
  position: relative;
  padding-right: 160px; /* Space for avatar on larger screens */
}

.hero-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  z-index: 2;
}

.name {
  font-size: 3.5rem;
  margin: 0 0 0.5rem 0;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  background: linear-gradient(90deg, #f8fafc, var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.subtitle {
  margin: 0 0 1.25rem 0;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
}

.lead {
  color: var(--muted);
  max-width: 100%;
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Buttons */
.cta-row {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0 0;
  flex-wrap: wrap;
  row-gap: 0.75rem;
}

/* Mobile styles */
@media (max-width: 768px) {
  .hero {
    padding: 1.5rem 0 0.5rem;
    margin-bottom: -1.5rem;
  }
  
  .hero-inner {
    gap: 2rem;
    flex-direction: column-reverse;
  }
  
  .hero-left {
    padding-right: 0;
    margin-top: 1rem;
  }
  
  .hero-right {
    position: relative;
    margin: 0 auto 0 0;
    width: 100px;
    height: 100px;
  }
  
  .name {
    font-size: 2.25rem;
    margin-top: 0.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .lead {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }
  
  .cta-row {
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats {
    margin: 1.5rem auto 0;
    max-width: 100%;
    padding: 0 1.5rem;
    text-align: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .name {
    font-size: 2rem;
    margin-top: 0.25rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .lead {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .hero-right {
    width: 80px;
    height: 80px;
    margin: 0 0 0 auto;
  }
  
  .avatar {
    width: 80px !important;
    height: 80px !important;
    font-size: 2rem !important;
  }
}

/* Button row adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .btn {
    flex: 1 0 calc(50% - 0.5rem);
    min-width: 0;
  }
  
  .btn.ghost {
    order: 2;
    flex-basis: 100%;
    margin-top: 0.5rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent-2), #3bd3d0);
  color: #041022;
  box-shadow: 0 4px 15px rgba(45, 212, 191, 0.2);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.3);
}

.btn.accent {
  background: linear-gradient(90deg, #1fb5a5, #38e5c1);
  color: #021118;
}

.btn.accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 181, 165, 0.3);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dff3ff;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Avatar & KPIs */
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #17324c, #0b2a3e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.5rem;
  color: #cdeff0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  border: 4px solid rgba(45, 212, 191, 0.1);
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 10;
}

.avatar:hover {
  transform: scale(1.05) translate(-24px, 16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Mobile styles for avatar */
@media (max-width: 768px) {
  .avatar {
    width: 124px; /* ~12% smaller than 140px */
    height: 124px;
    font-size: 2.2rem;
    top: 12px;
    right: 16px;
  }
  
  .avatar:hover {
    transform: scale(1.05) translate(-16px, 12px);
  }
}

.kpis {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.kpi {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 12px;
  min-width: 240px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(45, 212, 191, 0.1);
}

.kpi-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Sections */
.section {
  margin: 4rem 0 5rem; /* Reduced top margin, kept bottom margin for better section separation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  will-change: transform, box-shadow, border-color;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(45, 212, 191, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.thumb {
  height: 180px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b2130, #071018);
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.card:hover .thumb {
  transform: scale(1.03);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
  z-index: 2;
}

.card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.card .muted {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.card-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.link:hover::after {
  width: 100%;
}

/* Tech Stack */
.tech {
  margin-bottom: 3.5rem; /* Reduced from 6rem to create tighter spacing */
}

.tech .badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
  justify-content: center;
}

.badge {
  background: rgba(45, 212, 191, 0.08);
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(45, 212, 191, 0.15);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(45, 212, 191, 0.05));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.badge:hover {
  background: rgba(45, 212, 191, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
}

.badge:hover::before {
  opacity: 1;
}

.tech .badges > * {
  margin: 0.25rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  align-items: stretch;
}

.stats-box, .languages-box {
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.stat-card {
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.stat-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Timeline */
.timeline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.timeline-item {
  background: var(--navy-light);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.timeline-card {
  background: var(--panel);
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-2), var(--accent));
  opacity: 0.8;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 
              0 0 15px rgba(40, 230, 212, 0.2);
  border-color: rgba(40, 230, 212, 0.4);
  z-index: 2;
  background: linear-gradient(
    135deg, 
    rgba(40, 230, 212, 0.02) 0%, 
    rgba(40, 230, 212, 0.01) 100%
  );
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(40, 230, 212, 0.3), rgba(40, 230, 212, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.timeline-date {
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.tech-tag {
  display: inline-block;
  background: var(--teal-light);
  color: var(--navy);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Quote */
blockquote {
  background: linear-gradient(90deg, rgba(10, 30, 40, 0.7), rgba(5, 12, 20, 0.6));
  padding: 2.5rem 3.5rem;  /* Increased left/right padding */
  border-radius: 12px;
  font-size: 1.4rem;
  color: #e0f7fa;
  border-left: 4px solid var(--accent);
  margin: 3.5rem 0 3rem;  /* Increased top margin */
  position: relative;
  overflow: hidden;
  font-style: italic;
  line-height: 1.6;
}

blockquote::before {
  content: '"\201D';
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 8rem;
  color: rgba(45, 212, 191, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* Contact Section */
.connect-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: #041022;
  transition: var(--transition);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.contact:hover::before {
  opacity: 0.9;
}

.contact i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.contact:hover i {
  transform: translateX(3px);
}

.instagram {
  background: linear-gradient(90deg, #ff6aa3, #9b4bff);
  color: white;
}

.instagram::before {
  background: linear-gradient(90deg, #ff6aa3cc, #9b4bffcc);
}

.email {
  background: linear-gradient(90deg, #ffc857, #ff8a00);
  color: #041022;
}

.email::before {
  background: linear-gradient(90deg, #ffc857cc, #ff8a00cc);
}

.whatsapp {
  background: linear-gradient(90deg, #25d366, #1fae5f);
  color: white;
}

.whatsapp::before {
  background: linear-gradient(90deg, #25d366cc, #1fae5fcc);
}

.linkedin {
  background: linear-gradient(90deg, #0a66c2, #0084ff);
  color: white;
}

.linkedin::before {
  background: linear-gradient(90deg, #0a66c2cc, #0084ffcc);
}

.tableau {
  background: linear-gradient(90deg, #4e7cff, #8056ff);
  color: white;
}

.tableau::before {
  background: linear-gradient(90deg, #4e7cffcc, #8056ffcc);
}

.resume {
  background: linear-gradient(90deg, #60a5fa, #2dd4bf);
  color: #041022;
}

.resume::before {
  background: linear-gradient(90deg, #60a5facc, #2dd4bfcc);
}

.strap {
  margin: 2rem 0 0.5rem;
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.dev {
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  font-size: 1rem;
}

.dev strong {
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  margin-top: 2rem;  /* Reduced from 4rem to 2rem */
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(5, 15, 30, 0.5);
  backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Design */
/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}

.modal.visible {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1001;
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1002;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.visible .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 1.8rem;
}

.modal-tools {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.modal-description {
  margin-bottom: 2rem;
  line-height: 1.7;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: all 0.2s ease;
}

.btn.outline:hover {
  background: rgba(45, 212, 191, 0.1);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    max-width: 92%;
  }
  
  .modal-title {
    font-size: 1.5rem;
    padding-right: 2rem;
  }
  
  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 1.25rem;
  }
  
  .modal-title {
    font-size: 1.3rem;
  }
  
  .modal-tools {
    font-size: 0.85rem;
  }
  
  .modal-description {
    font-size: 1rem;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}

.modal.visible {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1001;
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1002;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.visible .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 1.8rem;
}

.modal-tools {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.modal-description {
  margin-bottom: 2rem;
  line-height: 1.7;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: all 0.2s ease;
}

.btn.outline:hover {
  background: rgba(45, 212, 191, 0.1);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    max-width: 92%;
  }
  
  .modal-title {
    font-size: 1.5rem;
    padding-right: 2rem;
  }
  
  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 1.25rem;
  }
  
  .modal-title {
    font-size: 1.3rem;
  }
  
  .modal-tools {
    font-size: 0.85rem;
  }
  
  .modal-description {
    font-size: 1rem;
  }
}

@media (max-width: 1200px) {
  .container {
    padding: 2rem 1.5rem;
  }
  
  .hero-inner {
    flex-direction: column;
    gap: 3rem;
  }
  
  .hero-right {
    width: 124px;
    height: 124px;
    margin: 12px auto 0;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .kpis {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .kpi {
    min-width: 200px;
    flex: 1;
  }
  
  .name {
    font-size: 2.8rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1.25rem;
  }
  
  .section {
    margin-bottom: 2.5rem; /* Reduced bottom margin for mobile */
  }
  
  .section h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
  }
  
  h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .name {
    font-size: 2.4rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .lead {
    font-size: 1.05rem;
  }
  
  .btn {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .kpis {
    flex-direction: column;
    align-items: stretch;
  }
  
  .kpi {
    min-width: 100%;
  }
  
  .timeline-row,
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  blockquote {
    padding: 1.75rem 2rem;  /* Adjusted for mobile */
    font-size: 1.2rem;
    margin: 3rem 0;  /* Adjusted for mobile */
  }
  
  .connect-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .contact {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .section {
    margin: 2.5rem 0 3.5rem; /* Reduced top margin for mobile */
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .thumb {
    height: 150px;
  }
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Scroll Reveal Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #041022;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: #333 !important;
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0.5in !important;
  }
  
  a {
    text-decoration: none !important;
    color: #000 !important;
  }
  
  .btn, .contact {
    border: 1px solid #ccc !important;
    background: none !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  
  .section {
    page-break-inside: avoid;
    margin: 1rem 0 !important;
  }
  
  h2 {
    page-break-after: avoid;
  }
  
  .card, .timeline-card, .stat-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #eee !important;
  }
  
  .connect-row {
    display: block !important;
  }
  
  .contact {
    display: block !important;
    margin-bottom: 0.5rem;
    padding: 0.5rem !important;
    border-radius: 4px !important;
  }
  
  .site-footer {
    margin-top: 2rem !important;
    padding: 1rem 0 !important;
    border-top: 1px solid #eee !important;
  }
}
