/*
Theme Name: Aayush Portfolio
Author: Aayush Adhikari
Description: Minimal portfolio with featured websites, projects, and writings.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: aayush-portfolio
*/

      :root { color-scheme: dark; --bg: #090909; --panel: #0c0c0c; --line: #272727; --text: #b7b7b7; --muted: #858585; }
      * { box-sizing: border-box; }
      body { margin: 0; background: var(--bg); color: var(--text); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; -webkit-font-smoothing: antialiased; }
      a { color: inherit; text-decoration: none; }
      a:focus-visible { outline: 2px solid #b7b7b7; outline-offset: 5px; }
      a:hover { color: #eee; }
      .page { height: 100svh; padding: 30px 42px 22px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
      .topbar, .footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 10px; }
      .signature { font-size: 13px; color: var(--text); }
      .typewriter { display: inline-grid; position: relative; text-align: left; }
      .typewriter::before { content: attr(data-text); visibility: hidden; grid-area: 1 / 1; }
      .typing-text { display: block; width: 100%; overflow: hidden; white-space: nowrap; }
      .typing-cursor { position: absolute; left: 100%; bottom: 0; animation: cursor-blink .7s step-end infinite; }
      .typing-line { grid-area: 1 / 1; position: relative; width: 100%; min-width: 0; animation: typing-loop 5s steps(var(--characters), end) infinite; }
      @keyframes typing-loop { 0%, 10% { width: 0; } 45%, 75% { width: 100%; } 95%, 100% { width: 0; } }
      @keyframes cursor-blink { 50% { opacity: 0; } }
      .topbar-note { letter-spacing: .06em; }
      .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1.5fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 68px); width: 100%; max-width: 1440px; margin: auto; }
      .side { align-self: center; }
      .section-label { margin: 0 0 20px; color: var(--muted); font-size: 10px; line-height: 1.6; font-weight: normal; letter-spacing: .12em; text-transform: uppercase; }
      .section-label::before { content: "// "; color: #606060; }
      .section-intro { font-size: 11px; line-height: 1.7; color: var(--muted); margin: -10px 0 24px; }
      .work { display: block; border-top: 1px solid var(--line); padding: 21px 0; }
      .work:last-child { border-bottom: 1px solid var(--line); }
      .work-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: normal; margin: 0; line-height: 1.5; }
      .arrow { color: var(--muted); transition: transform .2s; }
      a.work:hover .arrow { transform: translate(2px, -2px); }
      .work p { margin: 8px 0 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
      .tags { display: block; margin-top: 13px; font-size: 9px; color: var(--muted); }
      .center { text-align: center; }
      .eyebrow { margin: 0 0 20px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
      h1 { margin: 0; font-size: clamp(32px, 3.6vw, 56px); font-weight: 500; line-height: 1.2; letter-spacing: -.065em; color: #bcbcbc; white-space: nowrap; }
      .role { margin: 17px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
      .socials { display: flex; justify-content: center; gap: 8px; margin: 26px 0 0; }
      .social { padding: 11px 16px; border: 1px solid transparent; font-size: 11px; transition: filter .2s, border-color .2s; }
      .social:hover { filter: brightness(1.18); }
      .email { background: #e7763c; color: #160d08; }
      .email:hover { color: #160d08; }
      .github { background: #000; border-color: #383838; color: #c8c8c8; }
      .linkedin { background: #0a66c2; color: #fff; }
      .stack { margin-top: 46px; }
      .stack-list { list-style: none; margin: 0; padding: 0; text-align: center; font-size: 10px; line-height: 1.8; }
      .stack-list li { padding: 4px 0; overflow-wrap: anywhere; }
      .stack-label { color: var(--muted); }
      .center .section-label { margin-bottom: 15px; }
      .writings { margin-top: 32px; text-align: left; }
      .writings .section-label { display: flex; align-items: baseline; gap: 7px; }
      .writings .section-label::before { content: "//"; }
      .soon { margin-left: auto; font-size: 9px; letter-spacing: 0; text-transform: none; }
      .writing { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 13px 0; font-size: 10px; line-height: 1.5; }
      .writing:last-child { border-bottom: 1px solid var(--line); }
      .writing span:last-child { color: var(--muted); font-size: 9px; white-space: nowrap; }
      .footer { border-top: 1px solid var(--line); padding-top: 16px; font-size: 9px; }
      .footer a { border-bottom: 1px solid #454545; }
      @media (min-width: 901px) and (max-height: 720px) {
        .page { padding-top: 20px; padding-bottom: 16px; }
        .eyebrow { margin-bottom: 12px; }
        .stack { margin-top: 25px; }
        .writings { margin-top: 22px; }
        .work { padding: 15px 0; }
        .socials { margin-top: 18px; }
      }
      @media (max-width: 1100px) and (min-width: 901px) {
        .page { padding-left: 24px; padding-right: 24px; }
        .layout { grid-template-columns: minmax(0, 1fr) minmax(310px, 1.5fr) minmax(0, 1fr); gap: 24px; }
        .work-heading { font-size: 11px; }
      }
      @media (max-width: 900px) {
        .page { padding: 20px 24px 16px; }
        .layout { max-width: 660px; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
        .center { grid-column: 1 / -1; grid-row: 1; }
        .eyebrow { margin-bottom: 10px; }
        h1 { font-size: 48px; }
        .role { margin-top: 9px; }
        .socials { margin-top: 15px; }
        .stack { margin-top: 22px; }
        .writings { margin-top: 20px; }
        .writing { padding: 9px 0; }
        .section-label { margin-bottom: 10px; font-size: 9px; }
        .section-intro { margin: 0 0 12px; font-size: 10px; }
        .work { padding: 12px 0; }
        .work-heading { font-size: 11px; }
        .work p { margin-top: 5px; font-size: 9px; }
        .tags { margin-top: 7px; font-size: 8px; }
      }
      @media (max-width: 600px) {
        .page { padding: 16px; }
        .topbar, .footer { font-size: 8px; }
        .topbar-note { letter-spacing: 0; }
        .layout { gap: 20px 18px; }
        h1 { font-size: clamp(28px, 8.8vw, 44px); }
        .eyebrow { font-size: 9px; }
        .role { font-size: 9px; }
        .social { padding: 9px 15px; font-size: 10px; }
        .stack { margin-top: 20px; }
        .center .section-label { margin-bottom: 10px; }
        .writings { margin-top: 17px; }
        .writing { font-size: 9px; padding: 8px 0; }
        .section-intro { font-size: 9px; }
        .work { padding: 10px 0; }
        .work-heading { font-size: 10px; }
        .work p { overflow-wrap: anywhere; font-size: 8px; }
        .footer { padding-top: 10px; }
      }
      @media (max-width: 900px) and (max-height: 740px) {
        .page { padding-top: 12px; padding-bottom: 10px; }
        .layout { gap: 12px 18px; }
        .eyebrow { margin-bottom: 6px; }
        .role { margin-top: 5px; }
        .socials { margin-top: 10px; }
        .social { padding: 7px 14px; }
        .stack, .writings { margin-top: 12px; }
        .section-label, .center .section-label { margin-bottom: 7px; }
        .section-intro { margin-bottom: 7px; }
        .work { padding: 7px 0; }
        .tags { margin-top: 4px; }
        .writing { padding: 6px 0; }
      }
      @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
    
.page { height: auto; min-height: 100svh; grid-template-rows: auto 1fr auto; gap: 36px; }
.layout { padding-block: 24px; }
.layout > * { min-width: 0; }
.all-link { display: block; width: fit-content; margin-top: 14px; font-size: 10px; color: var(--muted); }
.entry-list { padding: 0; margin: 0; list-style: none; }
.project-github { display: inline-block; margin: 12px 0 18px; padding: 8px 12px; }
.entry-list .project-github { margin-top: 0; }
.entry-list > li:last-child { border-bottom: 1px solid var(--line); }
.entry-list .work, .entry-list .writing { border-bottom: 0; }
.work-heading, .writing > span:first-child { overflow-wrap: anywhere; }
.empty-state { color: var(--muted); font-size: 11px; line-height: 1.8; }
.collection { min-height: 100svh; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; }
.collection-title { font-size: 11px; font-weight: normal; letter-spacing: .1em; text-transform: lowercase; white-space: normal; text-align: center; }
.collection-content { width: 100%; max-width: 640px; margin-block: auto; padding-block: 64px; }
.collection .work { padding: 22px 0; }
.collection .work-heading { font-size: 13px; }
.collection .writing { padding: 22px 0; font-size: 12px; }
.pagination { margin-top: 28px; text-align: center; line-height: 2; }
.page-numbers { padding: 6px 10px; }
.page-numbers.current { color: #fff; }
.article-page { max-width: 740px; margin: 0 auto; padding: 64px 24px; }
.article-page h1 { margin: 32px 0 18px; font-size: clamp(28px, 5vw, 44px); white-space: normal; overflow-wrap: anywhere; }
.article-content { margin-top: 36px; line-height: 1.9; font-size: 13px; overflow-wrap: anywhere; }
.article-content a { text-decoration: underline; }
.article-content img, .article-content video { max-width: 100%; height: auto; }
.article-content iframe { max-width: 100%; }
.article-content pre { overflow-x: auto; padding: 16px; background: var(--panel); }
.article-content figure { max-width: 100%; margin-inline: 0; }
.article-content table { display: block; overflow-x: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 99999; padding: 12px; background: var(--bg); }
.skip-link:focus { top: 16px; }
@media (max-width: 600px) { .page { gap: 24px; } .footer { flex-wrap: wrap; } .collection { padding: 40px 20px; } }

/* Keep the homepage within the viewport; scale its content to fit short screens. */
html:has(body.home-fixed), body.home-fixed { height: 100%; overflow: hidden; overscroll-behavior: none; }
.home-fixed .page { position: fixed; inset: 0; height: auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(10px, 2vh, 24px); }
.home-stage { position: relative; min-height: 0; min-width: 0; }
.home-stage .layout { position: absolute; top: 50%; left: 50%; margin: 0; padding-block: 0; transform: translate(-50%, -50%) scale(var(--home-scale, 1)); transform-origin: center; }
.home-stage .layout > * { min-width: 0; }
.home-fixed.admin-bar .page { top: 32px; }
@media (max-width: 782px) { .home-fixed.admin-bar .page { top: 46px; } }

/* Group the two collections in the upper left of the homepage. */
.home-stage .left-column { align-self: start; }
.left-column .writings { margin-top: 28px; }
@media (max-width: 900px) { .left-column .writings { margin-top: 20px; } }

/* Resume download and readable, naturally scrolling mobile homepage. */
.resume { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 22px; padding: 8px 16px; border: 1px solid var(--line); font-size: 12px; }
.resume:hover { border-color: var(--muted); }
@media (max-width: 900px) {
  html:has(body.home-fixed), body.home-fixed { height: auto; overflow: auto; overscroll-behavior: auto; }
  .home-fixed .page { position: static; min-height: 100svh; padding: 24px 20px; grid-template-rows: auto 1fr auto; gap: 36px; }
  .home-stage .layout { position: static; width: 100%; max-width: 620px; margin: 0 auto; transform: none; grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .home-stage .center { grid-column: auto; grid-row: 1; }
  .home-fixed .topbar, .home-fixed .footer { font-size: 11px; flex-wrap: wrap; line-height: 1.6; }
  .home-fixed .signature { font-size: 14px; }
  .home-fixed h1 { font-size: clamp(24px, 7vw, 44px); }
  .home-fixed .eyebrow, .home-fixed .section-label { font-size: 12px; margin-bottom: 14px; }
  .home-fixed .role, .home-fixed .section-intro { font-size: 14px; line-height: 1.8; }
  .home-fixed .socials { flex-wrap: wrap; gap: 10px; margin-top: 20px; }
  .home-fixed .social { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; font-size: 13px; }
  .home-fixed .stack { margin-top: 28px; }
  .home-fixed .stack-list { font-size: 14px; line-height: 1.8; }
  .home-fixed .stack-list li { padding: 6px 0; }
  .home-fixed .work { padding: 18px 0; }
  .home-fixed .work-heading { font-size: 15px; }
  .home-fixed .work p { font-size: 14px; line-height: 1.8; margin-top: 8px; }
  .home-fixed .tags { font-size: 12px; line-height: 1.7; margin-top: 10px; }
  .home-fixed .left-column .writings { margin-top: 32px; }
  .home-fixed .writing { font-size: 14px; padding: 14px 0; }
  .home-fixed .writing span:last-child, .home-fixed .soon { font-size: 11px; }
  .home-fixed .footer { padding-top: 16px; }
}

/* Higher-contrast typography with a consistent readable hierarchy. */
:root { --text: #e4e4e7; --muted: #b0b0b8; }
body { font-size: 14px; line-height: 1.7; }
a:focus-visible { outline-color: var(--text); }
.signature { font-size: 16px; font-weight: 600; }
.topbar, .footer { font-size: 12px; line-height: 1.6; }
.section-label, .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.section-label::before { color: var(--muted); }
h1 { color: #f4f4f5; font-weight: 700; letter-spacing: -.05em; }
.section-intro, .role, .work p, .stack-list, .empty-state { font-size: 14px; line-height: 1.8; }
.work-heading, .collection .work-heading { font-size: 16px; font-weight: 600; line-height: 1.5; }
.tags, .all-link, .soon, .writing span:last-child { font-size: 12px; line-height: 1.7; }
.writing, .collection .writing { font-size: 14px; line-height: 1.7; }
.stack-label { font-weight: 600; }
.social, .resume { font-size: 14px; font-weight: 600; }
.github { color: var(--text); }
.collection-title { font-size: 14px; font-weight: 600; }
.article-content { font-size: 16px; line-height: 1.85; }
@media (max-width: 900px) {
  .home-fixed .topbar, .home-fixed .footer { font-size: 12px; }
  .home-fixed .signature { font-size: 16px; }
  .home-fixed .social { font-size: 14px; }
  .home-fixed .work-heading { font-size: 16px; }
  .home-fixed .writing span:last-child, .home-fixed .soon { font-size: 12px; }
}

/* On-screen resume viewer. */
.resume-viewer { width: min(1000px, calc(100% - 24px)); max-width: none; height: 90vh; height: 90dvh; max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.resume-viewer[open] { display: flex; flex-direction: column; }
.resume-viewer::backdrop { background: rgb(0 0 0 / 80%); }
html:has(.resume-viewer[open]), body:has(.resume-viewer[open]) { overflow: hidden; }
.resume-viewer-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.resume-viewer-title { margin: 0; font-size: 16px; }
.resume-viewer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; }
.resume-viewer-close { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.resume-viewer-close:hover { border-color: var(--muted); }
.resume-viewer-close:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.resume-viewer-note { margin: 0; padding: 0 18px 12px; color: var(--muted); font-size: 12px; }
.resume-viewer-note a { text-decoration: underline; }
.resume-viewer-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
