/* ================================
   ROOT & RESET
   ================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-style: normal;
}

/* Rua Systems palette — same tokens as rua.systems (dark / light) */
:root {
  --bg: #07090d;
  --surface: #0e1117;
  --surface-hover: #141923;
  --accent: #3f9a73;
  --accent-muted: rgba(63, 154, 115, 0.55);
  --accent-soft: rgba(63, 154, 115, 0.1);
  --brass: var(--accent);
  --brass-muted: var(--accent-muted);
  --text: #e7ecf2;
  --text-secondary: #8a93a3;
  --text-muted: #7a8494;
  --border-subtle: rgba(231, 236, 242, 0.1);
  --border-muted: rgba(231, 236, 242, 0.06);
  --cog: rgba(63, 154, 115, 0.07);
  --line: rgba(231, 236, 242, 0.035);
  --glow: rgba(63, 154, 115, 0.12);
  --radius: 4px;
  --radius-large: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Consolas', monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f4f0;
  --surface: #faf9f6;
  --surface-hover: #eeece6;
  --accent: #2b7357;
  --accent-muted: rgba(43, 115, 87, 0.45);
  --accent-soft: rgba(43, 115, 87, 0.08);
  --text: #14181d;
  --text-secondary: #525b68;
  --text-muted: #616a77;
  --border-subtle: rgba(20, 24, 29, 0.12);
  --border-muted: rgba(20, 24, 29, 0.07);
  --cog: rgba(43, 115, 87, 0.09);
  --line: rgba(20, 24, 29, 0.045);
  --glow: rgba(43, 115, 87, 0.08);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 85% 0%, var(--glow), transparent 70%),
    repeating-linear-gradient(0deg, var(--line) 0px, var(--line) 1px, transparent 1px, transparent 6px);
  color: var(--text);
  line-height: 1.65;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  height: 100%;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ================================
   BACKGROUND — slow turning cogs
   ================================ */

