@font-face {
  font-family: "Sofascore Sans";
  src: url("./fonts/SofascoreSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e9ece8;
  --bg-deep: #dfe4df;
  --surface: rgba(255, 255, 255, 0.42);
  --ink: #121714;
  --ink-soft: #3d463f;
  --ink-muted: #6a736c;
  --line: rgba(18, 23, 20, 0.12);
  --accent: #1a6a3a;
  --accent-deep: #0f4f2c;
  --accent-wash: rgba(26, 106, 58, 0.1);
  --highlight: #c4f062;
  --font: "Sofascore Sans", system-ui, sans-serif;
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --max: 1120px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  background: linear-gradient(165deg, #f3f5f1 0%, var(--bg) 45%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-deep);
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 500;
}

.noise {
  display: none;
}

.cursor-glow {
  display: none !important;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space);
  backdrop-filter: none;
  background: rgba(233, 236, 232, 0.94);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(233, 236, 232, 0.9);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.logo {
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.logo:hover .logo-mark {
  background: var(--ink);
  color: var(--highlight);
  transform: rotate(-6deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.nav a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta).is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav-cta {
  position: relative;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  overflow: hidden;
  transition: color 0.3s var(--ease) !important;
}

.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.35s var(--ease);
  z-index: -1;
}

.nav-cta:hover {
  color: var(--highlight) !important;
}

.nav-cta:hover::before {
  transform: none;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(0.28rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-0.28rem) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 2.5rem;
  padding: calc(var(--header-h) + 2rem) var(--space) 4.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 23, 20, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 23, 20, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000 20%, transparent 75%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
}

.hero-orb--1 {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  top: 12%;
  right: 8%;
  background: rgba(196, 240, 98, 0.35);
}

.hero-orb--2 {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  bottom: 18%;
  right: 28%;
  background: rgba(26, 106, 58, 0.16);
}

.hero-orb--3 {
  width: min(24vw, 200px);
  height: min(24vw, 200px);
  top: 40%;
  left: 8%;
  background: rgba(196, 240, 98, 0.16);
}

.hero-scan {
  position: absolute;
  top: 18%;
  right: 6%;
  width: min(42vw, 380px);
  height: min(55vh, 460px);
  border: 1px solid rgba(18, 23, 20, 0.14);
  background:
    linear-gradient(180deg, transparent 0%, rgba(196, 240, 98, 0.08) 50%, transparent 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 11px,
      rgba(18, 23, 20, 0.04) 11px,
      rgba(18, 23, 20, 0.04) 12px
    );
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  opacity: 0.7;
}

.hero-scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 35%;
  height: 2px;
  background: var(--highlight);
  opacity: 0.8;
}

.hero-ring {
  position: absolute;
  top: 22%;
  right: 12%;
  width: min(28vw, 240px);
  height: min(28vw, 240px);
  border: 1px solid rgba(26, 106, 58, 0.22);
  border-radius: 50%;
  opacity: 0.7;
}

.hero-ring::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(18, 23, 20, 0.12);
  border-radius: 50%;
}

.floating-dots {
  display: none;
}

.hero-content,
.hero-meta {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin-inline: auto;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 1px;
}

.hero-name {
  font-size: clamp(4.2rem, 14vw, 9.5rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
}

.name-line {
  display: block;
  overflow: hidden;
}

.name-line .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(4deg);
  animation: charIn 0.85s var(--ease-out) forwards;
  animation-delay: calc(0.18s + var(--i) * 0.035s);
}

.hero-role {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
}

.hero-lead {
  margin: 1rem 0 0;
  max-width: 34rem;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s var(--ease);
}

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

.btn-primary {
  background: var(--ink);
  color: #f3f5f1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(196, 240, 98, 0.25), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--highlight);
}

.btn-primary:hover::before {
  transform: translateX(120%);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(12px);
  animation: revealUp 0.7s var(--ease) forwards;
  animation-delay: calc(0.85s + var(--d) * 0.1s);
}

.meta-key {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.meta-val {
  font-size: 0.925rem;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s ease;
}

a.meta-val:hover {
  color: var(--accent-deep);
}

.scroll-hint {
  position: absolute;
  right: var(--space);
  bottom: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  opacity: 0;
  animation: revealUp 0.8s var(--ease) 1.1s forwards;
}

.scroll-hint-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
  animation: none;
}

/* Marquee */

.marquee {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  padding: 1rem 0;
  animation: marquee 48s linear infinite;
}

.hero-offscreen .phone--back,
.hero-offscreen .phone--front,
.hero-offscreen .apps-hero-glow,
.hero-offscreen .status-dot,
.hero-offscreen .scroll-hint-line {
  animation-play-state: paused;
}

.hero-offscreen .hero-bg,
.hero-offscreen .apps-hero-bg,
.hero-offscreen .blog-hero-bg {
  opacity: 0;
  pointer-events: none;
}

.marquee-track span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.marquee-track span::before {
  content: "◆";
  margin-right: 2.5rem;
  color: var(--accent);
  font-size: 0.55rem;
  vertical-align: middle;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* Sections */

.section {
  width: min(calc(100% - (var(--space) * 2)), var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-index {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  position: relative;
}

.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-section.is-visible h2::after {
  animation: lineGrow 0.8s var(--ease) 0.2s forwards;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin-top: 0.65rem;
  background: linear-gradient(90deg, var(--highlight), var(--accent));
}

.about-text {
  margin: 0;
  max-width: 46rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Experience */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.job {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  position: relative;
  transition-delay: calc(var(--i, 0) * 0.08s) !important;
}

.job-aside {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.35rem;
  position: relative;
}

.job-dot {
  display: none;
}

.job-aside time {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.job-place {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.job-body {
  padding: 1.25rem 1.35rem;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid transparent;
  border-left: 2px solid var(--highlight);
  transition:
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.job:hover .job-body {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  border-left-color: var(--accent);
  transform: translateX(4px);
}

.job-body h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  letter-spacing: -0.02em;
}

.job-company {
  margin: 0.35rem 0 1.15rem;
  color: var(--accent-deep);
}

.job-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.job-body li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--highlight);
  border: 1px solid var(--accent);
  transition: transform 0.25s var(--ease);
}

.job:hover .job-body li::before {
  transform: scale(1.25);
}

/* Projects */

.projects {
  display: flex;
  flex-direction: column;
}

.project {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  column-gap: 1.25rem;
  align-items: start;
  padding: clamp(1.75rem, 4vw, 2.5rem) 0.5rem;
  border-top: 1px solid var(--line);
  position: relative;
  transition:
    background 0.4s var(--ease),
    padding-left 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.08s) !important;
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent-wash);
  transition: width 0.45s var(--ease);
  z-index: 0;
}

.project:hover::before {
  width: 100%;
}

.project:hover {
  padding-left: 1rem;
}

.project-num,
.project-content,
.project-arrow {
  position: relative;
  z-index: 1;
}

.project-num {
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.35rem;
  transition: transform 0.35s var(--ease);
}

.project:hover .project-num {
  transform: translateY(-2px);
  color: var(--accent-deep);
}

.project-content h3 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  transition: transform 0.35s var(--ease);
}

.project:hover .project-content h3 {
  transform: translateX(4px);
}

.project-content p {
  margin: 0;
  max-width: 42rem;
  color: var(--ink-soft);
}

.project-arrow {
  font-size: 1.4rem;
  color: var(--accent);
  opacity: 0;
  transform: translate(-8px, 8px);
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
  padding-top: 0.2rem;
}

.project:hover .project-arrow {
  opacity: 1;
  transform: none;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tech-list li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 0.3rem 0.55rem;
  background: rgba(18, 23, 20, 0.04);
  border: 1px solid var(--line);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.project:hover .tech-list li {
  background: rgba(196, 240, 98, 0.25);
  border-color: rgba(26, 106, 58, 0.25);
  color: var(--accent-deep);
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.skill-group {
  padding: 1.5rem 1.35rem;
  background: rgba(243, 245, 241, 0.65);
  position: relative;
  overflow: hidden;
  transition:
    background 0.35s var(--ease),
    transform 0.35s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.05s) !important;
}

.skill-group::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--highlight), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.skill-group:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-3px);
  z-index: 1;
}

