/* CSS Variables */
:root {
  --dark-navy: #020c1b;
  --navy: #0a192f;
  --light-navy: #112240;
  --lightest-navy: #233554;
  --navy-shadow: rgba(2, 12, 27, 0.7);
  --dark-slate: #495670;
  --slate: #8892b0;
  --light-slate: #a8b2d1;
  --lightest-slate: #ccd6f6;
  --white: #e6f1ff;
  --green: #57cbff;
  --green-tint: rgba(87, 203, 255, 0.1);
  --pink: #f57dff;
  --blue: #57cbff;

  --font-sans:
    "Calibre", "Inter", "San Francisco", "SF Pro Text", -apple-system,
    system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --fz-xxs: 12px;
  --fz-xs: 13px;
  --fz-sm: 14px;
  --fz-md: 16px;
  --fz-lg: 18px;
  --fz-xl: 20px;
  --fz-xxl: 22px;
  --fz-heading: 32px;

  --border-radius: 4px;
  --nav-height: 100px;
  --nav-scroll-height: 70px;
  --tab-height: 42px;
  --tab-width: 120px;

  --easing: cubic-bezier(0.645, 0.045, 0.355, 1);
  --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);

  --hamburger-width: 30px;
}

/* Reveal-on-scroll (native, ScrollReveal-free) */
.reveal-on-scroll {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  transition:
    opacity 500ms var(--easing),
    transform 500ms var(--easing);
  will-change: opacity, transform;
}

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

/* Keep profile photo zoom while also supporting reveal-on-scroll */
.pic-img.reveal-on-scroll {
  transform: translateY(20px) scale(1.8) !important;
}

.pic-img.reveal-on-scroll.is-visible {
  transform: translateY(0) scale(1.8) !important;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: var(--lightest-navy);
  color: var(--lightest-slate);
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  background-color: var(--navy);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: var(--fz-lg);
  line-height: 1.3;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
  }

  html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  header,
  main,
  section {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

body.hidden {
  overflow: hidden;
}

body.blur #content > * {
  filter: blur(5px) brightness(0.7);
  transition: var(--transition);
  pointer-events: none;
  user-select: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 10px 0;
  font-weight: 600;
  color: var(--lightest-slate);
  line-height: 1.1;
}

.big-heading {
  margin: 0;
  font-size: clamp(34px, 6.5vw, 64px);
}

.hero h3.big-heading {
  color: var(--slate);
  margin-top: 10px;
  font-size: clamp(30px, 5.5vw, 54px);
}

.medium-heading {
  margin: 0;
  font-size: clamp(30px, 5.5vw, 48px);
}

.numbered-heading {
  display: flex;
  align-items: center;
  position: relative;
  margin: 10px 0 40px;
  width: 100%;
  font-size: clamp(26px, 5vw, var(--fz-heading));
  white-space: nowrap;
}

.numbered-heading::before {
  position: relative;
  bottom: 4px;
  counter-increment: section;
  content: "0" counter(section) ".";
  margin-right: 10px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(var(--fz-md), 3vw, var(--fz-xl));
  font-weight: 400;
}

.numbered-heading::after {
  content: "";
  display: block;
  position: relative;
  top: -5px;
  width: 300px;
  height: 1px;
  margin-left: 20px;
  background-color: var(--lightest-navy);
}

