:root {
  color-scheme: dark;
  --bg: #101b2c;
  --surface: #172538;
  --ink: #edf3fc;
  --muted: #a9b8cc;
  --quiet: #93a5bd;
  --accent: #7ce4cb;
  --line: #2a394e;
  font-family: 'Inter Variable', sans-serif;
  font-synthesis: none;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #eaf0f3;
  --ink: #172538;
  --muted: #53637a;
  --quiet: #596d83;
  --accent: #147662;
  --line: #d4dde6;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f7f8fa;
    --surface: #eaf0f3;
    --ink: #172538;
    --muted: #53637a;
    --quiet: #596d83;
    --accent: #147662;
    --line: #d4dde6;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
}
a:hover {
  color: var(--accent);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
.page {
  max-width: 800px;
  margin-inline: auto;
  padding: 0 40px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding-block: 32px;
}
.wordmark {
  font:
    800 2rem/1 'Manrope Variable',
    sans-serif;
  letter-spacing: -0.12em;
  color: var(--ink);
}
.wordmark span,
.accent {
  color: var(--accent);
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 22px;
}
.languages {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 0.78rem;
}
.languages a {
  padding-block: 8px;
  color: var(--quiet);
}
.languages a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 8px;
}
.languages a[lang='fa'] {
  font-family: 'Vazirmatn Variable', sans-serif;
  font-size: 0.95rem;
}
.icon-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.icon-button:hover {
  background: var(--surface);
  color: var(--accent);
}
.moon-icon {
  display: none;
}
[data-theme='light'] .sun-icon {
  display: none;
}
[data-theme='light'] .moon-icon {
  display: inline;
}
.profile {
  padding-block: 65px 70px;
  max-width: 610px;
}
.profile-mark {
  width: 36px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 27px;
}
h1 {
  font-family: 'Manrope Variable', sans-serif;
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1.13;
  letter-spacing: -0.055em;
  color: var(--ink);
  font-weight: 650;
}
.role {
  font-size: 1.05rem;
  color: var(--accent);
  margin-top: 22px;
}
.about {
  margin-top: 36px;
  max-width: 565px;
}
.about p + p {
  margin-top: 17px;
}
.intro {
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.7;
  letter-spacing: -0.015em;
}
.contact {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 24px;
}
.contact h2 {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--quiet);
  font-weight: 500;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  margin-top: 15px;
}
.reveal-contact {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 15px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
}
.reveal-contact:hover {
  border-color: var(--accent);
}
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--ink);
  padding-block: 10px;
}
.contact-details {
  border-inline-start: 2px solid var(--accent);
  margin-top: 26px;
  padding-inline-start: 20px;
}
.contact-details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-details > div + div {
  margin-top: 16px;
}
.contact-details span {
  font-size: 0.75rem;
  color: var(--quiet);
}
.contact-details a {
  color: var(--accent);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
  width: fit-content;
}
.contact-help {
  font-size: 0.82rem;
  margin-top: 15px;
}
.footer {
  border-top: 1px solid var(--line);
  padding-block: 22px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
  font-size: 0.72rem;
  color: var(--quiet);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  inset-inline-start: 20px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  z-index: 10;
}
.skip-link:focus {
  top: 15px;
}
.not-found h1 {
  font-size: 2.8rem;
  margin-top: 16px;
}
.not-found .intro {
  margin-top: 25px;
}
.not-found .github-link {
  margin-top: 25px;
}
[lang='fa'] {
  font-family: 'Vazirmatn Variable', sans-serif;
}
[lang='fa'] h1 {
  font-family: 'Vazirmatn Variable', sans-serif;
  letter-spacing: normal;
  line-height: 1.5;
  font-weight: 600;
}
[lang='fa'] .intro,
[lang='fa'] .contact h2 {
  letter-spacing: normal;
}
[lang='fa'] .about {
  line-height: 2;
}
[dir='rtl'] .reveal-contact svg {
  transform: scaleX(-1);
}
[lang='fa'] .role {
  font-size: 1.18rem;
}
[lang='fa'] .languages a:not([lang='fa']) {
  font-family: 'Inter Variable', sans-serif;
}
@media (max-width: 600px) {
  .page {
    padding-inline: 24px;
  }
  .topbar {
    padding-block: 23px;
    gap: 15px;
  }
  .header-controls {
    gap: 12px;
  }
  .languages {
    gap: 12px;
    font-size: 0.72rem;
  }
  .profile {
    padding-block: 42px 50px;
  }
  .role {
    font-size: 0.96rem;
  }
  .intro {
    font-size: 1.1rem;
  }
  .about {
    margin-top: 29px;
  }
  .contact {
    margin-top: 30px;
  }
  h1 {
    font-size: 3.4rem;
  }
  [lang='fa'] h1 {
    font-size: 3.1rem;
  }
  .contact-actions {
    gap: 12px 20px;
  }
}
@media (max-width: 360px) {
  .page {
    padding-inline: 20px;
  }
  .languages {
    gap: 10px;
  }
  .header-controls {
    gap: 7px;
  }
  .wordmark {
    font-size: 1.7rem;
  }
  .icon-button {
    padding: 6px;
  }
  h1 {
    font-size: 3rem;
  }
  .role {
    font-size: 0.88rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* A single past contribution: links/names live in the profile fields. */
.past-work {
  margin-top: 32px;
  padding-inline-start: 18px;
  border-inline-start: 2px solid var(--line);
}
.past-work h2 {
  color: var(--quiet);
  font-size: 0.8rem;
  font-weight: 500;
}
.past-work h3 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.6;
}
.past-work h3 a,
.project-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.past-work p {
  font-size: 0.88rem;
  line-height: 1.8;
}
.project-profile {
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.8rem;
}

/* Real roles only; the section is omitted when there are no experience items. */
.experience {
  margin-top: 32px;
}
.experience h2 {
  color: var(--quiet);
  font-size: 0.8rem;
  font-weight: 500;
}
.experience ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.experience li + li {
  margin-top: 20px;
}
.experience h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 550;
}
.experience-meta {
  color: var(--quiet);
  font-size: 0.78rem;
}
.experience-summary {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.8;
}

