:root {
  --bg-dark: #041f38;
  --bg-main: #0a3a66;
  --bg-mid: #15558d;
  --paper: rgba(5, 32, 58, 0.82);
  --paper-strong: rgba(7, 35, 63, 0.93);
  --line-strong: rgba(255, 255, 255, 0.28);
  --line-mid: rgba(255, 255, 255, 0.14);
  --line-fine: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --text-soft: rgba(244, 250, 255, 0.84);
  --stroke: rgba(0, 0, 0, 0.88);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --body: "Inter", sans-serif;
  --hand: "Patrick Hand", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.09), transparent 20%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.07), transparent 18%),
    linear-gradient(180deg, #14639f 0%, var(--bg-main) 32%, var(--bg-dark) 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.blueprint-grid,
.blueprint-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.blueprint-grid {
  z-index: 0;
  background-image:
    linear-gradient(var(--line-strong) 1.4px, transparent 1.4px),
    linear-gradient(90deg, var(--line-strong) 1.4px, transparent 1.4px),
    linear-gradient(var(--line-mid) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-mid) 1px, transparent 1px),
    linear-gradient(var(--line-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-fine) 1px, transparent 1px);
  background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

.blueprint-overlay {
  z-index: 0;
  opacity: 0.58;
  background:
    linear-gradient(transparent 0, transparent 94%, rgba(255,255,255,0.05) 94.2%, transparent 94.4%),
    linear-gradient(90deg, transparent 0, transparent 92%, rgba(255,255,255,0.04) 92.15%, transparent 92.35%),
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.16) 0 1.1px, transparent 2px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 78%, rgba(255,255,255,0.14) 0 1.2px, transparent 2px),
    radial-gradient(circle at 88% 82%, rgba(255,255,255,0.12) 0 1.1px, transparent 2px);
  background-size: 100% 14px, 180px 100%, 260px 260px, 340px 340px, 420px 420px, 540px 540px;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 40px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.025);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

.page-shell::before,
.page-shell::after,
.hero-sheet::before,
.panel::before,
.info-card::before,
.experience-card::before,
.modal-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  pointer-events: none;
}

.page-shell::after {
  inset: 18px;
  border-style: dashed;
  opacity: 0.35;
}

.hero-sheet,
.panel,
.info-card,
.experience-card,
.modal-shell {
  position: relative;
  background: linear-gradient(180deg, rgba(12, 64, 108, 0.94), rgba(5, 32, 58, 0.94));
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.hero-sheet {
  padding: 28px;
  margin-bottom: 20px;
}

.topline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  color: var(--text-soft);
  font-size: 0.94rem;
}

.topline a {
  color: var(--text);
  text-decoration: none;
}

.topline a:hover {
  text-decoration: underline;
}

.hero-main {
  max-width: 980px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
.hero-role,
.tab-text,
.close-modal,
.experience-card strong {
  margin: 0;
  color: #fff;
  -webkit-text-stroke: 1px var(--stroke);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 rgba(0,0,0,0.72);
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.85rem);
  line-height: 0.98;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.hero-role {
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-summary,
.panel-header p,
.info-card p,
.info-card li,
.about-card p,
.modal-shell li,
.modal-role,
.experience-card em,
.experience-card small,
.experience-years {
  color: var(--text);
}

.hero-summary,
.panel-header p,
.info-card p,
.info-card li,
.about-card p,
.modal-shell li {
  line-height: 1.72;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sector-pill {
  position: relative;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.055);
  color: var(--text);
  min-height: 58px;
  padding: 12px 14px;
  font: 600 0.96rem var(--body);
  cursor: default;
}

.sector-pill::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(320px, 82vw);
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(3, 22, 40, 0.96);
  color: #fff;
  font: 500 0.82rem/1.45 var(--body);
  opacity: 0;
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 16px 34px rgba(0,0,0,0.32);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}


.sector-pill:hover::after,
.sector-pill:focus-visible::after {
  opacity: 1;
}

.sector-pill:hover::after,
.sector-pill:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}


.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  margin: 0 0 20px;
  padding: 0 6px;
}

.section-tab {
  position: relative;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.tab-text {
  font-family: var(--hand);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tab-line {
  display: block;
  width: 100%;
  min-width: 88px;
  height: 3px;
  background: rgba(255,255,255,0.32);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.section-tab:hover .tab-line,
.section-tab.active .tab-line {
  background: rgba(255,255,255,0.98);
  transform: scaleX(1.16);
  box-shadow: 0 0 18px rgba(255,255,255,0.3);
}

.panel {
  display: none;
  padding: 26px;
}

.panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  margin-bottom: 6px;
}

.experience-grid,
.project-grid,
.credentials-grid {
  display: grid;
  gap: 16px;
}

.experience-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-grid,
.credentials-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.experience-card {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.experience-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.34);
  background: linear-gradient(180deg, rgba(19, 74, 120, 0.96), rgba(5, 32, 58, 0.94));
}

.experience-years,
.experience-card em,
.experience-card small,
.modal-kicker,
.modal-role {
  display: block;
}

.experience-years {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.experience-card strong {
  display: block;
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.experience-card em {
  font-style: normal;
  font-weight: 600;
  margin-bottom: 8px;
}

.experience-card small {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.info-card {
  padding: 22px;
}

.info-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.info-card ul,
.modal-shell ul {
  margin: 0;
  padding-left: 1.2rem;
}

.info-card li,
.modal-shell li {
  margin-bottom: 10px;
}

.media-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.055);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.media-link:hover {
  background: rgba(255,255,255,0.1);
}

.about-card {
  padding: 26px;
}

.about-card p + p {
  margin-top: 16px;
}

.modal-backdrop {
  z-index: 14;
  background: rgba(1, 9, 18, 0.72);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.experience-modal {
  position: fixed;
  inset: 24px;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 18px;
}

.experience-modal[hidden],
.modal-backdrop[hidden] {
  display: none !important;
}

.modal-shell {
  width: min(980px, 100%);
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: 28px 30px 30px;
}

.close-modal {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.055);
  color: #fff;
  font-size: 1.65rem;
  cursor: pointer;
}

.modal-kicker {
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.modal-shell h3 {
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  margin-bottom: 10px;
}

.modal-role {
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-soft);
}

@media (max-width: 980px) {
  .sector-grid,
  .experience-grid,
  .project-grid,
  .credentials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 14px, 100%);
    margin: 8px auto 24px;
    padding: 10px;
  }

  .section-tabs {
    gap: 14px 18px;
  }

  .tab-text {
    font-size: 1.14rem;
    white-space: normal;
  }

  .hero-sheet,
  .panel,
  .info-card,
  .modal-shell {
    padding: 20px;
  }

  .topline,
  .section-tabs,
  .panel-header {
    gap: 12px;
  }

  .sector-grid,
  .experience-grid,
  .project-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .section-tabs {
    justify-content: space-between;
  }


  .experience-modal {
    inset: 8px;
    padding: 10px;
  }

  .modal-shell {
    max-height: 92vh;
  }
}
