/* ================================================================== */
/* Option F — Sidebar layout (B) + editorial typography (E)            */
/* Background: #fdfdfc                                                  */
/* ================================================================== */

:root {
  /* Palette ----------------------------------------------------------*/
  --bg: #fdfdfc;
  --surface: #ffffff;
  --text: #111111;
  --text-2: #454545;
  --text-3: #A8A8A4;
  --accent: #6E7C61;
  --rule: rgba(17, 17, 17, 0.07);

  /* Typography -------------------------------------------------------*/
  --font-sans: "Inter Tight", ui-sans-serif, -apple-system,
    BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout -----------------------------------------------------------*/
  --max-w: 1200px;
  --side-w: 360px;
  --pad-x: clamp(20px, 4vw, 48px);

  /* Spacing rhythm ---------------------------------------------------*/
  --space-section: clamp(80px, 10vw, 128px);
  --space-paragraph: 24px;

  /* Motion -----------------------------------------------------------*/
  --t-fast: 180ms cubic-bezier(0.4, 0.0, 0.2, 1);
  --t-rise: 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

em {
  font-style: italic;
  font-weight: 500;
  color: inherit;
}

::selection {
  background: rgba(110, 124, 97, 0.18);
  color: var(--text);
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform var(--t-fast);
  z-index: 200;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ================================================================== */
/* Layout shell                                                        */
/* ================================================================== */

.layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: var(--side-w) 1fr;
    gap: 5rem;
  }
}

/* ================================================================== */
/* Sidebar (B's structure, E's typography)                             */
/* ================================================================== */

.sidebar {
  padding: 3rem 0 2rem;
}

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* Subtle entrance on load */
.sidebar>* {
  animation: rise var(--t-rise) both;
}

.sidebar> :nth-child(1) {
  animation-delay: 0ms;
}

.sidebar> :nth-child(2) {
  animation-delay: 120ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

.name {
  font-size: clamp(2.4rem, 3.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.02;
  color: var(--text);
  text-wrap: balance;
}

/* Lede: positioning statement, italic emphasis on second line */
.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.12;
  color: var(--text);
  max-width: 16ch;
}

.lede-line {
  display: block;
}

.lede-line-2 {
  margin-top: 0.08em;
}

.lede-line-2 em {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.05;
}

/* Sidebar nav with growing-rule (B's pattern) */
.sidebar-nav {
  margin-top: 2.5rem;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sidebar-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.25rem 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--t-fast);
}

