/* =========================================================
   MAXIME IN TECH
   Technical Editorial Theme
   ========================================================= */


/* ==================== TOKENS ==================== */

:root {
  --bg: #0b0d10;
  --bg-soft: #101318;
  --bg-card: #12161b;
  --bg-card-hover: #171c22;

  --text: #f2f4f6;
  --text-soft: #a5adb6;
  --text-muted: #69727d;

  --line: #242a31;
  --line-bright: #303841;

  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-dark: #0c4a6e;

  --success: #7ee787;

  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --content: 1160px;
  --reading: 720px;

  --radius: 12px;
  --radius-small: 7px;
}


/* ==================== RESET ==================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  font: inherit;
}

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

button {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}


/* ==================== UTILITIES ==================== */

.wrap {
  width: min(var(--content), calc(100% - 64px));
  margin: 0 auto;
}

.section {
  padding: 130px 0;
  border-top: 1px solid var(--line);
}

.eyebrow,
.section-index,
.project-status,
.tags,
.terminal,
.stat-number,
.stat-label,
.timeline-period,
.footer-right {
  font-family: var(--mono);
}


/* ==================== NAVIGATION ==================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  width: min(var(--content), calc(100% - 64px));
  height: 72px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.logo-mark {
  width: 27px;
  height: 27px;

  display: grid;
  place-items: center;

  background: var(--text);
  color: var(--bg);

  border-radius: 5px;

  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;

  margin: 0;
  padding: 0;
  list-style: none;

  font-size: 14px;
  color: var(--text-soft);
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;

  height: 1px;

  background: var(--accent);

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}


/* Mobile toggle */

.nav-toggle {
  display: none;

  width: 42px;
  height: 38px;

  padding: 0;

  background: transparent;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-small);

  cursor: pointer;
}

.nav-toggle span {
  display: block;

  width: 17px;
  height: 1px;

  margin: 5px auto;

  background: var(--text);
}


/* ==================== HERO ==================== */

.hero {
  position: relative;
  overflow: hidden;

  padding: 120px 0 0;
}

.hero::before {
  content: "";

  position: absolute;
  top: -280px;
  right: -180px;

  width: 600px;
  height: 600px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.08) 0%,
    rgba(56, 189, 248, 0) 70%
  );

  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 80px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 25px;

  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--success);

  box-shadow: 0 0 0 4px rgba(126, 231, 135, 0.08);
}

.hero h1 {
  max-width: 760px;

  margin: 0;

  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 em,
.section-intro h2 em,
.contact-box h2 em {
  color: var(--accent);
  font-style: normal;
}

.hero-lede {
  max-width: 620px;

  margin: 32px 0 0;

  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 15px;

  padding: 12px 17px;

  border-radius: var(--radius-small);

  font-size: 14px;
  font-weight: 600;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--accent);
}

.button-ghost {
  border: 1px solid var(--line-bright);
  color: var(--text-soft);
}

.button-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}


/* ==================== TERMINAL ==================== */

.hero-terminal {
  position: relative;
}

.terminal {
  overflow: hidden;

  border: 1px solid var(--line-bright);
  border-radius: 10px;

  background: #090b0e;

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.015);
}

.terminal-header {
  height: 42px;

  display: flex;
  align-items: center;

  padding: 0 15px;

  border-bottom: 1px solid var(--line);

  color: var(--text-muted);
  font-size: 11px;
}

.terminal-dots {
  display: flex;
  gap: 5px;
  margin-right: 14px;
}

.terminal-dots span {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--line-bright);
}

.terminal-title {
  flex: 1;
}

.terminal-status {
  color: var(--success);
  font-size: 10px;
}

.terminal-body {
  min-height: 310px;

  padding: 26px;

  font-size: 12px;
  line-height: 1.8;
}

.terminal-prompt {
  margin-right: 8px;
  color: var(--accent);
}

.terminal-output {
  color: #d3dae2;
  padding-left: 20px;
}

.terminal-output.success {
  color: var(--success);
}

.terminal-output.muted {
  color: var(--text-muted);
}

.terminal-gap {
  height: 13px;
}

.terminal-cursor {
  display: flex;
  align-items: center;
}

.cursor {
  display: inline-block;

  width: 7px;
  height: 14px;

  margin-left: 2px;

  background: var(--accent);

  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}


