/* ==========================================================================
   PANROU/DEV — style.css
   Brand: navy #0C2A43 · cream #F3F0ED · red #ED4545
   Signature: the slash — nav paths, section eyebrows, diagonal edges.
   ========================================================================== */

:root {
  --navy: #0c2a43;
  --navy-deep: #081d30;
  --navy-soft: #133552;
  --cream: #f3f0ed;
  --cream-deep: #e7e1da;
  --cream-line: #dcd4cb;
  --red: #ed4545;
  --red-dark: #c73232;
  --red-soft: rgba(237, 69, 69, 0.16);
  --white: #ffffff;

  --on-navy: var(--cream);
  --on-navy-mute: #c9c0b6;
  --on-navy-faint: #8fa0b0;
  --on-cream: var(--navy);
  --on-cream-mute: #5a6e80;

  --font-sans: "Montserrat", "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "DejaVu Sans Mono", "Courier New", monospace;

  --container: 1120px;
  --slash-cut: clamp(
    36px,
    6vw,
    84px
  ); /* height of the diagonal section edges */
  --nav-h: 76px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--on-cream);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Type helpers
   ========================================================================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--red-dark);
  margin-bottom: 14px;
}
.eyebrow-red {
  color: var(--red);
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 14px;
}
.section-title.on-navy {
  color: var(--white);
}

.section-intro {
  max-width: 560px;
  color: var(--on-cream-mute);
  margin-bottom: 40px;
}

.accent {
  color: var(--red);
}

/* ==========================================================================
   Buttons & chips
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-red:hover {
  background: var(--red-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 240, 237, 0.35);
}
.btn-ghost:hover {
  border-color: var(--cream);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.85rem;
}
.btn-large {
  padding: 16px 34px;
  font-size: 1.05rem;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid rgba(243, 240, 237, 0.3);
  color: var(--on-navy-mute);
}
.chip-red {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo img {
  height: 22px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--on-navy-mute);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.nav-link:hover {
  color: var(--cream);
}
.nav-link.is-active {
  color: var(--cream);
  border-bottom-color: var(--red);
}
.nav-link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 26px;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
  }
  .nav-menu.is-open {
    display: flex;
  }
}

/* ==========================================================================
   Slash edges — the diagonal cuts that echo the logo's "/"
   ========================================================================== */

.slash-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slash-cut)), 0 100%);
  padding-bottom: calc(var(--slash-cut) + 40px) !important;
}
.slash-top {
  clip-path: polygon(0 var(--slash-cut), 100% 0, 100% 100%, 0 100%);
  padding-top: calc(var(--slash-cut) + 40px) !important;
  margin-top: calc(-1 * var(--slash-cut));
}
.slash-top.slash-bottom {
  clip-path: polygon(
    0 var(--slash-cut),
    100% 0,
    100% calc(100% - var(--slash-cut)),
    0 100%
  );
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--navy);
  color: var(--on-navy);
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
}
/* Giant ghost slash in the hero background */
.hero::after {
  content: "/";
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-54%);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(360px, 52vw, 760px);
  line-height: 1;
  color: rgba(243, 240, 237, 0.045);
  pointer-events: none;
  user-select: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}

.hero-compact {
  padding: 70px 0 90px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--white);
  margin-bottom: 26px;
}

.hero-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--on-navy-mute);
  margin-top: -14px;
  margin-bottom: 22px;
}

.hero-terminal {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--on-navy-mute);
  margin-bottom: 26px;
}
.hero-terminal .prompt {
  color: var(--red);
  margin-right: 8px;
}
.hero-terminal .path {
  color: var(--cream);
  font-weight: 700;
}
.hero-terminal .caret {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--red);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-terminal .caret {
    animation: none;
  }
}

