/* =========================================
   mertxDEV | Premium Portfolio CSS
   Yüksek Performanslı, Apple-Stili Tasarım
   ========================================= */

/* --- Değişkenler (Variables) - Sleek Dark Mode --- */
:root {
  /* Renk Paleti */
  --bg-color: #0A0A0B;
  --surface-base: rgba(24, 24, 27, 0.4);
  --surface-hover: rgba(39, 39, 42, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #EDEDED;
  --text-secondary: #A1A1AA;
  
  --accent-color: #FFFFFF;
  --accent-hover: #E5E5E5;
  --accent-blue: #0071E3;
  --status-green: #34C759;

  /* Tipografi */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout & Spacing */
  --max-width: 1200px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
  --spacing-xxl: 128px;
  --border-radius-rd: 24px;
  --border-radius-sm: 12px;

  /* Animasyon Geçişleri */
  --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.3s ease;
}

/* --- Temel Sıfırlamalar (Reset) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* --- Genel Utility & Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
}

/* Yüzey / Card Stili (Glassmorphism) */
.glass-panel {
  background: var(--surface-base);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-rd);
  padding: var(--spacing-lg);
  transition: all var(--transition-smooth);
}

.glass-panel:hover {
  background: var(--surface-hover);
  border-color: var(--surface-border-hover);
}

/* --- Navigasyon --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: var(--spacing-md) 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  font-weight: 500;
}

.nav-links a:not(.btn):hover {
  color: var(--text-primary);
}

/* --- Butonlar --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.btn-primary:hover {
  transform: scale(1.02);
  background-color: var(--accent-hover);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

.btn-outline {
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--text-primary);
  color: var(--bg-color);
}

.btn-block {
  width: 100%;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--spacing-xxl);
}

.hero-content {
  max-width: 900px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--status-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: var(--spacing-lg);
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #A1A1AA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--spacing-xl);
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
}

/* --- Projeler (Bento Grid) --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--spacing-md);
}

.bento-card {
  position: relative;
  overflow: hidden;
  grid-column: span 12;
  background: var(--surface-base);
  backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-rd);
  padding: 40px;
  transition: transform var(--transition-smooth), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 350px;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--surface-border-hover);
}

/* Asimetrik Yapı */
@media (min-width: 768px) {
  .bento-large { grid-column: span 8; }
  .bento-card:not(.bento-large) { grid-column: span 4; }
}

.project-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.bento-card h3 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.bento-card p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.bento-card p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--text-primary);
}

/* --- Deneyim & Yetenekler --- */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

@media (min-width: 992px) {
  .experience-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
  }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid var(--surface-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-secondary);
  border: 2px solid var(--bg-color);
}

.timeline-item:first-child .timeline-dot {
  background: var(--text-primary);
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: inline-block;
}

.timeline-item h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.skill-group h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

.skill-list li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 0.95rem;
  position: relative;
  padding-left: 16px;
}

.skill-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--surface-border-hover);
}

/* --- İletişim Formu --- */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.form-container {
  background: var(--surface-base);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-rd);
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-primary);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success Message */
.form-success-state {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.5s ease forwards;
}

.success-icon {
  color: var(--status-green);
  margin-bottom: 16px;
}

/* --- Animasyonlar Sınıfları (JS ile eklenecek) --- */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--transition-smooth) forwards;
}

.animate-fade-down {
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeDown 1s var(--transition-smooth) forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Mobilde sadece logo ve iletişim butonu kalabilir (ya da hamburger menü) */
  }
  .hero-cta {
    flex-direction: column;
  }
  .bento-card {
    min-height: auto;
  }
}

/* =========================================
   Faz 2: Özel İmleç & Geçiş Animasyonları
   ========================================= */

/* Varsayılan İmleci Gizle */
body {
  cursor: none !important;
}
a, button, input, textarea, .bento-card {
  cursor: none !important;
}

/* Özel İmleç Stilleri */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* İmleç Text/Link Üzerine Geldiğinde (Pembe) */
.cursor-dot.hovered {
  background-color: #FF2D55; /* Pembe Accent */
  width: 12px;
  height: 12px;
}

.cursor-outline.hovered {
  border-color: #FF2D55;
  width: 60px;
  height: 60px;
  background-color: rgba(255, 45, 85, 0.1); /* Hafif pembe gölge/ışık ortamı */
}

/* Yazıların / Elementlerin Pürüzsüz Pembe Değişimi */
.hover-pink {
  transition: color 0.4s ease;
}

a:hover .hover-pink,
.bento-card:hover .hover-pink {
  color: #FF2D55 !important;
}

a:hover {
  color: #FF2D55;
  transition: color 0.4s ease;
}

.nav-links a:hover {
  color: #FF2D55 !important;
}

.btn-primary:hover {
  background-color: #FF2D55;
  color: white;
  border-color: #FF2D55;
}

.btn-outline:hover {
  border-color: #FF2D55;
  background-color: rgba(255, 45, 85, 0.1);
  color: #FF2D55;
}

/* Sayfa Geçiş Katmanı (Page Transition Overlay) */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 10000;
  pointer-events: none;
  opacity: 1; /* İlk yüklemede sayfa karanlık başlar, sonra Fade-out olur */
  transition: opacity 0.6s cubic-bezier(0.8, 0, 0.2, 1);
}

.page-transition-overlay.fade-out {
  opacity: 0; /* İçeriğe yumuşak geçişle giriş */
}

.page-transition-overlay.fade-in {
  opacity: 1;
  pointer-events: all; /* Giderken tıklamaları engellemek için ekranı kapatır */
}
