/* Responsive Styles */

/* ========================================
   Tablet (768px - 1023px)
   ======================================== */
@media (max-width: 1023px) {
  /* Typography */
  :root {
    --fs-5xl: 2.5rem;  /* 40px */
    --fs-4xl: 2rem;    /* 32px */
    --fs-3xl: 1.75rem; /* 28px */
  }

  /* Container */
  .container {
    padding: 0 1.5rem;
  }

  /* Section */
  .section {
    padding: 4rem 0;
  }

  /* About Section */
  /* about-grid는 기본값이 이미 flex-direction: column */
  /* about-highlights는 기본값이 이미 flex-direction: row */

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  /* Projects Section */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  /* Contact Section */
  .contact-info {
    gap: var(--spacing-xl);
  }
}

/* ========================================
   Mobile (< 768px)
   ======================================== */
@media (max-width: 767px) {
  /* Typography */
  :root {
    --fs-5xl: 2rem;      /* 32px */
    --fs-4xl: 1.75rem;   /* 28px */
    --fs-3xl: 1.5rem;    /* 24px */
    --fs-2xl: 1.25rem;   /* 20px */
    --fs-xl: 1.125rem;   /* 18px */
  }

  /* Container */
  .container {
    padding: 0 1rem;
  }

  /* Section */
  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: var(--fs-3xl);
  }

  .section-subtitle {
    font-size: var(--fs-base);
    margin-bottom: var(--spacing-2xl);
  }

  /* Navigation */
  .nav-container {
    padding: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--spacing-2xl);
    gap: var(--spacing-lg);
    transition: left var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: var(--spacing-md);
    font-size: var(--fs-lg);
  }

  .nav-link::after {
    display: none;
  }

  /* Hero Section */
  .hero {
    padding-top: 70px;
    padding-bottom: var(--spacing-3xl);
  }

  .profile-image-wrapper {
    width: 180px;
    height: 180px;
  }

  .profile-image {
    width: 180px;
    height: 180px;
  }

  .hero-title {
    font-size: var(--fs-3xl);
  }

  .hero-subtitle {
    font-size: var(--fs-lg);
  }

  .hero-tags {
    gap: var(--spacing-sm);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  /* About Section */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .about-text .lead {
    font-size: var(--fs-lg);
  }

  .about-text p {
    margin-bottom: var(--spacing-md);
  }

  .about-highlights {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .highlight-card {
    padding: var(--spacing-lg);
  }

  .highlight-card .icon {
    font-size: 2.5rem;
  }

  .highlight-card h3 {
    font-size: var(--fs-lg);
  }

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .skill-category {
    padding: var(--spacing-lg);
  }

  .category-title {
    font-size: var(--fs-lg);
  }

  .skill-items {
    gap: var(--spacing-md);
  }

  .skill-badges {
    gap: var(--spacing-xs);
  }

  .tag,
  .badge {
    font-size: var(--fs-xs);
    padding: 0.25rem 0.625rem;
  }

  /* Projects Section */
  .project-filters {
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
  }

  .filter-row {
    gap: var(--spacing-sm);
  }

  .filter-buttons {
    gap: var(--spacing-xs);
  }

  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: var(--fs-xs);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .project-image {
    height: 200px;
  }

  .project-info {
    padding: var(--spacing-lg);
  }

  .project-title {
    font-size: var(--fs-lg);
  }

  .project-description {
    font-size: var(--fs-sm);
  }

  .project-overlay {
    gap: var(--spacing-md);
  }

  .btn-icon {
    width: 45px;
    height: 45px;
  }

  /* Contact Section */
  .contact-info {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .contact-item {
    padding: var(--spacing-xl);
  }

  .contact-item .icon {
    font-size: 2.5rem;
  }

  .contact-item h3 {
    font-size: var(--fs-lg);
  }

  .contact-form {
    padding: var(--spacing-xl);
  }

  /* Footer */
  .footer {
    padding: var(--spacing-xl) 0;
  }

  .footer .container {
    gap: var(--spacing-sm);
  }

  .footer-text {
    font-size: var(--fs-sm);
  }

  .footer-links {
    gap: var(--spacing-lg);
    flex-wrap: wrap;
  }

  .footer-links a {
    font-size: var(--fs-sm);
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-sm);
  }

  /* Cards */
  .card {
    padding: var(--spacing-lg);
  }
}

/* ========================================
   Small Mobile (< 480px)
   ======================================== */
@media (max-width: 479px) {
  /* Typography */
  :root {
    --fs-5xl: 1.75rem;   /* 28px */
    --fs-4xl: 1.5rem;    /* 24px */
    --fs-3xl: 1.25rem;   /* 20px */
  }

  /* Container */
  .container {
    padding: 0 0.75rem;
  }

  /* Section */
  .section {
    padding: 2.5rem 0;
  }

  /* Hero Section */
  .profile-image-wrapper {
    width: 150px;
    height: 150px;
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }

  .hero-title {
    font-size: var(--fs-2xl);
  }

  .hero-subtitle {
    font-size: var(--fs-base);
  }

  .hero-tags .tag {
    font-size: var(--fs-xs);
    padding: 0.25rem 0.625rem;
  }

  /* About Section */
  .about-text .lead {
    font-size: var(--fs-base);
  }

  /* Skills Section */
  .skill-category {
    padding: var(--spacing-md);
  }

  /* Projects Section */
  .project-image {
    height: 180px;
  }

  .project-info {
    padding: var(--spacing-md);
  }

  /* Contact Section */
  .contact-item {
    padding: var(--spacing-lg);
  }

  .contact-form {
    padding: var(--spacing-lg);
  }
}

/* ========================================
   Large Desktop (> 1440px)
   ======================================== */
@media (min-width: 1440px) {
  /* Container */
  :root {
    --container-max: 1400px;
  }

  /* Typography */
  .hero-title {
    font-size: var(--fs-6xl);
  }

  /* Projects Grid - 3 columns max */
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .navbar,
  .nav-toggle,
  .scroll-indicator,
  .hero-cta,
  .project-filters,
  .btn,
  .footer {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  .project-card,
  .highlight-card,
  .contact-item {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ========================================
   Landscape Orientation (Mobile)
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .profile-image-wrapper {
    width: 140px;
    height: 140px;
  }

  .profile-image {
    width: 140px;
    height: 140px;
  }

  .hero-title {
    font-size: var(--fs-2xl);
  }

  .scroll-indicator {
    display: none;
  }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* Increase tap targets */
  .btn,
  .nav-link,
  .filter-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects on touch devices */
  .card:hover,
  .project-card:hover,
  .highlight-card:hover,
  .contact-item:hover {
    transform: none;
  }

  /* Simplify animations */
  .project-overlay {
    opacity: 0.9;
  }
}