@media (max-width: 1080px) {
  .numbered-heading::after {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .numbered-heading::after {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .numbered-heading::before {
    margin-bottom: -3px;
    margin-right: 5px;
  }
}

p {
  margin: 0 0 15px 0;
}

a {
  display: inline-block;
  text-decoration: none;
  text-decoration-skip-ink: auto;
  color: inherit;
  position: relative;
  transition: var(--transition);
}

a:hover,
a:focus {
  color: var(--green);
}

.inline-link {
  display: inline-block;
  position: relative;
  color: var(--green);
  transition: var(--transition);
}

.inline-link::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  position: relative;
  bottom: 0.37em;
  background-color: var(--green);
  opacity: 0.5;
  transition: var(--transition);
}

.inline-link:hover::after,
.inline-link:focus::after {
  width: 100%;
}

/* Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  z-index: 11;
  padding: 0 50px;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

@media (max-width: 1080px) {
  header {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 25px;
  }
}

header.scrolled {
  height: var(--nav-scroll-height);
  box-shadow: 0 10px 30px -10px var(--navy-shadow);
  border-bottom: 1px solid var(--green-tint);
  backdrop-filter: blur(12px);
}

header.hidden-nav {
  transform: translateY(calc(var(--nav-scroll-height) * -1));
}

.nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  width: 100%;
  color: var(--lightest-slate);
  font-family: var(--font-mono);
  counter-reset: item 0;
  z-index: 12;
}

.logo a {
  color: var(--green);
  width: 42px;
  height: 42px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.logo a:hover {
  transform: translate(-4px, -4px);
}

.logo-icon {
  fill: none;
  stroke: currentColor;
  user-select: none;
  transition: var(--transition);
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
}

@media (max-width: 768px) {
  .nav {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

.nav-links ol {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links li {
  margin: 0 5px;
  position: relative;
  counter-increment: item 1;
  font-size: var(--fz-xs);
}

.nav-links a {
  padding: 10px;
}

.nav-links a::before {
  content: "0" counter(item) ".";
  margin-right: 5px;
  color: var(--green);
  font-size: var(--fz-xxs);
  text-align: right;
}

.nav-links .resume-button::before {
  content: none;
}

.nav-archive-link {
  margin-left: 15px;
}

@media (max-width: 768px) {
  .nav-archive-link {
    display: none !important;
  }
}

.nav-links a.active,
.nav-links a.active:hover {
  color: var(--green) !important;
}

.resume-button {
  color: var(--green);
  background-color: transparent;
  border: 1px solid var(--green);
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-size: var(--fz-xs);
  font-family: var(--font-mono);
  line-height: 1;
  text-decoration: none;
  transition: var(--transition);
  margin-left: 15px;
  cursor: pointer;
  min-width: 100px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.resume-button:hover,
.resume-button:focus {
  outline: none;
  box-shadow: 3px 3px 0 0 var(--green);
  transform: translate(-4px, -4px);
}

.menu-button {
  display: none;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 13;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
  min-height: 30px;
}

@media (max-width: 768px) {
  .menu-button {
    display: block;
  }
}

.menu-button span {
  width: 30px;
  height: 3px;
  background: #57cbff;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  transform-origin: center;
  display: block;
  will-change: transform;
}

.menu-button span:nth-child(1) {
  top: 7px;
}

.menu-button span:nth-child(2) {
  top: 13.5px;
}

.menu-button span:nth-child(3) {
  top: 20px;
}

.menu-button.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 13.5px;
  left: 0;
  background: #57cbff;
  opacity: 1;
  width: 30px;
  height: 3px;
}

.menu-button.active span:nth-child(2) {
  opacity: 0;
  width: 0;
  height: 0;
}

.menu-button.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 13.5px;
  left: 0;
  background: #57cbff;
  opacity: 1;
  width: 30px;
  height: 3px;
}

.menu {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(75vw, 400px);
  max-width: 400px;
  height: 100vh;
  outline: 0;
  z-index: 11;
  background-color: var(--light-navy);
  padding: 50px 10px 20px;
  box-shadow: -10px 0px 30px -15px var(--navy-shadow);
  transform: translateX(100%);
  transition:
    transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    visibility 0s 0.3s;
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden;
  opacity: 0;
}

.menu.active {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  transition:
    transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    visibility 0s;
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.menu.active .menu-close {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.2s ease 0.1s,
    transform 0.2s ease 0.1s;
}

.menu-close svg {
  width: 30px;
  height: 30px;
  transition: var(--transition);
}

.menu-close svg line {
  stroke-width: 3;
  stroke-linecap: round;
}

.menu-close:hover svg,
.menu-close:focus svg {
  transform: rotate(90deg);
  stroke: var(--white);
}

/* Backdrop overlay when menu is open */
.menu::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(2, 12, 27, 0.85);
  backdrop-filter: blur(4px);
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    visibility 0s 0.3s;
  pointer-events: none;
}

.menu.active::before {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
    visibility 0s;
}

.menu nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: auto;
  min-height: calc(100vh - 140px);
  padding-top: 20px;
  gap: 20px;
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.menu.active nav {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.3s ease 0.1s,
    transform 0.3s ease 0.1s;
}

