/* App interiors, styled after their macOS counterparts. Window chrome lives in style.css. */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;padding:0 13px;border-radius:7px;background:#ffffff1f;border:.5px solid #ffffff1a;box-shadow:inset 0 .5px 0 #ffffff1a;font-size:13px;font-weight:500;color:var(--label);text-decoration:none;white-space:nowrap;transition:background .12s}
.btn:hover{background:#ffffff2e}
.btn-primary{background:var(--blue);border-color:#ffffff1f}
.btn-primary:hover{background:#2b95ff}
.btn .ui-icon{width:14px;height:14px;opacity:1}
.inline-link{color:var(--link);font-size:inherit}
.inline-link:hover{text-decoration:underline}

/* Sidebars (Finder, Mail-style lists). macOS tints sidebar symbols with the accent color. */
.sidebar{display:flex;flex-direction:column;gap:1px;min-width:0;padding:10px 8px;background:var(--sidebar);border-right:.5px solid #000;overflow:auto}
.sidebar-heading{margin:14px 10px 4px;font-size:11px;font-weight:600;color:var(--label-3)}
.sidebar-heading:first-child{margin-top:4px}
.sidebar>:is(button,a){display:flex;align-items:center;gap:8px;width:100%;height:28px;padding:0 9px;border-radius:6px;font-size:13px;color:var(--label);text-decoration:none;text-align:left;white-space:nowrap}
.sidebar>:is(button,a):hover{background:#ffffff0d}
.sidebar>[aria-pressed=true]{background:#ffffff1f}
.sidebar small{margin-left:auto;font-size:12px;color:var(--label-3);font-variant-numeric:tabular-nums}
.sidebar .ui-icon{width:16px;height:16px;opacity:1;filter:invert(41%) sepia(97%) saturate(3000%) hue-rotate(203deg) brightness(102%)}
.sidebar img:not(.ui-icon){width:15px;height:15px;filter:invert(1);opacity:.8}
.segmented{display:inline-flex;gap:2px;padding:2px;border-radius:7px;background:#ffffff14}
.segmented button{display:grid;place-items:center;height:24px;min-width:32px;padding:0 8px;border-radius:5px;opacity:.6}
.segmented [aria-pressed=true]{background:#ffffff33;box-shadow:0 1px 2px #00000080;opacity:1}
.segmented .ui-icon{width:14px;height:14px}
.search-field{display:flex;align-items:center;gap:6px;height:28px;padding:0 8px;border-radius:7px;background:#ffffff14;min-width:0}
.search-field .ui-icon{width:14px;height:14px;opacity:.5}
.search-field input{width:100%;min-width:0;border:0;outline:0;background:none;font-size:13px;color:var(--label)}
.search-field input::placeholder{color:var(--label-3)}
.search-field:focus-within{box-shadow:0 0 0 3px #0a84ff80}

/* Finder: selected work */
.finder{display:grid;grid-template-columns:188px minmax(0,1fr);height:100%}
.finder-main{display:flex;flex-direction:column;min-width:0;overflow:auto}
.finder-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:10px;padding:9px 14px;background:#1e1e20eb;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:.5px solid var(--sep)}
.finder-toolbar h2{margin:0 auto 0 4px;font-size:15px;font-weight:700}
.finder-toolbar .search-field{width:190px}
#work-grid{padding:18px 20px 22px}
.work-grid-view{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:24px 20px}
.work-item{display:flex;flex-direction:column;gap:10px;min-width:0;margin:-6px;padding:6px;border-radius:12px;text-align:left;transition:background .15s}
.work-item:hover{background:#ffffff0a}
.work-image{display:block;width:100%;aspect-ratio:16/10;overflow:hidden;border-radius:9px;background:#2a2a2d;box-shadow:0 0 0 .5px #ffffff2b,0 8px 22px #00000059}
.work-image>img{display:block;width:100%;height:100%;object-fit:cover;object-position:top;transition:transform .5s var(--spring)}
.work-item:hover .work-image>img{transform:scale(1.02)}
.work-item-info{display:flex;flex-direction:column;gap:2px;min-width:0;padding:0 2px}
.work-item-info strong{font-size:14px;font-weight:650}
.work-item-kind{font-size:12px;color:var(--label-3)}
.work-item-description{margin-top:4px;font-size:13px;line-height:1.45;color:var(--label-2);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.work-list{display:flex;flex-direction:column}
.work-list .work-item{flex-direction:row;align-items:center;gap:14px;margin:0;padding:8px 10px;border-radius:8px}
.work-list .work-item:nth-child(odd){background:#ffffff08}
.work-list .work-item:hover{background:#ffffff12}
.work-list .work-image{width:84px;flex:0 0 84px;border-radius:6px}
.work-list .work-item-description{-webkit-line-clamp:1;margin-top:1px}
.work-count{margin:22px 0 0;text-align:center;font-size:11.5px;color:var(--label-3)}
.work-empty{padding:60px 10px;text-align:center}
.work-empty h3{margin:0 0 6px;font-size:15px;font-weight:600}
.work-empty p{margin:0;font-size:13px;color:var(--label-2)}

.work-detail{max-width:760px;margin:0 auto}
.back{display:inline-flex;align-items:center;gap:2px;height:28px;margin:-4px 0 12px -6px;padding:0 8px 0 4px;border-radius:6px;font-size:13px;color:var(--link)}
.back:hover{background:#ffffff0d}
.back .ui-icon{width:15px;height:15px;opacity:1;filter:invert(55%) sepia(80%) saturate(2400%) hue-rotate(190deg)}
.work-detail-image{aspect-ratio:16/9}
.work-detail-head{margin-top:22px}
.work-detail-head h2{margin:0;font-size:28px;font-weight:700;letter-spacing:-.022em;line-height:1.15}
.work-detail-head p{margin:8px 0 0;max-width:62ch;font-size:15px;line-height:1.55;color:var(--label-2)}
.work-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.info{margin:24px 0 0;padding:2px 14px;border-radius:10px;background:var(--raised);border:.5px solid var(--sep)}
.info>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:9px 0;border-top:.5px solid var(--sep);font-size:13px}
.info>div:first-child{border-top:0}
.info dt{color:var(--label-3)}
.info dd{margin:0}
.info-links{display:flex;flex-wrap:wrap;gap:4px 16px}
.info-links a{color:var(--link);text-decoration:none}
.info-links a:hover{text-decoration:underline}
.work-section{margin-top:26px}
.work-section h3{margin:0 0 6px;font-size:15px;font-weight:650}
.work-section p{margin:0;max-width:66ch;font-size:14.5px;line-height:1.65;color:var(--label-2)}

/* Terminal artwork: sized from its own box so it fits cards, list rows, and the detail view. */
.work-image-art{background:#0d1830}
.work-art{container-type:size;--art-u:min(2.9cqw,4.6cqh);display:flex;flex-direction:column;width:100%;height:100%;text-align:left;overflow:hidden}
.art-arh{--art-u:min(3cqw,4.4cqh)}.art-msw{--art-u:min(2.9cqw,4cqh)}
.art-dark{background:radial-gradient(120% 90% at 100% 0%,#1d3a70 0%,#0f1d38 52%,#0a1222 100%);color:#c9d8f2}
.art-bar{display:flex;align-items:center;gap:.6em;padding:.9em 1.4em;border-bottom:1px solid #ffffff12;font-size:calc(var(--art-u)*.85);line-height:1}
.art-bar i{width:.85em;height:.85em;border-radius:50%;background:#ff5f57}.art-bar i:nth-child(2){background:#febc2e}.art-bar i:nth-child(3){background:#28c840}
.art-bar b{margin-left:auto;font-weight:600;color:#c9d8f2;white-space:nowrap}
.art-bar em{font-style:normal;color:#ff7b86;white-space:nowrap}
.work-art code{flex:1;display:block;padding:1.1em 1.3em;font:var(--art-u)/1.6 var(--mono);white-space:pre;color:#c9d8f2}
.art-fail{color:#ff7b86}.art-ok{color:#6fe3a5}.art-dim{color:#6f86ab}
.art-badge{display:inline-block;padding:.15em .5em;border-radius:.3em;background:#ff453a;color:#fff;font-weight:600}

/* Pull requests: a Mail-style list with organizations in the sidebar. */
.prs{display:grid;grid-template-columns:196px minmax(0,1fr);height:100%}
.prs .sidebar-merge{width:16px;height:16px}
.pr-pane{display:flex;flex-direction:column;min-width:0;overflow:auto}
.pane-head{padding:20px 22px 16px;border-bottom:.5px solid var(--sep)}
.pane-head h2{margin:0;font-size:20px;font-weight:700;letter-spacing:-.015em}
.pane-head p{margin:6px 0 0;max-width:64ch;font-size:13px;line-height:1.55;color:var(--label-2)}
.pr-list{list-style:none;margin:0;padding:6px 8px}
.pr-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:2px 12px;align-items:start;padding:10px 12px;border-radius:8px;color:var(--label);text-decoration:none}
.pr-row:hover{background:#ffffff0d}
.pr-merged{grid-row:span 2;display:grid;place-items:center;width:20px;height:20px;margin-top:1px;border-radius:50%;background:var(--purple)}
.pr-merged svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round}
.pr-merged circle{fill:var(--purple)}
.pr-title{font-size:13.5px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.pr-title code{padding:1px 4px;border-radius:4px;background:#ffffff17;font:12px var(--mono)}
.pr-repo{grid-column:2;font-size:12px;color:var(--label-3)}
.pr-repo b{font-weight:500;color:var(--label-2)}
.pr-date{grid-column:3;grid-row:1;font-size:12px;color:var(--label-3);white-space:nowrap;font-variant-numeric:tabular-nums}
.pane-foot{margin:auto 0 0;padding:11px 22px;border-top:.5px solid var(--sep);font-size:12px;color:var(--label-3)}
.pane-foot a{color:var(--link);text-decoration:none}
.pane-foot a:hover{text-decoration:underline}

/* About This Mac, for a person. */
.about-mac{display:flex;flex-direction:column;align-items:center;max-width:500px;margin:0 auto;padding:26px 30px 22px;text-align:center}
.about-icon{width:112px;height:112px;margin-bottom:8px;filter:drop-shadow(0 10px 18px #0007)}
.about-mac h2{margin:0;font-size:27px;font-weight:700;letter-spacing:-.022em}
.about-sub{margin:2px 0 20px;font-size:13px;color:var(--label-3)}
.specs{display:grid;gap:7px;width:100%;margin:0;text-align:left}
.specs>div{display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px;font-size:12.5px;line-height:1.45}
.specs dt{text-align:right;font-weight:600}
.specs dd{margin:0;color:var(--label-2)}
.about-actions{display:flex;gap:8px;margin-top:22px}
.about-bio{max-width:44ch;margin:20px 0 0;font-size:13px;line-height:1.6;color:var(--label-2)}
.about-legal{margin:18px 0 0;font-size:11px;color:var(--label-3)}

/* Notes: a list of notes beside the open note. */
.notes-app{display:grid;grid-template-columns:250px minmax(0,1fr);height:100%}
.notes-list{display:flex;flex-direction:column;gap:2px;padding:8px;background:#1b1b1d;border-right:.5px solid #000;overflow:auto}
.notes-heading{margin:6px 10px 6px;font-size:11px;font-weight:600;color:var(--label-3)}
.notes-list>button{display:flex;flex-direction:column;gap:3px;padding:9px 12px;border-radius:8px;text-align:left}
.notes-list>button:hover{background:#ffffff0a}
.notes-list>button[aria-selected=true]{background:#ffd60a2e}
.notes-list strong{font-size:13px;font-weight:650;line-height:1.3}
.notes-list span{font-size:12px;line-height:1.35;color:var(--label-3);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.notes-list time{margin-right:6px;color:var(--label-2)}
.note-body{min-width:0;overflow:auto;padding:16px 40px 44px}
.note-date{display:block;margin:0 0 18px;text-align:center;font-size:12px;color:var(--label-3)}
.note-body h2{max-width:24ch;margin:0 0 14px;font-size:27px;font-weight:700;letter-spacing:-.022em;line-height:1.2;text-wrap:balance}
.note-body p,.note-body li{max-width:68ch;font-size:15px;line-height:1.72;color:#e3e3e8}
.note-body p{margin:0 0 15px}
.note-body h3{margin:30px 0 8px;font-size:18px;font-weight:650;letter-spacing:-.01em}
.note-body ul{margin:0 0 16px;padding-left:20px}
.note-body li{margin-bottom:7px}
.note-body a{color:var(--link);text-underline-offset:3px}
.note-body pre{max-width:68ch;margin:4px 0 18px;padding:14px 16px;overflow:auto;border-radius:9px;background:#000000;border:.5px solid var(--sep);font:12.5px/1.65 var(--mono);color:#d1d1d6}
.note-body :not(pre)>code{padding:1px 5px;border-radius:4px;background:#ffffff17;font:13px var(--mono)}
.essay-dek{color:var(--label-2)!important;font-size:16.5px!important;line-height:1.55!important;margin-bottom:24px!important}
.principle strong{color:var(--label)}
.scratch{display:flex;flex-direction:column}
.scratch textarea{flex:1;width:100%;min-height:300px;padding:0;border:0;outline:0;resize:none;background:none;font-size:15px;line-height:1.72;color:var(--label)}
.scratch textarea::placeholder{color:var(--label-3)}

/* Terminal */
.term{min-height:100%;padding:8px 12px 16px;background:#1c1c1e;font:13px/1.55 var(--mono);color:#e5e5ea;cursor:text}
#terminal-output{overflow-wrap:anywhere}
#terminal-output p{margin:0;white-space:pre-wrap}
#terminal-output p:empty{min-height:1.55em}
#terminal-output strong{font-weight:600;color:#64d2ff}
#terminal-output .t-dim{color:#8e8e93}
#terminal-output .t-fail{color:#ff6961}
#terminal-output .t-ok{color:#5ad97e}
#terminal-form{display:flex;align-items:baseline;gap:8px}
#terminal-form label{color:#e5e5ea;white-space:nowrap}
#terminal-input{flex:1;min-width:40px;padding:0;border:0;outline:0;background:none;font:inherit;color:#fff;caret-color:#fff}

/* Preview: the résumé */
.resume-shell{min-height:100%;display:flex;flex-direction:column;align-items:center;background:#38383b}
.resume-toolbar{position:sticky;top:0;z-index:2;align-self:stretch;display:flex;align-items:center;gap:8px;padding:7px 12px;background:#2a2a2deb;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:.5px solid #000;font-size:13px}
.resume-toolbar>span{display:flex;align-items:baseline;gap:8px;min-width:0;margin-right:auto;overflow:hidden;font-weight:600;white-space:nowrap;text-overflow:ellipsis}
.resume-toolbar small{font-weight:400;color:var(--label-3)}
.resume-paper{width:min(760px,calc(100% - 40px));margin:22px auto 30px;padding:44px 52px;border-radius:2px;background:#fff;color:#1d2433;box-shadow:0 2px 6px #0006,0 18px 50px #0000004d;font:12.5px/1.55 var(--font)}
.resume-paper header{padding-bottom:12px;margin-bottom:4px;text-align:center;border-bottom:1px solid #dde2ea}
.resume-paper h2{margin:0 0 4px;font-size:27px;font-weight:700;letter-spacing:-.02em}
.resume-paper header p{margin:0;color:#5a6476}
.resume-paper .resume-links{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 14px;margin-top:6px}
.resume-links a{color:#1d5fc4;text-decoration:none}
.resume-paper h3{margin:15px 0 6px;padding-bottom:3px;border-bottom:1px solid #eceff4;font-size:13px;font-weight:700;color:#1d2433}
.resume-paper section>p{margin:0}
.resume-item{margin-bottom:9px}
.resume-item-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.resume-item-head strong{font-size:13.5px}
.resume-item-head span,.resume-meta,.resume-edu span{font-size:11.5px;color:#6a7385}
.resume-item-head span{white-space:nowrap}
.resume-meta{margin:0;font-style:italic}
.resume-paper ul{margin:4px 0 0;padding-left:17px}
.resume-paper li{margin-bottom:3px}
.resume-skills{display:grid;gap:3px;margin:0}
.resume-skills div{display:grid;grid-template-columns:130px 1fr;gap:10px}
.resume-skills dt{font-weight:600}
.resume-skills dd{margin:0}
.resume-edu{display:grid;gap:4px}
.resume-edu div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px}

/* Mail: a new message to Felmon */
.compose{display:flex;flex-direction:column;height:100%;background:var(--win)}
.compose-toolbar{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--bar);border-bottom:.5px solid #000}
.compose-field{display:flex;align-items:center;gap:8px;min-height:40px;margin:0 16px;border-bottom:.5px solid var(--sep);font-size:13.5px}
.compose-field>span:first-child{flex:0 0 60px;color:var(--label-3)}
.recipient{padding:2px 9px;border-radius:999px;background:#0a84ff38;color:#d6e9ff;font-size:13px}
.recipient-address{font-size:12.5px;color:var(--label-3)}
.compose-field input{flex:1;min-width:0;height:38px;border:0;outline:0;background:none;font-size:13.5px;color:var(--label)}
.compose-field input::placeholder,.compose textarea::placeholder{color:var(--label-3)}
.compose textarea{flex:1;min-height:180px;padding:14px 16px;border:0;outline:0;resize:none;background:none;font-size:14px;line-height:1.6;color:var(--label)}
.compose-foot{margin:0;padding:10px 16px;border-top:.5px solid var(--sep);font-size:12px;color:var(--label-3)}
.compose-foot a{color:var(--link);text-decoration:none}
.compose-foot a:hover{text-decoration:underline}

/* System Settings */
.settings{max-width:600px;margin:0 auto;padding:22px 26px 30px}
.settings h2{margin:0 0 12px;font-size:20px;font-weight:700}
.settings h3{margin:24px 4px 8px;font-size:13px;font-weight:600;color:var(--label-2)}
.theme-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.theme-option{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px;color:var(--label-2)}
.theme-option[aria-pressed=true]{color:var(--label)}
.theme-thumb{display:block;width:100%;aspect-ratio:16/10;overflow:hidden;border-radius:8px;box-shadow:0 0 0 .5px #ffffff33;transition:box-shadow .15s}
.theme-thumb>img{display:block;width:100%;height:100%;object-fit:cover}
.theme-midnight>img{filter:brightness(.5) saturate(.75)}
.theme-silver>img{filter:grayscale(1) brightness(.95)}
.theme-option[aria-pressed=true] .theme-thumb{box-shadow:0 0 0 3px var(--blue)}
.group{border-radius:10px;background:var(--raised);border:.5px solid var(--sep)}
.group-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;margin:0;padding:8px 14px;border-top:.5px solid var(--sep);font-size:13px}
.group-row:first-child{border-top:0}
.group-row small{display:block;margin-top:2px;font-size:12px;color:var(--label-3)}
.group-row select{max-width:160px;height:26px;padding:0 8px;border-radius:6px;background:#ffffff1f;border:.5px solid #ffffff1a;font-size:13px;color:var(--label)}
.group-row kbd{padding:2px 7px;border-radius:5px;background:#ffffff14;font:12px var(--font);color:var(--label-2);white-space:nowrap}
input[role=switch]{appearance:none;-webkit-appearance:none;position:relative;flex-shrink:0;width:34px;height:20px;margin:0;border-radius:10px;background:#ffffff33;cursor:pointer;transition:background .2s}
input[role=switch]::before{content:'';position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0006;transition:transform .22s var(--spring)}
input[role=switch]:checked{background:var(--blue)}
input[role=switch]:checked::before{transform:translateX(14px)}
.settings-foot{margin:16px 4px 0;font-size:12px;color:var(--label-3)}

/* Phones: sidebars become a scrolling row above the content. */
@media(max-width:700px){
  .theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  :is(.finder,.prs,.notes-app){display:flex;flex-direction:column}
  :is(.finder,.prs) .sidebar,.notes-list{flex-direction:row;flex:0 0 auto;gap:6px;padding:8px 10px;overflow-x:auto;border-right:0;border-bottom:.5px solid #000;scrollbar-width:none}
  :is(.sidebar-heading,.notes-heading){display:none}
  .sidebar>:is(button,a){flex:0 0 auto;width:auto;height:34px;padding:0 12px;border-radius:17px;background:#ffffff0f}
  .notes-list>button{flex:0 0 auto;max-width:220px;padding:8px 12px}
  .notes-list span{display:none}
  .finder-main,.pr-pane,.note-body{flex:1}
  .finder-toolbar{flex-wrap:wrap}
  .finder-toolbar .search-field{order:3;width:100%}
  #work-grid{padding:16px 14px 20px}
  .work-grid-view{grid-template-columns:minmax(0,1fr)}
  .work-detail-head h2{font-size:25px}
  .info>div{grid-template-columns:84px minmax(0,1fr)}
  .pane-head{padding:16px 16px 14px}
  .pr-list{padding:4px}
  .pr-row{grid-template-columns:20px minmax(0,1fr);padding:10px}
  .pr-date{grid-column:2;grid-row:auto}
  .note-body{padding:14px 18px 36px}
  .note-body h2{font-size:24px}
  .about-mac{padding:22px 20px}
  .about-icon{width:92px;height:92px}
  .specs>div{grid-template-columns:88px minmax(0,1fr)}
  .resume-paper{width:calc(100% - 16px);margin:10px auto 18px;padding:24px 18px}
  .resume-toolbar>span small{display:none}
  .resume-item-head{flex-wrap:wrap;gap:0 12px}
  .resume-skills div{grid-template-columns:1fr;gap:0}
  .compose-field{margin:0 12px}
  .recipient-address{display:none}
  .settings{padding:18px 16px 26px}
  .btn{height:36px}
  .term{font-size:12.5px}
  .search-field input,#terminal-input,.compose-field input,.compose textarea,.scratch textarea{font-size:16px}
}
:is(.finder,.prs,.notes-app,.about-mac,.compose,.settings,.resume-shell,.term) :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--blue);outline-offset:2px}
