/* Laith Shatnawi — Engineering Profile */

:root {
  --ink: #0f172a;
  --ink-muted: #64748b;
  --paper: #f8fafc;
  --paper-warm: #f1f5f9;
  --steel: #0b5cab;
  --steel-light: #1a73c7;
  --copper: #0b5cab;
  --copper-soft: #3b82c4;
  --grid: rgba(11, 92, 171, 0.055);
  --line: rgba(15, 23, 42, 0.1);
  --focus: #0b5cab;
  --surface: #ffffff;

  --font-display: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius: 2px;
  --max-width: 72rem;
  --nav-height: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

@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;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  min-height: 100vh;
}

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

a {
  color: var(--steel);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover { color: var(--steel-light); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--ink);
  color: var(--paper);
  z-index: 1000;
}

.skip-link:focus { top: var(--space-sm); }

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .nav-inner {
  position: relative;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
}

.logo span { color: var(--steel); }

.site-nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--copper);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}

/* Layout */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.page-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--copper);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 var(--space-sm);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-sm);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
}

h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.125rem; font-weight: 600; }

.lead {
  font-size: 1.125rem;
  color: var(--ink-muted);
  max-width: 42rem;
  margin: var(--space-md) 0 0;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }
}

.hero-meta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
}

.hero-meta a { text-decoration: none; }
.hero-meta a:hover { text-decoration: underline; }

.spec-card {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-lg);
  position: relative;
}

.spec-card::before {
  content: "SPEC";
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.4;
}

.spec-card dl {
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}

.spec-card dt {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.spec-card dd {
  margin: 0;
  font-size: 0.95rem;
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: var(--space-2xl);
}

.stat {
  background: var(--surface);
  padding: var(--space-md);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--steel);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: var(--space-xs);
}

/* Cards & sections */
.section { margin-bottom: var(--space-2xl); }

.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.section-title .index {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--copper);
}

.card-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--steel-light);
  transform: translateY(-2px);
}

.card h3 { margin-bottom: var(--space-xs); }

.card-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--space-sm);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.card-link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--copper), var(--line));
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-lg) - 4px);
  top: 0.4rem;
  width: 9px;
  height: 9px;
  background: var(--paper);
  border: 2px solid var(--copper);
  border-radius: 50%;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-sm);
}

.timeline-header h2 { margin: 0; }

.timeline-date {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.timeline-location {
  font-size: 0.9rem;
  color: var(--steel);
  margin-bottom: var(--space-sm);
}

.timeline ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.timeline li { margin-bottom: 0.5rem; }

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; }

.pub-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}

.pub-item:first-child { padding-top: 0; }

.pub-title {
  font-weight: 500;
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.pub-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.pub-item a {
  font-size: 0.85rem;
  word-break: break-all;
}

/* Skills */
.skill-groups {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
}

.skill-group h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--line);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-tags li {
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.cert-list { list-style: none; padding: 0; margin: 0; }

.cert-list li {
  padding: var(--space-md);
  border: 1px solid var(--line);
  margin-bottom: var(--space-sm);
  background: var(--surface);
}

.cert-list strong { display: block; margin-bottom: 0.25rem; }

.cert-list span {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}

.contact-card h3 { margin-bottom: var(--space-md); }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-list li:last-child { border-bottom: none; }

.contact-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-value {
  font-size: 1rem;
}

.contact-value a { text-decoration: none; font-weight: 500; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-lg) var(--space-md);
  margin-top: var(--space-2xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Overview hero */
.hero-overview {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero-overview::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--copper);
}

.hero-overview h1 {
  margin-bottom: var(--space-sm);
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  font-weight: 500;
}

.section-links a { text-decoration: none; }
.section-links a:hover { text-decoration: underline; }

.overview-split {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .overview-split {
    grid-template-columns: 1.4fr 0.9fr;
    align-items: start;
  }
}

/* Role overview cards */
.role-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 720px) {
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}

.role-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.role-card:hover {
  border-color: var(--steel-light);
  transform: translateY(-3px);
  color: inherit;
}

.role-card img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
}

.role-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.role-card__meta {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0;
}

.role-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.role-card__org {
  font-size: 0.9rem;
  color: var(--steel);
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.role-card__body > p:last-child {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Focus strip */
.focus-strip {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .focus-strip { grid-template-columns: repeat(3, 1fr); }
}

.focus-item {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.focus-item img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
}

.focus-item > div {
  padding: var(--space-md);
}

.focus-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.focus-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Experience detail blocks */
.exp-block {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

@media (min-width: 800px) {
  .exp-block {
    grid-template-columns: 0.9fr 1.2fr;
    gap: var(--space-lg);
    align-items: start;
  }
}

.exp-block__media {
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-warm);
}

.exp-block__media img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
}

.exp-intro {
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}

.exp-block ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.exp-block li { margin-bottom: 0.45rem; }

.title-alt {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.pub-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 0.35rem;
}

/* CV-style overview */
.cv-main {
  max-width: 52rem;
}

.cv-header {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.cv-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--copper);
}

.cv-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--steel);
}

.cv-header .lead {
  margin-top: var(--space-sm);
  font-size: 1rem;
}

.cv-meta {
  list-style: none;
  margin: 0;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}

.cv-meta li {
  font-size: 0.9rem;
  color: var(--ink);
  display: grid;
  gap: 0.15rem;
}

.cv-meta span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (min-width: 720px) {
  .cv-header {
    grid-template-columns: 1.5fr 0.9fr;
    align-items: start;
  }
}

.cv-section {
  margin-bottom: var(--space-xl);
}

.cv-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--line);
}

.cv-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.cv-more {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-list > li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}

.cv-list > li:last-child { border-bottom: none; }

.cv-list__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem var(--space-md);
  margin-bottom: 0.25rem;
}

.cv-list__top h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.cv-list__date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

.cv-list__org {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--steel);
}

.cv-list__summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.cv-skills {
  display: grid;
  gap: 0.5rem;
}

.cv-skills p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.cv-skills strong {
  color: var(--ink);
  font-weight: 600;
}

.cv-pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-pubs li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
}

.cv-pubs li:last-child { border-bottom: none; }

.cv-pubs p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--space-md);
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
}
