/* Portfolio Stylesheet with Inter and Besley fonts */

@import url('https://fonts.googleapis.com/css2?family=Besley:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --first-color: #155263;
  --second-color: #ff6f3c;
  --third-color: #ff9a3c;
  --fourth-color: #ffc93c;
  --neutral-dark: #0a0a0a;
  --neutral-gray: #6b6b6b;
  --neutral-light: #fafafa;
  --white: #ffffff;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  color: var(--neutral-dark);
  background-color: #f8f8f8;
  animation: fadeIn 0.8s ease-in;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f8f8f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.5s ease-out 1.5s forwards;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--neutral-light);
  border-top: 4px solid var(--second-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 1.5rem;
  font-family: 'Besley', serif;
  font-size: 1.25rem;
  color: var(--neutral-dark);
  animation: pulse 1.5s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

h1, h2 {
  font-family: 'Besley', serif;
}

h1 {
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 { 
  font-size: 2rem; 
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 { 
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--neutral-gray);
}

p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

a {
  color: var(--second-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  padding: 1.5rem 0;
  animation: slideUp 0.6s ease-out;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--neutral-dark);
  font-family: 'Besley', serif;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 1rem;
}

.hero {
  padding: 2rem 0 2rem;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 1rem;
  animation: slideUp 0.8s ease-out 0.2s backwards;
}

.hero h3 {
  animation: slideUp 0.8s ease-out 0.3s backwards;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  animation: slideUp 0.8s ease-out 0.4s backwards;
}

.hero img {
  animation: slideUp 0.8s ease-out 0.5s backwards;
}

.section {
  padding: 2rem 0;
  animation: slideUp 0.8s ease-out 0.6s backwards;
}

.challenge-container {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
  margin-bottom: 2rem;
}

.section-number {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-gray);
  margin-bottom: 0.5rem;
  animation: slideInFromLeft 0.6s ease-out;
}

.challenge-grid {
  display: grid;
  gap: 2rem;
}

.challenge-card {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e5e5e5;
  animation: slideUp 0.6s ease-out;
}

.challenge-card:last-child {
  border-bottom: none;
}

.challenge-title {
  margin-bottom: 1rem;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.viz-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--neutral-light) 0%, #f0f0f0 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-gray);
  font-size: 0.875rem;
}

figure {
  animation: slideUp 0.8s ease-out;
}

.accent-box {
  background-color: #f9e4c1;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  animation: slideUp 0.8s ease-out;
}

.accent-box p {
  color: var(--neutral-dark);
}

footer {
  padding: 2.5rem 0;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  animation: fadeIn 1s ease-in 0.8s backwards;
}

footer p {
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .container, nav {
    padding: 0 1.5rem;
  }

  .hero {
    padding: 1.5rem 0 1.5rem;
  }

  .section {
    padding: 1.5rem 0;
  }
  
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 968px) {
  .chart-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}