.hero-sub {
  max-width: 620px;
  color: var(--on-navy-mute);
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-strip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--on-navy-faint);
}
.hero-strip .dot {
  color: var(--red);
  margin: 0 8px;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 90px 0;
}
.section-cream {
  background: var(--cream);
}
.section-navy {
  background: var(--navy);
  color: var(--on-navy);
}

/* ==========================================================================
   Service cards
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: 6px;
  padding: 28px 26px 30px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(12, 42, 67, 0.1);
}
.card:hover::before {
  transform: scaleX(1);
}

.card-path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red-dark);
  margin-bottom: 12px;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.card-text {
  font-size: 0.95rem;
  color: var(--on-cream-mute);
}

/* ==========================================================================
   Process steps
   ========================================================================== */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
  margin-top: 44px;
}
@media (max-width: 980px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 10px;
}
.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.step-text {
  font-size: 0.9rem;
  color: var(--on-navy-mute);
}

/* ==========================================================================
   Stack rows (home)
   ========================================================================== */

.stack-rows {
  display: grid;
  gap: 16px;
}

.stack-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cream-line);
}
.stack-row:last-child {
  border-bottom: 0;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-dark);
  min-width: 110px;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--white);
  border: 1px solid var(--cream-line);
  color: var(--on-cream-mute);
  padding: 4px 10px;
  border-radius: 4px;
  margin: 0 4px 4px 0;
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta {
  padding-bottom: 110px;
}
.cta-inner {
  text-align: center;
  max-width: 660px;
}

.cta-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}
.cta-text {
  color: var(--on-navy-mute);
  margin-bottom: 30px;
}

/* CTA on a cream section (about page) — navy text, button unchanged */
.section-cream .cta-title {
  color: var(--navy);
}
.section-cream .cta-text {
  color: var(--on-cream-mute);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--navy-deep);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-logo {
  height: 18px;
  width: auto;
}
.footer-nav {
  display: flex;
  gap: 22px;
}
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--on-navy-faint);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--cream);
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--on-navy-faint);
}

/* ==========================================================================
   About page — timeline (mirrors the CV design)
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 2px solid var(--cream-deep);
  margin-top: 30px;
}

.job {
  margin-bottom: 40px;
}
.job:last-child {
  margin-bottom: 0;
}

.job-head {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.job-head::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--red);
}
.job.is-current .job-head::before {
  box-shadow:
    0 0 0 2px var(--red),
    0 0 0 7px var(--red-soft);
}

.company {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.current-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px 4px;
  border-radius: 4px;
}
.current-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
}

.role-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 6px;
}
.role-title em {
  color: var(--on-cream-mute);
  font-weight: 400;
}

.meta {
  font-size: 0.85rem;
  color: var(--on-cream-mute);
  margin: 4px 0 12px;
}
.meta .sep {
  margin: 0 7px;
  color: var(--cream-line);
}
.meta .loc {
  font-style: italic;
}

.bullets {
  list-style: none;
}
.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

.stack-line {
  margin-top: 12px;
}
.stack-key {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-right: 6px;
}

.earlier-header {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 56px 0 20px;
  display: flex;
  align-items: center;
}
.earlier-header::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--red);
  margin-right: 12px;
  border-radius: 1px;
}

.earlier {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) {
  .earlier {
    grid-template-columns: 1fr;
  }
}

.compact-job {
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: 6px;
  padding: 20px 20px 22px;
}
.compact-company {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  font-size: 0.95rem;
}
.compact-role {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}
.compact-meta {
  font-size: 0.8rem;
  color: var(--on-cream-mute);
  margin: 3px 0 8px;
}
.compact-blurb {
  font-size: 0.88rem;
  color: var(--on-cream-mute);
}

/* ==========================================================================
   About page — skills grid
   ========================================================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
  margin-top: 36px;
}
@media (max-width: 720px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(243, 240, 237, 0.12);
}
.skill-name {
  font-weight: 600;
  color: var(--cream);
  font-size: 0.98rem;
}
.skill-years {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--red);
  white-space: nowrap;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
