/* ahadhassan.com. The look is the Mission Control design system.
   Loaded after tokens.css. Every color comes from a token, so the two modes need no extra rules.
   Rules marked "from Mission Control" are copied as written. Rules marked "site" are this site's own. */

/* 1. Derived variables, from Mission Control. */
:root,[data-theme],.mc{
--mc-surface-page:color-mix(in srgb,var(--mc-page) var(--mc-alpha,100%),transparent);
--mc-surface-panel:color-mix(in srgb,var(--mc-panel) var(--mc-alpha,100%),transparent);
--mc-surface-raised:color-mix(in srgb,var(--mc-raised) var(--mc-alpha,100%),transparent);
--mc-font-text:var(--font-text);
--mc-font-mono:var(--font-mono);
}

/* 2. Base, from Mission Control. */
body{margin:0;background:var(--mc-page);color:var(--mc-text-1);font-family:var(--mc-font-text);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
.mc{box-sizing:border-box;color:var(--mc-text-1);font-family:var(--mc-font-text);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
.mc *,.mc *::before,.mc *::after{box-sizing:border-box}
:where(.mc) h1,:where(.mc) h2,:where(.mc) h3,:where(.mc) p,:where(.mc) dl,:where(.mc) dt,:where(.mc) dd,:where(.mc) ol,:where(.mc) ul{margin:0}
:where(.mc) ol,:where(.mc) ul{padding:0;list-style:none}
.mc button,.mc textarea{font-family:inherit}
.mc :focus-visible{outline:2px solid var(--mc-emphasis);outline-offset:2px}
.mc-mono{font-family:var(--mc-font-mono);font-variant-numeric:tabular-nums}
.mc-micro{font-size:11px;line-height:1.3;font-weight:500;letter-spacing:.09em;text-transform:uppercase;color:var(--mc-text-2)}
.mc-ico{flex:none;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* 3. Parts, from Mission Control. */
.mc-rail{display:flex;align-items:center;gap:8px;min-width:0;height:40px;padding:0 12px 0 16px;border-bottom:1px solid var(--mc-hairline);background:var(--mc-surface-page)}
.mc-wordmark{flex:none;margin-right:8px;font-size:11px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;white-space:nowrap;color:var(--mc-emphasis)}
.mc-wm-full{display:none}
.mc-navlist{display:flex;align-items:center;align-self:stretch;gap:2px;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
.mc-nav{position:relative;display:inline-flex;align-items:center;gap:8px;flex:none;height:100%;padding:0 9px;font-size:13px;line-height:1;white-space:nowrap;text-decoration:none;color:var(--mc-text-2)}
.mc-nav:hover{color:var(--mc-text-1)}
.mc-nav.is-here{font-weight:600;color:var(--mc-emphasis)}
.mc-nav.is-here::after{content:"";position:absolute;left:9px;right:9px;bottom:0;height:2px;background:var(--mc-emphasis)}
.mc-rail-end{display:flex;align-items:center;gap:6px;flex:none;margin-left:8px}

.mc-plate{display:flex;flex-direction:column;gap:16px;padding:14px 14px 0;border-radius:3px;background:var(--mc-surface-panel)}
.mc-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px 32px}
.mc-head-title{flex:1 1 280px;min-width:0}
.mc-head h1{font-size:22px;line-height:1.2;font-weight:600;letter-spacing:-.012em;color:var(--mc-emphasis)}

.mc-panel{min-width:0;border-radius:3px;background:var(--mc-surface-panel)}
.mc-panel-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;min-height:46px;padding:8px 14px}
.mc-panel-rule{flex:1 1 16px;min-width:16px;height:1px;background:var(--mc-hairline)}
.mc-pos{font-size:11.5px;white-space:nowrap;color:var(--mc-text-2)}

.mc-icon-btn{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;padding:0;border:1px solid var(--mc-control);border-radius:3px;background:transparent;color:var(--mc-text-1);cursor:pointer}
.mc-icon-btn:hover{background:var(--mc-raised);color:var(--mc-emphasis)}
a.mc-icon-btn{text-decoration:none}

.mc-btns{display:flex;flex-wrap:wrap;gap:8px}
.mc-btn{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1 1 84px;height:44px;padding:0 16px;border:1px solid var(--mc-control);border-radius:3px;background:transparent;font-size:14px;font-weight:600;line-height:1;color:var(--mc-text-1);cursor:pointer}
.mc-btn:hover{background:var(--mc-raised);color:var(--mc-emphasis)}
a.mc-btn{text-decoration:none}

.mc-link{color:var(--mc-text-1);text-decoration:underline;text-decoration-color:var(--mc-control);text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer}
.mc-link:hover{color:var(--mc-emphasis);text-decoration-color:var(--mc-emphasis)}

.mc-empty{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:8px 14px 22px}
.mc-empty h3{font-size:22px;line-height:1.22;font-weight:600;letter-spacing:-.014em;color:var(--mc-emphasis)}
.mc-empty p{max-width:520px;font-size:14px;line-height:1.5;color:var(--mc-text-1)}

/* 4. Site. The shell. */

/* The window over the wallpaper. Mission Control's desktop window fades its surfaces and lets
   the wallpaper show through, and this page simulates that at a fixed 85 percent. Only the
   surfaces fade. Text, lines, and controls stay solid. The wallpaper image is smudged sideways
   before it ships, and --mc-blur softens it on top. Light mode takes a little less blur. */
:root{--mc-alpha:85%;--mc-blur:16px}
[data-theme="light"]{--mc-blur:12px}

/* The wave lines are multiplied by --wave-dim, so they draw fainter in the light mode. */
:root{--wave-dim:1}
[data-theme="light"]{--wave-dim:.45}
html{background:var(--mc-page)}
body{background:transparent}
.wallpaper{position:fixed;inset:calc(var(--mc-blur) * -2);z-index:0;pointer-events:none;background:var(--mc-page) url("/images/wallpaper.jpg") center/cover no-repeat;filter:blur(var(--mc-blur))}
.wallpaper-tint{position:fixed;inset:0;z-index:0;pointer-events:none;background:var(--mc-surface-page)}
.waves{position:fixed;inset:0;z-index:0;width:100%;height:100%;pointer-events:none}
/* The rail keeps a blur of its own, so text that scrolls under it doesn't show through its labels. */
.mc-rail{position:sticky;top:0;z-index:10;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
a.mc-wordmark{text-decoration:none}
.mc-icon-btn[disabled],.mc-icon-btn[disabled]:hover{border-color:var(--mc-hairline);background:transparent;color:var(--mc-text-2);cursor:default}
.site-main{position:relative;z-index:1;display:flex;flex-direction:column;gap:16px;max-width:1216px;margin:0 auto;padding:18px 48px 64px}
.site-plate{padding-bottom:16px}
.site-stack{display:flex;flex-direction:column;gap:16px;min-width:0}

/* The name is the one size outside the sixteen type styles. */
.site-name h1{font-size:34px;line-height:1.1;letter-spacing:-.014em}

/* Bio text reads at 16px, since this page is for reading. A paragraph's first sentence is its
   headline. It takes a line of its own in the emphasis tone, so the page can be read by its
   bold lines alone. */
.site-prose p{max-width:68ch;font-size:16px;line-height:1.6;color:var(--mc-text-1)}
.site-prose p + p{margin-top:12px}
.site-prose strong{display:block;font-weight:600;color:var(--mc-emphasis)}

/* A panel of text with no head. */
.site-block{padding:16px 14px 18px}

/* Bullets. The mark is the 4px dot, and a figure takes the mono face in the emphasis tone. */
.site-bullets{margin-top:14px}
.site-bullets li{position:relative;max-width:68ch;padding-left:16px;font-size:16px;line-height:1.5;color:var(--mc-text-1)}
.site-bullets li + li{margin-top:8px}
.site-bullets li::before{content:"";position:absolute;left:2px;top:calc(.75em - 2px);width:4px;height:4px;border-radius:50%;background:var(--mc-control)}
.site-num{font-size:.9375em;font-weight:500;color:var(--mc-emphasis)}

/* Lines of short items with a dot between neighbors. Every item carries its dot in 19px of
   padding on its left, and each line is pulled left by the same 19px. The dot of the first item
   on a line then falls outside the box and is clipped, so a line that wraps on a narrow screen
   never starts or ends with a dot. The four lines hold from 390px up. */
.site-dots{margin:0 14px 16px;overflow:hidden}
.site-dots ul{display:flex;flex-wrap:wrap;margin-left:-19px}
.site-dots li{position:relative;padding-left:19px;font-size:14px;line-height:1.8;white-space:nowrap;color:var(--mc-text-1)}
.site-dots li::before{content:"";position:absolute;left:8px;top:50%;width:3px;height:3px;margin-top:-1.5px;border-radius:50%;background:var(--mc-control)}

/* Contact. Two groups of buttons, the addresses and the profiles. The groups share a row when
   there is room, and each one wraps on its own when there is not. */
.site-contact{display:flex;flex-wrap:wrap;gap:8px;max-width:668px;padding:14px}
.site-contact .mc-btns{flex:1 1 auto}
.site-contact .mc-btn{white-space:nowrap}
.site-empty{padding-top:22px}

/* 5. Site. The About page. */

/* Text on the left and photos on the right. The photo column is held from the first paint, so
   the text never moves when the photos arrive. With no photos the text takes the full width. */
.about-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:16px;align-items:start}
.about-grid.no-carousel{grid-template-columns:minmax(0,1fr)}
.about-grid .carousel{position:sticky;top:56px}

.carousel[hidden]{display:none}
.carousel-frame{position:relative;margin:0 14px;padding:12px}
.carousel-tk{position:absolute;width:12px;height:12px;border:0 solid var(--mc-hairline);pointer-events:none}
.carousel-tk-tl{left:0;top:0;border-left-width:1px;border-top-width:1px}
.carousel-tk-tr{right:0;top:0;border-right-width:1px;border-top-width:1px}
.carousel-tk-bl{left:0;bottom:0;border-left-width:1px;border-bottom-width:1px}
.carousel-tk-br{right:0;bottom:0;border-right-width:1px;border-bottom-width:1px}
.carousel-stage{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.carousel-img{display:block;max-width:100%;max-height:62vh;width:auto;height:auto;border-radius:2px;background:var(--mc-raised);-webkit-user-drag:none}
.carousel-img:not(.is-active){visibility:hidden}
.carousel-stage .carousel-img{grid-area:1/1;cursor:zoom-in}
.carousel-caption{padding:10px 14px 0;font-size:12px;line-height:1.45;color:var(--mc-text-2)}
.carousel-caption:empty{display:none}
.carousel-nav{display:flex;align-items:center;justify-content:center;gap:16px;padding:14px 14px 16px}
.carousel-nav[hidden],.carousel-arrows[hidden]{display:none}
.carousel-dots{display:flex;gap:8px}
.carousel-dot{appearance:none;-webkit-appearance:none;position:relative;width:7px;height:7px;padding:0;border:1px solid var(--mc-control);border-radius:1px;background:transparent;cursor:pointer}
/* The mark stays 7px. The area that takes a press reaches halfway to the next dot and 10px above and below. */
.carousel-dot::after{content:"";position:absolute;inset:-10px -5px}
.carousel-dot[aria-current="true"]{border-color:var(--mc-emphasis);background:var(--mc-emphasis)}
.carousel-arrows{display:flex;gap:6px}
@media (hover:none){.carousel-nav .mc-icon-btn{display:none}}

body:has(.lightbox[open]){overflow:hidden}
.lightbox{width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:24px;border:0;background:var(--mc-page);color:var(--mc-text-1);font-family:inherit}
.lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}
.lightbox::backdrop{background:var(--mc-page)}
.lightbox-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px;color:var(--mc-text-2)}
.lightbox-stage{min-height:0;display:flex;align-items:center;justify-content:center;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.lightbox-img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;border-radius:2px;-webkit-user-drag:none}
.lightbox-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:30px}
.lightbox-caption{font-size:13px;line-height:1.45;color:var(--mc-text-1)}

/* 6. Site. Widths follow the viewport. */
@media (min-width:640px){
.mc-wm-full{display:inline}
.mc-wm-short{display:none}
}
@media (max-width:1023px){
.site-main{padding:18px 32px 56px}
}
/* One column. The panels of the text column join the grid, so the photos can sit between them.
   The name and the Neurobane panel come first, then the photos of Neurobane, then the rest. */
@media (max-width:767px){
.about-grid{grid-template-columns:minmax(0,1fr)}
.about-grid .site-stack{display:contents}
.about-grid .site-stack > :nth-child(n+3){order:2}
.about-grid .carousel{position:static;order:1}
.carousel-img{max-height:60vh}
.lightbox{padding:16px}
}
@media (max-width:439px){
.mc-rail{gap:4px;padding:0 10px 0 12px}
.mc-wordmark{margin-right:2px}
.mc-nav{padding:0 6px}
.mc-nav.is-here::after{left:6px;right:6px}
.mc-rail-end{margin-left:4px}
}
@media (max-width:639px){
.site-main{padding:16px 16px 48px}
.site-name h1{font-size:28px}
}
