/* sakgun.com — Selahaddin Akgün
   Type: Newsreader (editorial serif) + IBM Plex Mono (labels, data)
   Ink: warm graphite. Accent: copper. */

:root {
  --bg:        oklch(0.985 0.005 75);
  --bg-sunk:   oklch(0.962 0.008 75);
  --fg:        oklch(0.245 0.012 60);
  --fg-muted:  oklch(0.505 0.012 60);
  --fg-faint:  oklch(0.645 0.010 60);
  --rule:      oklch(0.885 0.008 70);
  --rule-soft: oklch(0.928 0.006 70);
  --accent:    oklch(0.555 0.115 52);
  --accent-ink:oklch(0.985 0.005 75);
  --shadow:    0 1px 2px oklch(0.245 0.012 60 / 0.05), 0 12px 32px oklch(0.245 0.012 60 / 0.06);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 62ch;
  --max: 1120px;
}

html[data-theme="dark"] {
  --bg:        oklch(0.175 0.010 70);
  --bg-sunk:   oklch(0.215 0.010 70);
  --fg:        oklch(0.935 0.008 78);
  --fg-muted:  oklch(0.715 0.010 78);
  --fg-faint:  oklch(0.580 0.010 78);
  --rule:      oklch(0.310 0.010 70);
  --rule-soft: oklch(0.255 0.010 70);
  --accent:    oklch(0.735 0.110 62);
  --accent-ink:oklch(0.175 0.010 70);
  --shadow:    0 1px 2px oklch(0 0 0 / 0.3), 0 14px 36px oklch(0 0 0 / 0.35);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 380;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

h1, h2, h3, h4 { font-weight: 400; line-height: 1.14; margin: 0; letter-spacing: -0.012em; }

a { color: var(--fg); text-decoration: none; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

/* ---------- primitives ---------- */

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 450;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.measure { max-width: var(--measure); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

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

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.masthead__in {
  max-width: var(--max); margin-inline: auto; padding: 0.85rem var(--pad);
  display: flex; align-items: center; gap: 1.5rem;
}
.wordmark {
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em;
  display: flex; align-items: baseline; gap: 0.5rem; margin-right: auto;
}
.wordmark b { font-weight: 500; }
.wordmark span { color: var(--fg-faint); }

.nav { display: flex; gap: 1.4rem; min-width: 0; overflow: hidden; }
.nav a {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--fg-muted); padding-block: 0.25rem;
}
.nav a:hover { color: var(--accent); }
@media (max-width: 1120px) { .nav { gap: 1rem; } }
@media (max-width: 1040px) { .nav { display: none; } }

.controls { display: flex; align-items: center; gap: 0.5rem; }

.seg {
  display: flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden;
}
.seg button {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-muted); padding: 0.4rem 0.65rem; transition: background-color .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--accent); }

.icon-btn {
  appearance: none; cursor: pointer;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--fg-muted);
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 15px; height: 15px; }
html[data-theme="dark"] .icon-sun { display: none; }
html:not([data-theme="dark"]) .icon-moon { display: none; }

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

.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 15.5rem; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 4.6rem);
  margin: 0.9rem 0 0;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero__role {
  font-size: clamp(1.125rem, 2.3vw, 1.45rem);
  line-height: 1.35; color: var(--fg-muted); margin: 1.15rem 0 0; max-width: 34ch;
}
.hero__lede { margin-top: 1.8rem; max-width: 56ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.1rem; }

.btn {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.72rem 1.15rem; border: 1px solid var(--fg); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--rule); color: var(--fg-muted); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* portrait slot */
.portrait {
  aspect-ratio: 4 / 5; width: 100%; border: 1px solid var(--rule); border-radius: 3px;
  overflow: hidden; position: relative; background: var(--bg-sunk);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait__ph {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, var(--rule-soft) 0 1px, transparent 1px 9px);
  display: grid; place-items: center; text-align: center; padding: 1rem;
}
.portrait__ph span { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }
.portrait__cap { font-family: var(--mono); font-size: 0.6875rem; color: var(--fg-faint); margin-top: 0.6rem; letter-spacing: 0.04em; }
@media (max-width: 860px) { .portrait { max-width: 13rem; } }

/* ---------- stats ---------- */

.stats { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat { padding: clamp(1.4rem, 3vw, 2.2rem) 0; }
.stat + .stat { border-left: 1px solid var(--rule-soft); padding-left: clamp(1rem, 2.5vw, 2rem); }
.stat__n { font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; }
.stat__n sup { font-size: 0.42em; vertical-align: super; color: var(--accent); }
.stat__t { margin-top: 0.55rem; display: block; }
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
}

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

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { border-top: 1px solid var(--rule-soft); }

