/* =============================================================
   Sythong Run — portfolio
   1. Variables   2. Left-panel   3. Nav    4. Layout   
   5. Components  6. Sections     7. Responsive
   ============================================================= */

/* 1. Variables ---------------------------------------------------- */
:root {
    --ink: #14161a;
    --ink-medium: #2f3135; 
    --ink-soft: #5b6169;
    --light-gray: #d3d5d7;
    --line: #e2e6ea;
    --paper: #e1ecf3;
    --surface: #ffffff;
    --accent: #12a294;
    --button: #137261;
  
    --font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
    --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  
    --rail-w: 20rem;
    --gap: 1.75rem;
    --radius: 14px;
    --shadow: 0 1px 2px rgb(20 22 26 / .05), 0 12px 32px -18px rgb(20 22 26 / .25);
  }
  
  /* 2. Left-panel ------------------------------------------------------ */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
  }
  
  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.015em;
    margin: 0;
  }
  
  p {
    margin: 0 0 1rem;
    max-width: 68ch;
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
    background: var(--line);
    /* keeps the layout intact while images are missing */
  }
  
  a {
    color: inherit;
    text-underline-offset: .18em;
  }


  a:hover {
    color: var(--accent);
  }
  
  ul,
  ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  button,
  input,
  textarea {
    font: inherit;
    color: inherit;
  }
  
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* 3. Nav ------------------------------------------------*/
  /* Nav — across the top, stick while scroll */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 2rem 1rem 1rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  
  .topbar ul {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
  }
  
  .topbar a {
    display: block;
    padding: .45rem .8rem;
    border-radius: 999px;
    font-size: .92rem;
    text-decoration: none;
    font-weight: bold;
  }
  
  .topbar a:hover {
    background: var(--paper);
  }
  
  /* so an anchor jump doesn't park the heading under the sticky bar */
  .main section {
    scroll-margin-top: 6rem;
  }
  
  /* --- Current section, A: follows the link you clicked -----------
     :target marks the section the
     URL points at; :has() reaches back up to style its nav link. */
  @supports not (timeline-scope: --s) {
  
    html:not(#home:target) .topbar [href="#home"],
    html:has(#about:target) .topbar [href="#about"],
    html:has(#philosophy:target) .topbar [href="#philosophy"],
    html:has(#experience:target) .topbar [href="#experience"],
    html:has(#other:target) .topbar [href="#other"] {
      background: var(--ink);
      color: var(--surface);
    }
  }

  /* 4. Layout ---------------------------------------------------- */
  .rail {
    position: fixed;
    inset: var(--gap) auto var(--gap) var(--gap);
    width: var(--rail-w);
    overflow-y: auto;
    padding: 2.25rem 1.75rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
  }
  
  .main {
    margin-left: calc(var(--rail-w) + var(--gap) * 2);
    padding: var(--gap) var(--gap) var(--gap) 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    max-width: 68rem;
  }
  
  .card {
    padding: 2.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  
  /* 5. Components ------------------------------------------------ */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--ink-soft);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
  }
  
  .btn:hover {
    color: #fff;
    background: var(--button);
  }
  
  .sec-head {
    margin-bottom: 2rem;
  }
  
  .sec-head h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    margin-bottom: .5rem;
  }
  
  .sec-head p {
    margin: 0;
    color: var(--ink-soft);
  }
  
  .sub {
    font-size: 1.05rem;
    margin: 2.5rem 0 1.25rem;
  }
  
  /* 6. Sections -------------------------------------------------- */
  
  /* Profile rail */
  .avatar {
    width: 9.5rem;
    height: 9.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .rail h1 {
    font-size: 1.5rem;
  }
  
  .role {
    margin: .35rem 0 1.5rem;
    color: var(--ink-soft);
  }
  
  .rail-title {
    font-size: 1rem;
    margin-bottom: .6rem;
  }
  
  .rail-note {
    margin-bottom: 1.75rem;
    color: var(--ink-soft);
    font-size: .92rem;
  }
  
  .social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin-bottom: 2rem;
  }
  
  .social a {
    display: block;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: var(--light-gray);
    font-size: .8rem;
    text-decoration: none;
  }
  
  .social a:hover {
    background: var(--button);
    color: #fff;
  }
  
  /* Hero */
  .hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 2rem;
    padding-block: 3rem;
  }
  
  .hero h2 {
    font-size: clamp(1.9rem, 4vw, 2rem);
    margin-bottom: 1.75rem;
    text-wrap: balance;
  }
  
  .hero img {
    border-radius: var(--radius);
  }

  
  /* Teaching experiences */
  .timeline {
    padding-left: 1.75rem;
    border-left: 1px solid var(--line);
  }
  
  .timeline li {
    position: relative;
    padding-bottom: 2rem;
  }
  
  .timeline li:last-child {
    padding-bottom: 0;
  }
  
  /*timeline line + bullet point*/
  .timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.75rem - 5px);
    top: .45rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
  }
  
  .timeline h3 {
    font-size: 1.1rem;
  }
  
  .when {
    margin: .25rem 0 .6rem;
    color: var(--ink-medium);
    font-size: .88rem;
  }
  
  .timeline p:last-child {
    margin: 0;
    color: var(--ink-medium);
  }
  
  
  /* Footer */
  .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--ink-soft);
    font-size: .9rem;
  }
  
  .site-footer p {
    margin: 0;
  }
  
  /* 7. Responsive ------------------------------------------------ */
  @media (max-width: 68rem) {
    .rail {
      position: static;
      inset: auto;
      width: auto;
      margin: var(--gap) var(--gap) 0;
    }
  
    .main {
      margin-left: 0;
      padding: var(--gap);
      max-width: none;
    }
  
    .hero {
      grid-template-columns: 1fr;
    }
  
    .hero img {
      order: -1;
      max-width: 16rem;
    }
  }
  
  @media (max-width: 48rem) {
    .card {
      padding: 1.75rem;
    }
  
    .topbar {
      border-radius: var(--radius);
    }
  
    .details {
      grid-template-columns: 1fr;
      gap: 0;
    }
  
    .details dt {
      padding-bottom: 0;
    }
  
    .contact-form,
    .post {
      grid-template-columns: 1fr;
    }
  
    .post img {
      grid-row: auto;
      max-height: 12rem;
    }
  }

  