/* Abdullah Tahir — personal site (design 3)
   A navy side panel that continues the studio backdrop of his portrait and
   keeps his contact details in view, beside a warm, readable page. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("bricolage.woff2") format("woff2-variations"), url("bricolage.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("sourceserif.woff2") format("woff2-variations"), url("sourceserif.woff2") format("woff2");
}

:root {
  --navy: #1c2840;
  --navy-2: #24345a;
  --page: #fbfaf7;
  --ink: #222834;
  --muted: #5f6878;
  --shirt: #d6e4f3;
  --mist: #e8eef6;
  --rule: #e4e1da;
  --green: #4cc38a;
  --link: #1f4e79;

  --head: "Bricolage Grotesque", "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: 1.8rem;
  --step-3: clamp(2.1rem, 2.5vw + 1.2rem, 2.75rem);

  --side: 360px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--head);
  font-optical-sizing: auto;
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}
h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--navy); padding: 0.6rem 1rem; z-index: 10; font-family: var(--head); }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Side panel ---------- */

.side {
  background: var(--navy);
  color: #fff;
  font-family: var(--head);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-photo {
  width: 100%;
  height: min(310px, 38vh);
  object-fit: cover;
  object-position: 50% 14%;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  flex-shrink: 0;
}

.side-body { padding: 0 2rem 1.6rem; margin-top: -2rem; position: relative; flex: 1; display: flex; flex-direction: column; }

.side h1 {
  color: #fff;
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.side .role-line { color: var(--shirt); margin: 0.5rem 0 1.1rem; font-size: 1.02rem; line-height: 1.45; }

.status {
  border-top: 1px solid rgba(214, 228, 243, 0.22);
  border-bottom: 1px solid rgba(214, 228, 243, 0.22);
  padding: 0.85rem 0;
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--shirt);
}
.status p { margin: 0 0 0.35rem; }
.status p:last-child { margin: 0; }
.status .now { color: #fff; font-weight: 600; display: flex; align-items: center; gap: 0.55rem; }
.status .now::before {
  content: "";
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(76, 195, 138, 0.22);
}

.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.2rem; }
.btn {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  line-height: 1.2;
}
.btn-solid { background: #fff; color: var(--navy); }
.btn-solid:hover { background: var(--shirt); }
.btn-line { border-color: rgba(214, 228, 243, 0.55); color: #fff; }
.btn-line:hover { background: rgba(214, 228, 243, 0.12); }

.side nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.side nav a {
  color: var(--shirt);
  text-decoration: none;
  font-size: 0.98rem;
  display: block;
  padding: 0.22rem 0;
}
.side nav a:hover, .side nav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.side .linkedin { margin-top: auto; padding-top: 1rem; font-size: 0.92rem; }
.side .linkedin a { color: var(--shirt); }

/* ---------- Main ---------- */

.main { padding: clamp(2.5rem, 6vw, 5rem) var(--pad) 3rem; }
.main > * { max-width: 46rem; }

.hello h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.hello .lede { font-size: 1.3rem; line-height: 1.55; }

.block { padding-top: clamp(2.5rem, 5vw, 3.5rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }
.block > h2 { margin-bottom: 1.6rem; }

/* Experience */
.job { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1.25rem; margin-bottom: 2.4rem; }
.job:last-child { margin-bottom: 0; }
.job .year {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--muted);
  padding-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.job h3 { margin-bottom: 0.15rem; }
.job .meta { font-family: var(--head); color: var(--muted); font-size: var(--step--1); margin-bottom: 0.7rem; }
.job ul { margin: 0; padding-left: 1.1rem; }
.job li { margin-bottom: 0.35rem; }
.job li::marker { color: var(--navy-2); }
.job strong { font-weight: 650; color: var(--navy); }
.job .note { font-family: var(--head); font-size: var(--step--1); color: var(--muted); margin: 0.7rem 0 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.project .tag {
  display: inline-block;
  font-family: var(--head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--mist);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin-bottom: 0.6rem;
}
.project h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.project p:last-child { margin: 0; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2.5rem; margin: 0; }
.skills dt { font-family: var(--head); font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.skills dd { margin: 0; }

/* Education */
.edu { margin-bottom: 1.5rem; }
.edu:last-child { margin-bottom: 0; }
.edu h3 { font-size: 1.2rem; margin-bottom: 0.15rem; }
.edu .meta { font-family: var(--head); color: var(--muted); font-size: var(--step--1); margin-bottom: 0.35rem; }
.edu p:last-child { margin-bottom: 0; }

/* Contact */
.contact p { max-width: 34em; }
.contact .big {
  font-family: var(--head);
  font-size: clamp(1.25rem, 2vw + 0.8rem, 1.7rem);
  font-weight: 600;
  word-break: break-word;
}

.foot { margin-top: 4rem; font-family: var(--head); font-size: var(--step--1); color: var(--muted); }

/* ---------- CV page ---------- */

.cv-intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cv-intro h2 { font-size: var(--step-3); }
.cv-intro p { font-family: var(--head); color: var(--muted); margin: 0.35rem 0 0; }
.cv-intro .btn { background: var(--navy); color: #fff; padding: 0.7rem 1.2rem; }
.cv-intro .btn:hover { background: var(--navy-2); }
.cv-contact { font-family: var(--head); font-size: var(--step--1); color: var(--muted); margin-bottom: 2rem; }
.cv-contact p { margin: 0 0 0.25rem; }
.cv-section { margin-bottom: 2.2rem; }
.cv-section > h2 { font-size: var(--step-1); border-bottom: 1px solid var(--rule); padding-bottom: 0.35rem; margin-bottom: 1rem; }
.cv-item { margin-bottom: 1.3rem; }
.cv-item:last-child { margin-bottom: 0; }
.cv-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.2rem 1rem; flex-wrap: wrap; }
.cv-item h3 { font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.cv-item .dates { font-family: var(--head); color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.cv-item .sub { color: var(--muted); margin: 0.1rem 0 0.4rem; }
.cv-page ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.cv-page li { margin-bottom: 0.3rem; }
.cv-skills p { margin-bottom: 0.4rem; }
.cv-skills strong { color: var(--navy); }

/* ---------- Small screens ---------- */

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; overflow: visible; }
  .side-photo { height: 340px; object-position: 50% 15%; }
  .side-body { padding: 0 var(--pad) 1.8rem; }
  .side-actions { grid-template-columns: 1fr 1fr; }
  .side nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; }
  .side .linkedin { padding-top: 1rem; }
  .main { padding-top: 2.5rem; }
}

@media (max-width: 600px) {
  .projects, .skills { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .job .year { padding-top: 0; margin-bottom: 0.15rem; }
  .side-actions { grid-template-columns: 1fr; }
  .hello .lede { font-size: 1.2rem; }
}

@media print {
  .layout { display: block; }
  .side, .skip, .cv-intro .btn, .foot { display: none; }
  body { background: #fff; font-size: 10.5pt; }
  .main { padding: 0; }
  a { color: var(--ink); text-decoration: none; }
}