.sidebar-nav .rule {
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transition: width var(--t-fast), opacity var(--t-fast);
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible,
.sidebar-nav a[aria-current="location"] {
  color: var(--text);
}

.sidebar-nav a:hover .rule,
.sidebar-nav a:focus-visible .rule,
.sidebar-nav a[aria-current="location"] .rule {
  width: 3rem;
  opacity: 1;
}

/* External-link indicator (used on Notebook) */
.sidebar-nav .ext {
  display: inline-block;
  font-size: 0.85em;
  opacity: 0.55;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.sidebar-nav a:hover .ext,
.sidebar-nav a:focus-visible .ext {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Sidebar bottom: socials */
.sidebar-bottom {
  margin-top: 2.5rem;
}

.social {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 500;
}

.social a {
  position: relative;
  color: var(--text-2);
  padding-bottom: 2px;
  transition: color var(--t-fast);
}

.social a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.18;
  transition: opacity var(--t-fast), background var(--t-fast);
}

.social a:hover {
  color: var(--text);
}

.social a:hover::after {
  opacity: 0.6;
  background: var(--accent);
}

@media (max-width: 1023px) {
  .sidebar {
    padding: 2.5rem 0 1rem;
  }

  .sidebar-nav {
    display: none;
  }

  .social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
  }
}

/* ================================================================== */
/* Main content                                                        */
/* ================================================================== */

.content {
  padding: 0 0 4rem;
  max-width: 720px;
}

@media (min-width: 1024px) {
  .content {
    padding: 6rem 0;
  }
}

/* Section primitives */

.section {
  padding: var(--space-section) 0 0;
}

.section:first-child {
  padding-top: 0;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 2.5rem;
}

/* ================================================================== */
/* About                                                               */
/* ================================================================== */

.about-body p {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 56ch;
}

.about-body p+p {
  margin-top: var(--space-paragraph);
}

.about-body strong {
  color: var(--text);
  font-weight: 600;
}

.about-body em {
  font-style: italic;
  font-weight: 500;
  color: var(--text);
}

/* ================================================================== */
/* Selected Work (from E — typographic, no cards)                     */
/* ================================================================== */

.projects {
  display: flex;
  flex-direction: column;
  gap: 110px;
}

@media (max-width: 900px) {
  .projects {
    gap: 80px;
  }
}

.project {
  position: relative;
  transition: opacity 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project-year {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

.project-title {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.project-cta {
  margin: 1.25rem 0 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.project-cta a {
  color: var(--text);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 25% 1px;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: color var(--t-fast), background-size 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project-cta a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.project-descriptor {
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 560px;
  text-wrap: balance;
}

.project-descriptor em {
  font-style: italic;
  font-weight: 400;
}

.project-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 560px;
  text-wrap: pretty;
}

.project-desc p+p {
  margin-top: var(--space-paragraph);
}

/* Dim-on-hover for the Selected Work list */
@media (hover: hover) {
  .projects:hover .project {
    opacity: 0.4;
  }

  .projects:hover .project:hover {
    opacity: 1;
  }
}

/* ================================================================== */
/* Philosophy (E's centered editorial column)                          */
/* ================================================================== */

.section-philosophy {
  text-align: center;
}

.section-philosophy .section-label {
  /* keep centered with the column */
}

.philosophy-body {
  max-width: 560px;
  margin: 0 auto;
}

.philosophy-body p {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-paragraph);
  text-wrap: balance;
}

.philosophy-body p:last-child {
  margin-bottom: 0;
}

.philosophy-body em {
  font-style: italic;
  font-weight: 500;
  color: var(--text);
}

/* ================================================================== */
/* Experience (E's typographic timeline)                              */
/* ================================================================== */

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.exp-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 32px;
  align-items: baseline;
  transition: opacity 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 720px) {
  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.exp-year {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-top: 4px;
}

.exp-role {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0 0 8px;
}

.exp-status {
  color: var(--accent);
  font-weight: 400;
  opacity: 0.75;
  white-space: nowrap;
}

.exp-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 520px;
}

.exp-cta {
  margin: 0.65rem 0 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.exp-cta a {
  color: var(--text);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 25% 1px;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: color var(--t-fast), background-size 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-cta a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

/* Dim-on-hover for the Experience list */
@media (hover: hover) {
  .exp-list:hover .exp-item {
    opacity: 0.4;
  }

  .exp-list:hover .exp-item:hover {
    opacity: 1;
  }
}

/* ================================================================== */
/* Contact                                                             */
/* ================================================================== */

.section-contact {
  text-align: center;
}

.contact-q {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.contact-q em {
  font-style: italic;
  font-weight: 500;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.contact-mail:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 3rem;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-links a {
  color: var(--text-2);
  transition: color var(--t-fast);
}

.contact-links a:hover {
  color: var(--text);
}

/* ================================================================== */
/* Footer                                                              */
/* ================================================================== */

.footer {
  margin-top: var(--space-section);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ================================================================== */
/* Resume page                                                          */
/* ================================================================== */

.resume {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem var(--pad-x) 4rem;
}

@media (min-width: 1024px) {
  .resume {
    padding: 5rem var(--pad-x);
  }
}

/* Header */

.resume-header {
  margin-bottom: 3.5rem;
}

.resume-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.resume-name {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.02;
  color: var(--text);
  margin: 0;
}

.resume-download {
  flex-shrink: 0;
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.resume-download:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.resume-meta {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

.resume-meta a {
  color: inherit;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.resume-meta a:hover {
  color: var(--text);
  border-bottom-color: var(--text-2);
}

.resume-back {
  margin-top: 1.25rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.resume-back a {
  color: inherit;
  transition: color var(--t-fast);
}

.resume-back a:hover {
  color: var(--text-2);
}

/* Section primitives */

.resume-section {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.resume-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.resume-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 1.5rem;
}

.resume-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.resume-body p+p {
  margin-top: 1rem;
}

.resume-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Selected work */

.resume-projects {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.resume-project-year {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 0.4rem;
}

.resume-project-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0 0 0.3rem;
}

.resume-project-descriptor {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.resume-project-descriptor em {
  font-style: italic;
  font-weight: 500;
}

.resume-project-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.resume-project-cta {
  margin: 0.8rem 0 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.resume-project-cta a {
  color: var(--text);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 25% 1px;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: color var(--t-fast), background-size 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.resume-project-cta a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

/* Experience list */

.resume-exp-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.resume-exp-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  align-items: baseline;
}

@media (max-width: 640px) {
  .resume-exp-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

.resume-exp-year {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-top: 3px;
}

.resume-exp-role {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.resume-exp-status {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.resume-exp-role a {
  color: inherit;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.resume-exp-role a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.resume-exp-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

/* Skills (definition list, two-column grid) */

.resume-skills {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.85rem 1.5rem;
  margin: 0;
}

@media (max-width: 640px) {
  .resume-skills {
    grid-template-columns: 1fr;
    gap: 0.25rem 0;
  }

  .resume-skills dd {
    margin-bottom: 0.75rem;
  }
}

.resume-skills dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-top: 3px;
}

.resume-skills dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}

/* Generic list (publications / talks) */

.resume-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resume-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.resume-list strong {
  color: var(--text);
  font-weight: 600;
}

.resume-list code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: rgba(17, 17, 17, 0.04);
  padding: 1px 5px;
  border-radius: 2px;
}

/* Footer */

.resume-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.resume-footer a {
  color: inherit;
  transition: color var(--t-fast);
}

.resume-footer a:hover {
  color: var(--text-2);
}

/* ================================================================== */
/* Motion preferences                                                  */
/* ================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================== */
/* Print — resume page → PDF                                           */
/* ================================================================== */

@media print {
  @page {
    size: A4;
    margin: 16mm 14mm;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Hide UI chrome that doesn't belong in a printed document */
  .skip-link,
  .resume-back,
  .resume-download {
    display: none !important;
  }

  /* Reset shell to full width */
  .resume {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  /* Header — slightly tighter than screen */
  .resume-header {
    padding-top: 0;
    padding-bottom: 0.6rem;
  }

  .resume-name {
    font-size: 22pt;
  }

  .resume-meta {
    font-size: 9.5pt;
    color: #333;
  }

  /* Section rhythm — tighten and ensure the hairline reads in print */
  .resume-section {
    padding-top: 1rem;
    border-top-color: rgba(0, 0, 0, 0.18);
    /* Force hairline to render in Chrome print */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume-section-label {
    font-size: 9pt;
    color: #333;
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Don't split an item across pages */
  .resume-exp-item,
  .resume-projects>article,
  .resume-list>li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resume-exp-list {
    gap: 0.9rem;
  }

  .resume-projects {
    gap: 1rem;
  }

  /* CTAs — show the URL inline so the printed page is useful on paper too */
  .resume-project-cta {
    margin-top: 0.35rem;
  }

  .resume-project-cta a,
  .resume-exp-cta a {
    background: none;
    color: #000;
    padding: 0;
  }

  .resume-project-cta a[href]::after,
  .resume-exp-cta a[href]::after {
    content: " — " attr(href);
    color: #555;
    font-weight: 400;
  }

  /* Drop the decorative external-arrow glyph in print */
  .resume-project-cta a span[aria-hidden],
  .resume-exp-cta a span[aria-hidden] {
    display: none;
  }

  /* Inline links inside body copy — render the URL after the text */
  .resume-meta a[href^="http"]::after,
  .resume-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    color: #555;
    font-size: 0.9em;
  }

  /* Footer */
  .resume-footer {
    margin-top: 1.2rem;
    border-top-color: rgba(0, 0, 0, 0.18);
  }

  /* Print-only blocks: visible only when printing */
  .print-only {
    display: block;
  }
}

/* Hide .print-only by default on screen */
.print-only {
  display: none;
}