.menu ol {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  order: 0;
  flex-grow: 1;
}

.menu li {
  margin: 0 auto 20px;
  position: relative;
  counter-increment: item 1;
  font-size: var(--fz-lg);
  width: 100%;
}

.menu a {
  width: 100%;
  padding: 10px 20px;
  color: var(--lightest-slate);
  display: block;
  transition: var(--transition);
}

.menu a:hover,
.menu a:focus {
  color: var(--green);
  background-color: var(--green-tint);
  border-radius: var(--border-radius);
}

.menu-buttons-wrapper {
  order: 999;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
  margin-top: auto;
}

.menu .menu-archive-button {
  margin: 0 20px 0 20px;
  width: calc(100% - 40px);
  text-align: center;
  align-self: stretch;
}

.menu .resume-button {
  margin: 0 20px 20px 20px;
  width: calc(100% - 40px);
  text-align: center;
  align-self: stretch;
}

.menu a::before {
  content: "0" counter(item) ".";
  margin-right: 5px;
  color: var(--green);
  font-size: var(--fz-sm);
}

.menu .resume-button::before {
  content: none;
}

/* Side Elements */
.social {
  position: fixed;
  bottom: 0;
  left: 40px;
  right: auto;
  z-index: 10;
  width: 40px;
}

@media (max-width: 1080px) {
  .social {
    left: 20px;
  }
}

@media (max-width: 768px) {
  .social {
    display: none;
  }
}

.social::after {
  content: "";
  display: block;
  width: 1px;
  height: 90px;
  margin: 0 auto;
  background-color: var(--lightest-navy);
}

.social ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social li {
  margin-bottom: 20px;
}

.social a {
  padding: 10px;
  color: var(--light-slate);
  transition: var(--transition);
}

.social a:hover {
  color: var(--green);
  transform: translateY(-3px);
}

.social svg {
  width: 20px;
  height: 20px;
}

.email {
  position: fixed;
  bottom: 0;
  right: 40px;
  left: auto;
  z-index: 10;
  width: 40px;
}

@media (max-width: 1080px) {
  .email {
    right: 20px;
  }
}

@media (max-width: 768px) {
  .email {
    display: none;
  }
}

.email::after {
  content: "";
  display: block;
  width: 1px;
  height: 90px;
  margin: 0 auto;
  background-color: var(--lightest-navy);
}

.email a {
  margin: 20px auto;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: var(--fz-xxs);
  line-height: var(--fz-lg);
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  color: var(--light-slate);
  transition: var(--transition);
}

.email a:hover {
  color: var(--green);
  transform: translateY(-3px);
}

/* Main Content */
main {
  margin: 0 auto;
  width: 100%;
  max-width: 1600px;
  min-height: 100vh;
  padding: 0 150px;
  counter-reset: section;
  overflow-x: hidden;
}

main section:first-of-type {
  padding-top: 0;
  margin-top: 0;
}

@media (max-width: 1080px) {
  main {
    padding: 0 100px;
  }
}

@media (max-width: 768px) {
  main {
    padding: 0 50px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 25px;
  }
}

section {
  margin: 0 auto;
  padding: 100px 0;
  max-width: 1000px;
}

@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  section.hero {
    padding: 0 !important;
    padding-top: calc(var(--nav-height) + 20px) !important;
    min-height: auto;
    margin-bottom: 140px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 0;
  }

  section.hero {
    padding: 0 !important;
    padding-top: calc(var(--nav-height) + 15px) !important;
    margin-bottom: 125px;
  }
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  /* Avoid forcing a full-viewport hero, which can create large empty gaps
     (especially after shrinking typography). */
  min-height: 72vh;
  height: auto;
  padding: 0 !important;
  padding-top: calc(var(--nav-height) + 130px) !important;
  margin-top: 0;
  margin-bottom: 90px;
  max-width: none;
}

@media (max-height: 700px) and (min-width: 700px), (max-width: 360px) {
  .hero {
    height: auto;
    padding-top: var(--nav-height);
  }
}

.hero-greeting {
  margin: 0 0 30px 4px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(var(--fz-sm), 5vw, var(--fz-md));
  font-weight: 400;
}

@media (max-width: 480px) {
  .hero-greeting {
    margin: 0 0 20px 2px;
  }
}