body::before,
body::after {
  content: '';
  position: fixed;
  z-index: 0;
  pointer-events: none;
  background-color: var(--cog);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23000' stroke-width='2.5'><circle cx='50' cy='50' r='31'/><circle cx='50' cy='50' r='13'/><circle cx='50' cy='50' r='41'/></g><g fill='%23000'><rect x='46' y='3' width='8' height='14' transform='rotate(0 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(30 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(60 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(90 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(120 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(150 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(180 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(210 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(240 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(270 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(300 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(330 50 50)'/></g></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23000' stroke-width='2.5'><circle cx='50' cy='50' r='31'/><circle cx='50' cy='50' r='13'/><circle cx='50' cy='50' r='41'/></g><g fill='%23000'><rect x='46' y='3' width='8' height='14' transform='rotate(0 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(30 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(60 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(90 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(120 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(150 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(180 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(210 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(240 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(270 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(300 50 50)'/><rect x='46' y='3' width='8' height='14' transform='rotate(330 50 50)'/></g></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body::before {
  width: 62vmin;
  height: 62vmin;
  left: -22vmin;
  bottom: -22vmin;
  animation: cog-cw 140s linear infinite;
}

body::after {
  width: 34vmin;
  height: 34vmin;
  right: -10vmin;
  top: -8vmin;
  animation: cog-ccw 90s linear infinite;
}

@keyframes cog-cw {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cog-ccw {
  to {
    transform: rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  body::before,
  body::after {
    animation: none;
  }
}

/* ================================
   SCROLLBAR
   ================================ */

::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: 3px;
}

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

/* ================================
   LAYOUT
   ================================ */

.main-wrapper {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 960px;
  min-width: 0;
  width: 100%;
  margin: auto;
  background-color: var(--surface);
  border-inline: 1px solid var(--border-muted);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 0.4s ease;
}

a {
  color: var(--text);
  transition: var(--transition);
}

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

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

.navbar {
  min-height: 40px;
  height: fit-content;
  padding: 0px 8px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
}

.navbar>ul {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar>ul>li {
  list-style: none;
}

.navbar a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.navbar a:hover {
  color: var(--text);
}

li.lang {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 5px;
}

li.lang>a {
  text-decoration: none;
}

li.lang>a.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-secondary);
  width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--brass);
  border-color: var(--brass-muted);
}

.theme-toggle .bi {
  font-size: 13px;
}

/* ================================
   SECTIONS
   ================================ */

.section-wrapper {
  margin: 12px 0px;
  padding: 4px 8px;
  text-align: center;
}

.landing-message {
  padding-top: 18px;
}

.landing-message h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.landing-message h3 {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 12px;
  margin: 18px 0px 20px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  background-color: transparent;
  transition: var(--transition);
}

.contact-chip .bi {
  color: var(--brass);
  margin-right: 2px;
  font-size: 14px;
  transition: var(--transition);
}

a.contact-chip:hover {
  color: var(--text);
  border-color: var(--accent-muted);
  background-color: var(--accent-soft);
}

a.contact-chip:hover .bi {
  color: var(--accent);
}

.landing-message>p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
}

.landing-message>p a {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid var(--brass-muted);
}

.landing-message>p a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-muted);
}

.section-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.section-buttons>.button {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: var(--transition);
  border-radius: var(--radius);
}

.section-buttons>.button.active {
  color: var(--accent);
  border-color: var(--accent-muted);
  background-color: var(--accent-soft);
}

.section-buttons>.button:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.section-wrapper:not(.landing-message) {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.section-tab {
  display: none;
}

.section-tab.active {
  display: block;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ================================
   EXPERIENCE
   ================================ */

.experience-item {
  text-align: left;
  padding: 12px 0px;
  border-bottom: 1px solid var(--border-muted);
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.experience-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.experience-company {
  font-size: 15px;
  color: var(--brass);
}

.experience-meta {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0px 8px 0px;
}

.experience-meta span,
.experience-meta a {
  font-family: var(--mono);
}

.experience-meta a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
}

.experience-meta a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-muted);
}

.experience-list {
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-secondary);
}

.experience-list>li {
  margin-bottom: 4px;
}

.experience-list>li::marker {
  color: var(--accent-muted);
}

/* ================================
   EDUCATION
   ================================ */

.education-item {
  text-align: left;
  padding: 12px 0px;
  border-bottom: 1px solid var(--border-muted);
}

.education-item:last-child {
  border-bottom: none;
}

.education-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.education-meta {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0px 4px 0px;
}

.education-meta span {
  font-family: var(--mono);
}

.education-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ================================
   TALENTS
   ================================ */

.talents-category {
  padding: 8px 0px;
  border-bottom: 1px solid var(--border-muted);
  text-align: left;
}

.talents-category:last-child {
  border-bottom: none;
}

.talents-category-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.talents-category-title::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background-color: var(--brass-muted);
}

.talents-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.talent-tag {
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.talent-tag:hover {
  border-color: var(--brass-muted);
  color: var(--text);
}

/* ================================
   LANGUAGES
   ================================ */

.language-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0px;
  border-bottom: 1px solid var(--border-muted);
  text-align: left;
}

.language-item:last-child {
  border-bottom: none;
}

.language-name {
  font-size: 16px;
  font-weight: 600;
}

.language-level {
  font-size: 13px;
  color: var(--text-muted);
}

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

a.experience-title {
  text-decoration: none;
}

a.experience-title .bi {
  font-size: 12px;
  margin-left: 4px;
  color: var(--accent);
}

.status-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-muted);
  white-space: nowrap;
}

.status-badge.status-active {
  color: var(--brass);
  border-color: var(--brass-muted);
}

.experience-list code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--text);
}

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

@media (max-width: 600px) {

  /* Mobilde sabit yükseklik ve overflow yerine
     sayfanın doğal scroll yapması sağlanır */
  html {
    height: auto;
    overflow: auto;
  }

  body {
    height: auto;
    overflow: auto;
  }

  .main-wrapper {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .section-wrapper:not(.landing-message) {
    flex: unset;
    overflow: visible;
    min-height: 0;
  }

  .section-tab.active {
    flex: unset;
    overflow-y: visible;
    min-height: 0;
  }

  /* Navbar */
  .navbar {
    flex-wrap: wrap;
    padding: 4px 8px;
    gap: 2px;
  }

  .navbar>ul {
    gap: 8px;
  }

  /* Landing */
  .section-wrapper {
    padding: 4px 12px;
  }

  .landing-message h1 {
    font-size: 26px;
  }

  .landing-message h3 {
    font-size: 11px;
  }

  .contact-row {
    gap: 8px;
    margin: 14px 0px 16px;
  }

  .contact-chip {
    font-size: 12px;
    padding: 5px 12px;
  }

  .landing-message>p {
    font-size: 14px;
  }

  /* Tab butonları */
  .section-buttons {
    flex-wrap: wrap;
  }

  .section-buttons>.button {
    font-size: 14px;
    padding: 2px 8px;
  }

  /* Tecrübeler */
  .experience-title {
    font-size: 15px;
  }

  .experience-meta {
    flex-wrap: wrap;
    gap: 4px;
  }

  .experience-list {
    font-size: 14px;
  }

  /* Eğitim */
  .education-title {
    font-size: 15px;
  }

  .education-meta {
    flex-wrap: wrap;
    gap: 4px;
  }
}
