/* sulykhan.com — main stylesheet */

/* ─────────────────────────────────────────
       TOKENS — change these to restyle everything
    ───────────────────────────────────────── */
    :root {
      --bg:           #e8e8e8;   /* page background */
      --text:         #1a1a1a;   /* body text */
      --muted:        #8a8a8a;   /* secondary text, dates, labels */
      --faint:        #bbbbbb;   /* borders, very subtle elements */
      --accent:       #ff3cac;   /* highlight colour e.g. "New" badge */
      --font:         'Geist', -apple-system, sans-serif;
      --terracotta:   #C0614A;   /* brush stroke + link hover + splash screen */
      --size:         14px;
      --line:         1.65;
      --width:        660px;     /* max content width */
    }

    /* ─────────────────────────────────────────
       RESET
    ───────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html {
      font-size: var(--size);
      -webkit-font-smoothing: antialiased;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      font-weight: 400;
      line-height: var(--line);
    }

    a {
      color: inherit;
      text-decoration: underline;
      text-decoration-color: var(--faint);
      text-underline-offset: 2px;
      transition: text-decoration-color 0.15s;
    }

    a:hover { text-decoration-color: var(--terracotta); }

    /* ─────────────────────────────────────────
       LAYOUT HELPERS
    ───────────────────────────────────────── */
    .container {
      max-width: var(--width);
      margin: 0 auto;
      padding: 56px 24px 80px;
    }

    .muted  { color: var(--muted); }
    .faint  { color: var(--faint); }
    .small  { font-size: 13px; }
    .spacer { margin-bottom: 32px; }

    /* ─────────────────────────────────────────
       TYPOGRAPHY
    ───────────────────────────────────────── */
    h1, h2, h3 {
      font-weight: 400;
      line-height: 1.3;
    }

    h1 { font-size: 18px; margin-bottom: 6px; }
    h2 { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
    h3 { font-size: 14px; margin-bottom: 4px; }

    p { margin-bottom: 14px; }
    p:last-child { margin-bottom: 0; }

    hr {
      border: none;
      border-top: 1px solid var(--faint);
      margin: 36px 0;
    }

    /* ─────────────────────────────────────────
       NAV — simple back link, no persistent header
    ───────────────────────────────────────── */
    .back {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 14px;
      color: var(--muted);
      text-decoration: none;
      margin-bottom: 32px;
      transition: color 0.15s;
    }

    .back:hover { color: var(--text); text-decoration: none; }

    /* ─────────────────────────────────────────
       LIST ROW — year | title | date
       Used for writing lists, project lists, etc.
    ───────────────────────────────────────── */
    .row-list { margin-bottom: 8px; }

    /* Dim all rows when any one is hovered — only the focused row stays full opacity */
    .row-list:has(.row:hover) .row .row-mid,
    .row-list:has(.row:hover) .row .row-right { opacity: 0.35; }
    .row-list:has(.row:hover) .row:hover .row-mid,
    .row-list:has(.row:hover) .row:hover .row-right { opacity: 1; }

    /* Transition on base state so ease-out fires on mouse-leave */
    .row .row-mid, .row .row-right, .row .row-left { transition: opacity 0.4s ease; }

    .row {
      display: grid;
      grid-template-columns: 40px 1fr auto;
      gap: 0 8px;
      align-items: baseline;
      padding: 8px 0;
      border-top: 1px solid var(--faint);
      transition: none;
      cursor: pointer;
    }

    .row:last-child:not(.row-view-all) { border-bottom: 1px solid var(--faint); }

    /* Same-year rows: remove the full-width divider, draw it only from the title column */
    .row.row-continuation {
      border-top: none;
      position: relative;
    }

    .row.row-continuation::before {
      content: '';
      position: absolute;
      top: 0;
      left: 48px; /* 40px year column + 8px gap */
      right: 0;
      height: 1px;
      background: var(--faint);
    }

    .row-left  { font-size: 14px; color: var(--muted); }
    .row-mid   { font-size: 14px; color: var(--text); }
    .row-mid a { text-decoration: none; }
    .row-right { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

    /* ─────────────────────────────────────────
       BADGE — "New" pill
    ───────────────────────────────────────── */
    .badge {
      display: inline-flex;
      align-items: center;
      font-size: 11px;
      color: var(--accent);
      border: 1px solid var(--accent);
      border-radius: 20px;
      padding: 0 7px;
      line-height: 18px;
      margin-left: 6px;
      vertical-align: middle;
    }

    /* ─────────────────────────────────────────
       ENTRY — period | title + org + desc
       Used for CV, projects, etc.
    ───────────────────────────────────────── */
    .entry {
      display: grid;
      grid-template-columns: 40px 1fr;
      gap: 0 20px;
      margin-bottom: 24px;
    }

    .entry-period { font-size: 13px; color: var(--muted); padding-top: 2px; }
    .entry-title  { font-size: 14px; margin-bottom: 1px; }
    .entry-org    { font-size: 13px; color: var(--muted); margin-bottom: 5px; }
    .entry-desc   { font-size: 13px; color: var(--muted); line-height: 1.65; }

    /* ─────────────────────────────────────────
       TAGS — skill chips, categories
    ───────────────────────────────────────── */
    .tags { display: flex; flex-wrap: wrap; gap: 6px; }

    .tag {
      font-size: 13px;
      color: var(--muted);
      background: rgba(0,0,0,0.06);
      padding: 3px 9px;
      border-radius: 3px;
    }

    /* ─────────────────────────────────────────
       ARTICLE LAYOUT — sidebar TOC + main content
    ───────────────────────────────────────── */
    .article-layout {
      display: grid;
      grid-template-columns: 200px 1fr 200px;
      min-height: 100vh;
    }

    /* Sidebar */
    .article-sidebar {
      padding: 56px 24px 56px 48px;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    .toc-label {
      font-size: 11px;
      color: var(--faint);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 10px;
    }

    .toc { list-style: none; }

    .toc li {
      padding: 3px 0 3px 10px;
      border-left: 1px solid var(--faint);
    }

    .toc li.active { border-left-color: var(--text); }

    .toc a {
      font-size: 12.5px;
      color: var(--muted);
      text-decoration: none;
      display: block;
      line-height: 1.5;
      transition: color 0.15s;
    }

    .toc li.active a,
    .toc a:hover { color: var(--text); }

    /* Main content */
    .article-main {
      padding: 56px 40px 80px;
      max-width: 520px;
    }

    /* ─────────────────────────────────────────
       FOOTER
    ───────────────────────────────────────── */
    .footer {
      margin-top: 80px;
      padding-top: 20px;
      border-top: 1px solid var(--faint);
      font-size: 13px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* ─────────────────────────────────────────
       RESPONSIVE
    ───────────────────────────────────────── */
    @media (max-width: 840px) {
      .article-layout { grid-template-columns: 1fr; }
      .article-sidebar { display: none; }
      .article-main { padding: 40px 24px 60px; max-width: 100%; }
    }

    @media (max-width: 480px) {
      .row { grid-template-columns: 32px 1fr auto; }
      .entry { grid-template-columns: 1fr; gap: 2px; }
      .entry-period { padding-top: 0; }
    }


    /* ─────────────────────────────────────────
       CURRENTLY — role + employer line
    ───────────────────────────────────────── */
    .currently {
      display: flex;
      gap: 10px;
      align-items: baseline;
      margin-bottom: 32px;
      font-size: 13px;
    }

    .currently-label {
      color: var(--muted);
      min-width: 56px;
      flex-shrink: 0;
    }

    .currently-value {
      color: var(--text);
    }

    /* ─────────────────────────────────────────
       HERO — 50/50 photo + intro split
    ───────────────────────────────────────── */
    .hero {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 32px;
      align-items: stretch;
      margin-bottom: 40px;
    }

    .hero-photo {
      min-height: 100%;
      will-change: transform;
      box-shadow: 0 4px 24px rgba(0,0,0,0.12);
      border-radius: 16px;
      cursor: pointer;
    }


    .hero-photo-inner {
      width: 100%;
      height: 100%;
      border-radius: 16px;
      overflow: hidden;
      pointer-events: none;
      position: relative;
    }

    .hero-photo-inner::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 16px;
      background: radial-gradient(circle 120px at 50% 50%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 40%, transparent 70%);
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
    }

    .hero-photo:hover .hero-photo-inner::after {
      opacity: 1;
    }

    .hero-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 8%;
      display: block;
      transition: filter 0.4s ease;
    }



    .hero-text {
      padding-top: 4px;
    }

    .hero-text p + p {
      margin-top: 14px;
    }

    @media (max-width: 600px) {
      .hero {
        grid-template-columns: 1fr;
        gap: 20px;
      }

      .hero-photo {
        height: 72vw;
        max-height: 320px;
        min-height: unset;
      }

  
    .hero-photo-inner {
      width: 100%;
      height: 100%;
      border-radius: 16px;
      overflow: hidden;
      pointer-events: none;
      position: relative;
    }

    .hero-photo-inner::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 16px;
      background: radial-gradient(circle 120px at 50% 50%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 40%, transparent 70%);
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
    }

    .hero-photo:hover .hero-photo-inner::after {
      opacity: 1;
    }

    .hero-photo img {
        object-position: center 5%;
      }
    }



    /* ── GLARE ── */
    .hero-glare {
      position: absolute;
      inset: 0;
      border-radius: 16px;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.25s ease;
      z-index: 2;
    }

/* ─────────────────────────────────────────
   OUTCOMES PAGE
───────────────────────────────────────── */
.outcomes-header {
  margin-bottom: 56px;
}

.outcomes-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.outcomes-title {
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 18px;
}

.outcomes-desc {
  font-size: 15px;
  color: var(--text);
  max-width: 66%;
  line-height: 1.65;
}

.outcomes-list {
  display: flex;
  flex-direction: column;
  --outcomes-width: 860px;
  max-width: var(--outcomes-width);
}

.outcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
  padding: 44px 0;
  border-top: 1px solid var(--faint);
  align-items: start;
}

