/* ============================================================
   Jerrar Bukhari — Robotics Engineer Portfolio
   Bright, professional theme. Three accents: blue / teal / orange.
   No framework required.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #f7f9fc;
  --bg-soft: #eef3f9;
  --panel: #ffffff;
  --border: #dde5ef;
  --border-strong: #c7d3e2;

  /* text */
  --text: #16233a;
  --text-soft: #3d4f6b;
  --muted: #64748b;

  /* accents */
  --accent: #2563eb;        /* blue  — primary */
  --accent-dark: #1e40af;
  --accent-soft: #dbeafe;
  --accent-2: #0d9488;      /* teal  — secondary */
  --accent-2-soft: #ccfbf1;
  --accent-3: #f97316;      /* orange — highlight */
  --accent-3-soft: #ffedd5;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 35, 58, 0.06), 0 2px 8px rgba(22, 35, 58, 0.05);
  --shadow-md: 0 4px 12px rgba(22, 35, 58, 0.08), 0 12px 32px rgba(22, 35, 58, 0.07);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(37, 99, 235, 0.07), transparent 60%),
    radial-gradient(900px 480px at -5% 5%, rgba(13, 148, 136, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1140px, 92vw); margin-inline: auto; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.mt { margin-top: 1.6rem; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(247, 249, 252, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text); font-weight: 700;
}
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 1.02rem; letter-spacing: -0.01em; }

.nav-links {
  display: flex; align-items: center; gap: 1.35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.is-active { color: var(--accent); font-weight: 700; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 0.55rem 0.6rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text);
  margin: 4px 0; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff !important;
  padding: 0.72rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32); }
.btn-ghost {
  background: transparent; color: var(--accent) !important;
  border-color: var(--border-strong); box-shadow: none;
}
.btn-ghost:hover { background: var(--accent-soft); box-shadow: none; }
.btn-small { padding: 0.5rem 1.05rem; font-size: 0.9rem; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.35fr 0.85fr;
  gap: 3rem; align-items: center;
  padding: 4.5rem 0 3.5rem;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 1rem; padding: 0.35rem 0.9rem;
  background: var(--accent-2-soft); color: #0f766e;
  border-radius: 999px; font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
}

