/* Segfault-Macka: kurumsal temel stiller (tum sayfalar) */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-alt: #EEF1F6;
  --navy: #0B142C;
  --navy-ink: #F7F8FA;
  --navy-muted: #C4CEE2;
  --navy-line: rgba(247, 248, 250, 0.2);

  --ink: #0B142C;
  --ink-muted: #47546B;
  --border: #D5DCE6;
  --border-strong: #68758C;

  --accent: #352896;
  --accent-hover: #261C70;
  --accent-active: #1D1559;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECEAF9;

  --status-ok: #14532D;
  --status-ok-bg: #E6F4EC;
  --status-err: #991B1B;
  --status-err-bg: #FEF2F2;

  --font-heading: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r-tag: 4px;
  --r-control: 6px;
  --r-panel: 8px;

  --container: 1160px;
  --gutter: clamp(16px, 3vw, 40px);
  --sec-pad: clamp(44px, 6vw, 88px);
  --header-h: 64px;
  --t-fast: 150ms ease;
}

@media (min-width: 961px) {
  :root {
    --header-h: 72px;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4, p, ul, ol, dl, figure {
  margin: 0;
}

/* Base-layer interaction affordances (R-39) */
a[href],
button:not(:disabled),
summary,
select:not(:disabled),
label[for],
[role="button"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Visible high-contrast keyboard focus (R-32) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.band-navy :focus-visible,
.site-footer :focus-visible {
  outline-color: #FFFFFF;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 300;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  border-radius: var(--r-control);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Layout container */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sec-pad);
  border-bottom: 1px solid var(--border);
}

.section-surface {
  background: var(--surface);
}

.section-alt {
  background: var(--surface-alt);
}

.band-navy {
  background: var(--navy);
  color: var(--navy-ink);
  border-bottom: 1px solid var(--navy-line);
}

/* Typography hierarchy */
.sec-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.band-navy .sec-index {
  color: var(--navy-muted);
}

.h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.85rem, 1.35rem + 2.1vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.band-navy .h2 {
  color: var(--navy-ink);
}

.h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.375rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lead {
  color: var(--ink-muted);
  max-width: 62ch;
}

.band-navy .lead {
  color: var(--navy-muted);
}

.prose-text {
  color: var(--ink-muted);
  max-width: 65ch;
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Buttons (R-11, R-03, R-39) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-control);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

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

.btn:active {
  background: var(--accent-active);
  border-color: var(--accent-active);
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--ink);
}

.btn-secondary:active {
  background: var(--border);
  transform: translateY(1px);
}

.band-navy .btn-light {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--surface);
}

.band-navy .btn-light:hover {
  background: var(--surface-alt);
  border-color: var(--surface-alt);
}

.band-navy .btn-outline-light {
  background: transparent;
  color: var(--navy-ink);
  border-color: var(--navy-muted);
}

.band-navy .btn-outline-light:hover {
  background: rgba(247, 248, 250, 0.12);
  border-color: var(--navy-ink);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Header & Navigation (R-03, R-24, R-32, R-39) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link img {
  height: 34px;
  width: auto;
}

.brand-sub {
  display: none;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.2;
}

@media (min-width: 1025px) {
  .brand-sub {
    display: block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-control);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.nav-link:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.nav-link:active {
  background: var(--border);
}

.nav-link[aria-current="page"] {
  font-weight: 700;
  color: var(--accent);
  border-bottom-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Desktop project dropdown */
.nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dd-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--ink);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.dd-toggle:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.dd-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast);
}

.nav-dd.open .dd-toggle svg {
  transform: rotate(180deg);
}

.dd-menu {
  list-style: none;
  padding: 8px;
  margin: 0;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-panel);
  box-shadow: 0 12px 28px rgba(11, 20, 44, 0.12);
  display: none;
  z-index: 120;
}

.nav-dd.open .dd-menu {
  display: block;
}

.dd-menu a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-control);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.dd-menu a small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.dd-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.dd-menu .dd-all {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--accent);
}

.header-cta {
  margin-left: 8px;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}

.menu-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.menu-btn .icon-close {
  display: none;
}

.site-header.menu-open .menu-btn .icon-open {
  display: none;
}

.site-header.menu-open .menu-btn .icon-close {
  display: block;
}

.menu-btn:hover {
  background: var(--surface-alt);
  border-color: var(--ink);
}

.menu-btn:active {
  background: var(--border);
}

/* Mobile & narrow tablet navigation reflow */
@media (max-width: 960px) {
  .menu-btn {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    display: none;
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .site-header.menu-open .site-nav {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 14px;
    font-size: 1.0625rem;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }

  .nav-link[aria-current="page"] {
    background: var(--accent-soft);
    border-left-color: var(--accent);
    border-radius: var(--r-control);
  }

  .nav-dd {
    flex-direction: column;
    align-items: stretch;
  }

  .dd-toggle {
    display: none;
  }

  .dd-menu {
    display: block;
    position: static;
    min-width: 0;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    margin: 4px 0 8px 16px;
    padding: 0 0 0 12px;
  }

  .dd-menu a {
    font-weight: 500;
    padding: 10px 12px;
  }

  .dd-menu a small,
  .dd-menu .dd-all {
    display: none;
  }
}

/* Sponsors strip (real verified institutions only, zero 404s) */
.sponsors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 28px;
}

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

@media (min-width: 1025px) {
  .sponsors-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.sponsor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: 20px 16px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}

.sponsor-card img {
  height: 52px;
  max-width: 148px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-tag);
}

.sponsor-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.sponsor-role {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* Contact CTA band */
.cta-band {
  padding-block: clamp(44px, 6vw, 76px);
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-grid {
    grid-template-columns: 1.25fr auto;
  }
}

.cta-contact-line {
  margin-top: 14px;
  font-size: 1rem;
  color: var(--navy-muted);
}

.cta-contact-line strong {
  color: var(--navy-ink);
  font-weight: 600;
}

.cta-contact-line a {
  color: var(--navy-ink);
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
}

/* Footer (content-driven, 3 real groups, no 4-column template filler) */
.site-footer {
  background: var(--navy);
  color: var(--navy-muted);
  padding: 48px 0 calc(28px + env(safe-area-inset-bottom, 0px));
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.2fr 2fr;
    gap: 48px;
  }
}

.footer-brand img {
  width: 210px;
  height: auto;
}

.footer-brand p {
  margin-top: 14px;
  font-size: 0.9375rem;
  max-width: 36ch;
  color: var(--navy-muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 560px) {
  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-cols h3 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy-ink);
  margin-bottom: 10px;
}

.footer-cols ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--navy-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-cols a:hover {
  color: var(--navy-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--navy-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.875rem;
}

/* Reduced motion (R-39) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