.hero-description {
  margin: 20px 0 0;
  max-width: 540px;
  font-size: var(--fz-lg);
  line-height: 1.6;
}

.email-link {
  color: var(--green);
  background-color: transparent;
  border: 1px solid var(--green);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  font-size: var(--fz-sm);
  font-family: var(--font-mono);
  line-height: 1;
  text-decoration: none;
  transition: var(--transition);
  margin-top: 36px;
}

.email-link:hover,
.email-link:focus {
  outline: none;
  box-shadow: 4px 4px 0 0 var(--green);
  transform: translate(-5px, -5px);
}

/* About Section */
.about-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-gap: 50px;
}

.about-text > div > ul {
  margin: 0 0 10px 0;
  padding-left: 18px;
}

.about-text > div > ul > li + li {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .about-inner {
    display: block;
  }
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));
  grid-gap: 0 10px;
  padding: 0;
  margin: 20px 0 0 0;
  list-style: none;
}

.skills-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 14px;
  font-family: var(--font-mono);
  font-size: var(--fz-md);
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skills-intro::after {
  content: "";
  height: 1px;
  flex: 1;
  background-color: var(--lightest-navy);
  opacity: 0.9;
}

.skills-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
  font-family: var(--font-mono);
  font-size: var(--fz-sm);
  color: var(--lightest-slate);
}

.skills-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: var(--fz-sm);
  line-height: 12px;
}

.about-pic {
  position: relative;
  max-width: 300px;
}

@media (max-width: 768px) {
  .about-pic {
    margin: 50px auto 0;
    width: 70%;
  }
}

.pic-wrapper {
  display: block;
  position: relative;
  width: 100%;
  border-radius: var(--border-radius);
  background-color: #ffffff;
  box-shadow: 0 10px 30px -15px var(--navy-shadow);
  transition: var(--transition);
  overflow: hidden;
}

@media (max-width: 768px) {
  .pic-wrapper {
    overflow: hidden;
    max-width: 100%;
  }

  .pic-img {
    max-width: 100%;
    height: auto;
  }
}

.pic-wrapper:hover {
  transform: translate(-4px, -4px);
  box-shadow: 0 20px 30px -15px var(--navy-shadow);
}

.pic-wrapper::before {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  top: 0;
  left: 0;
  background-color: var(--navy);
  mix-blend-mode: screen;
  transition: var(--transition);
  z-index: 2;
}

.pic-wrapper:hover::before {
  background-color: transparent;
}

.pic-wrapper::after {
  display: none;
}

.pic-img {
  position: relative;
  border-radius: var(--border-radius);
  mix-blend-mode: multiply;
  filter: grayscale(100%) contrast(1);
  transition: var(--transition);
  width: 100%;
  height: auto;
  display: block;
  z-index: 1;
  transform: scale(1.8);
  transform-origin: center center;
}

.pic-wrapper:hover .pic-img {
  filter: none;
  mix-blend-mode: normal;
}

/* Jobs Section */
.jobs-inner {
  display: flex;
}

@media (max-width: 600px) {
  .jobs-inner {
    display: block;
  }
}

@media (min-width: 700px) {
  .jobs-inner {
    /* With only 1 job entry, a large min-height creates a big empty gap before the next section */
    min-height: 0;
  }
}

/* Tighten spacing between Jobs -> Featured (desktop) */
section.jobs {
  padding-bottom: 60px;
}

section.featured {
  padding-top: 60px;
}

@media (max-width: 768px) {
  section.jobs {
    padding-bottom: 50px;
  }

  section.featured {
    padding-top: 50px;
  }
}

