/* omerbeyoglu.com.tr, single page. Colours come from the Omerbeyoglu Unlu brand palette. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-warm: #faf9f7;
  --card: #f7f6f4;
  --line: #e3ded6;
  --line-soft: #ebe9e5;

  --ink: #1a1a1a;
  --ink-strong: #2c2c2c;
  --muted: #545454;
  --muted-soft: #767676;

  --accent: #8b7355;
  --accent-soft: #b8956a;
  --accent-ink: #6f5b42;

  --radius: 14px;
  --radius-sm: 8px;
  --measure: 68ch;
  --shell: 1040px;

  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --step-2: clamp(1.25rem, 1.15rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.5rem, 1.25rem + 1.5vw, 2.6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --bg-warm: #1b1a17;
    --card: #201e1a;
    --line: #35312b;
    --line-soft: #2b2824;

    --ink: #ece9e4;
    --ink-strong: #f6f4f1;
    --muted: #b6afa5;
    --muted-soft: #979086;

    --accent: #c9a87c;
    --accent-soft: #b8956a;
    --accent-ink: #d9bd95;
  }
}

*, *::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: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink-strong); font-weight: 600; line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: var(--step-3); letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1rem; max-width: var(--measure); }
ul { margin: 0 0 1rem; padding-left: 1.1rem; }
li { margin-bottom: 0.35rem; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 50;
}
.skip-link:focus { left: 0; color: #fff; }

.shell { width: min(100% - 2rem, var(--shell)); margin-inline: auto; }
.section { padding: 3rem 0; border-top: 1px solid var(--line-soft); }
section[id] { scroll-margin-top: 96px; }
.section:first-of-type { border-top: 0; }
.section__label {
  display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__inner { display: flex; align-items: center; gap: 1rem; min-height: 56px; }
.brand { font-weight: 600; letter-spacing: 0.02em; color: var(--ink-strong); text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 1rem; margin-left: auto; align-items: center; flex-wrap: wrap; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink-strong); }
.nav a[aria-current="true"] { color: var(--ink-strong); border-bottom-color: var(--accent); }
.nav__linkedin { display: inline-flex; align-items: center; }
.nav__linkedin svg { display: none; width: 18px; height: 18px; }
/* On narrow screens the section links are not hidden. The row scrolls sideways instead. */
@media (max-width: 720px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; gap: 1.1rem; }
  .nav a { white-space: nowrap; }
  .nav__linkedin svg { display: block; }
  .nav__linkedin span { display: none; }
  /* The transparent underline the text links carry would push the mark up by a
     pixel. Without it the icon sits on the same centre line as the words. */
  .nav a.nav__linkedin { border-bottom: 0; }
}

/* Hero */
.hero { padding: 3rem 0 2.5rem; }
.hero__grid { display: grid; grid-template-columns: 132px 1fr; gap: 1.75rem; align-items: start; }
.hero__grid > img { margin-top: 0.4rem; }
@media (max-width: 640px) { .hero__grid { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.hero__photo {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
}
.hero h1 { letter-spacing: 0.01em; }
.hero h1 .accent { color: var(--accent); }
.hero__name { font-size: var(--step-1); color: var(--ink-strong); font-weight: 600; margin: 0.1rem 0 0.1rem; }
.hero__role { color: var(--muted); font-weight: 400; margin: 0; }
.hero__role + .hero__meta { margin-top: 0.45rem; }
.hero__role b { color: var(--accent-ink); font-weight: 600; }
.hero__meta { color: var(--muted-soft); font-size: 0.9rem; display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (max-width: 640px) { .actions { justify-content: center; } }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1rem; font: inherit; font-size: 0.9rem; font-weight: 500;
  background: var(--bg-warm); color: var(--ink-strong); text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--card); border-color: var(--accent-soft); color: var(--ink-strong); transform: translateY(-1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Card grids */
.grid { display: grid; gap: 1rem; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  background: var(--bg-warm); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.25rem 1.35rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--muted); margin-bottom: 0.75rem; }
.card ul { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; }
.card__icon { color: var(--accent); margin-bottom: 0.6rem; display: block; }
.card__icon svg { width: 22px; height: 22px; }
.card--compact { padding: 1.1rem 1.2rem; }
.card--compact h3 { font-size: 0.98rem; }
.card--compact p { margin-bottom: 0; font-size: 0.88rem; }

#about p { max-width: none; text-align: justify; hyphens: auto; }

/* Inline terms with an explanation on hover */
.term {
  position: relative; border-bottom: 1px dotted var(--accent-soft); cursor: help;
  color: var(--ink-strong); font-weight: 500;
}
/* The bubble is laid out only while it is open. A hidden one that still takes
   space pushes the page sideways on narrow screens. */
.term::after, .term::before { display: none; pointer-events: none; }

.term:hover::after, .term:focus::after {
  content: attr(data-tip); display: block;
  position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 0;
  z-index: 20; width: max-content; max-width: min(260px, calc(100vw - 2.5rem));
  background: var(--ink-strong); color: var(--bg);
  border-radius: var(--radius-sm); padding: 0.5rem 0.7rem;
  font-size: 0.8rem; font-weight: 400; line-height: 1.45; text-align: left; hyphens: none;
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
}
.term:hover::before, .term:focus::before {
  content: ''; display: block;
  position: absolute; bottom: calc(100% + 5px); left: 50%; translate: -50% 0;
  z-index: 21; border: 5px solid transparent; border-top-color: var(--ink-strong);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Calendar dialog */
dialog {
  width: min(100% - 1.5rem, 900px); max-height: 88vh; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
dialog::backdrop { background: rgb(0 0 0 / 55%); backdrop-filter: blur(2px); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.dialog__head h2 { font-size: 1rem; margin: 0; }
.dialog__close { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0.2rem 0.4rem; }
.dialog__body { padding: 0; }
.dialog__body iframe { display: block; width: 100%; height: min(70vh, 560px); border: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line-soft); padding: 1.05rem 0 1.15rem; color: var(--muted-soft); font-size: 0.8rem; }
.footer p { max-width: none; margin: 0; }
.footer strong { font-weight: 600; color: var(--muted); }
.footer .sep { margin: 0 0.5rem; color: var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; }
.footer__copy { white-space: nowrap; }
.footer a { color: var(--accent-ink); }

/* Narrow screens: everything is centred */
@media (max-width: 640px) {
  .hero__meta { justify-content: center; }
  .section { text-align: center; }
  #about p { text-align: center; hyphens: none; }
  .card { text-align: center; }
  .footer { text-align: center; }
  .footer__inner { justify-content: center; }
}