.skill-group:hover::after {
  transform: scaleX(1);
}

.skill-group--wide {
  grid-column: 1 / -1;
}

.skill-group h3 {
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.skill-group p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Education */

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.25rem 1.35rem;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
  transition:
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.08s) !important;
}

.edu:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(26, 106, 58, 0.3);
  transform: translateX(4px);
}

.edu-aside time {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.edu-body h3 {
  font-size: 1.35rem;
}

.edu-degree {
  margin: 0.35rem 0 0.25rem;
  color: var(--ink-soft);
}

.edu-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent-deep);
}

/* Contact */

.contact-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 2rem;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  text-decoration: none;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0.25rem;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    padding-left 0.35s var(--ease);
}

.contact-links a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
  padding-left: 0.75rem;
}

.link-arrow {
  opacity: 0;
  transform: translate(-6px, 6px);
  color: var(--accent);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.contact-links a:hover .link-arrow {
  opacity: 1;
  transform: none;
}

.contact-location {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
}

/* Footer */

.site-footer {
  width: min(calc(100% - (var(--space) * 2)), var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.site-footer a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--accent-deep);
}

/* Motion base */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.9s var(--ease) forwards;
}

.hero-label.reveal {
  animation-delay: 0.08s;
}

.hero-role.reveal {
  animation-delay: 0.55s;
}