/* ==================== STATS ==================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  margin-top: 110px;

  border-top: 1px solid var(--line);
}

.stat {
  min-height: 130px;

  padding: 26px 28px 25px 0;

  border-right: 1px solid var(--line);
}

.stat + .stat {
  padding-left: 28px;
}

.stat:last-child {
  border-right: none;
}

.stat-number {
  display: block;

  color: var(--text);
  font-size: 24px;
}

.stat-label {
  display: block;

  margin-top: 5px;

  color: var(--text-muted);
  font-size: 11px;
}


/* ==================== SECTION INTRO ==================== */

.section-intro {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;

  margin-bottom: 70px;
}

.section-index {
  display: block;

  margin-bottom: 18px;

  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.section-intro h2 {
  margin: 0;

  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.section-intro > p {
  align-self: end;

  margin: 0;

  color: var(--text-muted);
  font-size: 15px;
}


/* ==================== PROJECTS ==================== */

.projects-section {
  background: var(--bg-soft);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  position: relative;

  min-height: 500px;

  display: flex;
  flex-direction: column;

  padding: 30px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--bg-card);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);

  border-color: var(--line-bright);
  background: var(--bg-card-hover);
}

.project-featured {
  grid-row: span 2;
  min-height: 100%;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-number {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 11px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.project-status span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--success);
}

.project-icon {
  width: 58px;
  height: 58px;

  display: grid;
  place-items: center;

  margin-top: 58px;
  margin-bottom: 28px;

  border: 1px solid var(--line-bright);
  border-radius: 8px;

  color: var(--accent);

  font-family: var(--mono);
  font-size: 14px;
}

.project-card h3 {
  margin: 0;

  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.project-card p {
  max-width: 570px;

  margin: 18px 0 0;

  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin-top: 25px;
}

.tags span,
.principles span {
  display: inline-block;

  padding: 5px 8px;

  border: 1px solid var(--line-bright);
  border-radius: 4px;

  color: var(--text-muted);
  font-size: 9px;
}

.project-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-top: auto;
  padding-top: 40px;
}

.project-footer strong {
  display: block;

  font-family: var(--mono);
  font-size: 21px;
  font-weight: 400;

  color: var(--accent);
}

.project-footer span:not(.arrow) {
  display: block;

  margin-top: 2px;

  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
}

.arrow {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line-bright);
  border-radius: 50%;

  color: var(--text-soft);

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.project-card:hover .arrow {
  background: var(--accent);
  color: var(--bg);
  transform: rotate(45deg);
}


/* ==================== SKILLS ==================== */

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

.skill-card {
  position: relative;

  min-height: 330px;

  padding: 30px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--bg-soft);
}