.tab-list {
  position: relative;
  z-index: 3;
  width: max-content;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (max-width: 600px) {
  .tab-list {
    display: flex;
    overflow-x: auto;
    width: calc(100% + 100px);
    padding-left: 50px;
    margin-left: -50px;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .tab-list {
    width: calc(100% + 50px);
    padding-left: 25px;
    margin-left: -25px;
  }
}

.tab-button {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--tab-height);
  padding: 0 20px 2px;
  border-left: 2px solid var(--lightest-navy);
  background-color: transparent;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  border-top: none;
  border-right: none;
  border-bottom: none;
  transition: var(--transition);
}

.tab-button:hover,
.tab-button:focus {
  background-color: var(--light-navy);
  color: var(--green);
}

.tab-button.active {
  color: var(--green);
}

@media (max-width: 768px) {
  .tab-button {
    padding: 0 15px 2px;
  }
}

@media (max-width: 600px) {
  .tab-button {
    min-width: 120px;
    padding: 0 15px;
    border-left: 0;
    border-bottom: 2px solid var(--lightest-navy);
    text-align: center;
    justify-content: center;
  }
}

.tab-highlight {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 2px;
  height: var(--tab-height);
  border-radius: var(--border-radius);
  background: var(--green);
  transform: translateY(0);
  transition: transform 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
  transition-delay: 0.1s;
}

@media (max-width: 600px) {
  .tab-highlight {
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: var(--tab-width);
    height: 2px;
    margin-left: 50px;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .tab-highlight {
    margin-left: 25px;
  }
}

.tab-panels {
  position: relative;
  width: 100%;
  margin-left: 20px;
}

@media (max-width: 600px) {
  .tab-panels {
    margin-left: 0;
  }
}

.tab-panel {
  width: 100%;
  height: auto;
  padding: 10px 5px;
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel ul {
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: var(--fz-lg);
}

.tab-panel li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.tab-panel li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
}

.tab-panel h3 {
  margin-bottom: 2px;
  font-size: var(--fz-xxl);
  font-weight: 500;
  line-height: 1.3;
}

.tab-panel .company {
  color: var(--green);
}

.tab-panel .range {
  margin-bottom: 25px;
  color: var(--light-slate);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
}

/* Featured Projects */
.featured-projects {
  list-style: none;
  padding: 0;
  margin: 0;
}

.featured-project {
  position: relative;
  display: grid;
  row-gap: 10px;
  column-gap: 15px;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  margin-bottom: 100px;
}

@media (max-width: 768px) {
  .featured-project {
    margin-bottom: 70px;
  }
}

@media (max-width: 480px) {
  .featured-project {
    margin-bottom: 30px;
  }

  .project-image {
    height: 250px;
    max-height: 250px;
  }

  .project-img {
    max-height: 250px;
  }
}

.project-content {
  position: relative;
  grid-row: 1 / -1;
  z-index: 5;
}

.featured-project:nth-of-type(odd) .project-content {
  grid-column: 7 / -1;
  text-align: right;
}

.featured-project:nth-of-type(even) .project-content {
  grid-column: 1 / 7;
  text-align: left;
}

.featured-project:nth-of-type(odd) .project-tech-list {
  justify-content: flex-end;
}

.featured-project:nth-of-type(even) .project-tech-list {
  justify-content: flex-start;
}

.featured-project:nth-of-type(odd) .project-links {
  justify-content: flex-end;
  margin-left: 0;
  margin-right: -10px;
}

.featured-project:nth-of-type(even) .project-links {
  justify-content: flex-start;
  margin-left: -10px;
  margin-right: 0;
}

@media (max-width: 1080px) {
  .featured-project:nth-of-type(odd) .project-content {
    grid-column: 5 / -1;
  }
  .featured-project:nth-of-type(even) .project-content {
    grid-column: 1 / 9;
  }
}

@media (max-width: 768px) {
  .featured-project:nth-of-type(odd) .project-tech-list,
  .featured-project:nth-of-type(even) .project-tech-list {
    justify-content: flex-start;
  }
  .featured-project:nth-of-type(odd) .project-links,
  .featured-project:nth-of-type(even) .project-links {
    justify-content: flex-start;
    margin-left: -10px;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  /* On mobile, stack featured project content ABOVE the image (no overlay). */
  .featured-project {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  /* Show the image first to create a visual hook, then the text content */
  .featured-project .project-image {
    order: 0;
  }

  .project-content {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    grid-column: 1 / -1;
    padding: 0;
    z-index: 5;
  }

  .featured-project .project-content {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .project-content {
    padding: 30px 25px 20px;
  }
}

.project-overline {
  margin: 10px 0;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 400;
}

.project-title {
  color: var(--lightest-slate);
  font-size: clamp(24px, 5vw, 28px);
  margin: 0 0 20px;
}

@media (max-width: 768px) {
  .project-title {
    color: var(--white);
  }
}

.project-description {
  position: relative;
  z-index: 2;
  padding: 25px;
  border-radius: var(--border-radius);
  background-color: var(--light-navy);
  color: var(--light-slate);
  font-size: var(--fz-lg);
  box-shadow: 0 10px 30px -15px var(--navy-shadow);
  transition: var(--transition);
}

.project-description ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-description li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.project-description li:last-child {
  margin-bottom: 0;
}

.project-description li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
}

/* Keep bullets readable even when the featured card is right-aligned */
.featured-project:nth-of-type(odd) .project-description {
  text-align: left;
}

.project-description:hover {
  box-shadow: 0 20px 30px -15px var(--navy-shadow);
}

@media (max-width: 768px) {
  .project-description {
    padding: 20px 0;
    background-color: transparent;
    box-shadow: none;
  }
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  z-index: 6;
  margin: 25px 0 10px;
  padding: 0;
  list-style: none;
}

.project-tech-list li {
  margin: 0 20px 5px 0;
  color: var(--light-slate);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .project-tech-list {
    margin: 10px 0;
  }

  .project-tech-list li {
    margin: 0 10px 5px 0;
    color: var(--lightest-slate);
  }
}

.project-links {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 6;
  margin-top: 10px;
  margin-left: -10px;
  color: var(--lightest-slate);
}

.project-links a {
  padding: 10px;
  color: var(--lightest-slate);
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--green);
}

.project-links .external svg {
  width: 22px;
  height: 22px;
  margin-top: -4px;
}

.project-image {
  grid-row: 1 / -1;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px -15px var(--navy-shadow);
  transition: var(--transition);
  height: 320px;
  overflow: hidden;
}

.featured-project:nth-of-type(odd) .project-image {
  grid-column: 1 / 8;
}

.featured-project:nth-of-type(even) .project-image {
  grid-column: 6 / -1;
}

@media (max-width: 1080px) {
  .featured-project:nth-of-type(odd) .project-image {
    grid-column: 1 / 9;
  }
  .featured-project:nth-of-type(even) .project-image {
    grid-column: 5 / -1;
  }
}

.project-image:hover {
  box-shadow: 0 20px 30px -15px var(--navy-shadow);
}

@media (max-width: 768px) {
  .project-image {
    grid-column: 1 / -1;
    height: 300px;
    max-height: 300px;
    opacity: 1;
    overflow: hidden;
  }
}

.project-image a {
  width: 100%;
  height: 100%;
  background-color: var(--green);
  border-radius: var(--border-radius);
  display: block;
  overflow: hidden;
  position: relative;
}

.project-image a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  transition: var(--transition);
  background-color: var(--navy);
  mix-blend-mode: screen;
}

.project-image a:hover::before,
.project-image a:focus::before {
  background: transparent;
}

.project-img {
  border-radius: var(--border-radius);
  mix-blend-mode: multiply;
  filter: grayscale(100%) contrast(1) brightness(90%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CortexMonitor image: keep same container but slightly zoomed-out */
.project-image-cortex .project-img {
  object-fit: cover;
  transform: scale(0.9);
  transform-origin: center center;
}

.project-image a:hover .project-img,
.project-image a:focus .project-img {
  filter: none;
}

@media (max-width: 768px) {
  .project-image {
    max-height: 300px;
    overflow: hidden;
  }

  .project-image a {
    max-height: 100%;
  }

  .project-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 300px;
    filter: grayscale(100%) contrast(1) brightness(90%);
  }
}

.project-icon {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.project-icon svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
}

.project-image a:hover .project-icon,
.project-image a:focus .project-icon {
  opacity: 1;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .project-icon {
    min-height: 200px;
    padding: 20px;
    opacity: 0.4;
  }

  .project-icon svg {
    max-width: 150px;
  }
}

/* Projects Grid */
.projects-grid {
  list-style: none;
  padding: 0;
  margin: 50px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  grid-gap: 15px;
  position: relative;
}

@media (max-width: 1080px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Archive link in projects section - override inline-link default green color */
.archive-link.inline-link {
  font-family: var(--font-mono);
  font-size: var(--fz-sm);
  display: inline-block;
  margin-bottom: 20px;
  color: var(--light-slate) !important;
  transition: var(--transition);
}

.archive-link.inline-link:hover,
.archive-link.inline-link:focus {
  color: var(--green) !important;
}

/* Ensure underline appears on hover */
.archive-link.inline-link::after {
  background-color: var(--green);
  opacity: 0;
  transition: var(--transition);
}

.archive-link.inline-link:hover::after,
.archive-link.inline-link:focus::after {
  opacity: 1;
  width: 100%;
}

.project-card {
  position: relative;
  cursor: default;
  transition: var(--transition);
}

.project-card:hover .project-card-inner {
  transform: translateY(-7px);
}

.project-card-inner {
  box-shadow: 0 10px 30px -15px var(--navy-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  height: 100%;
  padding: 1.4rem 1.75rem 2rem;
  border-radius: var(--border-radius);
  background-color: var(--light-navy);
  transition: var(--transition);
  overflow: hidden;
}

.project-card-inner:hover {
  box-shadow: 0 20px 30px -15px var(--navy-shadow);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  width: 100%;
}

.project-card-folder {
  color: var(--green);
}

.project-card-folder svg {
  width: 40px;
  height: 40px;
}

.project-card-links {
  display: flex;
  align-items: center;
  margin-right: -10px;
  color: var(--light-slate);
}

.project-card-links a {
  padding: 5px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-title {
  margin: 0 0 10px;
  color: var(--lightest-slate);
  font-size: var(--fz-xxl);
}

.project-card-description {
  color: var(--light-slate);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 0;
}

.project-card-description p {
  margin: 0;
  line-height: 1.5;
}

.project-card-description ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card-description li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.project-card-description li:last-child {
  margin-bottom: 0;
}

.project-card-description li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
}

.project-card-tech {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0;
  margin: auto 0 0 0;
  padding-top: 14px;
  list-style: none;
  row-gap: 6px;
}

.project-card-tech li {
  font-family: var(--font-mono);
  font-size: var(--fz-xxs);
  line-height: 1.75;
  margin-right: 15px;
}

.more-button {
  color: var(--green);
  background-color: transparent;
  border: 1px solid var(--green);
  border-radius: var(--border-radius);
  font-size: var(--fz-xs);
  font-family: var(--font-mono);
  line-height: 1;
  text-decoration: none;
  padding: 1.25rem 1.75rem;
  transition: var(--transition);
  margin: 80px auto 0;
  display: block;
  cursor: pointer;
}

.more-button:hover,
.more-button:focus {
  outline: none;
  box-shadow: 4px 4px 0 0 var(--green);
  transform: translate(-5px, -5px);
}

/* Archive Button - styled like email-link */
.archive-button {
  display: block;
  margin: 80px auto 0;
  text-align: center;
  max-width: fit-content;
  cursor: pointer;
}

/* Archive page "Back to Home" button - same sizing as Resume button */
.back-home-button {
  display: block;
  margin: 80px auto 0;
  max-width: fit-content;
  margin-left: auto !important; /* override resume-button's nav margin */
}

/* Contact Section */
.contact {
  max-width: 600px;
  margin: 0 auto 100px;
  text-align: center;
}

@media (max-width: 768px) {
  .contact {
    margin: 0 auto 50px;
  }
}

.contact .overline {
  display: block;
  margin-bottom: 20px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: var(--fz-md);
  font-weight: 400;
}

/* Contact section uses a numbered heading as an overline; center it and remove the divider line */
.contact .numbered-heading {
  justify-content: center;
  margin: 0 0 20px;
}

.contact .numbered-heading::after {
  display: none;
}

.contact .title {
  font-size: clamp(40px, 5vw, 60px);
}

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 70px;
  padding: 15px;
  text-align: center;
}

.footer-social {
  display: none;
}

@media (max-width: 768px) {
  .footer-social {
    display: block;
    width: 100%;
    max-width: 270px;
    margin: 0 auto 10px;
    color: var(--light-slate);
  }
}

.footer-social ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-social a {
  padding: 10px;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-credit {
  color: var(--light-slate);
  font-family: var(--font-mono);
  font-size: var(--fz-xxs);
  line-height: 1;
}

.footer-credit a {
  padding: 10px;
  color: var(--light-slate);
}

.footer-credit a:hover {
  color: var(--green);
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: auto;
  left: -999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -99;
}

.skip-to-content:focus {
  background-color: var(--green);
  color: var(--navy);
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: auto;
  z-index: 99;
  padding: 18px 23px;
  font-size: var(--fz-sm);
  font-family: var(--font-mono);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--border-radius);
}

/* Scrollbar Styles */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--dark-slate) var(--navy);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--navy);
}

::-webkit-scrollbar-thumb {
  background-color: var(--dark-slate);
  border: 3px solid var(--navy);
  border-radius: 10px;
}

/* Focus styles */
:focus {
  outline: 2px dashed var(--green);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
  outline-offset: 0px;
}

:focus-visible {
  outline: 2px dashed var(--green);
  outline-offset: 3px;
}

/* Archive Page */
.archive-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 0;
  padding-top: calc(var(--nav-height) + 40px);
}

