:root {
  --bg: #0c0c0f;
  --bg-soft: #151518;
  --paper: #f7f6f3;
  --paper-card: #ffffff;
  --paper-line: #e1ded8;
  --text: #eeeeee;
  --text-soft: #b8b8b8;
  --text-muted: #7e7e7e;
  --ink: #111111;
  --accent: #e8453c;
  --accent-dark: #c03030;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --mono: "Space Mono", monospace;
  --display: "Space Grotesk", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: rgba(232, 69, 60, 0.3);
  color: #ffffff;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

li {
  list-style: none;
}

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

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

::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 50px;
  border-bottom: 1px solid transparent;
  font-family: var(--mono);
  font-size: 14px;
  color: #eeeeee;
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(12, 12, 15, 0.92);
  border-color: var(--line);
  backdrop-filter: blur(15px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #eeeeee;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #888888;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.site-nav .language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #eeeeee;
  font-weight: 700;
}

.site-nav .language-switch:hover,
.site-nav .language-switch:focus-visible {
  border-color: var(--accent);
  background: rgba(232, 69, 60, 0.12);
}

.nav-toggle {
  display: none;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle__bar {
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before {
  top: -8px;
}

.nav-toggle__bar::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  transform: translateY(8px) rotate(90deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  opacity: 0;
}

.section,
.hero {
  position: relative;
  overflow: hidden;
}

.section {
  padding: 125px 75px;
}

.section-dark {
  background: var(--bg);
  color: var(--text);
}

.section-light {
  background: var(--paper);
  color: var(--ink);
}

.section-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1250px);
  margin: 0 auto;
}

.section-inner--narrow {
  width: min(100%, 1125px);
}

.section-kicker {
  margin: 15px 0 60px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-title {
  margin: 0;
  font-size: 60px;
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px 75px 100px;
  background: var(--bg);
}

.hero__inner {
  width: min(100%, 1500px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: 60px;
  align-items: start;
}

.hero__copy {
  min-width: 0;
}

.hero__title {
  margin: 0;
  color: #f2f2f2;
  font-size: 95px;
  line-height: 0.95;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.hero__intro {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.hero__actions,
.contact__actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 35px;
  font-family: var(--mono);
}

.button {
  display: inline-flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  padding: 15px 35px;
  border: 1px solid transparent;
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 200ms ease, transform 200ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible {
  box-shadow: 0 0 25px rgba(232, 69, 60, 0.28);
}

.button--ghost {
  border-color: #444444;
  color: #aaaaaa;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: var(--accent);
  color: #ffffff;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(232, 69, 60, 0.2), transparent 70%);
  pointer-events: none;
}

.dot-grid {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(10, 4px);
  gap: 10px;
  opacity: 0.07;
  pointer-events: none;
}

.dot-grid::before {
  content: "";
  display: contents;
}

.dot-grid span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #ffffff;
}

.dot-grid--hero {
  top: 100px;
  left: 50px;
}

.dot-grid--contact {
  top: 25px;
  left: 50px;
  grid-template-columns: repeat(12, 4px);
  opacity: 0.08;
}

.portrait {
  position: relative;
  width: 325px;
  flex-shrink: 0;
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.portrait::before {
  top: -10px;
  left: -10px;
  border: 1px solid var(--line);
}

.portrait::after {
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--accent);
  opacity: 0.3;
}

.portrait img {
  width: 325px;
  height: 425px;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(15%);
}

.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.stat-card {
  padding: 25px 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  transition: background 220ms ease, border-color 220ms ease;
}

.stat-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.stat-card dt {
  color: var(--accent);
  font-size: 40px;
  font-weight: 700;
}

.stat-card dd {
  margin: 8px 0 0;
  color: #888888;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.timeline {
  position: relative;
  padding-left: 45px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--line);
}

.timeline__item {
  position: relative;
  margin-bottom: 50px;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 8px;
  width: 15px;
  height: 15px;
  border: 2px solid #444444;
  border-radius: 999px;
  background: #222222;
}

.timeline__item:first-child::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent), 0 0 30px rgba(232, 69, 60, 0.2);
}

.panel {
  padding: 25px 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: background 220ms ease, border-color 220ms ease;
}

.panel:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.entry-header h3,
.project-card h3,
.skill-group h3,
.side-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.entry-header p {
  margin: 5px 0 0;
  color: #888888;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
}

.entry-header .muted {
  color: #666666;
  font-family: var(--display);
  font-size: 14px;
}

.entry-meta {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--mono);
}