.hero-title {
  margin: 0 0 0.35rem;
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-role {
  margin: 0 0 1.2rem;
  font-family: var(--font-mono); font-size: 1.02rem; font-weight: 600;
  color: var(--accent-3);
}
.hero-role .sep { color: var(--muted); font-weight: 400; }

.hero-lede {
  margin: 0 0 1.8rem; max-width: 40rem;
  font-size: 1.1rem; color: var(--text-soft);
}
.hero-lede strong { color: var(--text); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.8rem;
  list-style: none; margin: 0; padding: 0;
}
.hero-meta li { display: grid; gap: 0.1rem; }
.hero-meta strong {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-weight: 600;
}
.hero-meta span { font-size: 0.95rem; font-weight: 500; }
.available {
  color: #047857; background: #d1fae5;
  padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.85rem !important;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--shadow-md);
}
.hero-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 14px; display: block;
}
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem;
  padding: 1.1rem 0.4rem 0.35rem;
}
.hero-stats div { display: grid; }
.hero-stats strong {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hero-stats div:nth-child(2) strong { color: var(--accent-2); }
.hero-stats div:nth-child(3) strong { color: var(--accent-3); }
.hero-stats span { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 3.4rem 0 0.6rem; }

.section-title {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 1.8rem;
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.hash {
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600;
  color: var(--accent-3);
}

/* ---------- panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-sm);
}
.panel h4 {
  margin: 0 0 0.9rem; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
}
.panel p { margin: 0 0 1rem; color: var(--text-soft); }
.panel p:last-child { margin-bottom: 0; }
.panel strong { color: var(--text); }

/* ---------- about ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.4rem;
  align-items: start;
}

.terminal {
  background: #101c30; border-color: #1c2c47;
  color: #dbe7f7; padding: 0; overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #16233a; border-bottom: 1px solid #24365a;
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar i:nth-child(1) { background: #f87171; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #34d399; }
.terminal-bar span {
  margin-left: 0.6rem; font-family: var(--font-mono);
  font-size: 0.8rem; color: #8fa5c4;
}
.terminal pre {
  margin: 0; padding: 1.2rem 1.4rem;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75;
  overflow-x: auto; color: #c9dcf5;
}

/* ---------- experience timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  border-radius: 2px; opacity: 0.35;
}
.timeline-item { position: relative; margin-bottom: 1.4rem; }
.timeline-marker {
  position: absolute; left: -2rem; top: 1.7rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--panel); border: 4px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.timeline-item:nth-child(2) .timeline-marker { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12); }
.timeline-item:nth-child(3) .timeline-marker { border-color: var(--accent-3); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12); }
.timeline-item:nth-child(4) .timeline-marker { border-color: var(--muted); box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12); }

.exp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
.exp-head h3 { margin: 0; font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; }
.exp-org { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; }
.exp-dates {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 0.25rem 0.7rem; border-radius: 999px; white-space: nowrap;
}
.exp-sub {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-2);
}
.panel ul:not(.chips):not(.patent-list):not(.edu-list) {
  margin: 0.3rem 0 0.6rem; padding-left: 1.2rem; color: var(--text-soft);
}
.panel ul:not(.chips):not(.patent-list):not(.edu-list) li { margin-bottom: 0.5rem; }
.panel ul:not(.chips):not(.patent-list):not(.edu-list) li::marker { color: var(--accent-3); }
.panel-compact { padding: 1.2rem 1.5rem; }

/* ---------- project cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.4rem;
}
.card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card-img {
  width: 100%; aspect-ratio: 8 / 5; object-fit: cover;
  display: block; border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.card-img-placeholder {
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-weight: 600; font-size: 1.05rem;
  background:
    repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 14px, #e4ecf5 14px, #e4ecf5 28px);
}
.card-img-placeholder small { font-weight: 400; font-size: 0.82rem; }
.card-body {
  display: flex; flex-direction: column; flex: 1;
  padding: 1.3rem 1.4rem 1.1rem;
}
.card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.7rem; margin-bottom: 0.55rem;
}
.card-head h3 { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.card-body p { margin: 0 0 1rem; color: var(--text-soft); font-size: 0.95rem; flex: 1; }

.tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-soft);
  padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.tag-teal { color: #0f766e; background: var(--accent-2-soft); }
.tag-orange { color: #c2410c; background: var(--accent-3-soft); }

.card-foot {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
  padding-top: 0.8rem; border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.card-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }

/* ---------- chips ---------- */
.chips {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  list-style: none; margin: 0 0 1rem; padding: 0;
}
.chips li {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 0.24rem 0.65rem; border-radius: 999px;
}
.chips.plain li { background: var(--panel); }
.card .chips { margin-bottom: 1rem; }

/* ---------- skills grid ---------- */
.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}
.stack-grid .panel h4 { color: var(--accent-2); }
.stack-grid .panel:nth-child(3n+2) h4 { color: var(--accent-3); }
.stack-grid .panel:nth-child(3n) h4 { color: var(--accent); }

/* ---------- patents & education ---------- */
.patents-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.4rem;
  align-items: start;
}
.patent-list, .edu-list { list-style: none; margin: 0; padding: 0; }
.patent-list li, .edu-list li {
  display: grid; gap: 0.15rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.patent-list li:last-child, .edu-list li:last-child { border-bottom: none; padding-bottom: 0; }
.patent-list li:first-child, .edu-list li:first-child { padding-top: 0; }
.patent-list strong, .edu-list strong { font-size: 0.98rem; }
.patent-list .muted, .edu-list .muted { font-size: 0.84rem; }
.patent-list p { margin: 0.3rem 0 0; font-size: 0.9rem; color: var(--text-soft); }

/* ---------- contact CTA ---------- */
.cta {
  text-align: center;
  padding: 2.8rem 2rem;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(37, 99, 235, 0.06), transparent 70%),
    radial-gradient(600px 200px at 80% 100%, rgba(13, 148, 136, 0.06), transparent 70%),
    var(--panel);
}
.cta h3 { margin: 0 0 0.5rem; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.cta p { max-width: 34rem; margin-inline: auto; }
.socials {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.4rem;
  list-style: none; margin: 1.4rem 0 1rem; padding: 0;
}
.socials a { color: var(--text-soft); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.socials a:hover { color: var(--accent); }
.cta .small a { color: var(--accent-2); font-weight: 600; text-decoration: none; }
.cta .small a:hover { text-decoration: underline; }

/* ---------- placeholder notes ---------- */
.placeholder-note {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: #b45309; background: var(--accent-3-soft);
  border: 1px dashed #fdba74;
  padding: 0.1rem 0.5rem; border-radius: 6px;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 1.6rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.88rem; color: var(--text-soft);
}
.footer-inner p { margin: 0; }

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 3rem; }
  .hero-card { max-width: 420px; }
  .about-grid, .patents-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch;
    gap: 0; padding: 0.6rem 4vw 1.1rem;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { padding: 0.55rem 0; }
  .nav-links .btn { text-align: center; margin-top: 0.4rem; }
  .exp-head { flex-direction: column; gap: 0.4rem; }
  .hero-meta { gap: 1.1rem; }
}