.hero-lead.reveal {
  animation-delay: 0.65s;
}

.hero-actions.reveal {
  animation-delay: 0.75s;
}

.job,
.project,
.skill-group,
.edu,
.about-text,
.contact-lead,
.contact-links,
.contact-location {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
}

.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes charIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 18px);
  }
}

@keyframes floatDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.25;
  }
  50% {
    transform: translateY(-14px);
    opacity: 0.7;
  }
}

@keyframes scanLine {
  0% {
    top: 8%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 88%;
    opacity: 0;
  }
}

@keyframes scanPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 106, 58, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(26, 106, 58, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 106, 58, 0);
  }
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
  50% {
    transform: scaleY(0.55);
    opacity: 0.45;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 56px 56px;
  }
}

@keyframes lineGrow {
  to {
    width: 3.5rem;
  }
}

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

  .reveal,
  .job,
  .project,
  .skill-group,
  .edu,
  .about-text,
  .contact-lead,
  .contact-links,
  .contact-location,
  .reveal-section,
  .meta-item,
  .scroll-hint,
  .name-line .char,
  .hero-orb,
  .hero-scan,
  .hero-scan::before,
  .hero-ring,
  .hero-ring::after,
  .hero-grid,
  .floating-dots span,
  .marquee-track,
  .status-dot,
  .scroll-hint-line {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .cursor-glow {
    display: none;
  }
}

/* Responsive */

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--space) 1.25rem;
    background: rgba(233, 236, 232, 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.2s ease;
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

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

  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--ink) !important;
  }

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

  .job,
  .edu {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .project {
    grid-template-columns: 1fr auto;
  }

  .project-num {
    display: none;
  }

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

  .hero-scan,
  .hero-ring {
    opacity: 0.4;
  }

  .scroll-hint {
    display: none;
  }

  .cursor-glow {
    display: none;
  }
}

@media (min-width: 960px) {
  .hero {
    align-content: center;
    padding-bottom: 4rem;
  }

  .hero-content {
    padding-right: min(38vw, 400px);
  }
}

@media (max-width: 520px) {
  .hero-name {
    font-size: clamp(3.4rem, 18vw, 4.8rem);
  }

  .site-footer {
    flex-direction: column;
  }

  .project-arrow {
    display: none;
  }
}

/* ========== Blog ========== */

.blog-hero {
  position: relative;
  min-height: 72vh;
  min-height: min(72svh, 640px);
  display: grid;
  align-content: end;
  padding: calc(var(--header-h) + 3rem) var(--space) 3.5rem;
  overflow: hidden;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin-inline: auto;
}

.blog-hero-title {
  font-size: clamp(3.4rem, 11vw, 7rem);
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin: 0 0 1rem;
}

.blog-hero-lead {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.blog-filters {
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--highlight);
}

