/*
Theme Name: Qazi Osama
Theme URI: https://www.qaziosama.com
Author: Qazi Osama
Author URI: https://www.qaziosama.com
Description: Personal portfolio theme for Qazi Osama — Senior Software Engineer & Consultant
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qazi-osama
Tags: portfolio, one-page, consulting
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0D1B2A;
  --ink: #1A2B3C;
  --steel: #2D4A6B;
  --gold: #C8A96E;
  --gold-light: #E8CC9A;
  --cream: #F7F3EE;
  --warm-white: #FDFAF6;
  --muted: #8A9BB0;
  --text: #1A2B3C;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--warm-white);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 4rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(253, 250, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 169, 110, 0.2);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  position: fixed;
  top: 0;
  right: 4rem;
  height: 64px;
  min-height: 64px;
  align-items: center;
  z-index: 999;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
  padding-top: 0 !important;
}

.hero-left {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 5rem 5rem 5rem;
  position: relative;
}

.hero-left::after {
  content: '';
  position: absolute;
  top: 0; right: -1px; bottom: 0;
  width: 80px;
  background: var(--warm-white);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.hero-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.05;
  color: white;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-name em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  max-width: 400px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 1rem 2rem;
  transition: all 0.25s;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.hero-cta-arrow { transition: transform 0.2s; }
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 5rem 5rem 7rem;
  position: relative;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.9s forwards;
}

.stat-item {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
}

.stat-number {
  font-family: var(--serif);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-industries {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(200,169,110,0.25);
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

.industries-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--steel);
  border: 1px solid rgba(45, 74, 107, 0.25);
  padding: 0.4rem 0.9rem;
  background: rgba(45, 74, 107, 0.05);
}

/* SECTION BASE */
section {
  padding: 3rem 0;
  scroll-margin-top: 64px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 4rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.section-heading em { font-style: italic; color: var(--steel); }

/* WHAT I DO */
.services {
  background: var(--cream);
}

.services-intro {
  max-width: 600px;
  margin-bottom: 4rem;
}

.services-intro p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(200,169,110,0.2);
}

.service-card {
  padding: 2.5rem;
  border-right: 1px solid rgba(200,169,110,0.2);
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card:last-child { border-right: none; }

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { background: white; }

.service-number {
  font-family: var(--serif);
  font-size: 3rem;
  color: rgba(200,169,110,0.2);
  line-height: 1;
  margin-bottom: 1rem;
}

.service-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* WHO I HELP */
.who {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.profile-photo-wrap {
  margin-bottom: 2rem;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(200, 169, 110, 0.4);
  flex-shrink: 0;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-placeholder {
  background: #1A2B3C;
}

.who::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,0.08) 0%, transparent 70%);
}

.who .section-heading { color: white; }
.who .section-heading em { color: var(--gold-light); }

.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-top: 3rem;
}

.who-left p {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.who-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.client-type {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,169,110,0.15);
  transition: border-color 0.2s, background 0.2s;
}

.client-type:hover {
  border-color: rgba(200,169,110,0.4);
  background: rgba(255,255,255,0.07);
}

.client-icon {
  width: 36px;
  height: 36px;
  background: rgba(200,169,110,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  font-size: 1rem;
}

.client-info h4 {
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  margin-bottom: 0.25rem;
}

.client-info p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* HOW I WORK */
.engagements {
  background: var(--warm-white);
}

.engagements-intro {
  max-width: 550px;
  margin-bottom: 4rem;
}

.engagements-intro p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.engagement-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(200,169,110,0.2);
}

.engagement-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: start;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(200,169,110,0.2);
  transition: padding-left 0.3s;
  cursor: default;
}

.engagement-item:hover {
  padding-left: 0.5rem;
}

.engagement-num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold);
  padding-top: 0.15rem;
}

.engagement-body h3 {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.engagement-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.engagement-badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid rgba(200,169,110,0.4);
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  margin-top: 0.15rem;
}

/* STACK */
.stack {
  background: var(--cream);
  padding: 5rem 0;
}

.stack-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.stack-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.stack-divider {
  width: 1px;
  height: 40px;
  background: rgba(200,169,110,0.3);
  flex-shrink: 0;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stack-item {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--steel);
  background: white;
  border: 1px solid rgba(45,74,107,0.15);
  padding: 0.5rem 1.1rem;
  transition: all 0.2s;
}

.stack-item:hover {
  border-color: var(--gold);
  color: var(--navy);
}

/* CONTACT */
.contact {
  background: var(--navy);
  padding: 8rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

button.calendly-open {
  border: none;
  cursor: pointer;
  margin-bottom: 2.5rem;
  font-family: var(--sans);
}

.contact::after {
  content: "LET'S TALK";
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 14rem;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.contact .section-heading {
  color: white;
  margin-bottom: 1rem;
}

.contact-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(200,169,110,0.4);
  padding-bottom: 0.25rem;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: 2.5rem;
}

.contact-email:hover {
  color: white;
  border-color: white;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.contact-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover { color: var(--gold); }

.contact-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(200,169,110,0.3);
}

/* FOOTER */
.site-footer {
  background: #080F18;
  padding: 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.2);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* NAV TOGGLE (hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 1001;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav {
    padding: 1.25rem 2rem;
    z-index: 1000;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    /* Reset desktop positioning */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 100vh;
    width: 100vw;
    /* Full-screen overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #0D1B2A;
    z-index: 1002;
    list-style: none;
    margin: 0;
    padding: 0;
    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-links.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
  }

  /* Hamburger renders on top of overlay */
  .nav-toggle {
    z-index: 1003;
  }

  .nav-toggle[aria-expanded="true"] span { background: white; }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.12em;
  }

  .nav-links a:hover { color: var(--gold); }

  section {
    padding-top: 5rem;
    scroll-margin-top: 4rem;
  }

  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-left { padding: 7rem 2.5rem 3rem; }
  .hero-left::after { display: none; }
  .hero-right { padding: 3rem 2.5rem 5rem; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; border-bottom: 1px solid rgba(200,169,110,0.2); }
  .who-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .engagement-item { grid-template-columns: 40px 1fr; }
  .engagement-badge { display: none; }
  .stack-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .stack-divider { width: 40px; height: 1px; }
  .container { padding: 0 2rem; }
  .site-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}