/* =========================
   Base variables and theme
   ========================= */
:root {
  --page-bg: #10151f;
  --surface-bg: #021136;
  --text-main: #bcc7d8;
  --text-strong: #e7edf8;
  --text-muted: #8c97ab;
  --accent-green: #087700;
  --accent-blue: #27a6ff;
  --section-line: #087700;
  --button-radius: 0.6rem;
  --content-width: min(1120px, 90vw);
  --layout-padding: 2rem;
  --social-left: 2rem;
}

/* Global reset and typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #000000;
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.45;
  font-weight: 500;
}

a {
  color: inherit;
}

/* Main centered canvas (similar to prototype frame) */
.page-shell {
  max-width: 1650px;
  margin: 0 auto;
  min-height: 100vh;
}

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

.section {
  padding: 4.5rem 0;
}

/* Scroll reveal base states */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

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

/* =========================
   Header and navigation
   ========================= */
.site-header {
  padding-top: 2.2rem;
}

.header-content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu-button {
  display: none;
}

.mobile-menu {
  display: none;
}

/* Fixed right navigation (always visible while scrolling) */
.site-header nav {
  position: fixed;
  top: 50%;
  right: 2.8rem;
  transform: translateY(-50%);
  z-index: 1000;
}

.logo {
  position: fixed;
  top: 1.5rem;
  left: calc(var(--social-left) + 1rem);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 1001;
}

.logo-image {
  width: clamp(3.8rem, 6vw, 5.2rem);
  height: auto;
  display: block;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  /* Dynamic size with a 16px cap on desktop */
  font-size: clamp(0.85rem, 0.75rem + 0.55vw, 1rem);
  line-height: 1;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text-strong);
}

.nav-list a.is-current {
  color: var(--accent-green);
  font-weight: 700;
}

/* =========================
   Hero section
   ========================= */
