/* zia-khan-portfolio — styles for index.html */
:root {
  --bg: #080c14;
  --bg-soft: #101826;
  --card: rgba(14, 22, 36, 0.82);
  --text: #eef3fb;
  --muted: #97a6bc;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #4ee0c2;
  --accent-text: #5eead4;
  --accent-2: #8b7cff;
  --header-bg: rgba(8, 12, 20, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --max: 1120px;
  --nav-h: 88px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.1);
  --accent: #0f766e;
  --accent-text: #0f766e;
  --accent-2: #4f46e5;
  --header-bg: rgba(255, 255, 255, 0.94);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, .btn { font-family: inherit; }

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip:focus {
  width: auto;
  height: auto;
  clip: auto;
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--accent);
  color: #04110d;
  padding: 8px 12px;
  border-radius: 8px;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 18%, transparent 72%);
  opacity: 0.5;
}

.orb {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
}

.orb-a { top: -12%; right: -8%; background: #3d6bff; }
.orb-b { bottom: 10%; left: -12%; background: #14b8a6; }
.orb-c { top: 40%; left: 40%; width: 28vw; height: 28vw; background: #7c5cff; opacity: 0.16; }

html[data-theme="light"] .orb { opacity: 0.1; }
html[data-theme="light"] .bg-grid { opacity: 0.28; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 80%, transparent);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 0;
}

.logo-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, white);
  background: var(--card);
}

.logo-name {
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 650;
}

.nav a:hover,
.nav a:focus-visible { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn,
.menu-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.btn-icon {
  flex-shrink: 0;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #06221c; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-soft,
.btn-resume {
  background: var(--accent);
  color: #06221c;
  border-color: transparent;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 0.98rem;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-resume {
  background: var(--accent);
  color: #ffffff;
}

html[data-theme="light"] .btn-ghost {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
}

.hero {
  padding: 56px 0 28px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.82rem;
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.kicker {
  color: var(--accent-text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

h1, h2, h3 {
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 12px;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }

h1 span {
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-row strong { color: var(--text); }

.hero-card { position: relative; padding-top: 18px; }

.avatar-wrap {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: var(--shadow);
  position: absolute;
  top: 0;
  right: 18px;
  z-index: 2;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.code-window {
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 28px;
}

html[data-theme="light"] .code-window { background: #101828; }

.code-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-top i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.code-top i:nth-child(1) { background: #ff5f57; }
.code-top i:nth-child(2) { background: #febc2e; }
.code-top i:nth-child(3) { background: #28c840; }

.code-top span {
  margin-left: 8px;
  color: #8ea0b8;
  font-size: 0.78rem;
  font-family: "JetBrains Mono", monospace;
}

pre {
  margin: 0;
  padding: 22px 20px 28px;
  overflow: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #d7e3f4;
}

.tok-key { color: #7dd3fc; }
.tok-str { color: #86efac; }
.tok-num { color: #fcd34d; }
.tok-fn { color: #c4b5fd; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 8px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

.stat-value span {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.section { padding: 72px 0; }

.section-head { margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }

.timeline { display: grid; gap: 16px; }

.job {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(12px);
}

.job-side { color: var(--muted); }
.job-side strong { display: block; color: var(--text); margin-bottom: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.skill-card h3 { font-size: 1.05rem; margin-bottom: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter.active,
.filter:hover {
  color: #06221c;
  background: var(--accent);
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.project-cover {
  height: 108px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-weight: 800;
  color: #fff;
}

.cover-saas { background: linear-gradient(135deg, #12344a, #1f6f78); }
.cover-ai { background: linear-gradient(135deg, #3b1d6d, #6d28d9); }
.cover-edu { background: linear-gradient(135deg, #134e4a, #0f766e); }
.cover-ops { background: linear-gradient(135deg, #1e3a8a, #312e81); }
.cover-mobile { background: linear-gradient(135deg, #7c2d12, #b45309); }

.project-body { padding: 16px 16px 18px; }
.project-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.project-body p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.education,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.edu,
.contact-card,
.contact-panel {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.contact-list { display: grid; gap: 12px; margin: 18px 0; }

.contact-list a,
.contact-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.contact-list b {
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.open { display: grid; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal-close { position: absolute; top: 14px; right: 14px; }

body.modal-open,
body.nav-open { overflow: hidden; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .wrap { width: min(var(--max), calc(100% - 24px)); }
  h1 { font-size: clamp(1.9rem, 8vw, 2.7rem); }
  .section { padding: 48px 0; }
  .hero,
  .job,
  .skill-grid,
  .education,
  .contact-grid { grid-template-columns: 1fr; }
  .stats,
  .project-grid { grid-template-columns: 1fr 1fr; }

  .nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 45;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 20px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    gap: 12px;
  }

  .nav a {
    padding: 10px 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav.open { display: flex; }
  .menu-btn { display: grid; }
  .hero { padding-top: 28px; gap: 28px; }
  .hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
  }
  .avatar-wrap {
    position: static;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    margin: 0 0 16px;
  }
  .code-window {
    width: 100%;
    margin-top: 0;
  }
  .job { padding: 16px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 76px; }
  .logo-photo { width: 44px; height: 44px; }
  .logo-name { font-size: 1.12rem; }
  .stats,
  .project-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 6px; }
  .header-actions .btn-resume { padding: 10px 14px; min-height: 44px; }
  .hero-actions .btn { flex: 1 1 calc(50% - 12px); }
  .pills { gap: 8px; }
  .pill { font-size: 0.75rem; }
  pre { font-size: 0.74rem; padding: 16px 14px 20px; }
  .contact-list a,
  .contact-list span {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .contact-list b { text-align: left; }
  .modal { padding: 12px; }
  .modal-panel { padding: 22px 16px; border-radius: 16px; }
  .site-footer { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
}