/* Override first-of-type rule for archive section */
main section:first-of-type.archive-section {
  padding-top: calc(var(--nav-height) + 40px);
  margin-top: 0;
}

@media (max-width: 768px) {
  .archive-section {
    padding-top: calc(var(--nav-height) + 30px);
  }

  main section:first-of-type.archive-section {
    padding-top: calc(var(--nav-height) + 30px);
  }
}

@media (max-width: 480px) {
  .archive-section {
    padding-top: calc(var(--nav-height) + 20px);
  }

  main section:first-of-type.archive-section {
    padding-top: calc(var(--nav-height) + 20px);
  }
}

.archive-title {
  font-size: clamp(40px, 8vw, 60px);
  color: var(--lightest-slate);
  margin-bottom: 10px;
}

.archive-subtitle {
  font-size: var(--fz-lg);
  color: var(--green);
  font-family: var(--font-mono);
  margin-bottom: 50px;
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

.archive-table thead {
  display: none;
}

@media (min-width: 768px) {
  .archive-table thead {
    display: table-header-group;
  }
}

.archive-table th {
  text-align: left;
  padding: 10px 20px 10px 0;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--lightest-navy);
}

.archive-table th:last-child {
  text-align: right;
  padding-right: 0;
}

.archive-table tbody tr {
  border-bottom: 1px solid var(--lightest-navy);
  transition: var(--transition);
}