.hero {
  --x: 50%;
  --y: 50%;
  padding-top: 3.5rem;
  position: relative;
  min-height: calc(100svh - 2.2rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x) var(--y),
    rgba(8, 119, 0, 0.18),
    transparent 40%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.hero:hover::before {
  opacity: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
}

.hero-social {
  position: fixed;
  left: var(--social-left);
  bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
}

.hero-social a {
  color: var(--accent-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.social-divider {
  width: 1px;
  height: 140px;
  background: var(--accent-green);
  margin-top: 0.5rem;
}

.social-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Keep hero content aligned to the same left axis as the logo */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-width: 0;
}

.hero-content {
  padding-inline: 0;
}

.accent-green {
  color: var(--accent-green);
  display: block;
  animation: nameFade 800ms ease;
}

@keyframes nameFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accent-inline {
  color: inherit;
  background-image: linear-gradient(var(--accent-green), var(--accent-green));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.08em;
  animation: audience-underline 520ms ease-out forwards;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


body.is-initial-load .hero-intro .accent-inline {
  animation-delay: 900ms;
}

@keyframes audience-underline {
  from {
    background-size: 0% 0.08em;
  }
  to {
    background-size: 100% 0.08em;
  }
}

.hero-intro {
  margin: 1rem 0 2.2rem;
  max-width: 920px;
  color: var(--text-main);
  font-size: clamp(1.55rem, 4.1vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
}

/* Underline style used for selected lines from the prototype */
.underline-line {
  display: block;
  text-decoration: underline;
  text-decoration-color: var(--accent-blue);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.06em;
}

.audience-list {
  margin: 0 0 1.9rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  justify-content: flex-start;
  width: 100%;
}

.audience-menu {
  padding-right: 0;
}

.audience-option {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-muted);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.audience-option:hover,
.audience-option:focus-visible {
  color: var(--text-strong);
  outline: none;
}

.audience-list li {
  color: var(--text-muted);
  font-size: 1rem;
}

.audience-option.is-active {
  color: var(--text-strong);
  font-weight: 700;
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--accent-green);
  border-radius: var(--button-radius);
  padding: 0.82rem 1.6rem;
  color: var(--text-strong);
  text-decoration: none;
  font-size: 1rem;
  transition: all 180ms ease;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  transform: translateY(-2px);
  background: rgba(8, 119, 0, 0.15);
}

.hero-visual {
  min-height: 460px;
  border: 1px solid rgba(0, 166, 58, 0.55);
  border-radius: 0.25rem;
  background: radial-gradient(
    circle at top,
    rgba(39, 166, 255, 0.11),
    transparent 60%
  );
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 4rem);
  display: grid;
  place-items: center;
}

/* =========================
   Shared section heading
   ========================= */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  margin-bottom: 3.1rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  white-space: nowrap;
}

.heading-line {
  width: 100%;
  height: 1px;
  background: var(--section-line);
}

/* =========================
   Projects section
   ========================= */
.projects-list {
  display: grid;
  gap: 4rem;
}

.project-item {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.project-item:hover {
  transform: translateY(-6px);
}

.project-item.reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.project-btn-mobile {
  display: none;
}

/* Alternate text/image positions for visual rhythm */
.project-item.reverse .project-content {
  order: 2;
}

.project-item.reverse .project-media {
  order: 1;
}

.project-content h3 {
  margin: 0 0 0.75rem;
  color: var(--text-strong);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

.project-content p {
  margin: 0 0 1rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.38;
}

.project-content strong {
  color: var(--text-main);
}

.project-media {
  min-height: 360px;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
}

/* =========================
   About section
   ========================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.2rem;
}

.about-grid h3 {
  margin: 0 0 1.35rem;
  color: var(--text-strong);
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
}

.about-grid p {
  margin: 0 0 1.35rem;
  color: var(--text-main);
  font-size: 1rem;
}

.competency-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}

.competency-item {
  position: relative;
  border: 1px solid rgba(140, 151, 171, 0.22);
  border-radius: 12px;
  padding: 1rem 1rem 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.015);
  transition:
    transform 230ms ease,
    border-color 230ms ease,
    background 230ms ease;
}

.competency-item::before {
  content: "";
  position: absolute;
  left: 0.48rem;
  top: 1.08rem;
  width: 3px;
  height: 1.55rem;
  border-radius: 99px;
  background: rgba(8, 119, 0, 0.95);
}

.competency-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-green);
  background: rgba(8, 119, 0, 0.08);
}

.competency-item h4 {
  margin: 0 0 1.2rem;
  color: var(--text-main);
  font-size: 1.95rem;
}

.competency-item p {
  margin: 0;
  color: var(--text-main);
}

.tech-list {
  margin: 0.80rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(140, 151, 171, 0.45);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.2;
  transition:
    border-color 220ms ease,
    color 220ms ease,
    background 220ms ease;
}

.tech-chip:hover {
  border-color: var(--accent-green);
  color: var(--text-strong);
  background: rgba(8, 119, 0, 0.11);
}

/* =========================
   Contact / Footer
   ========================= */
.site-footer {
  padding-top: 3.6rem;
  min-height: calc(100svh - 2.2rem);
}

#about {
  min-height: calc(100svh - 2.2rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  grid-template-areas:
    "content profile"
    "copyright profile";
  gap: 3rem;
  align-items: start;
}

.contact-content {
  grid-area: content;
}

.footer-eyebrow {
  margin: 0 0 1rem;
  color: var(--text-strong);
  font-size: 1.5rem;
  font-weight: 700;
}

.site-footer h2 {
  margin: 0 0 1.1rem;
  max-width: 800px;
  color: var(--text-strong);
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 1.12;
}

.contact-description {
  margin: 0 0 1.9rem;
  max-width: 760px;
  color: var(--text-main);
  font-size: clamp(1rem, 1.8vw, 1.85rem);
  line-height: 1.3;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.contact-links a {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent-green);
  text-underline-offset: 0.2em;
  transition: color 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--accent-green);
}

.copyright {
  grid-area: copyright;
  margin: 3.3rem 0 0;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
}

.profile-placeholder {
  grid-area: profile;
  width: min(360px, 100%);
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(8, 119, 0, 0.16);
  border: 1px solid rgba(8, 119, 0, 0.35);
  justify-self: end;
}

.profile-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

/* =========================
   Microinteraction Enhancements
   ========================= */
a,
button {
  transition:
    color 200ms ease,
    transform 200ms ease;
}

.competency-item {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.competency-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-green);
  box-shadow: 0 0 25px rgba(8, 119, 0, 0.18);
}

.project-media .project-image {
  transition: transform 400ms ease;
}

.project-media:hover .project-image {
  transform: scale(1.08);
}

.tech-chip {
  transition:
    border-color 200ms ease,
    transform 200ms ease,
    color 200ms ease,
    background 200ms ease;
}

.tech-chip:hover {
  border-color: var(--accent-green);
  color: var(--text-strong);
  background: rgba(8, 119, 0, 0.08);
  transform: translateY(-2px);
}

.heading-line {
  width: 0;
  transition: width 600ms ease;
}

.heading-line.is-visible {
  width: 100%;
}

/* =========================
   Responsive rules
   ========================= */
@media (max-width: 1080px) {
  :root {
    --social-left: 1.4rem;
  }

  .hero-grid {
    grid-template-columns: 70px 1fr;
  }

  .hero-copy {
    grid-column: 2;
  }

  .hero-visual {
    grid-column: 1 / -1;
    min-height: 300px;
  }

  .hero-social {
    bottom: 1.1rem;
  }
}

@media (max-width: 900px) {
  :root {
    --social-left: 1.15rem;
  }

  .section {
    padding: 3.4rem 0;
  }

  .hero-grid,
  .project-item,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: baseline;
  }

  .section-heading h2 {
    white-space: normal;
  }

  .project-item.reverse .project-content,
  .project-item.reverse .project-media {
    order: initial;
  }

  .project-media {
    min-height: 260px;
  }

  .profile-placeholder {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  :root {
    --social-left: 0.8rem;
  }

  .site-header {
    padding-top: 1.6rem;
  }

  .hero-social {
    left: 0.55rem;
    bottom: 0.85rem;
    gap: 0.7rem;
  }

  .social-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  .social-divider {
    height: 92px;
  }

  .header-content {
    align-items: flex-start;
  }

  .site-header nav {
    right: 1.35rem;
  }

  .nav-list {
    gap: 0.55rem;
  }

  .nav-list a {
    font-size: clamp(0.8rem, 0.72rem + 0.7vw, 1rem);
  }

  .audience-list {
    gap: 1rem;
  }

  .btn-outline {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 1024px) {
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .hero-copy h1,
  .hero-intro {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .project-item,
  .project-item.reverse {
    grid-template-columns: 1fr;
  }

  .project-item.reverse .project-content,
  .project-item.reverse .project-media {
    order: initial;
  }

  .project-btn-desktop {
    display: none;
  }

  .project-btn-mobile {
    display: inline-block;
    justify-self: start;
    margin-top: 0.45rem;
  }
}

@media (max-width: 1100px) {
  .site-header nav {
    display: none;
  }

  .mobile-menu-button {
    position: fixed;
    top: 1.5rem;
    right: 1rem;
    z-index: 1200;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(140, 151, 171, 0.45);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.85);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    cursor: pointer;
  }

  .mobile-menu-button span {
    width: 15px;
    height: 1.75px;
    background: var(--text-strong);
    border-radius: 999px;
  }

  .mobile-menu {
    position: fixed;
    top: 3.8rem;
    right: 1rem;
    z-index: 1190;
    min-width: 165px;
    border: 1px solid rgba(140, 151, 171, 0.35);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.94);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 240ms ease,
      transform 240ms ease;
  }

  .mobile-menu a {
    color: var(--text-main);
    text-decoration: none;
  }

  .mobile-menu a:hover,
  .mobile-menu a:focus-visible {
    color: var(--accent-green);
  }

  .mobile-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding-left: 0;
    padding-right: 0;
  }

  .audience-list {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .audience-list::-webkit-scrollbar {
    display: none;
  }

  .audience-list li {
    flex: 0 0 auto;
  }

  .audience-menu {
    padding-right: 0;
  }

  .audience-menu::after {
    content: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "profile"
      "copyright";
    gap: 1.6rem;
  }

  .profile-placeholder {
    justify-self: start;
  }

  .copyright {
    margin: 0;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 4rem);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.75rem, 9.5vw, 3rem);
    line-height: 1.08;
  }

  .mobile-menu-button {
    top: 1.35rem;
    right: 0.8rem;
    width: 34px;
    height: 34px;
  }

  .mobile-menu-button span {
    width: 14px;
  }

  .mobile-menu {
    right: 0.8rem;
  }

  .project-media {
    min-height: 220px;
  }
}