.section__head {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline; margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
.section__head p { color: var(--fg-muted); margin: 0.7rem 0 0; max-width: 52ch; }
@media (max-width: 640px) { .section__head { grid-template-columns: 1fr; gap: 0.5rem; } }

.body-grid {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
}
@media (max-width: 640px) { .body-grid { grid-template-columns: 1fr; } }

/* about */
.about__cols { columns: 2; column-gap: clamp(1.75rem, 4vw, 3rem); }
@media (max-width: 760px) { .about__cols { columns: 1; } }
.about__facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.about__facts li { display: flex; gap: 0.85rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--fg-muted); }
.about__facts b { font-weight: 450; color: var(--fg-faint); min-width: 6.5rem; }

/* ---------- leadership ---------- */

.lead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule); }
.lead-cell { background: var(--bg); padding: clamp(1.35rem, 2.6vw, 2rem); }
.lead-cell .label { display: block; margin-bottom: 1.1rem; color: var(--accent); }
.lead-cell h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.lead-cell p { color: var(--fg-muted); font-size: 0.9375rem; margin: 0; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.role {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.65rem 0; border-top: 1px solid var(--rule-soft); position: relative;
}
.role:first-child { border-top: 1px solid var(--rule); }
.role--now .role__co::after {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
  display: inline-block; margin-left: 0.5rem; vertical-align: 0.15em;
}
.role__when { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--fg-faint); padding-top: 0.35rem; }
.role__co { font-size: 1.3rem; }
.role__title { color: var(--fg-muted); margin-top: 0.2rem; font-size: 1rem; }
.role__body { margin-top: 0.85rem; color: var(--fg-muted); max-width: 62ch; }
.role__body ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; }
.role__body li::marker { color: var(--accent); }
@media (max-width: 640px) { .role { grid-template-columns: 1fr; gap: 0.35rem; } .role__when { padding-top: 0; } }

/* ---------- projects ---------- */

.projects { display: grid; gap: 1px; background: var(--rule-soft); border-block: 1px solid var(--rule); }
.project {
  background: var(--bg); padding: clamp(1.5rem, 3.5vw, 2.4rem) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
  transition: background-color .25s;
}
.project:hover { background: var(--bg-sunk); }
.project__head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.project__head h3 { font-size: 1.5rem; }
.project__flag {
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 0.2rem 0.5rem; border-radius: 3px;
}
.project__body { color: var(--fg-muted); margin-top: 0.8rem; max-width: 60ch; }
.project__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.project__meta li { font-family: var(--mono); font-size: 0.75rem; color: var(--fg-faint); }
.project__links { display: flex; gap: 1rem; margin-top: 1.1rem; }
.project__links a { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--accent); text-decoration: underline; }
@media (max-width: 760px) { .project { grid-template-columns: 1fr; gap: 1.1rem; } }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.tag {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.03em;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.22rem 0.6rem; color: var(--fg-muted);
}

/* ---------- stack ---------- */

.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule); }
.stack__group { background: var(--bg); padding: clamp(1.25rem, 2.5vw, 1.85rem); }
.stack__group h3 { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.stack__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.stack__group li { font-size: 0.9375rem; color: var(--fg-muted); }
@media (max-width: 860px) { .stack { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */

.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.contact__list { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0; }
.contact__list li { border-top: 1px solid var(--rule-soft); padding: 0.85rem 0; display: flex; justify-content: space-between; gap: 1rem; }
.contact__list li:last-child { border-bottom: 1px solid var(--rule-soft); }
.contact__list a, .contact__list span:last-child { font-family: var(--mono); font-size: 0.8125rem; }

form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }
.field input, .field textarea {
  font-family: var(--serif); font-size: 1rem; color: var(--fg);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0; transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 6.5rem; }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--accent); }
form button[type="submit"] { justify-self: start; cursor: pointer; }
.form-note { font-family: var(--mono); font-size: 0.6875rem; color: var(--fg-faint); line-height: 1.6; }
.form-status { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); min-height: 1.2em; }

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

.footer { border-top: 1px solid var(--rule); padding-block: 2.5rem 3.5rem; }
.footer__in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline; justify-content: space-between; }
.footer a { color: var(--fg-muted); }
.footer a:hover { color: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- print (CV) ---------- */
@media print {
  :root { --bg: #fff; --fg: #16150f; --fg-muted: #3a382e; --fg-faint: #6b685c; --rule: #d5d2c8; --rule-soft: #e5e3db; --accent: #8a4b1f; }
  html[data-theme="dark"] { color-scheme: light; }
  .masthead, .hero__actions, .portrait, form, .form-note, #contact .contact__grid > div:last-child { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding-block: 1.4rem; break-inside: avoid-page; }
  body { font-size: 10.5pt; }
  a { color: inherit; }
}
