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

/* Base responsive settings are in main.css */
/* This file contains additional responsive adjustments */

/* Large Desktops (1200px and up) */
@media (min-width: 1200px) {
  .section-content {
    max-width: 1140px;
  }
  
  h1 {
    font-size: 6.5rem;
  }
  
  .hero .lead {
    font-size: 1.8rem;
  }
  
  .card {
    padding: 2.5rem;
  }
  
  .skills-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktops (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .section-content {
    max-width: 960px;
  }
  
  h1 {
    font-size: 5.5rem;
  }
  
  .hero .lead {
    font-size: 1.6rem;
  }
  
  .skills-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .section-content {
    max-width: 720px;
  }
  
  h1 {
    font-size: 4.5rem;
  }
  
  h2 {
    font-size: 3rem;
  }
  
  .hero .lead {
    font-size: 1.4rem;
  }
  
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card {
    padding: 1.5rem;
  }
  
  /* Adjust navigation for tablets */
  .nav-progress {
    right: 1rem;
  }
  
  .nav-dot {
    width: 10px;
    height: 10px;
  }
}

/* Small Tablets and Large Phones (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .section-content {
    max-width: 540px;
  }
  
  h1 {
    font-size: 3.5rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  h3 {
    font-size: 1.8rem;
  }
  
  .hero .lead {
    font-size: 1.3rem;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  /* Mobile navigation adjustments */
  .main-nav {
    padding: 0.75rem 1rem;
  }
  
  .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);
  }
  
  .nav-links.active li {
    margin: 0.5rem 0;
  }
  
  /* Adjust section padding */
  .section {
    padding: 5rem 1rem 2rem;
  }
  
  /* Footer adjustments */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-contact a {
    justify-content: center;
  }
  
  .footer-social .social-icons {
    justify-content: center;
  }
}

/* Phones (575px and below) */
@media (max-width: 575px) {
  :root {
    --content-width: 95%;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  h3 {
    font-size: 1.4rem;
  }
  
  .hero .lead {
    font-size: 1.1rem;
  }
  
  .hero .subheading {
    font-size: 1.2rem;
  }
  
  .section {
    padding: 4rem 1rem 2rem;
  }
  
  .card {
    padding: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .social-icons {
    gap: 0.5rem;
  }
  
  .social-icon {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.2rem;
  }
  
  /* Mobile navigation */
  .main-nav {
    padding: 0.5rem 1rem;
  }
  
  .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);
    z-index: 1000;
  }
  
  .nav-links.active li {
    margin: 0.5rem 0;
  }
  
  /* Adjust animations for mobile */
  .fade-in-left, .fade-in-right {
    animation-name: fadeInUp; /* Override with simpler animation for mobile */
  }
  
  /* Typing animation adjustments for mobile */
  .hero .lead.typing {
    width: 100%;
    max-width: 300px;
    white-space: normal;
    min-height: 4.5em;
    margin: 0 auto 1.5rem;
    padding-right: 0.5rem;
  }
  
  /* Simplify card interactions for touch devices */
  .card:hover {
    transform: none;
  }
  
  .card.expanded {
    transform: translateY(-5px);
  }
  
  /* Skills section adjustments */
  .skills-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .skill-category {
    margin-bottom: 1.5rem;
  }
  
  /* Project showcase adjustments */
  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .project-date {
    margin-top: 0.5rem;
  }
  
  .feature-item {
    margin-bottom: 1rem;
  }
  
  /* Footer adjustments */
  .site-footer {
    padding: 2rem 1rem 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-info h3, .footer-contact h3, .footer-social h3 {
    font-size: 1.3rem;
  }
  
  .footer-contact a {
    justify-content: center;
  }
  
  .footer-social .social-icons {
    justify-content: center;
  }
  
  .footer-bottom {
    margin-top: 1.5rem;
  }
}

/* Height-based media queries */

/* Short screens */
@media (max-height: 700px) {
  .section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  h1 {
    font-size: 4rem;
  }
  
  h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero .lead {
    margin-bottom: 1rem;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
  
  .chapter-heading {
    margin-bottom: 1.5rem;
  }
}

/* Very short screens */
@media (max-height: 500px) {
  .section {
    min-height: auto;
    height: auto;
    padding: 3rem 1rem;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: 4rem 1rem 2rem;
  }
  
  /* Adjust navigation for landscape mobile */
  .nav-links.active {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 4rem 1rem 2rem;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .social-icons {
    margin-top: 1rem;
  }
  
  /* Two column layout for skills in landscape */
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Print styles */
@media print {
  .nav-progress, .scroll-indicator, .bottom-nav {
    display: none !important;
  }
  
  .section {
    min-height: auto;
    height: auto;
    page-break-after: always;
    padding: 1cm;
  }
  
  body {
    font-size: 12pt;
  }
  
  h1 {
    font-size: 24pt;
  }
  
  h2 {
    font-size: 18pt;
  }
  
  h3 {
    font-size: 14pt;
  }
  
  a {
    text-decoration: underline;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  /* Ensure all content is visible when printing */
  .reveal, .stagger-item, .chapter {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .card-expanded-content {
    max-height: none !important;
    display: block !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #3b82f6; /* Blue for dark mode */
    --secondary-color: #60a5fa; /* Lighter blue for dark mode */
    --text-color: #e9ecef;
    --light-text: #adb5bd;
    --background-color: #121212;
    --section-bg-alt: #1e1e1e;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-color);
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
  }
  
  .card {
    background-color: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }
  
  .bottom-nav {
    background-color: rgba(18, 18, 18, 0.9);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .social-icon {
    background-color: #2d2d2d;
  }
  
  .social-icon:hover {
    background-color: var(--primary-color);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  
  .reveal, .stagger-item, .chapter, .hero h1, .hero .lead, .hero .subheading {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .scroll-indicator {
    animation: none !important;
  }
  
  .card:hover {
    transform: none !important;
  }
}
