/* 
 * Main CSS for Budi Sugianto's Portfolio
 * Modern Storytelling Layout with Slide Effects
 */

:root {
  /* Color Variables - Black & Blue Theme */
  --primary-color: #2563eb; /* Modern blue primary */
  --secondary-color: #3b82f6; /* Complementary blue */
  --accent-color: #1d4ed8; /* Darker blue for emphasis */
  --text-color: #f8fafc; /* Clean white */
  --light-text: #94a3b8; /* Muted gray-blue */
  --background-color: #0f0f0f; /* True black */
  --section-bg-alt: #1a1a1a; /* Dark gray-black */
  --card-bg: #262626; /* Charcoal for cards */
  
  /* Typography */
  --heading-font: 'Saira Extra Condensed', sans-serif;
  --body-font: 'Muli', sans-serif;
  
  /* Spacing */
  --section-spacing: 5rem;
  --content-width: 90%;
  --max-content-width: 1200px;
  
  /* Transitions */
  --transition-slow: 0.5s ease;
  --transition-medium: 0.3s ease;
  --transition-fast: 0.2s ease;
  
  /* Z-indices */
  --z-navigation: 1000;
  --z-overlay: 900;
  --z-modal: 1100;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100%;
  background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-color);
}

h1 {
  font-size: 6rem;
  line-height: 1;
}

h2 {
  font-size: 3.5rem;
  margin-bottom: 2rem;
}

h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

p {
  margin-bottom: 1rem;
}

/* Layout Structure */
.container {
  width: 100%;
  min-height: 100%;
  overflow: visible;
}

/* Regular Sections */
.section {
  width: 100%;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: visible;
  min-height: auto;
}

/* For smoother scrolling */
html {
  scroll-behavior: smooth;
}

/* Add padding to account for fixed header */
body {
  padding-top: 0;
}

.section-content {
  width: var(--content-width);
  max-width: var(--max-content-width);
  position: relative;
  z-index: 2;
}

/* Section Variations */
.section-alt {
  background-color: var(--section-bg-alt);
}

/* Hero Section */
.hero {
  text-align: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.hero h1 {
  margin-bottom: 1rem;
  opacity: 0; /* Start invisible for animation */
  transform: translateY(30px); /* Start below for animation */
  animation: fadeInUp 1s ease forwards;
}

.hero h1 .text-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0; /* Start invisible for animation */
  transform: translateY(30px); /* Start below for animation */
  animation: fadeInUp 1s ease forwards 0.3s; /* Delay animation */
}

.hero .lead.typing {
  min-height: 1.6em;
  position: relative;
  display: inline-block;
  border-right: 2px solid var(--primary-color);
  animation: fadeInUp 1s ease forwards 0.3s, blink-caret 0.75s step-end infinite;
  white-space: nowrap;
  overflow: hidden;
  margin: 0 auto 2rem;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

.hero .subheading {
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  opacity: 0; /* Start invisible for animation */
  transform: translateY(30px); /* Start below for animation */
  animation: fadeInUp 1s ease forwards 0.6s; /* Delay animation */
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
  cursor: pointer;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  fill: var(--primary-color);
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(15, 15, 15, 0.95);
  padding: 1rem 2rem;
  z-index: var(--z-navigation);
  display: flex;
  justify-content: flex-end;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-medium);
}

.nav-link:hover {
  color: var(--primary-color);
}

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

.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  width: 100%;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Chapter Sections */
.chapter {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

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

.chapter-heading {
  margin-bottom: 3rem;
  position: relative;
}

.chapter-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1rem;
  width: 50px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Interactive Cards */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.card-subtitle {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-body {
  position: relative;
}

.card-expanded-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s ease;
}

.card.expanded .card-expanded-content {
  max-height: 1000px; /* Set a large enough value to accommodate all content */
}

.card-expand-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card-expand-btn:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.card.expanded .card-expand-btn {
  background-color: var(--primary-color);
  color: var(--background-color);
}

/* Skills Visualization */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  margin-bottom: 2rem;
}

.skill-category-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.skill-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-icon {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* Education Section */
.education-item {
  margin-bottom: 2rem;
}

.education-item h4 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.education-date {
  color: var(--light-text);
  font-style: italic;
  margin-top: 0.5rem;
}

.education-gpa {
  margin-top: 0.5rem;
  font-weight: bold;
}

.certifications {
  margin-top: 2rem;
}

.certifications h4 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  display: inline-block;
}

/* Project Showcase */
.project-showcase {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-header h3 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
  display: inline-block;
}

.project-date {
  color: var(--light-text);
}

.project-features {
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  margin-bottom: 1.5rem;
}

.feature-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.feature-text h4 {
  margin-bottom: 0.5rem;
}

.project-links {
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--background-color);
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--background-color);
  transform: translateY(-2px);
}

/* Community Impact */
.community-impact {
  margin-top: 3rem;
}

.community-impact h3 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  display: inline-block;
}

/* Vision Section */
.vision-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.personal-interests, .future-goals, .contact-section {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
}

.personal-interests h3, .future-goals h3, .contact-section h3 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  display: inline-block;
}

.contact-links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  transition: color var(--transition-fast);
}

.contact-link i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.contact-link:hover {
  color: var(--primary-color);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.social-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  color: white;
  border-radius: 100%;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 3rem 2rem 1rem;
  margin-top: 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.footer-info h3, .footer-contact h3, .footer-social h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.footer-info p {
  margin-bottom: 0.5rem;
}

.footer-contact a {
  display: flex;
  align-items: center;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

.footer-contact a i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.footer-contact a:hover {
  color: var(--primary-color);
}

.footer-social .social-icons {
  margin-top: 0.5rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--light-text);
}

/* Responsive Design */
@media (min-width: 992px) {
  .vision-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-section {
    grid-column: span 2;
  }
}

@media (max-width: 992px) {
  h1 {
    font-size: 4rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  .nav-progress {
    right: 1rem;
  }
  
  .section {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  :root {
    --content-width: 95%;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .hero .lead {
    font-size: 1.2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-info, .footer-contact, .footer-social {
    text-align: center;
  }
  
  .footer-contact a {
    justify-content: center;
  }
  
  .footer-social .social-icons {
    justify-content: center;
  }
}