.outcomes-list .outcome:last-child {
  border-bottom: 1px solid var(--faint);
}

.outcome-pull {
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.outcome-body {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 14px;
}

.outcome-body strong {
  color: var(--text);
  font-weight: 500;
}

.outcome-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text);
  border: 1px solid var(--muted);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

@media (max-width: 620px) {
  .outcome {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .outcome-pull {
    font-size: 17px;
  }

  .outcomes-title {
    font-size: 24px;
  }

  .outcomes-desc {
    max-width: 100%;
  }
}

/* External links within outcome body */
.outcome-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
  white-space: nowrap;
}

.outcome-body a:hover {
  text-decoration-color: var(--terracotta);
}

/* ─────────────────────────────────────────
   WRITING FEATURED POST
───────────────────────────────────────── */
.writing-featured {
  padding: 0;
}

.writing-featured-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 8px 0 24px;
}

/* Base transition on everything — ensures ease-out on mouse-leave */
.writing-featured-title,
.writing-featured-desc,
.writing-featured-meta {
  transition: opacity 0.4s ease;
}

/* Writing rows: title + date only, no left label column */
.writing-section .row { grid-template-columns: 1fr auto; }

/* Hovering a row dims the featured */
.writing-section:has(.row:hover) .writing-featured-title,
.writing-section:has(.row:hover) .writing-featured-desc,
.writing-section:has(.row:hover) .writing-featured-meta {
  opacity: 0.35;
}

