/* ==========================================================================
   Asim Farooq — Creative Portfolio CV
   Table of contents:
   1. CSS Variables (design tokens)
   2. Reset & base
   3. Layout shell (sidebar + main grid)
   4. Sidebar
   5. Main content / hero
   6. Section headings & about
   7. Timeline (experience & education)
   8. Footer
   9. Responsive breakpoints
   10. Print styles
   ========================================================================== */

/* ---------- 1. CSS Variables ---------- */
:root {
  /* Colors */
  --color-primary: #10233f;        /* deep navy — sidebar / headings */
  --color-primary-light: #1c3a63;  /* lighter navy for gradients/cards */
  --color-accent: #00b4d8;         /* cyan accent */
  --color-accent-dark: #0093ad;
  --color-bg: #f4f6fa;             /* page background */
  --color-surface: #ffffff;        /* card background */
  --color-text: #1f2733;
  --color-text-muted: #5b6472;
  --color-text-on-dark: #e8edf5;
  --color-text-on-dark-muted: #a9b8cc;
  --color-border: #e3e8f0;

  /* Typography */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --fs-h1: clamp(2.2rem, 5vw, 3.2rem);
  --fs-h2: clamp(1.3rem, 2.5vw, 1.6rem);
  --fs-h3: 1.05rem;
  --fs-body: 1rem;
  --fs-small: 0.85rem;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  /* Layout */
  --sidebar-width: 300px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 6px 24px rgba(16, 35, 63, 0.08);
  --shadow-card-hover: 0 12px 32px rgba(16, 35, 63, 0.14);
  --transition: 0.25s ease;
}

/* ---------- 2. Reset & base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

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

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

h1, h2, h3 { font-family: var(--font-heading); margin: 0; color: var(--color-primary); }

/* ---------- 3. Layout shell ---------- */
body {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  align-items: start;
  min-height: 100vh;
}

/* ---------- 4. Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-text-on-dark);
  padding: var(--space-5) var(--space-4);
}

.sidebar-inner { display: flex; flex-direction: column; gap: var(--space-4); }

.profile-photo-wrap { display: flex; justify-content: center; }

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sidebar-name { text-align: center; }
.sidebar-name h2 { color: #fff; font-size: 1.4rem; }
.sidebar-name .role-tag {
  margin: var(--space-1) 0 0;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.1rem;
  background: var(--color-accent);
  color: #06222b;
  font-weight: 600;
  font-size: var(--fs-small);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: #33c7e6; text-decoration: none; transform: translateY(-2px); }

.side-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
}
.side-section h3 i { color: var(--color-accent); }

/* Contact list */
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--fs-small);
}
.contact-list li i {
  width: 1.1rem;
  text-align: center;
  margin-top: 0.15rem;
  color: var(--color-accent);
}
.contact-list a { color: var(--color-text-on-dark); word-break: break-word; }
.contact-list a:hover { color: var(--color-accent); }
.contact-list .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-on-dark-muted);
}

/* Personal details */
.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--fs-small);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}
.detail-list li:last-child { border-bottom: none; }
.detail-list .label { color: var(--color-text-on-dark-muted); }

/* Skills */
.skill-group { margin-bottom: var(--space-3); }
.skill-cat {
  margin: 0 0 var(--space-2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-text-on-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  transition: background var(--transition), border-color var(--transition);
}
.tag:hover { background: var(--color-accent); border-color: var(--color-accent); color: #06222b; }

/* Languages */
.lang-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lang-list li {
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.4);
  color: var(--color-text-on-dark);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
}

/* ---------- 5. Main content / hero ---------- */
.main-content { padding: 0 0 var(--space-6); min-width: 0; }

.hero {
  background: radial-gradient(circle at top right, var(--color-primary-light), var(--color-primary) 65%);
  color: #fff;
  padding: var(--space-6) var(--space-5);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(0, 180, 216, 0.18) 100%);
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--fs-small);
}
.hero h1 { color: #fff; font-size: var(--fs-h1); font-weight: 800; line-height: 1.1; }
.hero-role {
  margin: var(--space-2) 0 0;
  font-size: 1.15rem;
  color: var(--color-text-on-dark-muted);
  font-weight: 500;
}

/* ---------- 6. Section headings & about ---------- */
.content-section {
  padding: var(--space-5);
  max-width: 980px;
}

.content-section h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-h2);
  margin-bottom: var(--space-4);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.about-text {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  color: var(--color-text-muted);
  font-size: 1.02rem;
}

/* ---------- 7. Timeline ---------- */
.timeline {
  position: relative;
  padding-left: var(--space-5);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-border));
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4);
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-5) + 2px);
  top: 0.4rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.timeline-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.timeline-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.timeline-card-head h3 { font-size: var(--fs-h3); }

.date-pill {
  background: rgba(0, 180, 216, 0.12);
  color: var(--color-accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.company {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.block-title {
  margin: var(--space-3) 0 var(--space-2);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary-light);
}

.bullet-list li {
  position: relative;
  padding-left: var(--space-3);
  margin-bottom: var(--space-2);
  font-size: 0.94rem;
  color: var(--color-text);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.bullet-list li:last-child { margin-bottom: 0; }

/* ---------- 8. Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) 0;
  max-width: 980px;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) var(--space-5) 0;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}
.btn-small { padding: 0.5rem 0.9rem; background: var(--color-primary); color: #fff; }
.btn-small:hover { background: var(--color-primary-light); }

/* ---------- 9. Responsive breakpoints ---------- */

/* Tablet */
@media (max-width: 1024px) {
  :root { --sidebar-width: 260px; }
  .content-section { padding: var(--space-4); }
  .hero { padding: var(--space-5) var(--space-4); }
}

/* Mobile: stack sidebar above content, toggle for quick access */
@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    order: -1;
  }

  .hero { border-radius: 0; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }

  .content-section { max-width: 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; max-width: 100%; }

  .timeline { padding-left: var(--space-4); }
  .timeline-dot { left: calc(-1 * var(--space-4) + 2px); }
}

@media (max-width: 480px) {
  .content-section, .hero, .site-footer { padding-left: var(--space-3); padding-right: var(--space-3); }
  .timeline-card-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- 11. Print styles ---------- */
@media print {
  .btn-download { display: none !important; }

  body { display: block; }

  .sidebar {
    position: static;
    height: auto;
    color: var(--color-text);
    background: none !important;
    border-bottom: 2px solid var(--color-primary);
  }
  .sidebar-name h2, .side-section h3 { color: var(--color-primary); }
  .contact-list a, .contact-list .label,
  .detail-list .label, .detail-list li,
  .skill-cat, .tag, .lang-list li { color: var(--color-text); }

  .hero { background: none !important; color: var(--color-primary); border: none; }
  .hero h1, .hero-role, .eyebrow { color: var(--color-primary) !important; }

  .timeline-card { box-shadow: none; border: 1px solid var(--color-border); }
  a { text-decoration: none; color: var(--color-text); }
}
