/* =============================================
   MAIN.CSS — Global CSS Variables & Reset
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Sora:wght@300;400;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Brand Colors */
  --orange:       #f97316;
  --orange-dark:  #c2410c;
  --orange-light: #fdba74;

  /* Neutral Palette */
  --white:        #ffffff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-300:     #d1d5db;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-600:     #4b5563;
  --gray-700:     #374151;
  --gray-800:     #1f2937;
  --gray-900:     #111827;
  --black:        #000000;

  /* Background */
  --bg-primary:   #0d1117;
  --bg-secondary: #161b22;
  --bg-card:      #1c2333;

  /* Typography */
  --font-body:     'DM Sans', sans-serif;
  --font-heading:  'Sora', sans-serif;

  /* Font Sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-orange: 0 0 20px rgba(249, 115, 22, 0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Z-index */
  --z-navbar:  100;
  --z-overlay: 200;
  --z-modal:   300;
}

/* ── Dark Mode Token Overrides ── */
html.dark {
  --page-bg:        #0f0f0f;
  --surface:        #1a1a1a;
  --surface-raised: #212121;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-primary:   #f5f5f4;
  --text-secondary: #c4c4c0;
  --text-muted:     #a8a29e;
  --heading-color:  #f5f5f4;
  --input-bg:       #1a1a1a;
}

html:not(.dark) {
  --page-bg:        #fdf8f6;
  --surface:        #ffffff;
  --surface-raised: #f9fafb;
  --surface-border: rgba(0, 0, 0, 0.07);
  --text-primary:   #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted:     #6b7280;
  --heading-color:  #1a1a2e;
  --input-bg:       #ffffff;
}

/* ── Dark: page & body ── */
html.dark body {
  background-color: #0f0f0f;
  color: #f5f5f4;
}

/* ── Dark: navbar ── */
html.dark #navbar {
  background: rgba(15, 15, 15, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
html.dark #navbar.scrolled {
  background: rgba(20, 20, 20, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
html.dark .nav-logo { color: #f5f5f4; }
html.dark .nav-links a { color: #c4c4c0; }
html.dark .nav-links a:hover { background: rgba(249,115,22,0.12); color: var(--orange-light); }
html.dark .nav-links a.active { background: rgba(249,115,22,0.16); color: var(--orange-light); }
html.dark .nav-hamburger span { background: #c4c4c0; }
html.dark .nav-mobile { border-top-color: rgba(255,255,255,0.07); background: #131313; }
html.dark .nav-mobile a { color: #c4c4c0; border-bottom-color: rgba(255,255,255,0.05); }
html.dark .nav-mobile a:hover,
html.dark .nav-mobile a.active { background: rgba(249,115,22,0.10); color: var(--orange-light); }

/* ── Dark: hero ── */
html.dark #hero {
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, rgba(194, 65, 12, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 55% 50% at 100% 100%, rgba(249, 115, 22, 0.08) 0%, transparent 60%),
    #0f0f0f;
}
html.dark #hero::before {
  background-image: radial-gradient(circle, rgba(249, 115, 22, 0.04) 1px, transparent 1px);
}
html.dark .hero-name { color: #f5f5f4; }
html.dark .hero-desc { color: #a8a29e; }
html.dark .hero-skills-card {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html.dark .skills-card-title { color: #f5f5f4; }
html.dark .skill-tag {
  background: #212121;
  border-color: rgba(255,255,255,0.1);
  color: #c4c4c0;
}
html.dark .btn-secondary {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.12);
  color: #c4c4c0;
}
html.dark .btn-secondary:hover {
  border-color: var(--orange-light);
  color: var(--orange-light);
}
html.dark .social-pill {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.10);
  color: #c4c4c0;
}
html.dark .social-pill:hover {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.35);
  color: var(--orange-light);
}

/* ── Dark: about & skills ── */
html.dark #hakkimda,
html.dark #yetenekler {
  background: #0f0f0f;
}
html.dark .section-heading { color: #f5f5f4; }
html.dark .about-card {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
html.dark .about-paragraph { color: #a8a29e; }
html.dark .about-paragraph strong { color: #f5f5f4; }
html.dark .about-fact {
  background: #212121;
  border-color: rgba(255,255,255,0.06);
}
html.dark .about-fact:hover { border-color: rgba(249,115,22,0.3); }
html.dark .about-fact-val { color: #c4c4c0; }
html.dark .skill-card {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
html.dark .skill-card:hover {
  box-shadow: 0 16px 48px rgba(249,115,22,0.12), 0 4px 16px rgba(0,0,0,0.5);
}
html.dark .skill-pill {
  background: #212121;
  border-color: rgba(255,255,255,0.10);
  color: #c4c4c0;
}
html.dark .skill-pill:hover {
  background: rgba(249,115,22,0.10);
  border-color: rgba(249,115,22,0.35);
  color: var(--orange-light);
}

/* ── Dark: scrollbar ── */
html.dark ::-webkit-scrollbar-track { background: #0f0f0f; }

/* ── Dark: theme button transition ── */
.nav-theme-btn { transition: background var(--transition-fast), transform var(--transition-base); }

/* ── CSS Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--white);
}

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

img, video {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-24);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-400);
  margin-bottom: var(--space-12);
}

.highlight {
  color: var(--orange);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--orange-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ── Selection ── */
::selection {
  background-color: var(--orange);
  color: var(--white);
}
