/* === furkanikkan.com Responsive CSS === */

html {
  overflow-x: clip;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

.product-image img {
  max-width: none;
  height: 100%;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-backdrop.active {
  display: block;
}

/* --- Büyük Ekranlar (≥1440px) --- */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

/* --- Laptop / Küçük Masaüstü (≤1024px) --- */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 3.5rem;
    --text-5xl: 3rem;
    --text-4xl: 2.25rem;
    --section-padding: 5rem;
  }

  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-top: 120px;
  }

  .profile-card {
    width: 280px;
    height: 350px;
  }

  .contact-grid {
    gap: var(--space-6);
  }

  .interests-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .skills-grid,
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }

  /* Header & Mobil Menü (1024px altında menü sıkıştığı için hamburgere geçilir) */
  .mobile-menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 10px 8px;
    align-items: center;
    justify-content: space-between;
    z-index: 1002;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: calc(var(--space-16) + env(safe-area-inset-top, 0px)) var(--space-6) var(--space-8);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.12);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main-nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }

  .nav-link {
    font-size: var(--text-lg);
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    min-height: 44px;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--space-4);
  }

  .nav-actions .nav-cta {
    width: 100%;
    justify-content: center;
  }

  /* Hamburger Animasyonu */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* --- Tablet (≤768px) --- */
@media (max-width: 768px) {
  :root {
    --text-6xl: 2.75rem;
    --text-5xl: 2.25rem;
    --text-4xl: 2rem;
    --section-padding: 4rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .grid-2-col,
  .grid-3-col,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .interests-grid,
  .skills-grid,
  .products-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Hero */
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: var(--space-8);
  }

  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    margin-top: var(--space-4);
    width: 100%;
  }

  .typewriter-container {
    min-height: 2.75rem;
  }

  .hero-subtitle {
    font-size: clamp(1.1rem, 4.5vw, 1.5rem);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .badge-1 {
    top: 24px;
    left: -12px;
  }

  .badge-2 {
    bottom: 40px;
    right: -12px;
  }

  .stat-card:hover,
  a.c-card:hover {
    transform: none;
  }

  .skills-filter {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-8);
  }

  .filter-btn {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .contact-form-container {
    padding: var(--space-6);
  }

  .c-text p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-detail-content {
    padding: var(--space-6);
  }

  .product-detail-content h3 {
    font-size: var(--text-2xl);
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
  }

  .footer-links a {
    padding: 0.35rem 0.25rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

/* --- Mobil Küçük (≤480px) --- */
@media (max-width: 480px) {
  :root {
    --text-6xl: 2.25rem;
    --text-3xl: 1.75rem;
    --section-padding: 3.25rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .logo-text {
    font-size: var(--text-base);
  }

  .grid-4-col {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 96px;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .btn {
    white-space: normal;
    text-align: center;
  }

  .profile-card {
    width: min(240px, 72vw);
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .badge-1 { left: -8px; }
  .badge-2 { right: -8px; }

  .badge-1, .badge-2 {
    font-size: var(--text-xs);
    padding: 0.45rem 0.7rem;
    max-width: min(150px, 42vw);
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }

  .stat-card:hover {
    transform: none;
  }

  .learning-grid,
  .products-grid,
  .skills-grid,
  .projects-grid,
  .interests-grid {
    grid-template-columns: 1fr;
  }

  .glass-card {
    padding: var(--space-6);
  }

  .contact-form-container {
    padding: var(--space-4);
  }

  .product-detail-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .product-detail-content {
    padding: var(--space-6) var(--space-4);
  }

  .product-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card-actions .btn,
  .product-card-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .skills-filter {
    gap: var(--space-1);
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: var(--text-sm);
  }

  .image-placeholder {
    font-size: var(--text-xl);
    padding: 0 var(--space-3);
    text-align: center;
  }

  .scroll-indicator {
    display: none;
  }
}

/* --- Çok Dar Ekranlar (≤360px) --- */
@media (max-width: 360px) {
  :root {
    --text-6xl: 2rem;
    --text-4xl: 1.75rem;
    --section-padding: 3.25rem;
  }

  .container {
    padding: 0 0.85rem;
  }

  .logo-text {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-nav {
    width: 100%;
  }

  .profile-card {
    width: min(210px, 78vw);
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .floating-badge {
    position: static;
    margin: var(--space-2) auto 0;
    width: fit-content;
    max-width: none;
    animation: none;
  }

  .hero-visual .profile-card {
    display: flex;
    flex-direction: column;
  }
}
