
html {
  color-scheme: dark;
}

html.dark {
  background-color: hsl(240 6% 10%);
}

:root {
  --background: 240 6% 10%;
  --foreground: 240 5% 96%;
  --card: 240 5% 14%;
  --card-foreground: 240 5% 96%;
  
  --primary: 240 5% 92%;
  --primary-foreground: 240 6% 9%;
  --muted: 240 4% 18%;
  --muted-foreground: 240 4% 64%;
  --border: 240 4% 24%;
  --radius: 0.5rem;
}

body {
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
}


.site-body {
  background-color: hsl(var(--background));
  background-image:
    linear-gradient(hsl(240 4% 16% / 0.35) 1px, transparent 1px),
    linear-gradient(90deg, hsl(240 4% 16% / 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-gradient {
  background:
    radial-gradient(ellipse 90% 60% at 50% -30%, hsl(240 5% 28% / 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, hsl(240 5% 20% / 0.2), transparent 50%);
}

.animate-in {
  animation: fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.35);
}

.card-hover {
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
  box-shadow: 0 12px 24px -8px rgb(0 0 0 / 0.45);
  border-color: hsl(240 4% 32%);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background-color: hsl(240 5% 12%);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: hsl(var(--muted));
  border-color: hsl(240 4% 35%);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  padding: 0.5rem;
  background: hsl(240 5% 12%);
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-icon:hover {
  background-color: hsl(var(--muted));
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.input {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background-color: hsl(240 5% 11%);
  color: hsl(var(--foreground));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: hsl(240 4% 55%);
  box-shadow: 0 0 0 2px hsl(240 5% 40% / 0.25);
}

.alert {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
}

.alert-success {
  border-color: hsl(142 50% 40% / 0.45);
  background-color: hsl(142 40% 16% / 0.5);
  color: hsl(142 40% 82%);
}

.alert-destructive {
  border-color: hsl(0 50% 45% / 0.5);
  background-color: hsl(0 35% 18% / 0.55);
  color: hsl(0 40% 88%);
}

/* İmleç takibi — sadece fare + reduced-motion yok */
.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  border: 1px solid hsl(0 0% 100% / 0.14);
  background: radial-gradient(circle at 35% 35%, hsl(0 0% 100% / 0.07), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}

body.cursor-glow-active .cursor-glow {
  opacity: 1;
}

@media (pointer: coarse) {
  .cursor-glow {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none !important;
  }
}

/* Hamburger → X */
.nav-hamburger-box {
  display: flex;
  width: 1.25rem;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background-color: currentColor;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease;
  transform-origin: center;
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobil çekmece */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: hsl(240 6% 6% / 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  /* Dar panel: ~%65–72 viewport, üst sınır ~15.5rem */
  width: min(15.5rem, 70vw);
  max-width: 100%;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}


.mobile-drawer-panel {
  position: relative;
  height: 100%;
  border-radius: var(--radius) 0 0 var(--radius);
  border-left: 1px solid hsl(var(--border) / 0.65);
  background: hsl(240 6% 8% / 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.04),
    -20px 0 48px -10px rgb(0 0 0 / 0.52);
}

.mobile-drawer-hero-glow {
  background:
    radial-gradient(ellipse 85% 55% at 85% -15%, hsl(240 5% 28% / 0.38), transparent 58%),
    radial-gradient(ellipse 55% 45% at -5% 95%, hsl(240 5% 22% / 0.14), transparent 52%);
}

.mobile-drawer-chrome {
  opacity: 0;
}

.mobile-drawer.is-open .mobile-drawer-chrome {
  animation: mobile-drawer-chrome-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes mobile-drawer-chrome-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.625rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--foreground));
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mobile-nav-link::before {
  content: '>';
  flex-shrink: 0;
  font-weight: 700;
  color: hsl(142 48% 48% / 0.92);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background-color: hsl(240 5% 14% / 0.85);
  border-color: hsl(var(--border) / 0.65);
  outline: none;
}

.mobile-drawer.is-open .mobile-nav-link {
  animation: mobile-drawer-link-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-drawer.is-open .mobile-nav-link:nth-child(1) {
  animation-delay: 0.08s;
}
.mobile-drawer.is-open .mobile-nav-link:nth-child(2) {
  animation-delay: 0.14s;
}
.mobile-drawer.is-open .mobile-nav-link:nth-child(3) {
  animation-delay: 0.2s;
}
.mobile-drawer.is-open .mobile-nav-link:nth-child(4) {
  animation-delay: 0.26s;
}
.mobile-drawer.is-open .mobile-nav-link:nth-child(5) {
  animation-delay: 0.32s;
}

.mobile-drawer.is-open .mobile-drawer-footer .mobile-drawer-cta {
  animation: mobile-drawer-link-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

@keyframes mobile-drawer-link-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-drawer-cta {
  box-shadow: 0 2px 12px -2px rgb(0 0 0 / 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer.is-open .mobile-drawer-chrome {
    animation: none;
    opacity: 1;
  }
  .mobile-drawer.is-open .mobile-nav-link,
  .mobile-drawer.is-open .mobile-drawer-footer .mobile-drawer-cta {
    animation: none;
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .mobile-drawer-overlay,
  .mobile-drawer {
    display: none !important;
  }
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Footer */
.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.site-footer__link:hover {
  color: hsl(var(--foreground));
}

.site-footer__link--active {
  color: hsl(var(--foreground));
  font-weight: 500;
}

.site-footer__inline-link {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.site-footer__inline-link:hover {
  color: hsl(var(--foreground));
}

.site-footer__social-btn {
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.7);
  background: hsl(240 6% 10% / 0.65);
  color: hsl(var(--foreground));
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.site-footer__social-btn:hover {
  border-color: hsl(var(--primary) / 0.45);
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  transform: translateY(-1px);
}

.site-footer__cta {
  box-shadow: 0 1px 0 0 hsl(0 0% 100% / 0.04);
}

.mobile-nav-link--active {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.prose-custom {
  word-break: break-word;
}

.prose-custom :where(h2, h3) {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose-custom h2 {
  font-size: 1.125rem;
}

.prose-custom h3 {
  font-size: 1rem;
}

.prose-custom :where(p, ul, ol) {
  margin-bottom: 1rem;
}

.prose-custom ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.prose-custom a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-custom a:hover {
  opacity: 0.9;
}


.admin-app .label {
  color: hsl(var(--muted-foreground));
}

.admin-app input[type="checkbox"] {
  accent-color: hsl(var(--primary));
}

.input[type="file"] {
  padding: 0.4rem 0.5rem;
  font-size: 0.8125rem;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}


.hero-dev .dev-float {
  position: absolute;
  user-select: none;
}

.dev-float-1 {
  right: -5%;
  top: 10%;
  animation: dev-float-y 14s ease-in-out infinite;
}

.dev-float-2 {
  left: -3%;
  bottom: 15%;
  animation: dev-float-y 18s ease-in-out infinite reverse;
}

.dev-float-3 {
  right: 15%;
  bottom: 25%;
  animation: dev-float-y 22s ease-in-out infinite;
  animation-delay: -4s;
}

@keyframes dev-float-y {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-18px) rotate(2deg);
  }
}

.dev-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.1em;
  margin-left: 1px;
  background: hsl(var(--primary));
  vertical-align: text-bottom;
  animation: dev-caret-blink 1s step-end infinite;
}

@keyframes dev-caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.dev-terminal {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(240 6% 8%);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.04),
    0 24px 48px -12px rgb(0 0 0 / 0.45);
  overflow: hidden;
}

.dev-terminal-delay {
  animation-delay: 0.15s;
  animation-fill-mode: backwards;
}

.dev-terminal-body {
  padding: 1rem 1.125rem 1.25rem;
  min-height: 11rem;
}

.dev-code-line {
  opacity: 0;
  animation: dev-line-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dev-code-line:nth-child(1) {
  animation-delay: 0.2s;
}
.dev-code-line:nth-child(2) {
  animation-delay: 0.45s;
}
.dev-code-line:nth-child(3) {
  animation-delay: 0.7s;
}
.dev-code-line:nth-child(4) {
  animation-delay: 0.95s;
}
.dev-code-line:nth-child(5) {
  animation-delay: 1.2s;
}
.dev-code-line:nth-child(6) {
  animation-delay: 1.45s;
}

@keyframes dev-line-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dev-code-indent {
  padding-left: 1rem;
}

.dev-code-indent2 {
  padding-left: 2rem;
}

.animate-pulse-subtle {
  animation: dev-pulse-subtle 1.8s ease-in-out infinite;
}

@keyframes dev-pulse-subtle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}


.contact-status-dot {
  animation: contact-status-pulse 1.2s ease-in-out infinite;
}

@keyframes contact-status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.28;
    transform: scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dev-float-1,
  .dev-float-2,
  .dev-float-3 {
    animation: none;
  }
  .dev-caret {
    animation: none;
    opacity: 1;
  }
  .dev-code-line {
    opacity: 1;
    animation: none;
  }
  .animate-pulse-subtle {
    animation: none;
  }
  .contact-status-dot {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
