/* ============================================================
   Adeel Ahmad — portfolio
   Palette: ink-navy base, brass accent, jade reserved for live status only.
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --bg:        #0B1220;
  --bg-alt:    #0E1729;
  --panel:     #131C2E;
  --line:      #22304A;
  --line-soft: #1A2438;

  --text:      #E6ECF5;
  --text-dim:  #8A9BB5;

  --brass:     #E3B23C;
  --brass-dim: #B98D26;
  --jade:      #3FB984;   /* functional: live status only */

  --f-display: 'Archivo', system-ui, sans-serif;
  --f-body:    'IBM Plex Sans', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--brass); color: #12161f;
  padding: 10px 16px; font-weight: 600; z-index: 100;
}
.skip:focus { left: 16px; top: 12px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex; align-items: center; gap: 28px;
  padding-block: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--brass); color: var(--brass);
  font-family: var(--f-mono); font-size: 0.78rem; font-weight: 500;
  border-radius: 3px;
}
.brand-photo {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; object-position: 50% 22%;
  border: 1px solid var(--line); flex: none;
}
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }

.head-nav { display: flex; gap: 26px; margin-left: auto; font-size: 0.94rem; }
.head-nav a { color: var(--text-dim); transition: color .18s; }
.head-nav a:hover { color: var(--text); }
.head-cta { margin-left: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px;
  font-family: var(--f-body); font-size: 0.95rem; font-weight: 600;
  border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; transition: background .18s, border-color .18s, color .18s;
}
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-full { width: 100%; }
.btn-accent { background: var(--brass); color: #12161f; }
.btn-accent:hover { background: #f0c157; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }

/* ---------- hero ---------- */
.hero { padding-block: 92px 76px; }
.hero-grid {
  display: grid; gap: 56px;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.1rem);
  margin-bottom: 24px;
}
.lede {
  font-size: 1.15rem; color: var(--text-dim);
  max-width: 34em; margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-meta {
  display: flex; flex-direction: column; gap: 9px;
  font-size: 0.92rem; color: var(--text-dim);
  border-top: 1px solid var(--line-soft); padding-top: 22px;
}
.hero-meta li::before {
  content: '—'; color: var(--brass); margin-right: 10px;
}

/* ---------- status panel (signature) ---------- */
.status {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 22px 24px 20px;
}
/* portrait sits on the panel colour, so it reads as a cutout, not a photo box */
.portrait {
  display: block; width: calc(100% + 46px);
  max-width: none; height: auto;
  margin: -22px -24px 4px -22px;
  border-radius: 5px 5px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
}
.status-head {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.status-title { font-weight: 600; font-size: 0.95rem; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim); flex: none;
}
.dot-live {
  background: var(--jade);
  box-shadow: 0 0 0 0 rgba(63, 185, 132, 0.55);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,185,132,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(63,185,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,185,132,0); }
}
.status-list { display: flex; flex-direction: column; gap: 13px; margin: 0; }
.status-list > div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
/* rows whose value is too long to sit beside its label */
.status-list > div.stack { flex-direction: column; gap: 4px; align-items: stretch; }
.status-list > div.stack dd { text-align: left; }
.status-list dt {
  font-family: var(--f-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); flex: none;
}
.status-list dd { margin: 0; font-size: 0.9rem; text-align: right; }
.status-link {
  display: inline-block; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%; font-size: 0.9rem; font-weight: 600; color: var(--brass);
}
.status-link:hover { color: #f0c157; }

/* ---------- sections ---------- */
.section { padding-block: 88px; border-top: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-alt); }
.sec-head { max-width: 58ch; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.sec-sub { color: var(--text-dim); margin-top: 16px; }

/* ---------- cases ---------- */
.cases { display: flex; flex-direction: column; gap: 20px; }
.case {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;               /* lets the screenshot bleed to the card edge */
  transition: border-color .2s;
}
.case:hover { border-color: #2E3F5E; }
/* The card's own padding lives here, so the banner can sit outside it.
   The body paragraphs stack, so the copy reads top to bottom in one column. */
.case-body {
  padding: 30px 32px;
}
.case-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 4px 10px;
}
.tag-live { color: var(--jade); border-color: rgba(63,185,132,0.35); }
.case-span { color: var(--text-dim); }
.case h3 { font-size: 1.5rem; margin-bottom: 8px; }
.case-role {
  font-family: var(--f-mono); font-size: 0.78rem;
  color: var(--brass); margin-bottom: 16px;
}
.case p { color: var(--text-dim); }
.case p + p { margin-top: 14px; }
.case h3 a { transition: color .18s; }
.case h3 a:hover { color: var(--brass); }
.case h3 a::after {
  content: '↗'; font-size: 0.62em; margin-left: 8px;
  color: var(--brass); vertical-align: super;
}

/* screenshot of the live product, as a banner across the head of the card.
   A fixed ratio keeps all four the same height whatever the source aspect,
   and anchoring to the top keeps each site's header and hero in frame. */
.case-shot {
  display: block; position: relative;
  aspect-ratio: 5 / 2;
  border-bottom: 1px solid var(--line);
  overflow: hidden; line-height: 0;
}
.case-shot img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0;
  filter: saturate(0.9) brightness(0.86);
  transition: filter .3s;
}
.case-shot:hover img { filter: none; }
/* a soft floor under the shot so it sits into the card instead of ending abruptly */
.case-shot::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 28%;
  background: linear-gradient(to bottom, transparent, rgba(19,28,46,0.42));
  pointer-events: none;
}
.case-shot + .case-body { padding-top: 26px; }