.entry-meta time,
.entry-year {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

.entry-meta span {
  display: block;
  margin-top: 5px;
  color: #555555;
  font-size: 12px;
}

.entry-list {
  margin-top: 18px;
}

.entry-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
  color: #aaaaaa;
  font-size: 16px;
  line-height: 1.7;
}

.entry-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
}

#experience .timeline::before {
  background: var(--paper-line);
}

#experience .panel {
  border-color: var(--paper-line);
  background: var(--paper-card);
}

#experience .panel:hover {
  border-color: var(--accent);
  background: var(--paper-card);
}

#experience .entry-header p {
  color: #666666;
}

#experience .entry-meta span {
  color: #777777;
}

#experience .entry-list li {
  color: #555555;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  background: var(--paper-card);
  color: var(--ink);
  text-decoration: none;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--accent);
}

.project-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(0, 0, 0, 0.04) 10px, rgba(0, 0, 0, 0.04) 11px),
    linear-gradient(135deg, #eae8e3, #ddd8d0);
}

.project-card__visual::after {
  content: "project screenshot";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.project-card__visual:has(img)::after {
  display: none;
}

.project-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card__visual-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 320ms ease;
}

.project-card:hover .project-card__visual-hover,
.project-card:focus-visible .project-card__visual-hover {
  opacity: 1;
}

.project-card__body {
  padding: 25px 30px;
}

.project-card h3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 15px;
  font-size: 20px;
}

.project-card h3 span {
  color: var(--accent);
}

.project-card__redirect {
  align-self: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.project-card p {
  margin: 10px 0 0;
  color: #777777;
  font-size: 15px;
  line-height: 1.6;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag-list li {
  padding: 6px 12px;
  border: 1px solid var(--paper-line);
  background: #f3f1ec;
  color: #666666;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.tag-list li:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: #ffffff;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(275px, 1fr);
  gap: 60px;
}

.stack {
  display: grid;
  gap: 20px;
  align-content: start;
}

.side-title {
  margin-bottom: 20px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 15px;
  text-transform: uppercase;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-list li,
.language-grid > div {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.compact-list strong,
.language-grid strong {
  display: block;
  color: #eeeeee;
  font-size: 16px;
  line-height: 1.3;
}

.compact-list span,
.language-grid span {
  display: block;
  margin-top: 4px;
  color: #666666;
  font-family: var(--mono);
  font-size: 12px;
}

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

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

.skill-group h3 {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
}

.skill-group .tag-list {
  margin-top: 0;
}

.contact {
  position: relative;
  overflow: hidden;
  padding: 125px 75px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  text-align: center;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
}

.contact__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 750px);
  margin: 0 auto;
}

.contact .section-kicker {
  margin: 15px 0 20px;
  color: rgba(255, 255, 255, 0.7);
}

.contact__title {
  margin: 0;
  font-size: 70px;
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
}

.contact__email {
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  opacity: 0.8;
}

.contact__actions {
  justify-content: center;
  gap: 20px;
}

.button--contact {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(5px);
}

.button--contact:hover,
.button--contact:focus-visible {
  background: rgba(255, 255, 255, 0.35);
}

.button--contact-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.button--contact-ghost:hover,
.button--contact-ghost:focus-visible {
  border-color: #ffffff;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 75px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: #555555;
  font-family: var(--mono);
  font-size: 12px;
}

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

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

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.typing-caret::after {
  content: "";
  display: inline-block;
  height: 1em;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

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

  .portrait {
    width: min(325px, 100%);
  }

  .stats,
  .skills-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 89px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 25px 30px;
    background: rgba(12, 12, 15, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
  }

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

  .site-nav a {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .language-switch {
    justify-self: start;
    margin-top: 18px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-strong);
  }

  .section,
  .hero,
  .contact {
    padding-left: 30px;
    padding-right: 30px;
  }

  .hero {
    padding-top: 138px;
  }

  .hero__title {
    font-size: 60px;
  }

  .section-title {
    font-size: 50px;
  }

  .contact__title {
    font-size: 55px;
  }

  .entry-header {
    display: grid;
  }

  .entry-meta {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
    padding-left: 30px;
    padding-right: 30px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 52px;
  }

  .hero__intro {
    font-size: 16px;
  }

  .button,
  .hero__actions,
  .contact__actions {
    width: 100%;
  }

  .button {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline__item::before {
    left: -31px;
  }
}