/* Notes retain the profile's typography and spacing. */
.profile-notes {
  margin-top: 32px;
}
.profile-notes h2 {
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--accent);
}
.profile-notes p {
  margin-top: 6px;
  font-size: 0.88rem;
}
.notes-page {
  padding-block: 35px 70px;
  overflow-wrap: anywhere;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.78rem;
  margin-bottom: 32px;
}
.breadcrumbs a,
.notes-back,
.note-link {
  color: var(--accent);
}
.notes-page h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.notes-intro {
  margin-top: 22px;
  font-size: 1.08rem;
}
.notes-section {
  margin-top: 42px;
}
.notes-page h2 {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 550;
}
.notes-page h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.6;
}
.note-list,
.group-list,
.stack-list {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}
.note-list li,
.group-list li,
.stack-list li {
  border-top: 1px solid var(--line);
  padding-block: 22px;
}
.group-list p,
.stack-list p,
.note-list p {
  font-size: 0.92rem;
}
.catalog-scope {
  margin-top: 12px;
  font-size: 0.85rem;
}
.note-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-block: 20px 30px;
  font-size: 0.78rem;
  color: var(--quiet);
}
.note-toc {
  border-inline-start: 2px solid var(--line);
  padding-inline-start: 20px;
  margin-block: 30px 40px;
  font-size: 0.9rem;
}
.note-toc h2 {
  font-size: 0.9rem;
}
.note-toc ul {
  padding-inline-start: 20px;
  margin-bottom: 0;
}
.prose h2 {
  margin-block: 38px 16px;
  scroll-margin-top: 24px;
}
.prose h3 {
  margin-top: 28px;
}
.prose p + p,
.prose ul,
.prose ol {
  margin-top: 18px;
}
.prose strong {
  color: var(--ink);
  font-weight: 550;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose pre {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
  font-size: 0.82rem;
}
.prose code {
  font-family: ui-monospace, monospace;
  direction: ltr;
  unicode-bidi: isolate;
}
.prose img {
  max-width: 100%;
  height: auto;
}
.prose blockquote {
  margin-inline: 0;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--line);
}
.notes-back {
  display: inline-block;
  margin-top: 44px;
  font-size: 0.9rem;
}
[lang='fa'] .notes-page h1 {
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: normal;
}
@media (max-width: 600px) {
  .notes-page {
    padding-block: 25px 50px;
  }
}

/* Drupal integration: keep messages, tabs, and the admin toolbar unobtrusive. */
.messages {
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 12px 16px;
  margin: 0 0 20px;
  list-style: none;
}
.messages a {
  color: var(--accent);
  text-decoration: underline;
}
.toolbar-tray-open:not(.toolbar-vertical) .topbar,
body.toolbar-horizontal .topbar,
body.toolbar-fixed .topbar {
  padding-top: 71px;
}
/* Gin modern navigation (core navigation): clear the top bar and left sidebar
 * so our content is not hidden behind them when logged in. */
body.gin--core-navigation {
  padding-top: var(--drupal-displace-offset-top, 54px);
  padding-inline-start: var(--admin-toolbar-sidebar-width, 64px);
}
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px;
  width: 1px;
  word-wrap: normal;
}
