/* ishahid.com.au — Industry design system: steel on a light technical ground. */

:root {
  /* Colour */
  --ground: #f2f2f3;
  --ink: #1d1f20;
  --body: #424244;
  --muted: #5d5d60;
  --hairline: rgba(29, 31, 32, 0.16);
  --spine-past: rgba(29, 31, 32, 0.28);
  --accent: #416180;
  --accent-hover: #2c455d;
  --dark-field: #1d2d3d;
  --on-dark: #b5d9fd;
  --tint: #d6ebff;
  --reversed: #f2f2f3;
  --focus: #416180;

  /* Type */
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  /* Density multiplier — resolved from the "Tighter" design default. */
  --dm: 0.72;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --column: 1080px;
  --section-top: calc(clamp(56px, 8vw, 104px) * var(--dm));
  --column-gap: clamp(24px, 4vw, 56px);
}

/* ---------- Base ---------- */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--tint);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.accent {
  color: var(--accent);
}

/* Registration marks — the system's framing device in place of radii. */
.mark {
  position: absolute;
  font-family: var(--font-body);
  font-style: normal;
  line-height: 1;
}

/* ---------- Page shell ---------- */

.page {
  min-height: 100vh;
  padding: 0 var(--gutter);
}

.column {
  max-width: var(--column);
  margin: 0 auto;
}

/* ---------- 1. Masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 34px;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 44px) 0 14px;
  border-bottom: 1px solid var(--hairline);
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.masthead__home {
  color: inherit;
}

.masthead__home:hover {
  color: var(--accent);
}

.masthead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 2. Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 0;
  padding: calc(clamp(48px, 8vw, 104px) * var(--dm)) 0 calc(clamp(40px, 6vw, 76px) * var(--dm));
}

.hero__headline {
  grid-column: 1 / -1;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  /* The clamp is the design curve; the 8.2vw cap keeps the three explicit
     line breaks intact on phones, where 40px would wrap them to four. */
  font-size: min(clamp(40px, 6.6vw, 82px), 8.2vw);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.hero__intro {
  grid-column: 1 / -1;
  margin-top: clamp(14px, 1.8vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__rule {
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.hero__lead {
  width: 100%;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}

/* ---------- 3. Proof row ---------- */

.proof {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--hairline);
}

.proof > .mark {
  font-size: 13px;
  color: var(--accent);
}

.mark--tl { left: -5px; top: -8px; }
.mark--tr { right: -5px; top: -8px; }
.mark--bl { left: -5px; bottom: -8px; }
.mark--br { right: -5px; bottom: -8px; }

.proof__cell {
  padding: clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--hairline);
}

/* One column: rules between cells only — the plate's own border closes the box. */
.proof__cell:last-child {
  border-bottom: 0;
}

/* Two up, then four. auto-fit would pass through a 3 + 1 row on the way, which
   leaves an orphan cell and a rule running into empty space. */
@media (min-width: 480px) {
  .proof {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof__cell:nth-child(odd) {
    border-right: 1px solid var(--hairline);
  }

  .proof__cell:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (min-width: 880px) {
  .proof {
    grid-template-columns: repeat(4, 1fr);
  }

  .proof__cell {
    border-right: 1px solid var(--hairline);
    border-bottom: 0;
  }

  .proof__cell:last-child {
    border-right: 0;
  }
}

.proof__figure {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1;
  color: var(--accent);
}

.proof__caption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- 4–6. Labelled sections ---------- */

.block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--column-gap);
  padding: var(--section-top) 0 0;
}

.block__label-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.block__label-number {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.block__body {
  grid-column: span 2;
}

.block__body--stack {
  display: flex;
  flex-direction: column;
}

/* 01 — Currently */

.currently {
  gap: clamp(20px, 3vw, 30px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

.currently__lead {
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}

/* 02 — What I work on */

.competencies {
  gap: 26px;
}

.competencies__item {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}

.lead-in {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12em;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* 03 — Career */

.career {
  display: flex;
  flex-direction: column;
}

/* Wrapping flex, not a two-track grid: auto-fit would equalise the columns
   and destroy the narrow year rail. */
.career__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(18px, 2.5vw, 34px);
  padding-bottom: 34px;
  padding-left: clamp(18px, 2.5vw, 30px);
  border-left: 1px solid var(--hairline);
}

.career__marker {
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--spine-past);
}

.career__marker--current {
  background: var(--accent);
}

.career__years {
  flex: 0 0 116px;
  padding-top: 3px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.career__detail {
  flex: 1 1 320px;
  min-width: 0;
}

.career__role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.3vw, 29px);
  line-height: 1.12;
  letter-spacing: 0.004em;
}

.career__company {
  margin-top: 4px;
  font-size: 14.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.career__description {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 56ch;
  text-wrap: pretty;
}

.career__row--early {
  padding-bottom: 0;
  border-left: 0;
}

.career__row--early .career__years {
  padding-top: 2px;
}

.career__early {
  flex: 1 1 320px;
  min-width: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 56ch;
  text-wrap: pretty;
}

/* 04 — Credentials */

.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(24px, 3.2vw, 44px);
}

.credentials__cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.credentials__cell--education {
  width: min(100%, 343px);
  min-height: 190px;
}

.credentials__subheading {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.credentials__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

.credentials__list--security {
  gap: 12px;
}

.credentials__list--education {
  gap: 26px;
}

.credentials__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 15.5px;
  line-height: 1.4;
}

.credentials__issuer {
  color: var(--muted);
  text-align: right;
}

.credentials__entry {
  font-size: 15.5px;
  line-height: 1.45;
}

.credentials__sub {
  margin-top: 3px;
  color: var(--muted);
}

/* ---------- 7. Closing panel + footer ---------- */

/* Sibling of the content column, so the dark field bleeds the full page width. */
.panel {
  position: relative;
  background: var(--dark-field);
  color: var(--reversed);
  margin: calc(clamp(64px, 9vw, 120px) * var(--dm)) calc(-1 * var(--gutter)) 0;
  padding: clamp(52px, 7.5vw, 96px) var(--gutter) clamp(22px, 2.4vw, 30px);
  min-height: 125px;
}

.panel > .mark {
  font-size: 14px;
  color: rgba(242, 242, 243, 0.45);
}

.panel > .mark--tl { left: 9px; top: 4px; right: auto; bottom: auto; }
.panel > .mark--tr { right: 9px; top: 4px; left: auto; bottom: auto; }
.panel > .mark--bl { left: 9px; bottom: 4px; right: auto; top: auto; }
.panel > .mark--br { right: 9px; bottom: 4px; left: auto; top: auto; }

.panel {
  --focus: #b5d9fd;
}

.panel__row {
  max-width: var(--column);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(30px, 4vw, 56px);
}

.panel__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.008em;
  max-width: 28ch;
  text-wrap: balance;
}

.button {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--reversed);
  color: var(--dark-field);
  padding: 18px 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 160ms ease;
}

