/* ============ PolyAzılım — terminal aesthetic ============ */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --border: #262626;
  --text: #f2f2f2;
  --text-dim: #a8a8a8;   /* WCAG AA on #0a0a0a (~8.7:1) */
  --accent: #00ff9c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.7;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.accent {
  color: var(--accent);
}

.prompt {
  color: var(--accent);
  user-select: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- matrix background ---------- */

#matrix {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.logo {
  display: block;
}

.logo:hover,
.logo:focus-visible {
  text-decoration: none;
}

.logo-img {
  display: block;
  height: 36px;
  width: auto;
  /* siyah logoyu koyu zeminde beyaza çevir; zemini karışımla yok et */
  filter: invert(1);
  mix-blend-mode: screen;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.terminal {
  width: 100%;
  max-width: 640px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 10px;
  height: 10px;
  background: var(--border);
  display: inline-block;
}

.t-dot:first-child {
  background: var(--accent);
}

.t-title {
  margin-left: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 1.5rem 1.25rem;
  min-height: 8.5rem;
}

.t-line {
  font-size: 1rem;
}

.t-output {
  margin-top: 0.75rem;
  color: var(--text-dim);
}

.tagline {
  color: var(--text);
  font-weight: 500;
}

.cursor-block {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-sub {
  color: var(--text-dim);
  max-width: 52ch;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.btn-lg {
  font-size: 1rem;
  padding: 1rem 1.5rem;
  word-break: break-word;
}

/* ---------- sections ---------- */

.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

/* ---------- hizmetler ---------- */

.services {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.service {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.service:hover {
  border-color: var(--accent);
}

.service h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.service h3::before {
  content: "» ";
  color: var(--accent);
}

.service p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ---------- projeler ---------- */

.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
}

.card-media {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  background: #1a1a1a;
}

/* hover overlay: "$ cat proje.txt" typed, then summary */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  background: rgba(10, 10, 10, 0.88);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card:hover .card-overlay,
.card:focus-within .card-overlay {
  opacity: 1;
}

.overlay-cmd {
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  width: 15ch; /* "$ cat proje.txt" */
}

.card:hover .overlay-cmd,
.card:focus-within .overlay-cmd {
  animation: type-cmd 0.8s steps(15, end) both;
}

.overlay-out {
  color: var(--accent);
  font-size: 0.8rem;
  opacity: 0;
}

.card:hover .overlay-out,
.card:focus-within .overlay-out {
  animation: overlay-out-in 0.15s ease 0.85s both;
}

@keyframes type-cmd {
  from {
    width: 0;
  }
  to {
    width: 15ch;
  }
}

@keyframes overlay-out-in {
  to {
    opacity: 1;
  }
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ---------- iletişim ---------- */

.contact-text {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.site-footer p {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ---------- breakpoints (mobile-first) ---------- */

@media (min-width: 640px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  body {
    font-size: 17px;
  }
  .services {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}