/* Hovering the featured dims the rows */
.writing-section:has(.writing-featured-link:hover) .row .row-mid,
.writing-section:has(.writing-featured-link:hover) .row .row-right {
  opacity: 0.35;
}

.writing-featured-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
}

.writing-featured-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 10px;
  max-width: 520px;
}

.writing-featured-meta {
  font-size: 12px;
  color: var(--muted);
}

/* View all row — muted treatment */
.row.row-view-all .row-mid a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}

.row.row-view-all .row-mid a:hover {
  color: var(--text);
}

/* ─────────────────────────────────────────
   SPLASH SCREEN
───────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: all;
}

#splash-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.splash-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 32px;
  animation: splash-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.splash-initials {
  font-family: var(--font);
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 20px;
  line-height: 1;
}

.splash-tagline {
  font-family: var(--font);
  font-size: clamp(20px, 5vw, 38px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 36px;
  max-width: 520px;
  text-align: center;
}

.splash-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 140px;
}

.splash-loader-track {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.splash-loader-fill {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  width: 0%;
  animation: loader-fill 4.2s linear forwards;
}

.splash-loader-num {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.06em;
}

@keyframes loader-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes splash-lift {
  from { transform: translateY(0); }
  to   { transform: translateY(-110vh); }
}

@keyframes splash-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ─────────────────────────────────────────
   BRUSH STROKE — animated paint highlight
───────────────────────────────────────── */
@keyframes brush-sweep {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 -2% 0 0); }
}
