/* =================================================
   THEME VARIABLES (LIGHT - DEFAULT)
================================================= */

:root {
  --bg: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --border: #d0d7de;
  --card-bg: #ffffff;
  --accent: #0969da;

  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-text: #24292f;
}

/* =================================================
   DARK MODE
================================================= */

.theme-dark {
  --bg: #0d1117;
  --text: #c9d1d9;
  --muted: #8b949e;
  --border: #30363d;
  --card-bg: #161b22;
  --accent: #58a6ff;

  --nav-bg: rgba(13, 17, 23, 0.9);
  --nav-text: #c9d1d9;
}

/* =================================================
   GLOBAL RESET & TYPOGRAPHY
================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  background-color: var(--bg);
  color: var(--text);
}

/* HEADINGS */

h1, h2, h3, h4, h5 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* LINKS (content links) */

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* =================================================
   NAVBAR
================================================= */

.custom-navbar {
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.custom-navbar .navbar-brand {
  color: var(--nav-text);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-navbar .nav-link {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 1.25rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.custom-navbar .nav-link:hover {
  color: var(--accent);
}

/* Hover underline effect */

.custom-navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

.custom-navbar .nav-link:hover::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
}

/* =================================================
   HERO
================================================= */

.hero {
  padding: 120px 20px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* =================================================
   PROJECTS / CARDS
================================================= */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 60px 20px;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}


/* =====================
   FOOTER
===================== */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 6rem;
  padding-top: 3rem;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-links,
.footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-social li {
  margin-bottom: 0.5rem;
}

.footer-links a,
.footer-social a {
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* =================================================
   RESPONSIVE
================================================= */

@media (max-width: 768px) {
  .custom-navbar .nav-link {
    margin-left: 0;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 1rem;
  }
}

/* =================================================
   TERMINAL WINDOW (macOS / Linux style)
================================================= */

/* LIGHT MODE TERMINAL */
:root pre {
  background-color: #f6f8fa;
  color: #24292f;
  border: 1px solid #d0d7de;
  border-radius: 13px;
  padding: 40px 18px 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}

/* DARK MODE TERMINAL */
.theme-dark pre {
  background-color: #0d1117;
  color: #c9d1d9;
  border-color: #30363d;
}

/* CODE FONT */
pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  background: none;
  padding: 0;
  display: block;
}

/* INLINE CODE */
p code,
li code,
td code {
  background-color: rgba(175, 184, 193, 0.25);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

/* =================================================
   SYNTAX HIGHLIGHT — LIGHT MODE
================================================= */

:root .language-bash,
:root .language-python,
:root .language-cpp,
:root .language-html {
  color: #24292f;
}

:root .k { color: #cf222e; }   /* keyword */
:root .s { color: #0a3069; }   /* string */
:root .c { color: #6e7781; }   /* comment */
:root .n { color: #24292f; }   /* name */
:root .o { color: #cf222e; }   /* operator */

/* =================================================
   SYNTAX HIGHLIGHT — DARK MODE
================================================= */

.theme-dark .k { color: #ff7b72; }
.theme-dark .s { color: #a5d6ff; }
.theme-dark .c { color: #8b949e; }
.theme-dark .n { color: #c9d1d9; }
.theme-dark .o { color: #ff7b72; }

/* =================================================
   RESPONSIVE
================================================= */

@media (max-width: 768px) {
  pre {
    font-size: 0.8rem;
    padding: 36px 14px 14px;
  }
}

/* =================================================
   DARK MODE – CODE BLOCK CONTRAST FIX
   (Only affects <pre><code>)
================================================= */

.theme-dark pre,
.theme-dark pre code {
  color: #e6edf3 !important;
}

.theme-dark pre {
  background: #161b22 !important; /* biraz daha açık */
  border: 1px solid #30363d;
}

/* Syntax tokens */
.theme-dark .k { color: #ff9b8f !important; }
.theme-dark .s { color: #79c0ff !important; }
.theme-dark .c {
  color: #9da7b1 !important;
  font-style: italic;
}
.theme-dark .n { color: #e6edf3 !important; }
.theme-dark .o { color: #ffb86c !important; }

/* =================================================
   TERMINAL HEADER (Language Bar)
================================================= */

pre {
  position: relative;
  padding-top: 60px; /* header için yer açıyoruz */
}

/* Header bar */
pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 36px;
  padding: 8px 14px;

  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3px;

  display: flex;
  align-items: center;

  background-color: #eaeef2;
  color: #57606a;

  border-bottom: 1px solid #d0d7de;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

/* DARK MODE */
.theme-dark pre::before {
  background-color: #161b22;
  color: #8b949e;
  border-bottom: 1px solid #30363d;
}

/* =================================================
   COPY BUTTON (Terminal Header Right)
================================================= */

pre .copy-btn {
  position: absolute;
  top: 3px;
  right: 10px;

  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;

  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.15s ease;
}

/* Hover – light mode */
pre .copy-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

/* Hover – dark mode */
.theme-dark pre .copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ✔ COPIED STATE (Tema uyumlu – yeşil YOK) */
pre .copy-btn.copied {
  color: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.05);
}

/* =====================
   MARKDOWN TABLOLARI
===================== */
table {
  width: 100%;
  border-collapse: collapse; /* hücreler arası boşlukları kaldır */
  margin-bottom: 1.5rem;
}

th, td {
  border: 1px solid var(--border); /* kenarlık rengi tema değişkeni */
  padding: 8px 12px;
  text-align: left;
}

th {
  background-color: var(--card-bg); /* başlık arka planı */
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background-color: rgba(0,0,0,0.03); /* alternatif satır rengi */
}

/* Dark mode tablolar */
.theme-dark table {
  border-color: #30363d;
}

.theme-dark th, 
.theme-dark td {
  border-color: #30363d;
}

.theme-dark tbody tr:nth-child(even) {
  background-color: rgba(255,255,255,0.05);
}

/* =================================================
   GITHUB STYLE EMOJI
================================================= */

img.emoji {
  display: inline-block;
  vertical-align: text-bottom;
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.05em;
}

/* =================================================
   HERO TERMİNAL YAZISI
================================================= */

/* Dark theme (GitHub Dark) */
body.theme-dark #terminal-text,
body.theme-dark #cursor {
  color: #ffffff;           /* GitHub terminal yeşili */
  background-color: #00000000;
}

/* Light theme (GitHub Light) */
body:not(.theme-dark) #terminal-text,
body:not(.theme-dark) #cursor {
  color: #000000;           /* GitHub siyah metin */
  background-color: #ffffff00;
}

.hero p {
  max-width: 760px;
  line-height: 1.65;
  font-weight: 400;
}

body.theme-dark .hero p {
  color: #8b949e;     /* GitHub dark secondary text */
}

body:not(.theme-dark) .hero p {
  color: #57606a;     /* GitHub light secondary text */
}

body.theme-dark .hero .cursor{
  background-color: #ffffff;     /* GitHub dark secondary text */
}

body:not(.theme-dark) .hero .cursor {
  background-color: #000000;       /* GitHub light secondary text */
}

/* =================================================
   PROJECT CARD
================================================= */
.project-card {
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.project-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.project-link {
  font-weight: 500;
  text-decoration: none;
  color: var(--link-color);
}

.project-link:hover {
  text-decoration: underline;
}

body {
  --card-bg: #ffffff;
  --card-border: #d0d7de;
  --text-secondary: #57606a;
  --link-color: #0969da;
}

body.theme-dark {
  --card-bg: #161b22;
  --card-border: #30363d;
  --text-secondary: #8b949e;
  --link-color: #58a6ff;
}

/* =================================================
   NAVBAR BRAND
================================================= */
.navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.brand-text {
  color: var(--bs-body-color);
}
body:not(.theme-dark) .navbar-brand img
{
  content: url("/assets/favicon/favicon-light.svg");
}

body.theme-dark .navbar-brand img
{
  src: url("/assets/favicon/favicon.svg");
}