/* ==========================================================================
   Şuayp — Portfolyo Stilleri
   Harici font/CDN çağrısı yoktur; sadece sistem font yığınları kullanılır.
   ========================================================================== */

:root {
  --bg: #070A12;
  --surface: #101827;
  --accent: #2F7FFF;
  --accent-rgb: 47, 127, 255;
  --text: #EAF0FA;
  --text-muted: #8B96AC;

  --hairline: rgba(var(--accent-rgb), 0.15);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.35);

  --font-display: -apple-system, "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;

  --nav-height: 76px;
  --container-max: 1200px;
  --section-gap: clamp(72px, 12vw, 160px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* ---------- Erişilebilirlik yardımcıları ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #06101f;
  padding: 10px 16px;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 6px;
}

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

/* ---------- Sayfa geneli statik nokta-ızgara dokusu ---------- */
body {
  background-image: radial-gradient(circle, rgba(var(--accent-rgb), 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center top;
}

/* ---------- Layout yardımcıları ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) {
  .container { padding: 0 32px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

section p {
  color: var(--text-muted);
  max-width: 68ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 8px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #061020;
  border: 1px solid var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.28); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline-soft);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(16, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .nav { padding: 0 32px; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-list {
  display: flex;
  gap: 32px;
}
.nav-list a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 2px;
  transition: color 0.2s var(--ease);
}
.nav-index {
  color: var(--text-muted);
  margin-right: 4px;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-list a:hover,
.nav-list a.is-active {
  color: var(--text);
}
.nav-list a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 6px;
}
.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--surface);
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s var(--ease);
    overflow-y: auto;
  }
  .nav-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    padding: 32px 24px;
  }
  .nav-list a {
    display: block;
    font-size: 0.95rem;
    padding: 16px 4px;
    border-bottom: 1px solid var(--hairline-soft);
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 75% 35%, rgba(var(--accent-rgb), 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero-content { max-width: 620px; }
.hero-title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 22px;
}
.hero-rule {
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--text);
  margin-bottom: 16px;
}
.hero-lead {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 34px;
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
}
.blueprint-frame {
  position: relative;
  width: min(38vw, 420px);
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--hairline);
}
.hero-monogram {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(var(--accent-rgb), 0.45);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  padding: 14%;
}
.tick {
  position: absolute;
  background: var(--hairline);
}
.tick-top, .tick-bottom { left: calc(50% - 0.5px); width: 1px; height: 14px; }
.tick-top { top: -14px; }
.tick-bottom { bottom: -14px; }
.tick-left, .tick-right { top: calc(50% - 0.5px); width: 14px; height: 1px; }
.tick-left { left: -14px; }
.tick-right { right: -14px; }

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
  }
  .hero-visual { display: flex; }
}

.scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  width: max-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  z-index: 1;
}
.scroll-hint-line {
  width: 1px;
  height: 26px;
  background: var(--hairline-soft);
}
.scroll-hint-arrow {
  animation: bob 2.2s ease-in-out infinite;
  font-size: 0.9rem;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ==========================================================================
   REVEAL (scroll animasyonu)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   ORTAK BÖLÜM BOŞLUKLARI
   ========================================================================== */
.about, .projects, .timeline-section, .contact {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--hairline-soft);
}

/* Sticky nav altına kayarken başlıkların çubuğun ardında kalmaması için */
section[id] {
  scroll-margin-top: var(--nav-height);
}

/* ==========================================================================
   HAKKIMDA
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.about-text p + p { margin-top: 16px; }

.about-skills {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 45% 1fr; gap: 64px; }
}

/* ==========================================================================
   PROJELER
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}
@media (min-width: 720px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 12px;
  padding: 28px 26px 24px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}
.project-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.7;
}
.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.project-card p {
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 4px 8px;
}

/* ==========================================================================
   DENEYİM & EĞİTİM — ZAMAN ÇİZELGESİ
   ========================================================================== */
.timeline {
  position: relative;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: var(--hairline);
}
.timeline-item {
  position: relative;
  padding-left: 32px;
}
.timeline-node {
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.timeline-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
}
.timeline-content p:not(.timeline-date):not(.timeline-org) {
  font-size: 0.95rem;
}

@media (min-width: 1024px) {
  .timeline { margin-top: 64px; gap: 0; }
  .timeline::before { left: calc(50% - 0.5px); }
  .timeline-item {
    width: 50%;
    padding-left: 0;
    padding-bottom: 64px;
  }
  .timeline-item:nth-child(odd) {
    padding-right: 56px;
    text-align: right;
    margin-left: 0;
  }
  .timeline-item:nth-child(even) {
    padding-left: 56px;
    margin-left: 50%;
  }
  .timeline-node {
    top: 4px;
    left: auto;
  }
  .timeline-item:nth-child(odd) .timeline-node { right: -7px; left: auto; }
  .timeline-item:nth-child(even) .timeline-node { left: -7px; }
  .timeline-item:nth-child(odd) .tag-list,
  .timeline-item:nth-child(odd) .chip-list { justify-content: flex-end; }
}

/* ==========================================================================
   İLETİŞİM
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.contact-intro p { margin-top: 16px; margin-bottom: 28px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
  font-size: 0.95rem;
}
.contact-links a svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.contact-links a:hover,
.contact-links a:hover svg { color: var(--accent); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-field input,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
  outline: none;
}
.form-field input:invalid:not(:placeholder-shown) {
  border-color: #c0392b;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  min-height: 1.4em;
  font-size: 0.9rem;
  margin: 0;
}
.form-status[data-state="success"] { color: #35d07f; }
.form-status[data-state="error"] { color: #ff6b6b; }
.form-status[data-state="sending"] { color: var(--text-muted); }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 45% 1fr; gap: 64px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--hairline-soft);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-mark {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-nav a:hover { color: var(--accent); }

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline-soft);
  border-radius: 50%;
  color: var(--text-muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ==========================================================================
   HAREKET AZALTMA — prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: color 0.15s, border-color 0.15s !important;
    transform: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-hint-arrow { animation: none !important; }
}