/* flow diagram — the shape of the system, in place of a screenshot */
.flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.flow li { display: flex; align-items: center; gap: 9px; }
.flow li span {
  font-family: var(--f-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 6px 11px;
}
.flow li:not(:last-child)::after {
  content: '→'; color: var(--brass); opacity: 0.8; font-size: 0.85rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li {
  font-family: var(--f-mono); font-size: 0.74rem;
  color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 5px 10px;
}
.earlier {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim); font-size: 0.95rem;
}
.earlier .mono { color: var(--brass); }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }
.skill-col h3 {
  font-size: 0.95rem; font-weight: 600; color: var(--brass);
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0;
}
.skill-col ul { display: flex; flex-direction: column; gap: 9px; }
.skill-col li { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- roles ---------- */
.roles {
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
.role {
  display: grid; grid-template-columns: 190px 1fr; gap: 28px;
  padding: 26px 0 26px 28px;
  position: relative;
}
.role::before {
  content: ''; position: absolute; left: -4px; top: 34px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); border: 1px solid var(--bg);
}
.role-current::before { background: var(--jade); }
.role-when { color: var(--text-dim); padding-top: 4px; }
.role h3 { font-size: 1.15rem; margin-bottom: 6px; }
.role .at { color: var(--brass); font-weight: 500; }
.role .at a { border-bottom: 1px solid transparent; transition: border-color .18s; }
.role .at a:hover { border-bottom-color: var(--brass); }
.role p { color: var(--text-dim); font-size: 0.95rem; max-width: 60ch; }
.edu {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--line-soft); color: var(--text-dim);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start;
}
.contact-list {
  display: flex; flex-direction: column; gap: 14px; margin-top: 32px;
}
.contact-list li {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft);
}
.contact-list .label {
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.7rem; width: 88px; flex: none;
}
.contact-list a { color: var(--text); transition: color .18s; }
.contact-list a:hover { color: var(--brass); }

.form {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 5px; padding: 30px 32px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block; margin-bottom: 8px;
  font-size: 0.85rem; font-weight: 500;
}
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--f-body); font-size: 0.95rem;
  transition: border-color .18s;
}
.field input:focus, .field textarea:focus { border-color: var(--brass); outline: none; }
.field textarea { resize: vertical; }
.form-note {
  margin-top: 14px; font-size: 0.88rem; color: var(--jade); min-height: 1.2em;
}
.form-note.error { color: #E88B7A; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line-soft); padding-block: 30px; }
.foot-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-size: 0.88rem;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s ease; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .skills { grid-template-columns: repeat(3, 1fr); gap: 30px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { height: 300px; object-fit: cover; object-position: 50% 16%; }
  .case-shot { aspect-ratio: 2 / 1; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .head-nav { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding-block: 60px 52px; }
  .section { padding-block: 62px; }
  .case-body { padding: 24px 22px; }
  .case-shot { aspect-ratio: 16 / 10; }
  .form { padding: 24px 22px; }
  .skills { grid-template-columns: 1fr; gap: 26px; }
  .role { grid-template-columns: 1fr; gap: 8px; padding-left: 22px; }
  .status-list > div { flex-direction: column; gap: 3px; }
  .status-list dd { text-align: left; }
  .head-cta { margin-left: auto; }
}

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