/* Rough sample, Mashoor Ahammad portfolio */
:root {
  --bg: #ffffff;
  --ink: #161616;
  --muted: #8a8a86;
  --line: #e6e5e1;
  --soft: #f5f4f1;
  --gutter: clamp(16px, 4vw, 56px);
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }   /* scrolling is eased by nav.js instead */
/* Page fade between pages */
html.page-enter body { opacity: 0; }
html.page-enter.page-in body { opacity: 1; transition: opacity .55s ease; }
html.page-out body { opacity: 0 !important; transition: opacity .45s ease !important; }
/* Project list fades while the filter changes */
#project-list { transition: opacity .35s ease; }
#project-list.swapping { opacity: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; mix-blend-mode: difference; color: #fff; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { opacity: .85; }
.site-header nav a:hover { opacity: 1; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 720px) {
  .site-header nav { display: none; }
  .menu-toggle { display: block; }
  .site-header.open { mix-blend-mode: normal; color: var(--ink); background: var(--bg); flex-wrap: wrap; }
  .site-header.open nav { display: flex; flex-direction: column; gap: 14px; width: 100%; padding: 28px 0 8px; font-size: 18px; }
}

/* Home hero */
.hero { position: relative; height: 92vh; min-height: 520px; overflow: hidden; }
.hero img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0) 45%); }
.hero-text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; z-index: 1; color: #fff; }
.hero-text h1 { font-family: var(--mono); font-weight: 400; font-size: clamp(34px, 6vw, 84px); line-height: 1.02; letter-spacing: -.02em; }
.hero-text p { font-family: var(--mono); font-size: clamp(13px, 1.3vw, 16px); margin-top: 14px; letter-spacing: .03em; text-transform: uppercase; }

