/**
 * Portfolio Website - Responsive Styles
 * Media queries and responsive behavior for all screen sizes
 * Author: Münevver Aslan
 */

/* Tablet Styles - 1024px and below */
@media (max-width: 1024px)
/* Desktop and below */
  {
  .container {
    padding: 0 20px;
  }

  /* Top-right Navigation adjustments for tablets */
  .vertical-nav {
    top: 1.5rem;
    right: 2rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-link {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }

  .categories-grid {
    max-width: 600px;
    gap: 1.5rem;
  }

  /* Slider adjustments for tablets */
  .categories-broken-layout .category-block {
    width: 33.333333vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
  }

  .categories-slider-container {
    padding: 0;
  }

  .categories-broken-layout .category-block .category-content {
    padding: 1.5rem;
  }

  .categories-broken-layout .category-block h3 {
    font-size: 1.3rem;
  }

  .categories-broken-layout .category-block p {
    font-size: 0.85rem;
  }

  .about-grid {
    gap: 3rem;
  }

  .carousel-item {
    min-width: 280px;
  }

  /* Mixed layout adjustments for tablets */
  .projects-grid.mixed-layout {
    gap: 2.5rem;
  }

  .project-block.full-width .project-content {
    padding: 2.5rem;
  }

  .project-block.full-width .project-title {
    font-size: 1.8rem;
  }

  .project-block.full-width .project-description {
    font-size: 1.05rem;
  }
}

/* Mobile Styles - 768px and below */
@media (max-width: 768px)
/* Tablet and below */
  {

  /* Typography adjustments */
  .section-title {
    font-size: 2.5rem;
  }

  .section-intro {
    font-size: 1.1rem;
  }

  .hero-content .headline {
    font-size: 1.1rem;
  }


  /* Top-right Navigation - Compact for mobile */
  .vertical-nav {
    top: 1rem;
    right: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .nav-text {
    font-size: 0.75rem;
  }

  /* Layout adjustments */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .social-links {
    flex-direction: row;
    gap: 1.5rem;
  }

  /* Carousel adjustments */
  .carousel {
    padding: 0 12px;
  }

  .carousel-item {
    min-width: 250px;
  }

  /* Categories grid - single column with enhanced touch targets */
  .categories-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .category-block {
    padding: 2rem 1.5rem;
    min-height: 200px;
    -webkit-tap-highlight-color: hsl(var(--color-dark-gray-hsl), 0.1);
  }

  .category-block:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 12px hsl(var(--color-pure-black-hsl), 0.15);
  }

  /* Enhanced Mobile slider */
  .categories-broken-layout {
    width: 100vw;
    overflow: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: auto;
  }

  .categories-slider-container {
    padding: 0;
    gap: 0;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    width: 100%;
  }

  .categories-broken-layout .category-block {
    width: 33.333333vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    scroll-snap-align: start;
    transition: all 0.3s ease;
  }

  .categories-broken-layout .category-block .category-content {
    padding: 2rem 1.5rem;
  }

  .categories-broken-layout .category-block h3 {
    font-size: 1.3rem;
  }

  .categories-broken-layout .category-block p {
    font-size: 0.9rem;
  }

  /* Enhanced touch-friendly hover effects */
  .categories-broken-layout .category-block:hover,
  .categories-broken-layout .category-block:active {
    transform: none;
    filter: brightness(1.05);
    box-shadow: none;
  }

  /* Mixed layout - switch to single column */
  .projects-grid.mixed-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-block.full-width {
    margin: 1rem 0;
  }

  .project-block.full-width .projects-grid-inner {
    flex-direction: column;
    min-height: auto;
  }

  .project-block.full-width .project-image {
    height: 280px;
  }

  .project-image img {
    object-fit: cover;
    object-position: center;
  }

  .project-block.full-width .project-content {
    padding: 2rem;
  }

  .project-block.full-width .project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .project-block.full-width .project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  /* Regular project content */
  .project-content {
    padding: 1.5rem;
  }

  /* Portfolio Section */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Styles - 480px and below */
@media (max-width: 480px)
/* Mobile */
  {
  .container {
    padding: 0 16px;
  }

  /* Hero section adjustments */
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .role {
    font-size: 1.1rem;
  }

  .hero-content .headline {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  /* Section titles */
  .section-title {
    font-size: 2rem;
  }

  .section-intro {
    font-size: 1rem;
  }

  /* Top-right Navigation - Ultra compact for small screens */
  .vertical-nav {
    top: 0.75rem;
    right: 0.75rem;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-link {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .nav-text {
    font-size: 0.7rem;
  }

  /* Button adjustments */
  .cta-button {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .resume-button {
    padding: 12px 32px;
    font-size: 0.9rem;
  }

  /* Carousel adjustments */
  .carousel-item {
    min-width: 220px;
    padding: 1.5rem;
  }

  .carousel-item h3 {
    font-size: 1.1rem;
  }

  .carousel-item p {
    font-size: 0.9rem;
  }

  /* Category blocks */
  .category-block {
    padding: 1.5rem 1rem;
    aspect-ratio: auto;
    min-height: 200px;
    -webkit-tap-highlight-color: hsl(var(--color-dark-gray-hsl), 0.1);
  }

  .category-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px hsl(var(--color-pure-black-hsl), 0.12);
  }

  .category-block h3 {
    font-size: 1.1rem;
  }

  .category-block p {
    font-size: 0.85rem;
  }

  /* Small mobile slider optimizations */
  .categories-slider-container {
    padding: 0;
    gap: 0;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    width: 100%;
  }

  .categories-broken-layout .category-block {
    width: 33.333333vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
  }

  .categories-broken-layout .category-block .category-content {
    padding: 1.25rem;
  }

  .categories-broken-layout .category-block h3 {
    font-size: 1.1rem;
  }

  .categories-broken-layout .category-block p {
    font-size: 0.8rem;
  }

  /* Mixed layout - smaller spacing */
  .projects-grid.mixed-layout {
    gap: 1.5rem;
  }

  .project-block.full-width {
    margin: 0.5rem 0;
  }

  .project-block.full-width .project-image {
    height: 240px;
  }

  .project-block.full-width .project-content {
    padding: 1.5rem;
  }

  .project-block.full-width .project-title {
    font-size: 1.3rem;
  }

  .project-block.full-width .project-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* Regular project content */
  .project-content {
    padding: 1.25rem;
  }

  .project-title {
    font-size: 1.25rem;
  }

  .project-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* About section */
  .about p {
    font-size: 1rem;
  }

  .skill-category h3 {
    font-size: 1rem;
  }

  .skill-category li {
    font-size: 0.9rem;
  }

  /* Contact section */
  .email {
    font-size: clamp(1.1rem, 4vw, 1.25rem);
  }

  /* Section height adjustments - maintain 100vh on smaller screens */
  .hero,
  .portfolio-categories-section,
  .about,
  .contact,
  .whats-new {
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    padding: 0;
  }

  .projects-section {
    padding: 40px 0;
  }


}

/* Very Small Screens - 360px and below */
@media (max-width: 360px)
/* Small mobile */
  {
  .container {
    padding: 0 12px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

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

  /* Top-right Navigation - Extremely compact */
  .vertical-nav {
    top: 0.5rem;
    right: 0.5rem;
  }

  .nav-links {
    gap: 0.6rem;
  }

  .nav-link {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .nav-text {
    font-size: 0.65rem;
  }

  .carousel-item {
    min-width: 200px;
    padding: 1.25rem;
  }

  .category-block {
    padding: 1.25rem 0.75rem;
    min-height: 180px;
  }

  /* Very small mobile slider */
  .categories-slider-container {
    padding: 0;
    gap: 0;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    width: 100%;
  }

  .categories-broken-layout .category-block {
    width: 33.333333vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
  }

  .categories-broken-layout .category-block .category-content {
    padding: 1rem;
  }

  .categories-broken-layout .category-block h3 {
    font-size: 1rem;
  }

  .categories-broken-layout .category-block p {
    font-size: 0.75rem;
  }

  .projects-grid.mixed-layout {
    gap: 1.25rem;
  }

  .project-content {
    padding: 1rem;
  }

  .project-block.full-width .project-content {
    padding: 1.25rem;
  }

  /* Section height adjustments - maintain 100vh on very small screens */
  .hero,
  .portfolio-categories-section,
  .about,
  .contact,
  .whats-new {
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    padding: 0;
  }

  .projects-section {
    padding: 30px 0;
  }


}

/* Landscape Mobile - optimize for horizontal viewing */
@media (max-width: 768px)
/* Tablet and below */
and (orientation: landscape) {

  .hero,
  .portfolio-categories-section,
  .about,
  .contact,
  .whats-new {
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for better mobile support */
    padding: 0;
  }

  .projects-section {
    padding: 40px 0;
  }

  .project-block.full-width .project-image {
    height: 200px;
  }
}

/* Hide dat.GUI controls on mobile */
@media (max-width: 768px) {
  .dg.main {
    display: none;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  /* Ensure crisp rendering on high-DPI displays */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {

  .no-print,
  .no-print * {
    display: none;
  }

  /* Ensure content is not hidden in print */
  * {
    background-color: transparent;
    box-shadow: none;
    text-shadow: none;
    color: #000;
  }

  .carousel-section,
  .back-link {
    display: none;
  }

  .hero,
  .about,
  .contact {
    page-break-inside: avoid;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}