.skill-card-number {
  margin-bottom: 55px;

  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.skill-card h3 {
  margin: 0;

  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.skill-card p {
  max-width: 500px;

  margin: 12px 0 20px;

  color: var(--text-muted);
  font-size: 14px;
}

.skill-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.skill-card li {
  padding: 6px 9px;

  border: 1px solid var(--line-bright);
  border-radius: 4px;

  color: var(--text-soft);

  font-family: var(--mono);
  font-size: 10px;
}

.skill-card-wide {
  grid-column: span 2;

  min-height: 250px;

  display: grid;
  grid-template-columns: 100px 1fr 280px;
  gap: 30px;
  align-items: start;
}

.skill-card-wide .skill-card-number {
  margin: 0;
}

.skill-card-wide h3 {
  margin-top: -6px;
}

.skill-card-wide p {
  max-width: 600px;
}

.principles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}


/* ==================== TIMELINE ==================== */

.journey-section {
  background: var(--bg-soft);
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  position: relative;

  display: grid;
  grid-template-columns: 22px 160px 1fr;
  gap: 24px;

  padding: 32px 0;

  border-bottom: 1px solid var(--line);
}

.timeline-marker {
  position: relative;

  display: flex;
  justify-content: center;
}

.timeline-marker::before {
  content: "";

  position: absolute;
  top: 5px;
  bottom: -37px;

  width: 1px;

  background: var(--line-bright);
}

.timeline-item:last-child .timeline-marker::before {
  display: none;
}

.timeline-marker span {
  position: relative;
  z-index: 2;

  width: 9px;
  height: 9px;

  margin-top: 4px;

  border: 2px solid var(--bg-soft);
  border-radius: 50%;

  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-period {
  padding-top: 1px;

  color: var(--text-muted);
  font-size: 10px;
}

.timeline-content h3 {
  margin: 0;

  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.timeline-content p {
  max-width: 620px;

  margin: 8px 0 0;

  color: var(--text-muted);
  font-size: 14px;
}


/* ==================== CONTACT ==================== */

.contact-section {
  padding: 130px 0;
}

.contact-box {
  position: relative;

  overflow: hidden;

  padding: 70px;

  border: 1px solid var(--line-bright);
  border-radius: var(--radius);

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(56, 189, 248, 0.09),
      transparent 35%
    ),
    var(--bg-card);
}

.contact-box::before {
  content: "CONTACT";

  position: absolute;
  top: -50px;
  right: -10px;

  color: rgba(255, 255, 255, 0.018);

  font-family: var(--mono);
  font-size: 150px;
  font-weight: 500;

  pointer-events: none;
}

.contact-box h2 {
  position: relative;

  max-width: 850px;

  margin: 0;

  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

.contact-box > p {
  position: relative;

  max-width: 600px;

  margin: 25px 0 35px;

  color: var(--text-soft);
  font-size: 16px;
}

.contact-links {
  position: relative;

  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;

  min-width: 150px;

  padding: 12px 14px;

  border: 1px solid var(--line-bright);
  border-radius: var(--radius-small);

  color: var(--text-soft);

  font-family: var(--mono);
  font-size: 11px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.contact-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.contact-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}


/* ==================== FOOTER ==================== */

footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 150px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-name {
  font-family: var(--serif);
  font-size: 18px;
}

.footer-name span {
  color: var(--accent);
}

.footer-inner p {
  margin: 3px 0 0;

  color: var(--text-muted);

  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--text-muted);
  font-size: 9px;
}

.footer-separator {
  color: var(--line-bright);
}


/* ==================== ANIMATIONS ==================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

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

.reveal-delay {
  transition-delay: 120ms;
}


/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {

  .hero {
    padding-top: 90px;
  }

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

  .hero-terminal {
    max-width: 650px;
  }

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

  .stat:nth-child(2) {
    border-right: none;
  }

  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(3) {
    padding-left: 0;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .skill-card-wide {
    grid-template-columns: 60px 1fr;
  }

  .principles {
    grid-column: 2;
  }
}


@media (max-width: 720px) {

  .wrap,
  .nav-inner {
    width: min(100% - 40px, var(--content));
  }

  .nav-inner {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;

    visibility: hidden;
    opacity: 0;

    transform: translateY(-10px);

    background: rgba(11, 13, 16, 0.98);
    border-bottom: 1px solid var(--line);

    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease;
  }

  nav.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links {
    width: min(100% - 40px, var(--content));

    margin: 0 auto;
    padding: 8px 0 15px;

    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links li {
    border-top: 1px solid var(--line);
  }

  .nav-links li:first-child {
    border-top: none;
  }

  .nav-links a {
    display: block;
    padding: 13px 0;
  }

  .hero h1 {
    font-size: clamp(48px, 14vw, 68px);
  }

  .hero-lede {
    font-size: 16px;
  }

  .terminal-body {
    min-height: auto;
    padding: 20px;
  }

  .section {
    padding: 90px 0;
  }

  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-featured {
    grid-row: auto;
    min-height: 500px;
  }

  .skill-card-wide {
    grid-column: auto;

    display: block;
  }

  .skill-card-wide .skill-card-number {
    margin-bottom: 45px;
  }

  .principles {
    margin-top: 20px;
  }

  .timeline-item {
    grid-template-columns: 16px 1fr;
    gap: 18px;
  }

  .timeline-period {
    grid-column: 2;
    grid-row: 1;

    padding: 0;
  }

  .timeline-content {
    grid-column: 2;
    grid-row: 2;
  }

  .timeline-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .contact-box {
    padding: 45px 28px;
  }

  .contact-section {
    padding: 90px 0;
  }

  .footer-inner {
    min-height: 130px;

    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .footer-right {
    margin-top: 10px;
  }
}


@media (max-width: 480px) {

  .stats {
    grid-template-columns: 1fr;
  }

  .stat,
  .stat + .stat {
    min-height: auto;

    padding: 18px 0;

    border-right: none;
    border-top: 1px solid var(--line);
  }

  .stat:first-child {
    border-top: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    justify-content: space-between;
  }

  .project-card {
    min-height: 460px;
    padding: 24px;
  }

  .project-card h3 {
    font-size: 28px;
  }

  .skill-card {
    padding: 24px;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-link {
    width: 100%;
  }
}


/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

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

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