/*
 * Jarvis Ka Personal Website
 * Theme inspired by Marc Chagall's "The Grand Circus" painting
 * Colors: Deep blues, warm yellows/golds, rich reds, greens
 */

:root {
  /* Chagall-inspired color palette */
  --chagall-deep-blue: #1e3a5f;
  --chagall-blue: #2d5a87;
  --chagall-light-blue: #4a7eb0;
  --chagall-gold: #f4d03f;
  --chagall-warm-yellow: #f5e6a3;
  --chagall-red: #c0392b;
  --chagall-soft-red: #e74c3c;
  --chagall-green: #27ae60;
  --chagall-cream: #fdf6e3;
  --chagall-warm-white: #fffef9;

  /* Typography */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-padding: 2.5rem 2rem;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--chagall-warm-white);
  color: var(--chagall-deep-blue);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(30, 58, 95, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.5rem 2rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--chagall-gold);
  text-decoration: none;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--chagall-warm-white);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--chagall-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--chagall-gold);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--chagall-gold);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--chagall-deep-blue) 0%, var(--chagall-blue) 100%);
  overflow: hidden;
}

/* Decorative floating shapes inspired by the color palette */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(244, 208, 63, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(192, 57, 43, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 400px 600px at 70% 80%, rgba(39, 174, 96, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 300px 300px at 10% 70%, rgba(244, 208, 63, 0.12) 0%, transparent 50%);
  animation: floatBg 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle 2px at 10% 20%, rgba(244, 208, 63, 0.6) 0%, transparent 100%),
    radial-gradient(circle 3px at 30% 70%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(circle 2px at 50% 30%, rgba(244, 208, 63, 0.5) 0%, transparent 100%),
    radial-gradient(circle 2px at 70% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
    radial-gradient(circle 3px at 90% 40%, rgba(244, 208, 63, 0.4) 0%, transparent 100%),
    radial-gradient(circle 2px at 85% 85%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(circle 2px at 15% 90%, rgba(244, 208, 63, 0.3) 0%, transparent 100%);
  pointer-events: none;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, 1%) rotate(1deg); }
  50% { transform: translate(0, 2%) rotate(0deg); }
  75% { transform: translate(-2%, 1%) rotate(-1deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--chagall-gold);
  box-shadow: 0 0 50px rgba(244, 208, 63, 0.35);
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--chagall-warm-white);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .tagline {
  font-size: 1.3rem;
  color: var(--chagall-gold);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.hero .intro {
  font-size: 1.1rem;
  color: var(--chagall-warm-yellow);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--chagall-gold);
  color: var(--chagall-deep-blue);
}

.btn-primary:hover {
  background: var(--chagall-warm-yellow);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(244, 208, 63, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--chagall-warm-white);
  border: 2px solid var(--chagall-warm-white);
}

.btn-secondary:hover {
  background: var(--chagall-warm-white);
  color: var(--chagall-deep-blue);
  transform: translateY(-2px);
}

/* Section Styles */
section {
  padding: var(--section-padding);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--chagall-deep-blue);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--chagall-gold), var(--chagall-red));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--chagall-blue);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* About Section */
.about {
  background: linear-gradient(180deg, var(--chagall-cream) 0%, var(--chagall-warm-white) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 1.5rem;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(30, 58, 95, 0.2);
}

.about-image::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--chagall-gold);
  border-radius: 10px;
  z-index: -1;
}

.about-content h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--chagall-deep-blue);
  margin-bottom: 1rem;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: #444;
}

.highlight {
  color: var(--chagall-red);
  font-weight: 600;
}

/* Articles Section */
.articles {
  background: var(--chagall-warm-white);
}

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

.article-card {
  background: white;
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(30, 58, 95, 0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border-left: 4px solid var(--chagall-gold);
  display: block;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(30, 58, 95, 0.12);
}

.article-date {
  font-size: 0.85rem;
  color: var(--chagall-blue);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.article-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--chagall-deep-blue);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-card .read-more {
  color: var(--chagall-red);
  font-weight: 600;
  font-size: 0.9rem;
}

.article-card:hover .read-more {
  color: var(--chagall-deep-blue);
}

/* Roles Section */
.roles {
  background: var(--chagall-warm-white);
}

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

.role-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
  transition: all 0.3s ease;
  border-top: 4px solid var(--chagall-gold);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--chagall-deep-blue) 0%, var(--chagall-blue) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

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

.role-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(30, 58, 95, 0.15);
}

.role-card > * {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.role-card:hover h3,
.role-card:hover p,
.role-card:hover .role-icon {
  color: var(--chagall-warm-white);
}

.role-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.role-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--chagall-deep-blue);
  margin-bottom: 0.75rem;
}

.role-card p {
  color: #666;
  font-size: 0.95rem;
}

/* Quote Section */
.quote-section {
  background: linear-gradient(135deg, var(--chagall-deep-blue) 0%, var(--chagall-blue) 100%);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative pattern for quote section */
.quote-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 400px 300px at 10% 50%, rgba(244, 208, 63, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 300px 400px at 90% 50%, rgba(244, 208, 63, 0.1) 0%, transparent 50%);
}

.quote {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.quote blockquote {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--chagall-warm-white);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.quote blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--chagall-gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.quote cite {
  color: var(--chagall-gold);
  font-style: normal;
  font-weight: 600;
}

/* Personal Section */
.personal {
  background: var(--chagall-cream);
}

.personal-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.personal-text h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--chagall-deep-blue);
  margin-bottom: 1rem;
}

.personal-text p {
  margin-bottom: 1.5rem;
  color: #444;
}

.fun-facts {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
}

.fun-facts h4 {
  font-family: var(--font-heading);
  color: var(--chagall-deep-blue);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--chagall-gold);
}

.fun-facts ul {
  list-style: none;
}

.fun-facts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fun-facts li:last-child {
  border-bottom: none;
}

.fact-icon {
  font-size: 1.3rem;
}

/* Connect Section */
.connect {
  background: var(--chagall-warm-white);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 50px;
  text-decoration: none;
  color: var(--chagall-deep-blue);
  box-shadow: 0 5px 20px rgba(30, 58, 95, 0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--chagall-deep-blue);
  color: var(--chagall-warm-white);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(30, 58, 95, 0.2);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

/* Footer */
footer {
  background: var(--chagall-deep-blue);
  color: var(--chagall-warm-white);
  text-align: center;
  padding: 2rem;
}

footer p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

footer .copyright {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .personal-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--chagall-deep-blue);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-toggle {
    display: flex;
  }

  .quote blockquote {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-link {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
}

/* Smooth scroll offset for fixed nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
