/* =====================================================================
   Mohammad Minhas — portfolio styles
   Organised top to bottom:
   1. Design tokens (colours, type, spacing) as CSS variables
   2. Base / resets
   3. Layout helpers
   4. Header / nav
   5. Hero
   6. Sections & typography
   7. Skills
   8. Cards (projects & labs)
   9. Labs status system
   10. Experience, contact, footer
   11. Accessibility & motion
   ===================================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Dark is the default. Light theme overrides are further down. */
  --bg:            #0e131b;
  --surface:       #141b25;
  --surface-2:     #1b2432;
  --border:        #28323f;
  --text:          #e8ebf0;
  --muted:         #98a3b3;

  --accent:        #2fb9a6;
  --accent-hover:  #43ccb9;
  --on-accent:     #08201d;

  /* Status colours carry real meaning (healthy / in-progress / planned) */
  --status-done:     #3fb950;
  --status-learning: #e0a53a;
  --status-planned:  #7f8b9c;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing / shape */
  --wrap: 1080px;
  --radius: 10px;
  --gap: 1rem;
}

/* Light theme: follows the visitor's OS setting automatically */
@media (prefers-color-scheme: light) {
  :root {
    --bg:            #fbfcfd;
    --surface:       #f2f5f8;
    --surface-2:     #e9edf2;
    --border:        #dbe1e9;
    --text:          #182029;
    --muted:         #57616f;

    --accent:        #0f8a7d;
    --accent-hover:  #0b7367;
    --on-accent:     #ffffff;

    --status-done:     #1a7f37;
    --status-learning: #9a6700;
    --status-planned:  #6b7686;
  }
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--surface-2);
  padding: .1em .4em;
  border-radius: 4px;
}

/* ---------- 3. LAYOUT ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: 4.5rem; }
.section-alt { background: var(--surface); }

/* ---------- 4. HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 700;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-size: .9rem;
  letter-spacing: .02em;
}
.brand-name { color: var(--text); }

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu a {
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
}
.nav-menu a:hover { color: var(--text); }

/* Hamburger stays hidden until Step 4 wires up the mobile menu */
.nav-toggle { display: none; }

/* ---------- 5. HERO ---------- */
.hero { padding-block: 4rem 3.5rem; }
.hero-inner { max-width: 760px; }
.hero-photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 .35rem;
}
.hero-role {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.hero-intro {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 1rem;
}
.hero-availability {
  color: var(--muted);
  margin: 0 0 1.6rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- 6. SECTIONS & TYPOGRAPHY ---------- */
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  padding-bottom: .5rem;
  position: relative;
}
/* Short accent rule under each section heading (structural marker) */
h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1rem; }
.section-lead {
  max-width: 68ch;
  color: var(--muted);
  margin: -0.5rem 0 2rem;
}
.muted { color: var(--muted); }

/* ---------- 7. SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}
.skill-group h3 { color: var(--text); }
.tags {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tags li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .7rem;
  font-size: .9rem;
}

/* ---------- 8. CARDS (projects & labs) ---------- */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 800px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.section-alt .card { background: var(--bg); }

.card-detail { margin: 0; }
.card-detail dt {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: .8rem;
}
.card-detail dd { margin: .15rem 0 0; }

.card-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.1rem;
}
.card-links a { color: var(--accent); font-size: .95rem; }

/* ---------- 9. LABS STATUS SYSTEM ---------- */
.labs-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 760px) {
  .labs-status { grid-template-columns: repeat(3, 1fr); }
}
.status {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
}
.status::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  flex: none;
}
.status-done::before     { background: var(--status-done); }
.status-learning::before { background: var(--status-learning); }
.status-planned::before  { background: var(--status-planned); }

.lab-list {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
}
.lab-list li {
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.lab-list li:last-child { border-bottom: 0; }

/* ---------- 10. LEARNING, EXPERIENCE, CONTACT, FOOTER ---------- */
.learning-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: .6rem;
  max-width: 68ch;
}
.learning-list li {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.timeline { display: grid; gap: 1.5rem; margin-bottom: 1.75rem; }
.job {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.job h3 { margin-bottom: .2rem; }
.job-meta { color: var(--muted); font-size: .9rem; margin: 0 0 .6rem; }
.job p:last-child { margin-bottom: 0; }

.transferable {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.transferable li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .35rem .75rem;
  font-size: .9rem;
}

.contact-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: .6rem;
  font-size: 1.05rem;
}
.contact-list a { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- 11. ACCESSIBILITY & MOTION ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  padding: .6rem 1rem;
  border-radius: 8px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