/* Cover slideshow */
/* Slides share the project column width, so cover, About and projects align in one column */
.cover { position: relative; min-height: 100vh; padding: 96px var(--gutter) 72px; display: flex; align-items: center; }
.cover-stage { flex: 1; display: grid; align-items: center; }
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity 1.1s ease; pointer-events: none; }
.slide.on { opacity: 1; pointer-events: auto; }
/* Every cover slide uses the same 16:9 frame as the project covers. A slide can shift its crop with style="--focus: x% y%". */
.slide img { width: min(clamp(432px, 51.6vw, 924px), calc((100vh - 200px) * 4 / 3)); max-width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }   /* your axo images are 4:3, so nothing is cut */
@media (max-width: 720px) { .slide img { width: 100%; max-height: none; } }
.slide figcaption { margin-top: 16px; font-family: var(--mono); font-style: italic; font-size: 13px; color: var(--muted); }
.cover-arrow { background: none; border: 0; font-size: 34px; line-height: 1; color: var(--muted); cursor: pointer; padding: 12px; z-index: 2; }
.cover-arrow:hover { color: var(--ink); }
.cover-count { position: absolute; right: var(--gutter); bottom: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.portrait { width: 100%; margin-bottom: 36px; }
.portrait img { aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1); }
.intro-text .label { margin-bottom: 18px; }
.about-copy p { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.7; max-width: 38em; margin-bottom: 1.1em; color: #3a3a38; }
.about-copy strong { font-weight: 500; color: var(--ink); }
.intro .name { font-family: var(--mono); font-weight: 400; font-size: clamp(30px, 4vw, 56px); line-height: 1.05; letter-spacing: -.02em; }
.intro .position { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 30px; }
@media (max-width: 720px) {
  .cover { min-height: 0; padding: 72px 4px 56px; }
  .cover-arrow { font-size: 26px; padding: 6px; }
}

/* About: write-up left, photo right, together exactly as wide as the project image column */
/* About block: same width as the cover slideshow above it, with a wider share for the photo */
.intro { --col: clamp(432px, 51.6vw, 924px); display: grid; grid-template-columns: 1fr calc((var(--col) - 26px) * .52) calc((var(--col) - 26px) * .48) 1fr; column-gap: 26px; align-items: center; padding: 110px var(--gutter) 90px; }
.intro .intro-text { grid-column: 2; grid-row: 1; }
.intro .portrait { grid-column: 3; grid-row: 1; margin-bottom: 0; }
/* Desktop: the photo runs exactly from the top of the "About" label to the bottom of "More about me" */
@media (min-width: 721px) {
  .intro { align-items: stretch; }
  .intro .portrait { position: relative; }
  .intro .portrait img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 50% 15%; }
  .intro .more { margin-bottom: 0; }
}
.intro .name { font-size: clamp(24px, 2.4vw, 36px); }
.intro .position { font-size: 11px; margin: 8px 0 20px; }
.intro .about-copy p { font-size: 14px; line-height: 1.65; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.intro p.lead { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.45; max-width: 30em; }
.intro .more { display: inline-block; margin-top: 28px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* Work list */
.work { padding: 0 var(--gutter) 60px; }
.work-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding: 22px 0 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.filters button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; cursor: pointer; }
.filters button:hover, .filters button.on { color: var(--ink); }
.filters button.on { text-decoration: underline; text-underline-offset: 4px; }
.project-wrap[hidden] { display: none; }
.panel-end { width: 160px; display: flex; align-items: flex-end; }
/* Project list, BIG style: one centred column of images, name and place to the left */
.project { display: grid; grid-template-columns: 1fr clamp(360px, 43vw, 770px) 1fr; column-gap: 26px; margin-bottom: 26px; }
.project-meta { align-self: start; text-align: right; padding-top: 2px; }
.project-meta .num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.project-meta h3 { font-family: var(--sans); font-weight: 400; font-size: 14px; line-height: 1.35; margin: 6px 0 3px; letter-spacing: .01em; }
.project-meta p { color: #b9b8b3; font-size: 11px; letter-spacing: .03em; }
.project-img { overflow: hidden; background: var(--soft); }
/* Every cover uses the same 16:9 shape (the shape of the first four projects).
   The opened project's first image uses the same crop, so the opening and closing animation stays exact.
   A project can shift its crop with "coverFocus" in projects.js (for example "50% 70%"). */
.project-img img, .strip-track > img.hero { aspect-ratio: 16 / 9; object-fit: cover; object-position: var(--focus, 50% 50%); }
.strip-track > img.hero { width: calc(var(--h) * 16 / 9); }
.project-img img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.project:hover .project-img img { transform: scale(1.02); }
.project:hover .project-meta h3 { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; row-gap: 32px; }
  .intro .portrait { grid-column: 1; grid-row: 1; }
  .intro .intro-text { grid-column: 1; grid-row: 2; }
  .project { grid-template-columns: 1fr; row-gap: 10px; margin-bottom: 44px; }
  .project-meta { text-align: left; }
  .intro { padding: 72px var(--gutter) 56px; }
  .work-head { flex-direction: column; gap: 14px; }
}

/* Project opened in place: sideways strip (BIG style) */
.project-wrap { scroll-margin-top: 76px; }
.project-wrap.open > .project { display: none; }
.strip { position: relative; margin: 10px calc(var(--gutter) * -1) 40px; }
.strip-track { --h: min(72vh, 720px); display: flex; align-items: flex-start; gap: 26px; height: calc(var(--h) + 8px); overflow-x: auto; overflow-y: hidden; padding: 0 var(--gutter); padding-left: var(--start, var(--gutter)); }
.strip-track.dragging { cursor: grabbing; user-select: none; }
/* Arrow cursors: right half = next, left half = previous */
.strip-track { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M12 20h16M21 13l7 7-7 7' fill='none' stroke='%23161616' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, e-resize; will-change: transform; scrollbar-width: none; }
.strip-track::-webkit-scrollbar { display: none; }
.strip-track.to-prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M28 20H12M19 13l-7 7 7 7' fill='none' stroke='%23161616' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, w-resize; }
.strip-track button { cursor: pointer; }
.strip-track > img { opacity: 1; }
.strip:not(.shown) .strip-track > img:not(:nth-child(2)) { opacity: 0; }
.strip-track > img { transition: opacity 1.5s .85s ease; }
/* Closing: everything except the main image fades out first, with no delay */
.strip.closing .panel, .strip.closing .strip-track > img, .strip.closing .strip-hint { transition: opacity .45s ease; }
/* The list row fades back in after its project has closed */
@keyframes rowReturn { from { opacity: 0; } to { opacity: 1; } }
.project.row-return { animation: rowReturn .6s ease; }
.strip-track > img { height: var(--h); width: auto; flex: none; background: var(--soft); -webkit-user-drag: none; }
.strip-track > img.drawing { background: #fff; outline: 1px solid var(--line); }
.panel { flex: none; height: var(--h); font-size: 13px; line-height: 1.6; color: #3a3a38; opacity: 0; transition: opacity 1.5s .65s ease; }
.strip.shown .panel { opacity: 1; }
.panel-facts { width: 220px; text-align: right; position: relative; }
.panel-facts .num { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 34px; }
.panel-facts h3 { font-weight: 400; font-size: 15px; line-height: 1.35; color: var(--ink); margin: 6px 0 2px; }
.panel-facts .place { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel-facts dl { margin-top: 28px; }
.panel-facts dt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.panel-facts dd { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.panel-text { width: 300px; }
.panel-text p { margin-bottom: 1em; }
.panel-text h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.panel-text ul { list-style: none; }
.panel-text li { padding: 7px 0; border-top: 1px solid var(--line); }
.panel-text table.areas { font-size: 12px; }
.strip-close { position: absolute; top: 0; right: 0; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.strip-close:hover { color: var(--ink); }
.strip-close.text { position: static; margin-top: 26px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.strip-hint { position: absolute; right: var(--gutter); bottom: -26px; font-family: var(--mono); font-size: 11px; color: var(--muted); opacity: 0; transition: opacity 1.15s 1.15s; }
.strip.shown .strip-hint { opacity: 1; }
@media (max-width: 720px) {
  .strip-track { --h: 56vh; gap: 14px; }
  .panel-facts { width: 170px; }
  .panel-text { width: 250px; }
}

/* Scroll reveal (subtle) */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s ease var(--d, 0s), transform 1s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
/* The About text rises in line by line (each has its own small delay, --d) */
.intro-text .reveal { transform: translateY(32px); transition-duration: 1.1s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin: 0 var(--gutter); padding: 48px 0 56px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; font-size: 14px; }
.site-footer a:hover { text-decoration: underline; }
@media (max-width: 720px) { .site-footer { grid-template-columns: 1fr; } }

/* Project page */
.p-title { padding: 130px var(--gutter) 46px; }
.p-title h1 { font-family: var(--mono); font-weight: 400; font-size: clamp(32px, 5vw, 72px); line-height: 1.05; letter-spacing: -.02em; max-width: 14em; }
.p-title .tagline { margin-top: 18px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); }
.p-hero img { max-height: 88vh; object-fit: cover; }
.p-body { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 80px var(--gutter); }
.facts { display: grid; gap: 20px; align-content: start; }
.facts div span { display: block; }
.facts .val { font-family: var(--mono); font-size: 14px; margin-top: 3px; }
.story p { max-width: 36em; margin-bottom: 1.1em; font-size: 17px; }
.story h2, .section h2 { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.gallery { padding: 0 var(--gutter); display: grid; gap: 16px; }
.gallery .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery .pair img { aspect-ratio: 1 / 1; object-fit: cover; }
figure figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 10px 0 0; }
.section { padding: 90px var(--gutter) 0; }
.role { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.role ul { list-style: none; columns: 2; column-gap: 40px; }
.role li { padding: 10px 0; border-top: 1px solid var(--line); break-inside: avoid; font-size: 15px; }
table.areas { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
table.areas td { padding: 12px 0; border-top: 1px solid var(--line); }
table.areas td:last-child { text-align: right; }
.drawing { background: var(--soft); padding: clamp(12px, 3vw, 40px); }
.pager { display: flex; justify-content: space-between; padding: 110px var(--gutter) 70px; font-family: var(--mono); font-size: clamp(18px, 2vw, 26px); }
.pager small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; }
/* About page */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin: 0 var(--gutter); padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .big { display: block; font-family: var(--mono); font-size: clamp(26px, 3vw, 44px); line-height: 1.1; margin-bottom: 6px; }
.cv-block { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 80px var(--gutter) 0; }
.cv-block > .label { font-weight: 400; }
/* Profile text on the About page lines up with the experience text column (after the 170px date column) */
.cv-block > .about-copy { padding-left: calc(170px + 24px); }
.cv-block > .about-copy p { max-width: none; }
@media (max-width: 720px) { .cv-block > .about-copy { padding-left: 0; } }
.timeline .job { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.timeline .job:first-child { border-top: 0; padding-top: 0; }
.when { font-family: var(--mono); font-size: 13px; }
.when span { display: block; color: var(--muted); margin-top: 4px; }
.job h3 { font-family: var(--mono); font-weight: 400; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.25; }
.firm { color: var(--muted); font-size: 14px; margin-top: 4px; }
.job ul { margin: 14px 0 0 18px; }
.job li { font-size: 15px; margin-bottom: 6px; color: #3a3a38; }
.keyp { margin-top: 14px; font-size: 14px; }
.keyp .label { display: block; margin-bottom: 4px; }
.skills { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.skills > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.skills .lvl { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
ul.plain { list-style: none; }
ul.plain li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
ul.plain.inline { display: flex; flex-wrap: wrap; gap: 0 28px; }
ul.plain.inline li { border-top: 0; padding: 0; font-family: var(--mono); font-size: 14px; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cv-block { grid-template-columns: 1fr; gap: 20px; padding-top: 60px; }
  .timeline .job { grid-template-columns: 1fr; gap: 8px; }
  .skills { grid-template-columns: 1fr; }
}

.draft-note { background: #fff4e5; color: #7a4b00; font-family: var(--mono); font-size: 12px; text-align: center; padding: 8px var(--gutter); position: relative; z-index: 11; }
.todo { background: #fff4e5; color: #7a4b00; padding: 0 4px; }
@media (max-width: 720px) {
  .p-body, .role { grid-template-columns: 1fr; gap: 30px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .role ul { columns: 1; }
  .gallery .pair { grid-template-columns: 1fr; }
  .p-title { padding-top: 100px; }
}
