/* ==========================================================================
   Sedat Gül, MD — personal academic site
   Design tokens extracted from the approved v3 design (authored in oklch).
   sRGB hex fallbacks are provided for older browsers via @supports.
   ========================================================================== */

:root {
  /* Fallback palette (sRGB approximations) */
  --bg: #fdfaf4;
  --ink: #2b221c;
  --ink-body: #362b26;
  --ink-32: #3b302b;
  --ink-34: #403530;
  --ink-36: #453b35;
  --ink-38: #4b403a;
  --ink-40: #50453f;
  --ink-42: #564a44;
  --muted-50: #6d6059;
  --muted: #7c6e67;
  /* Design values L=0.58 / L=0.60 nudged to L=0.555 so small muted text
     (years, addresses, footer) meets WCAG AA 4.5:1 on the cream background. */
  --muted-58: #7d7069;
  --muted-60: #7d7069;
  --accent: #a92321;
  --accent-hover: #940000;
  --accent-soft: #bd423a;
  --accent-label: #ac312c;
  --accent-venue: #a04038;
  --line: #e4ddd4;
  --line-2: #eae3dc;
  --line-3: #ece7e1;
  --callout-bg: #f8eee4;
  --selection: #f6cfb0;
  --stripe-a: #f2e5db;
  --stripe-b: #f9f0e9;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', Helvetica, Arial, sans-serif;
}

@supports (color: oklch(0.5 0.1 30)) {
  :root {
    --bg: oklch(0.985 0.008 80);
    --ink: oklch(0.26 0.018 50);
    --ink-body: oklch(0.3 0.018 50);
    --ink-32: oklch(0.32 0.018 50);
    --ink-34: oklch(0.34 0.018 50);
    --ink-36: oklch(0.36 0.018 50);
    --ink-38: oklch(0.38 0.018 50);
    --ink-40: oklch(0.4 0.018 50);
    --ink-42: oklch(0.42 0.018 50);
    --muted-50: oklch(0.5 0.02 50);
    --muted: oklch(0.55 0.02 50);
    --muted-58: oklch(0.555 0.02 50);
    --muted-60: oklch(0.555 0.02 50);
    --accent: oklch(0.48 0.17 27);
    --accent-hover: oklch(0.4 0.19 25);
    --accent-soft: oklch(0.55 0.16 27);
    --accent-label: oklch(0.5 0.16 27);
    --accent-venue: oklch(0.5 0.13 27);
    --line: oklch(0.9 0.014 70);
    --line-2: oklch(0.92 0.012 70);
    --line-3: oklch(0.93 0.01 70);
    --callout-bg: oklch(0.955 0.018 70);
    --selection: oklch(0.88 0.06 60);
    --stripe-a: oklch(0.93 0.02 60);
    --stripe-b: oklch(0.96 0.014 60);
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; text-wrap: pretty; }
h1, h2 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--selection); }

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

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  color: #fff;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 40px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.wordmark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 30px;
}

.nav-link {
  display: inline-block;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-34);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent-hover); text-decoration: none; }
