/* Usman Mahmood — portfolio
   Dark navy + cream/gold system */

:root {
  --bg: #0b1220;
  --bg-elevated: #111a2e;
  --bg-soft: #162038;
  --navy: #1b365d;
  --navy-bright: #2a4f85;
  --cream: #f5f0e8;
  --cream-muted: #c8c2b6;
  --gold: #c9a96e;
  --gold-soft: rgba(201, 169, 110, 0.16);
  --line: rgba(245, 240, 232, 0.08);
  --line-strong: rgba(245, 240, 232, 0.16);
  --text: #f5f0e8;
  --text-muted: #a8b0c0;
  --success: #7dcea0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 72px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(27, 54, 93, 0.55), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(201, 169, 110, 0.08), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--gold);
  color: #0b1220;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 32, 0.78);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(11, 18, 32, 0.92);
  border-bottom-color: var(--line-strong);
}

.nav {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
}
.logo:hover { color: var(--gold); }
.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: linear-gradient(145deg, var(--navy), #0b1220);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--cream);
}
.logo-text { font-size: 0.95rem; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--cream);
  background: rgba(245, 240, 232, 0.06);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.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);
}

/* Sections */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.section-alt {
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.65), rgba(17, 26, 46, 0.25));
  border-block: 1px solid var(--line);
}
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  margin-bottom: 0.6rem;
}
.section-sub {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Hero */
.hero { padding-top: clamp(3rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: 2.75rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin: 0 0 0.35rem;
  background: linear-gradient(120deg, var(--cream) 0%, #e8dcc4 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--cream-muted);
  margin: 0 0 1.25rem;
}
.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 40rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.socials a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.socials a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(160deg, rgba(27, 54, 93, 0.55), rgba(17, 26, 46, 0.95));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-card-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.28), transparent 70%);
  pointer-events: none;
}
.hero-card-label {
  position: relative;
  margin: 0 0 0.5rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-card-title {
  position: relative;
  font-size: 1.65rem;
  margin-bottom: 0.65rem;
}
.hero-card-text {
  position: relative;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.hero-meta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.hero-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.hero-meta dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  background: rgba(17, 26, 46, 0.7);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.stat-card:hover {
  border-color: rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--cream);
}
.stat-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #b8924f);
  color: #0b1220;
}
.btn-primary:hover { color: #0b1220; filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.35);
}
.btn-sm:hover {
  background: rgba(201, 169, 110, 0.28);
  color: var(--cream);
}

/* Services */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.service-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  min-height: 100%;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.service-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.service-icon {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}
.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Skills */
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.skill-chips li {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(27, 54, 93, 0.45);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.skill-chips li:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

/* Projects */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.filter-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover {
  color: var(--cream);
  border-color: rgba(201, 169, 110, 0.4);
}
.filter-btn.is-active {
  background: var(--navy);
  border-color: var(--navy-bright);
  color: var(--cream);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.45rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.project-card:hover {
  border-color: rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
}
.project-card.is-hidden { display: none; }
.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.project-top h3 {
  margin: 0;
  font-size: 1.2rem;
}
.badge {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.3);
}
.badge-muted {
  background: rgba(168, 176, 192, 0.12);
  color: var(--text-muted);
  border-color: var(--line-strong);
}
.project-card > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tags li {
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: rgba(245, 240, 232, 0.05);
  color: var(--cream-muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Timeline */
.timeline-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
}
.timeline-heading {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.timeline {
  position: relative;
  padding-left: 1.35rem;
  border-left: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.timeline li { position: relative; }
.timeline-dot {
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.18);
}
.timeline-role {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.timeline-org {
  margin: 0;
  color: var(--cream-muted);
  font-weight: 500;
}
.timeline-dates {
  margin: 0.2rem 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.timeline-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}
.contact-list li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.contact-list a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  word-break: break-word;
}
.contact-list a:hover { color: var(--gold); }

.contact-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.contact-form label {
  display: grid;
  gap: 0.4rem;
}
.contact-form label span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream-muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(11, 18, 32, 0.65);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(168, 176, 192, 0.55);
}
.contact-form .btn { justify-self: start; margin-top: 0.25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--gold); }

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .contact-grid,
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-aside { order: -1; max-width: 420px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(11, 18, 32, 0.97);
    border-bottom: 1px solid var(--line-strong);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }
  .nav-menu.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu a {
    padding: 0.85rem 1rem;
    border-radius: 10px;
  }
  .logo-text { display: none; }
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .cards-4,
  .stats {
    grid-template-columns: 1fr;
  }
  .hero-actions .btn { width: 100%; }
}


/* Profile photo */
.logo-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(201, 169, 110, 0.55);
  box-shadow:
    0 0 0 3px rgba(27, 54, 93, 0.9),
    0 6px 16px rgba(0, 0, 0, 0.35);
  background: var(--bg-elevated);
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-frame {
  margin: 0;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--bg-elevated);
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.contact-intro {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.contact-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid rgba(201, 169, 110, 0.6);
  box-shadow:
    0 0 0 4px rgba(17, 26, 46, 0.95),
    0 10px 24px rgba(0, 0, 0, 0.4);
  background: var(--bg-elevated);
}

.contact-photo-wrap {
  position: relative;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.55), rgba(27, 54, 93, 0.9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.contact-photo-wrap .contact-photo {
  display: block;
  border: 3px solid var(--bg);
  box-shadow: none;
}

.logo-photo-wrap {
  display: inline-flex;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.7), rgba(42, 79, 133, 0.85));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo-photo-wrap .logo-photo {
  border: 2px solid var(--bg);
  box-shadow: none;
}

.contact-intro .section-sub {
  margin-bottom: 0;
}

.contact-intro h2 {
  margin-bottom: 0.35em;
}
