/* ==========================================================================
   ODTÜ Parlar Vakfı · Kariyer — main.css
   Character: an institutional job notice. Foundation navy, a single METU
   red for emphasis, a serif for headings, numbered sections and a sticky
   summary beside the posting.
   ========================================================================== */

/* ---------------------------------- Tokens ------------------------------- */
:root {
  /* Color */
  --canvas:      #f5f7fa;
  --surface:     #ffffff;
  --ink:         #0f1c2b;
  --ink-mute:    #4d5b6b;
  --accent:      #004a7c;
  --accent-ink:  #ffffff;
  --accent-deep: #00304f;
  --signal:      #c8102e;
  --hairline:    #dde3ea;
  --success:     #15803d;
  --error:       #b91c1c;
  --focus:       #1d6fb8;

  /* Type */
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --size-body:    17px;

  /* Space */
  --space-xs:   8px;
  --space-sm:   12px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   32px;
  --space-xxl:  48px;
  --space-huge: 80px;

  /* Shape */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-pill: 999px;

  /* Layout */
  --column: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

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

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

/* ------------------------------- Typography ------------------------------ */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.display--xl { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.1; }
.display--lg { font-size: clamp(26px, 3vw, 34px);   line-height: 1.2; }
.display--md { font-size: 22px; line-height: 1.3; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}

.lead {
  max-width: 60ch;
  font-size: 19px;
  line-height: 1.6;
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------- Button -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn--block { width: 100%; }
.btn--light { background: var(--surface); border-color: var(--surface); color: var(--accent); }
.btn--light:hover { background: #e8eef5; border-color: #e8eef5; }

/* ---------------------------------- Nav ---------------------------------- */
.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  max-width: var(--column);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
}
.nav__logo { height: 44px; width: auto; }
.nav__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
}

/* --------------------------------- Bands --------------------------------- */
.band {
  padding: var(--space-huge) var(--space-lg);
}
.band__inner {
  max-width: var(--column);
  margin: 0 auto;
}

/* ---------------------------------- Hero --------------------------------- */
.hero {
  background: var(--accent-deep);
  background-image: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
  color: var(--accent-ink);
}
.hero .display, .hero .lead { color: var(--accent-ink); }
.hero .eyebrow { color: #ffb3bf; }
.hero .lead { opacity: 0.9; }
.hero__inner > * + * { margin-top: var(--space-lg); }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.fact {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
}

/* -------------------------------- Posting -------------------------------- */
.posting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-xxl);
  align-items: start;
}

.sections { counter-reset: section; }

.section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--hairline);
  counter-increment: section;
}
.section:first-child { border-top: 0; padding-top: 0; }
.section > * + * { margin-top: var(--space-md); }

.section__title::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--signal);
}

.checklist > li {
  position: relative;
  padding-left: 30px;
}
.checklist > li + li { margin-top: var(--space-sm); }
.checklist > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 2px;
  background: var(--accent);
}

/* Sticky summary */
.summary {
  position: sticky;
  top: var(--space-lg);
  padding: var(--space-xl);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.summary > * + * { margin-top: var(--space-lg); }

.summary__list > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
.summary__list dt { color: var(--ink-mute); }
.summary__list dd { font-weight: 600; text-align: right; }

/* ---------------------------------- Form --------------------------------- */
.apply {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

.form-card {
  max-width: 760px;
  margin: 0 auto;
}
.form-card > * + * { margin-top: var(--space-lg); }
.form-card__intro { color: var(--ink-mute); }

.form > * + * { margin-top: var(--space-lg); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.field > * + * { margin-top: 6px; }

.label {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.label abbr { color: var(--signal); text-decoration: none; }

.hint { font-size: 14px; color: var(--ink-mute); }

.input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c8d1dc;
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.18);
}
textarea.input { min-height: 180px; resize: vertical; }

.field--invalid .input,
.field--invalid .upload { border-color: var(--error); }
.field__error { font-size: 14px; font-weight: 600; color: var(--error); }
.field__error[hidden] { display: none; }

.upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 1px dashed #9fb0c2;
  border-radius: var(--radius-sm);
  background: var(--canvas);
}
.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
}
.upload__icon svg { width: 20px; height: 20px; }
.upload__name { font-weight: 700; }

.consent {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  font-size: 15px;
}
.consent input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* -------------------------------- Status --------------------------------- */
.status {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xxl);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
}
.status > * + * { margin-top: var(--space-lg); }
.status__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 50%;
  background: #e7f5ec;
  color: var(--success);
}
.status__mark svg { width: 30px; height: 30px; }
.status p { color: var(--ink-mute); }

/* -------------------------------- Footer --------------------------------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--column);
  margin: 0 auto;
  padding: var(--space-lg);
  font-size: 14px;
  color: var(--ink-mute);
}

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 960px) {
  .posting { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 640px) {
  :root { --space-huge: 56px; }
  .band { padding-left: var(--space-md); padding-right: var(--space-md); }
  .field-row { grid-template-columns: 1fr; }
  .nav__logo { height: 36px; }
  .nav__label { display: none; }
  .status { padding: var(--space-lg); }
}

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