/* Maryam Tariq — portfolio */
:root {
  --ink: #000;
  --ink-2: #1a1a1a;
  --ink-3: #262626;
  --muted: #525252;
  --muted-2: #6b6b6b;
  --muted-3: #6f6f6f;
  --line: #e0e0e0;
  --line-2: #e5e5e5;
  --tag-line: #d9d9d9;
  --ibm-blue: #0f62fe;
  --ibm-tint: #f4f8ff;
  --ibm-callout: #edf5ff;
  --cf-orange: #d9600c;
  --cf-tint: #f7f5f2;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: 48px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #000; color: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--ibm-blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 40px var(--pad);
  font-family: var(--serif);
  position: relative; z-index: 2;
}
.site-name { font-size: 40px; line-height: 1; }
.site-nav { display: flex; gap: 32px; font-size: 24px; line-height: 1; }
.site-nav a, .link-underline {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s var(--ease);
  padding-bottom: 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"], .link-underline:hover { background-size: 100% 1px; }

main { display: block; }

/* ---------- Shared type ---------- */
.display { font-family: var(--serif); font-size: 78px; line-height: 1; letter-spacing: -0.01em; }
.lede { font-size: 22px; line-height: 1.4; max-width: 720px; }
.section-title { font-family: var(--serif); font-size: 48px; line-height: 1.1; }

/* ---------- Home ---------- */
.home-hero {
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
  padding: 80px var(--pad);
}
.home-hero .title-row { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.wave {
  width: 72px; height: 72px;
  transform-origin: 70% 80%;
  animation: wave 2.4s var(--ease) .6s 1 both;
}
.wave:hover { animation: wave 1.2s var(--ease) 1; }
@keyframes wave {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
  60% { transform: rotate(0); }
}
.previously { display: flex; align-items: center; gap: 32px; color: var(--muted-2); font-size: 20px; line-height: 1.4; flex-wrap: wrap; }
.previously a { display: block; transition: transform .3s var(--ease), opacity .3s; }
.previously a:hover { transform: translateY(-2px); opacity: .8; }
.previously img { height: 32px; width: auto; }

/* ---------- Page intro (Work / About / Contact) ---------- */
.page { padding: 24px var(--pad) 120px; }
.page-intro { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.page-intro .lede { line-height: 30px; }

/* ---------- Work cards ---------- */
.work-section { padding-top: 24px; }
.work-section .section-title { margin-bottom: 30px; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.job-card {
  position: relative; display: block; height: 440px; border-radius: 16px; overflow: hidden;
  isolation: isolate;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.job-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .35); }
.job-card .meta { position: absolute; left: 24px; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 16px; color: #fff; z-index: 2; }
.job-card .meta strong { display: block; font-weight: 600; font-size: 24px; line-height: 1.15; }
.job-card .meta span { display: block; font-size: 16px; line-height: 1.2; color: rgba(255, 255, 255, .9); margin-top: 4px; }
.job-card .meta span.arrow { display: inline-block; margin: 0; font-size: inherit; color: inherit; transition: transform .35s var(--ease); }
.job-card:hover .arrow { transform: translateX(4px); }

.job-card.ibm { background: var(--ibm-tint); }
.job-card.ibm::before {
  content: ""; position: absolute; inset: -19.5px 0 0 -12px;
  background: url("assets/ibm-pattern.svg") 0 0 / 170px 55px repeat;
  z-index: 0;
}
.job-card.ibm::after {
  content: ""; position: absolute; left: 0; right: 0; top: 180px; bottom: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15, 98, 254, 0) 0%, rgba(15, 98, 254, .85) 60%, #0043ce 100%);
}
.job-card.ibm .logo { height: 36px; width: 90px; }
.job-card.ibm .logo img { height: 36px; width: 90px; filter: brightness(0) invert(1); }

.job-card.cf { background: #fa5a14; }
.job-card.cf > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .8s var(--ease); }
.job-card.cf:hover > img.bg { transform: scale(1.06); }
.job-card.cf .logo img { height: 36px; width: auto; }

/* ---------- About ---------- */
.skill-groups { display: flex; flex-direction: column; gap: 32px; margin-top: 32px; }
.skill-group h2 { font-family: var(--sans); font-size: 20px; line-height: 30px; color: var(--muted-2); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; padding: 0; margin: 0; }
.tags li {
  font-size: 20px; line-height: 30px; color: var(--ink-2);
  padding: 6px 12px; border: 1px solid var(--tag-line); border-radius: 999px; background: #fff;
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.tags li:hover { border-color: #9a9a9a; transform: translateY(-2px); }

/* ---------- Contact ---------- */
.contact-body { display: flex; flex-direction: column; gap: 40px; max-width: 720px; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.contact-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-2); font-size: 22px; line-height: 30px; }
.contact-list .k { color: var(--muted-2); }
.contact-list .v { color: var(--ink-2); font-weight: 500; text-align: right; }
.contact-list a.v { transition: color .25s; }
.contact-list a.v .ne { display: inline-block; transition: transform .3s var(--ease); }
.contact-list a.v:hover .ne { transform: translate(3px, -3px); }
.contact-list a.v:hover { color: #000; }

/* ---------- Company overview ---------- */
.overview { padding: 96px var(--pad) 120px; display: flex; flex-direction: column; gap: 32px; }
.banner { border-radius: 16px; overflow: hidden; aspect-ratio: 1344 / 340; background: var(--ibm-tint); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.overview-head { display: flex; justify-content: space-between; gap: 48px; align-items: flex-start; }
.overview-head h1 { font-size: 56px; line-height: 1.1; max-width: 640px; }
.overview-head .right { width: 600px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.overview-head .right p { font-size: 18px; line-height: 1.6; }
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: 193px 193px; column-gap: 40px; row-gap: 16px; }
.facts dt { font-size: 13px; font-weight: 600; color: var(--muted-3); line-height: 1.1; }
.facts dd { margin: 4px 0 0; font-size: 15px; color: #161616; line-height: 1.1; }
.facts div { min-width: 0; }

.block-title { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin-bottom: 24px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.project-card { display: flex; flex-direction: column; gap: 8px; }
.project-card .thumb {
  height: 300px; border-radius: 8px; background: var(--ibm-tint);
  display: grid; place-items: center; margin-bottom: 0; overflow: hidden;
  transition: background .4s var(--ease);
}
.project-card .thumb img { width: 120px; height: 120px; transition: transform .5s var(--ease); }
.project-card:hover .thumb { background: #e8f0ff; }
.project-card:hover .thumb img { transform: scale(1.08); }
.project-card h3 { font-size: 24px; line-height: 1.1; }
.project-card p { font-size: 15px; line-height: 1.1; color: var(--muted); }
.read-more { font-size: 15px; font-weight: 600; line-height: 1.1; color: var(--ibm-blue); display: inline-flex; gap: 6px; align-items: center; }
.read-more .arrow { display: inline-block; transition: transform .35s var(--ease); }
a:hover .read-more .arrow, .read-more:hover .arrow { transform: translateX(4px); }
.cf-theme .read-more { color: var(--cf-orange); }

.feature-card { display: flex; flex-direction: column; gap: 8px; }
.feature-card .thumb { border-radius: 8px; overflow: hidden; aspect-ratio: 1344 / 300; }
.feature-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.feature-card:hover .thumb img { transform: scale(1.02); }
.feature-card h3 { font-size: 24px; line-height: 1.1; margin-top: 8px; }
.feature-card p { font-size: 15px; line-height: 1.3; color: var(--muted); }

.badges { display: flex; gap: 32px; flex-wrap: wrap; }
.badge { width: 298px; display: flex; flex-direction: column; gap: 12px; }
.badge .art { width: 220px; height: 220px; padding: 10px; }
.badge .art img { width: 200px; height: 200px; object-fit: contain; transition: transform .5s var(--ease); }
.badge:hover .art img { transform: rotate(-3deg) scale(1.04); }
.badge strong { font-size: 16px; font-weight: 600; line-height: 1.5; color: #161616; display: block; }
.badge span { font-size: 14px; line-height: 1.5; color: var(--muted-3); display: block; margin-top: 4px; }
.badges.center .badge { align-items: center; text-align: center; }
.badges.left .badge .text { max-width: 200px; }

/* ---------- Case study ---------- */
.study { padding: 96px var(--pad) 120px; display: flex; flex-direction: column; align-items: center; gap: 48px; }
.study > * { width: 100%; max-width: 720px; }
.back { font-size: 15px; color: var(--muted-3); line-height: 1; }
.back .arrow { display: inline-block; transition: transform .35s var(--ease); }
.back:hover .arrow { transform: translateX(-4px); }
.study-head h1 { font-size: 56px; line-height: 1.1; }
.study-head p { font-size: 20px; line-height: 1.3; color: var(--muted); margin-top: 8px; }
.tools-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; display: flex; gap: 12px; font-size: 15px; line-height: 16px; flex-wrap: wrap; }
.tools-bar strong { font-weight: 600; }
.tools-bar span { color: var(--muted); }
.s { display: flex; flex-direction: column; gap: 12px; }
.s h2 { font-size: 32px; line-height: 1.1; }
.s p, .s li { font-size: 17px; line-height: 27px; color: var(--ink-3); }
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px 0; }
.boxes.two { grid-template-columns: 1fr 1fr; gap: 24px; padding: 0; }
.box { background: var(--ibm-tint); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; transition: transform .35s var(--ease); }
.box:hover { transform: translateY(-3px); }
.box strong { font-size: 15px; font-weight: 600; line-height: 1.35; }
.box span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.cf-theme .box { background: var(--cf-tint); gap: 10px; }
.cf-theme .box strong { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.callout { background: var(--ibm-callout); border-radius: 16px; padding: 24px; }
.callout h2 { font-size: 26px; }
.dots { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.dots li { position: relative; padding-left: 17px; }
.dots li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.caption { font-size: 13px; line-height: 1.4; color: var(--muted-3); }
.figure { border-radius: 8px; overflow: hidden; }
.figure img { width: 100%; }
.mocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.mocks figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.figure.framed, .mocks img { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.figure.framed { padding: 0; }
.mocks img { width: 100%; transition: transform .4s var(--ease); }
.mocks figure:hover img { transform: translateY(-3px); }
.badges.left .badge .art { padding: 0; }
.badges.left .badge .art img { width: 220px; height: 220px; }
.figure-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.note { font-style: italic; font-size: 14px; line-height: 16px; color: var(--muted-3); }
.study .end { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; font-size: 15px; color: var(--muted-3); }
.study .end a:hover { color: #000; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.page-fade { animation: pagefade .6s var(--ease) both; }
@keyframes pagefade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .overview-head { flex-direction: column; }
  .overview-head .right { width: 100%; max-width: 640px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  :root { --pad: 24px; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 20px; padding: 28px var(--pad); }
  .site-name { font-size: 32px; }
  .site-nav { font-size: 20px; gap: 22px; flex-wrap: wrap; }
  .display { font-size: 52px; }
  .home-hero .display { font-size: 46px; }
  .home-hero .title-row { gap: 12px; }
  .job-card.ibm::after { top: 35%; }
  .project-card .thumb { height: 200px; }
  .project-card .thumb img { width: 96px; height: 96px; }
  .banner { aspect-ratio: auto; height: 150px; }
  .banner img { object-position: left bottom; }
  .wave { width: 44px; height: 44px; flex-shrink: 0; }
  .lede, .contact-list li { font-size: 18px; line-height: 1.45; }
  .section-title { font-size: 38px; }
  .cards-2, .project-grid, .boxes, .boxes.two { grid-template-columns: 1fr; }
  .job-card { height: 340px; }
  .tags { gap: 12px; }
  .tags li, .skill-group h2 { font-size: 16px; line-height: 24px; }
  .overview, .study { padding-top: 40px; }
  .overview-head h1, .study-head h1 { font-size: 40px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .feature-card .thumb { aspect-ratio: 16 / 7; }
  .figure-labels { display: none; }
  .mocks { grid-template-columns: 1fr; max-width: 320px; }
  .badge { width: 100%; max-width: 298px; }
  .contact-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-list .v { text-align: left; }
}
