:root {
  --bg: #0b1220;
  --bg-secondary: #111c2e;
  --bg-card: #182538;
  --bg-card-alt: #122033;
  --surface: rgba(17, 28, 46, 0.75);
  --surface-strong: rgba(20, 30, 46, 0.92);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --amber: #e5a23b;
  --amber-soft: rgba(229, 162, 59, 0.16);
  --blue: #5296c8;
  --blue-soft: rgba(82, 150, 200, 0.17);
  --font-heading: "Playfair Display", Georgia, serif;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  --radius: 22px;
  --container: min(1180px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top left, rgba(82, 150, 200, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(229, 162, 59, 0.1), transparent 30%),
    #0b1220;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: transparent;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-color: #0b0a10;
  background-image:
    radial-gradient(ellipse at 50% 12%, rgba(139, 73, 52, 0.22), transparent 58%),
    repeating-linear-gradient(
      90deg,
      #0d0b10 0,
      #20151b 2.2%,
      #100d13 4.2%,
      #28202a 6.1%,
      #0d0b10 8.3%
    );
}

body::after {
  content: "";
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: #000;
  transition: opacity 500ms ease;
}

body.curtain-loading::after {
  opacity: 1;
}

#curtain-backdrop {
  position: fixed;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section--alt {
  background: transparent;
}

main {
  position: relative;
  z-index: 4;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.65);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--amber), #f1c67a 60%, #db9f3b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-text small {
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.brand-text small span:last-child {
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-menu a:not(.button) {
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 180ms ease;
}

.nav-menu a:not(.button):hover,
.nav-menu a:not(.button):focus-visible,
.nav-menu a:not(.button).is-active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  width: 48px;
  height: 48px;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--amber);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.eyebrow--muted {
  color: var(--blue);
}

.hero {
  padding-top: 4.5rem;
  padding-bottom: 4rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 0.65fr 0.75fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__content {
  max-width: 670px;
}

.hero__summary {
  margin: 1.25rem 0 1.5rem;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 28, 46, 0.96), rgba(11, 18, 32, 0.94));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.hero__summary:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 162, 59, 0.32);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 6.1rem);
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.hero__tagline {
  margin: 1rem 0 0.2rem;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  color: var(--text);
  font-weight: 600;
}

.hero__meta {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 640px;
  font-size: 1.08rem;
  color: rgba(241, 245, 249, 0.8);
  margin: 0;
}

.hero__actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  font-weight: 600;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 18, 32, 0.28);
}

.button--primary {
  background: linear-gradient(135deg, var(--amber), #f2bd63);
  color: #000;
  border-color: transparent;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.button--small {
  min-height: 40px;
  padding: 0.55rem 0.85rem;
}

.hero__visual {
  display: flex;
  justify-self: center;
  width: min(100%, 560px);
}

.hero-slideshow {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.hero-slides {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 600ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-controls {
  position: relative;
  flex: none;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.65rem 0.75rem;
  background: var(--bg-secondary);
  scrollbar-width: thin;
}

.slideshow-thumbnail {
  position: relative;
  flex: 0 0 72px;
  aspect-ratio: 8 / 5;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(241, 245, 249, 0.5);
  border-radius: 7px;
  background: var(--bg-secondary);
  opacity: 0.72;
  transition: opacity 180ms ease, border-color 180ms ease;
}

.slideshow-thumbnail:hover,
.slideshow-thumbnail:focus-visible,
.slideshow-thumbnail.is-active {
  opacity: 1;
  border-color: var(--amber);
}

.slideshow-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .slideshow-thumbnail {
    flex-basis: 60px;
  }
}

.section-heading {
  margin-bottom: 2.2rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 760px;
}

.gallery-intro {
  max-width: 680px;
  margin: 1rem 0 0;
  color: var(--muted);
}

.gallery-intro code {
  color: var(--amber);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: 1rem;
  align-items: start;
}

.gallery-item {
  min-width: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 37, 56, 0.88), rgba(12, 19, 31, 0.92));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 162, 59, 0.45);
}

.gallery-item--portrait {
  max-width: 250px;
}

.gallery-item--square {
  max-width: 250px;
}

.gallery-item img {
  width: 100%;
  object-fit: cover;
}

.gallery-item--portrait img {
  aspect-ratio: 4 / 5;
}

.gallery-item--square img {
  aspect-ratio: 1;
}

.gallery-item figcaption {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem 1rem;
}