.button:hover {
  background: var(--tint);
  color: var(--dark-field);
}

.button:active {
  background: var(--on-dark);
}

.button > .mark {
  font-size: 11px;
  color: rgba(29, 45, 61, 0.5);
}

.button > .mark--tl { left: 4px; top: 2px; right: auto; bottom: auto; }
.button > .mark--tr { right: 4px; top: 2px; left: auto; bottom: auto; }
.button > .mark--bl { left: 4px; bottom: 2px; right: auto; top: auto; }
.button > .mark--br { right: 4px; bottom: 2px; left: auto; top: auto; }

/* Top rule bleeds the full panel width; the row re-establishes the column. */
.footer {
  margin: clamp(40px, 5.5vw, 72px) calc(-1 * var(--gutter)) 0;
  border-top: 1px solid rgba(242, 242, 243, 0.22);
  padding: 22px var(--gutter) 0;
  font-size: 14.5px;
  color: var(--on-dark);
}

.footer__row {
  max-width: var(--column);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  align-items: baseline;
  justify-content: space-between;
}

.footer__copyright {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Scroll reveals ---------- */

/* Hidden state applies only when the script can reveal it again: the class is
   set in <head> and never added when IntersectionObserver or motion is absent. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 720ms cubic-bezier(.2, .6, .2, 1), transform 720ms cubic-bezier(.2, .6, .2, 1);
}

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media print {
  /* Whatever the observer has or hasn't fired, everything prints. */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .page {
    min-height: 0;
  }

  .panel {
    background: var(--ground);
    color: var(--ink);
  }

  .panel > .mark,
  .button > .mark {
    display: none;
  }

  .button {
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--ink);
  }

  .footer {
    color: var(--muted);
    border-top-color: var(--hairline);
  }

  .block,
  .career__row {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .button {
    transition: none;
  }
}