.archive-table tbody tr:hover {
  background-color: var(--green-tint);
}

.archive-table td {
  padding: 15px 20px 15px 0;
  vertical-align: middle;
}

.archive-table td:last-child {
  padding-right: 0;
  text-align: right;
  width: 10%;
}

.archive-year {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: var(--fz-sm);
  font-weight: 400;
  white-space: nowrap;
}

.archive-title-cell {
  color: var(--lightest-slate);
  font-size: var(--fz-lg);
  font-weight: 500;
}

.archive-tech {
  color: var(--slate);
  font-size: var(--fz-sm);
  font-family: var(--font-mono);
}

.archive-tech span {
  margin: 0 8px;
  color: var(--dark-slate);
}

.archive-link {
  color: var(--green);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.back-home-button {
  margin-top: 80px;
  display: block;
  max-width: max-content;
  margin-left: auto;
  margin-right: auto;
}

.archive-link:hover {
  color: var(--white);
  transform: translateY(-2px);
}

.archive-link svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .archive-table {
    display: block;
  }

  .archive-table thead {
    display: none;
  }

  .archive-table tbody {
    display: block;
  }

  /* Remove the default thin row border on mobile (it has higher specificity via `tbody tr`) */
  .archive-table tbody tr {
    border-bottom: none;
  }

  .archive-table tr {
    display: block;
    margin-bottom: 30px;
    padding-bottom: 20px;
    /* Use a pseudo-element divider instead of border-bottom (more reliable on mobile table layouts) */
    border-bottom: none;
    position: relative;
  }

  .archive-table tr::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    margin-top: 16px;
    background: rgba(87, 203, 255, 0.95);
    border-radius: 2px;
  }

  .archive-table td {
    display: block;
    padding: 5px 0;
    text-align: left !important;
  }

  .archive-table td:before {
    content: attr(data-label);
    display: block;
    color: var(--slate);
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    margin-bottom: 5px;
  }

  .archive-year {
    font-size: var(--fz-md);
    margin-bottom: 10px;
  }

  .archive-title-cell {
    font-size: var(--fz-xl);
    margin-bottom: 10px;
  }

  .archive-link {
    margin-top: 10px;
  }
}