.gallery-item figcaption strong {
  font-size: 0.95rem;
}

.gallery-item figcaption span {
  color: var(--muted);
  font-size: 0.75rem;
}

.card-grid,
.skills-grid,
.credentials-grid {
  display: grid;
  gap: 1.4rem;
}

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

.info-card,
.skill-card,
.credential-card,
.contact-panel {
  background: linear-gradient(180deg, rgba(24, 37, 56, 0.88), rgba(12, 19, 31, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 1.4rem;
  min-height: 230px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.info-card:hover,
.skill-card:hover,
.credential-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 162, 59, 0.32);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 162, 59, 0.18), rgba(82, 150, 200, 0.12));
  color: var(--amber);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.info-card h3,
.skill-card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.2;
}

.info-card p,
.skill-card li,
.credential-list li,
.contact-copy p,
.contact-details li,
.timeline-content li,
.location {
  color: rgba(241, 245, 249, 0.76);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.6rem;
  padding-left: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(229, 162, 59, 0.7), rgba(82, 150, 200, 0.16));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline-marker {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 0.95rem;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--amber), #f0c274);
  border: 4px solid rgba(11, 18, 32, 1);
  box-shadow: 0 0 0 1px rgba(229, 162, 59, 0.38);
  z-index: 1;
}

.timeline-content {
  background: rgba(12, 19, 31, 0.82);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.4rem;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.company-name {
  margin: 0 0 0.24rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.timeline-header h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.date-range {
  margin: 0;
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.timeline-content ul {
  padding-left: 1.1rem;
  margin: 0;
}

.timeline-content li + li {
  margin-top: 0.45rem;
}

.timeline-item--military .location {
  margin: 0.5rem 0 0.7rem;
  font-weight: 600;
}

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

.skill-card {
  padding: 1.35rem 1.2rem 1.1rem;
}

.skill-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

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

.credential-card {
  padding: 1.4rem 1.35rem;
}

.credential-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.credential-groups h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.2;
}

.credential-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.credential-list li {
  position: relative;
  padding-left: 1.05rem;
}

.credential-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 1.8rem;
}

.contact-copy h2 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.contact-details li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.contact-details span {
  color: var(--muted);
}

.contact-details a:not(.button) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(229, 162, 59, 0.5);
}

.copy-status {
  min-height: 1.5rem;
  margin: 0.55rem 0 0;
  color: var(--blue);
  font-size: 0.9rem;
}

.site-footer {
  position: relative;
  padding-top: 54px;
  background: transparent;
}

.footer-stage-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  opacity: 0.82;
  mask-image: linear-gradient(to bottom, transparent 0, #000 110px);
}

.site-footer::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -160px;
  left: 0;
  right: 0;
  height: calc(100% + 160px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0,
    #000 160px,
    rgba(0, 0, 0, 0.2) 270px,
    rgba(5, 8, 14, 0.34) 100%
  );
}

.site-footer::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.72),
    rgba(0, 0, 0, 0.28) 24px,
    transparent
  );
  filter: blur(3px);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  color: var(--muted);
  font-size: 0.94rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

:focus-visible {
  outline: 2px solid rgba(229, 162, 59, 0.9);
  outline-offset: 3px;
}

.cursor-spotlight {
  position: fixed;
  z-index: 39;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(116, 160, 189, 0.25) 5%,
    rgba(78, 126, 160, 0.15) 33%,
    rgba(71, 131, 173, 0.1) 45%,
    transparent 74%
  );
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 500ms ease;
  will-change: left, top, opacity;
}

.cursor-spotlight.is-visible {
  opacity: 1.9;
}

.cursor-spotlight.is-lingering {
  opacity: 0.32;
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    transition: none;
  }
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .hero__grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero__content {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 4rem 0;
  }

  .nav {
    position: relative;
    min-height: 72px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(11, 18, 32, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 0.65rem 0;
  }

  .button,
  .button--small {
    width: 100%;
  }

  .button--small {
    justify-content: center;
  }

  .overview-grid,
  .skills-grid,
  .credentials-grid,
  .credential-groups {
    grid-template-columns: 1fr;
  }

  .timeline-header,
  .contact-details li,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-range {
    white-space: normal;
  }

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

  .gallery-item--portrait,
  .gallery-item--square {
    grid-column: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body > header.site-header,
  body > main,
  body > footer.site-footer {
    transition: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-slide {
    transition: none;
  }

  .cursor-spotlight {
    display: none;
  }
}