.blog-list {
  padding-top: 2rem;
}

.blog-card {
  display: grid;
  gap: 1.25rem;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.06s);
}

.blog-card.is-visible {
  opacity: 1;
  transform: none;
}

.blog-card.is-featured {
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.blog-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(196, 240, 98, 0.35), transparent 55%),
    linear-gradient(165deg, #c5cdc2, #8fa08c);
  text-decoration: none;
  color: inherit;
}

.blog-card.is-featured .blog-card-media {
  aspect-ratio: 5 / 4;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.04);
}

.blog-card-media.is-placeholder img,
.blog-card-media--empty img {
  display: none;
}

.blog-card-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1.25rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, transparent 30%, rgba(18, 23, 20, 0.18)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(18, 23, 20, 0.04) 10px,
      rgba(18, 23, 20, 0.04) 11px
    );
}

.blog-card-media.is-placeholder .blog-card-placeholder,
.blog-card-media--empty .blog-card-placeholder {
  display: flex;
}

.blog-card-placeholder span {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.blog-card-placeholder small {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0.85;
}

.blog-card-body h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  line-height: 1.2;
}

.blog-card-body h2 a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-body h2 a:hover {
  color: var(--accent-deep);
}

.blog-card-body p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.blog-card-body code {
  font-family: var(--font);
  font-size: 0.85em;
  background: rgba(18, 23, 20, 0.06);
  padding: 0.1em 0.35em;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.blog-card-meta span:not(:first-child)::before,
.blog-card-meta time + span::before {
  content: none;
}

.blog-card-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--accent-deep);
  transition: letter-spacing 0.25s var(--ease);
}

.blog-card-link:hover {
  letter-spacing: 0.02em;
}

/* Post page */

.post-hero {
  padding-top: var(--header-h);
}

.post-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 280px;
  max-height: 62vh;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(196, 240, 98, 0.3), transparent 50%),
    linear-gradient(165deg, #c5cdc2, #7f9480);
}

.post-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero-media.is-placeholder img,
.post-figure-frame.is-placeholder img {
  display: none;
}

.post-hero-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--ink);
  text-align: center;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgba(18, 23, 20, 0.04) 12px,
      rgba(18, 23, 20, 0.04) 13px
    );
}

.post-hero-media.is-placeholder .post-hero-fallback,
.post-figure-frame.is-placeholder .post-hero-fallback {
  display: flex;
}

.post-hero-fallback span {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.post-hero-fallback small {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.post-hero-copy {
  width: min(calc(100% - (var(--space) * 2)), 720px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}

.post-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-kicker a {
  text-decoration: none;
  color: var(--accent-deep);
}

.post-hero-copy h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.post-body {
  width: min(calc(100% - (var(--space) * 2)), 720px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 7vw, 5rem);
}

.post-body .post-lead {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.post-body p,
.post-body ul {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.post-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.85rem;
}

.post-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0;
}

.post-body li {
  position: relative;
  padding-left: 1.1rem;
}

.post-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--highlight);
  border: 1px solid var(--accent);
}

.post-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 0 1.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  font-size: 1.15rem;
  color: var(--ink);
}

.post-body code {
  font-family: var(--font);
  font-size: 0.9em;
  background: rgba(18, 23, 20, 0.06);
  padding: 0.1em 0.35em;
}

.post-figure {
  margin: 2rem 0;
}

.post-figure-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(196, 240, 98, 0.25), transparent 55%),
    linear-gradient(165deg, #c5cdc2, #8fa08c);
}

.post-figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.post-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 2rem 0;
}

.post-gallery .post-figure {
  margin: 0;
}

.post-nav {
  width: min(calc(100% - (var(--space) * 2)), 720px);
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.post-nav-item:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(26, 106, 58, 0.35);
  transform: translateY(-2px);
  color: var(--ink);
}

.post-nav-item span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-nav-item strong {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.post-nav-item:last-child {
  text-align: right;
}

@media (max-width: 900px) {
  .blog-card.is-featured {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .post-hero-media {
    aspect-ratio: 16 / 11;
    max-height: none;
  }

  .post-gallery,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