.nav-link[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Layout ---------- */

.layout {
  padding-top: 56px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

/* ---------- Sidebar / profile ---------- */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 132px;
  text-align: center;
}

.headshot-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background-image: repeating-linear-gradient(135deg, var(--stripe-a) 0 8px, var(--stripe-b) 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.monogram {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* For the real photo, once available */
.headshot {
  width: 220px;
  height: 220px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.profile-id {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-name {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.profile-title { font-size: 16.5px; color: var(--muted); }
.profile-affil a { font-size: 16.5px; line-height: 1.4; }
.profile-sub { font-size: 14.5px; color: var(--muted-58); margin-top: 2px; }

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  width: 100%;
  font-size: 15px;
}

.profile-address {
  font-size: 14px;
  color: var(--muted-58);
  line-height: 1.5;
}

/* ---------- Content column ---------- */

.content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 4px;
}

.panel:focus { outline: none; }

/* Vertical stacks (design uses flex-column gaps throughout) */
.stack-8  { display: flex; flex-direction: column; gap: 8px; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-14 { display: flex; flex-direction: column; gap: 14px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-20 { display: flex; flex-direction: column; gap: 20px; }
.stack-26 { display: flex; flex-direction: column; gap: 26px; }
.stack-30 { display: flex; flex-direction: column; gap: 30px; }
.stack-34 { display: flex; flex-direction: column; gap: 34px; }
.stack-40 { display: flex; flex-direction: column; gap: 40px; }

.page-title {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lede {
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-body);
}

.measure-70 { max-width: 70ch; }

.eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-label);
}

.eyebrow-sm {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-label);
}

/* Placeholder blocks (bio / research statement / clinical description) */
.placeholder-note {
  border: 1px dashed var(--line);
  padding: 20px 24px;
  max-width: 70ch;
}
.placeholder-note p {
  font-size: 17.5px;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Home ---------- */

.home-cols {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
}

.col-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.interest-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.interest-list li {
  display: flex;
  gap: 11px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-32);
}
.interest-list .dash { color: var(--accent-soft); }

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.edu-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edu-what { font-size: 17px; line-height: 1.4; color: var(--ink-body); }
.edu-years { color: var(--muted-50); }
.edu-where { font-size: 15px; color: var(--muted-58); }

/* ---------- Research ---------- */

.research-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.card-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-36);
}

/* ---------- Publications ---------- */

.pub-selected {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-selected li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.pub-selected .pub-year {
  font-size: 15px;
  color: var(--muted-58);
  padding-top: 3px;
}
.pub-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pub-title {
  font-family: var(--serif);
  font-size: 19.5px;
  line-height: 1.45;
  color: var(--ink);
}
.pub-authors {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted-50);
}
.pub-venue {
  font-size: 15px;
  font-style: italic;
  color: var(--accent-venue);
}

.pub-other {
  display: flex;
  flex-direction: column;
}
.pub-other li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-3);
  font-size: 17px;
  line-height: 1.55;
}
.pub-other .pub-year { font-size: 15px; color: var(--muted-60); }
.pub-line { color: var(--ink-body); }
.pub-venue-inline { font-style: italic; color: var(--muted); }

.pub-note { max-width: 70ch; }
.pub-note p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-40);
}
.scholar-link { font-size: 16px; font-weight: 600; }

/* ---------- Clinical ---------- */

.clinical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.clinical-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.card-title-sm {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}
.card-body-sm {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-42);
}

.callout {
  padding: 22px 26px;
  background: var(--callout-bg);
  border-left: 3px solid var(--accent-soft);
  max-width: 74ch;
}
.callout p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-34);
}

/* ---------- Education & training ---------- */

.timeline {
  display: flex;
  flex-direction: column;
}
.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.timeline li:first-child { padding-top: 0; }
.tl-years {
  font-size: 15px;
  color: var(--muted-58);
  padding-top: 5px;
}
.timeline li:first-child .tl-years { padding-top: 5px; }
.tl-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tl-what {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}
.tl-where { font-size: 16.5px; color: var(--muted-50); }

.award-list {
  display: flex;
  flex-direction: column;
}
.award-list li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 22px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-3);
  font-size: 17px;
  line-height: 1.5;
}
.award-year { font-size: 15px; color: var(--muted-60); }
.award-name { color: var(--ink-body); }

.trials-note { max-width: 70ch; }
.trials-note p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-38);
}

/* ---------- Contact ---------- */

.contact-wrap { max-width: 66ch; }

.contact-blocks {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.contact-address {
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-32);
}
.contact-link { font-size: 17.5px; }

/* ---------- Footer ---------- */

.site-foot {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted-60);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .container { padding-inline: 28px; }

  .layout {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 72px;
  }

  .profile {
    position: static;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }

  .page-title { font-size: 42px; }
}

@media (max-width: 700px) {
  .container { padding-inline: 20px; }

  .layout {
    padding-top: 32px;
    padding-bottom: 64px;
    gap: 40px;
  }

  .header-inner {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav { gap: 2px 22px; }
  .nav-link { font-size: 15.5px; padding: 5px 0; }

  .page-title { font-size: 36px; }
  .lede { font-size: 18px; }

  .home-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .clinical-grid { grid-template-columns: 1fr; }

  .pub-selected li,
  .pub-other li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }

  .timeline li,
  .award-list li {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .headshot-placeholder,
  .headshot { width: 190px; height: 190px; }
  .monogram { font-size: 56px; }
}

/* ---------- Print ---------- */

@media print {
  .site-header { position: static; }
  .panel[hidden] { display: block !important; }
  .content { gap: 32px; }
  .skip-link { display: none; }
}
