/* ai.metu.edu.tr — METU AI and Data Science
   Single stylesheet, no external dependencies. */

:root {
  --metu-red: #9e1b32;
  --metu-red-dark: #7d1527;
  --metu-red-light: #c33a52;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-elevated: #ffffff;
  --text: #16181d;
  --text-muted: #565d69;
  --text-faint: #7c828d;
  --border: #e2e5ea;
  --border-strong: #ccd1d9;
  --accent: var(--metu-red);
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 8px 24px rgba(16, 18, 24, .06);

  --max: 1120px;
  --radius: 10px;
  --radius-lg: 16px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-soft: #14171d;
    --bg-elevated: #171b22;
    --text: #eceef2;
    --text-muted: #a4abb7;
    --text-faint: #7f8794;
    --border: #262b34;
    --border-strong: #333a45;
    --accent: #e8657f;
    --accent-contrast: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #14171d;
  --bg-elevated: #171b22;
  --text: #eceef2;
  --text-muted: #a4abb7;
  --text-faint: #7f8794;
  --border: #262b34;
  --border-strong: #333a45;
  --accent: #e8657f;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-elevated: #ffffff;
  --text: #16181d;
  --text-muted: #565d69;
  --text-faint: #7c828d;
  --border: #e2e5ea;
  --border-strong: #ccd1d9;
  --accent: var(--metu-red);
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 8px 24px rgba(16, 18, 24, .06);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 650;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.16rem; font-weight: 640; }

p { margin: 0 0 1rem; }

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

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

img, svg { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 640;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--metu-red), var(--metu-red-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.01rem; font-weight: 660; }
.brand-text span { font-size: .74rem; color: var(--text-faint); font-weight: 500; letter-spacing: 0; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  font-size: .93rem;
  font-weight: 520;
  padding: 8px 11px;
  border-radius: 7px;
}
.nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
  text-decoration: none;
}

.nav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin-inline: 8px;
}

.lang {
  font-size: .84rem !important;
  font-weight: 620 !important;
  color: var(--accent) !important;
  border: 1px solid var(--border-strong);
}
.lang:hover { border-color: var(--accent); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 10px;
  font-size: .9rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 1rem; }
  .nav-sep { display: none; }
  .lang { text-align: center; margin-top: 6px; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
}

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

.hero {
  position: relative;
  padding: clamp(60px, 9vw, 108px) 0 clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 420px at 12% -10%, color-mix(in srgb, var(--metu-red) 13%, transparent), transparent 65%),
    radial-gradient(620px 360px at 92% 4%, color-mix(in srgb, var(--metu-red) 8%, transparent), transparent 60%);
  pointer-events: none;
}

.hero > .wrap { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .79rem;
  font-weight: 620;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 { max-width: 17ch; margin-bottom: .32em; }

.hero .lede {
  font-size: clamp(1.06rem, 1.9vw, 1.3rem);
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 2rem;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: .96rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--metu-red-dark); }
@media (prefers-color-scheme: dark) {
  .btn-primary:hover { background: var(--metu-red-light); }
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-faint); }

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(38px, 5vw, 56px);
}

.stat { background: var(--bg); padding: 22px 24px; }
.stat b {
  display: block;
  font-size: 1.85rem;
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--text);
}
.stat span { font-size: .87rem; color: var(--text-muted); }

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

section { padding: clamp(56px, 8vw, 92px) 0; scroll-margin-top: 72px; }
section.alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--text-muted); font-size: 1.04rem; margin-bottom: 0; }

.kicker {
  font-size: .78rem;
  font-weight: 660;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--text-muted); font-size: .96rem; margin-bottom: 0; }
.card p + p { margin-top: .8rem; }

.card-lab {
  position: relative;
  padding-top: 30px;
  box-shadow: var(--shadow);
}
.card-lab::before {
  content: "";
  position: absolute;
  top: 0; left: 26px; right: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--metu-red), var(--metu-red-light));
}

.tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.tag-live {
  color: #1a7f4b;
  border-color: color-mix(in srgb, #1a7f4b 40%, transparent);
  background: color-mix(in srgb, #1a7f4b 8%, transparent);
}
.tag-pilot {
  color: #a06b00;
  border-color: color-mix(in srgb, #a06b00 40%, transparent);
  background: color-mix(in srgb, #a06b00 8%, transparent);
}
@media (prefers-color-scheme: dark) {
  .tag-live { color: #57d191; }
  .tag-pilot { color: #e0ac4a; }
}

.icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}
.icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* focus area list */
.areas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.area {
  display: flex;
  gap: 13px;
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.area .dot {
  flex: 0 0 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
}
.area b { display: block; font-weight: 620; font-size: .99rem; margin-bottom: 2px; }
.area span { color: var(--text-muted); font-size: .9rem; }

/* spec table */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  margin-top: 4px;
}
.spec th, .spec td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.spec th {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  width: 38%;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec td { color: var(--text); }
.spec td code, code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.table-scroll {
  overflow-x: auto;
  margin-top: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 10px;
}

/* note / callout */
.note {
  display: flex;
  gap: 13px;
  padding: 16px 19px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .93rem;
  margin-top: 24px;
}
.note b { color: var(--text); font-weight: 620; }

/* contact */
.contact-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 26px;
}
.contact-card dl { margin: 0; }
.contact-card dt {
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 640;
  color: var(--text-faint);
  margin-top: 16px;
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 3px 0 0; font-size: .98rem; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0 48px;
  font-size: .9rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* ---------- people ---------- */

.person .person-role {
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .25rem;
}

.person .person-affil {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: .55rem;
}

.person .person-links {
  font-size: .89rem;
  color: var(--text-faint);
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.lab-lead {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: .9rem;
}

.lab-lead a { font-weight: 560; }

/* ---------- profile page ---------- */

.profile-head {
  padding-top: clamp(38px, 6vw, 68px);
  padding-bottom: clamp(24px, 3vw, 34px);
}

.profile-head h1 {
  max-width: 20ch;
  margin-bottom: .3em;
}

.profile-head .lede {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.crumb {
  font-size: .85rem;
  margin-bottom: .9rem;
}

.crumb a { color: var(--text-faint); }
.crumb a:hover { color: var(--accent); }
