*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  min-height: 100vh;
  background-color: #0f0f0f;
  font-family: 'Geist Mono', monospace;
}

/* ─── Navbar ─────────────────────────────────────────────── */

#navbar {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);

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

  padding: 24px 32px;
  border-radius: 16px;
  border: 1px solid rgba(243, 243, 243, 0.15);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);

  width: min(calc(100% - 64px), 1200px);
  white-space: nowrap;
  overflow: hidden;
  z-index: 1000;
}

#navbar.hidden {
  transform: translateX(-50%) translateY(calc(-100% - 32px - 4px));
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-logo {
  cursor: pointer;
  display: flex;
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.nav-logo.spinning {
  animation: logoSpin 300ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.nav-name {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  line-height: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.nav-link {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  text-decoration: none;
  line-height: normal;
}

.nav-link--muted {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.nav-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  width: 154px;
  flex-shrink: 0;
}

.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── PlayStation icon ───────────────────────────────────── */

.hero-previously svg {
  flex-shrink: 0;
}

/* ─── Hero ───────────────────────────────────────────────── */

#hero {
  position: relative;
  background-color: #0f0f0f;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--navbar-bottom, 104px) + 64px) 48px 0;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-name {
  font-family: 'Crimson Pro', serif;
  font-weight: 500;
  font-size: 64px;
  line-height: normal;
  white-space: nowrap;
  color: #ffffff;
}

.hero-desc {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: #cccccc;
  width: 636px;
  line-height: normal;
  text-align: center;
}

.hero-cp-italic {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  color: #ffffff;
}

.hero-cp-italic.hero-muted {
  color: #cccccc;
}

/* ─── Letter bounce animation ─────────────────────────────── */

@keyframes letterBounce {
  0% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  3.1% {
    transform: translateY(-7px);
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  6.1% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}

.bounce-letter {
  display: inline-block;
  animation: letterBounce 4900ms linear infinite;
}

@keyframes squeezeLetter {
  0% {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
  }
  8.2% {
    transform: translateX(var(--squeeze-x));
    animation-timing-function: cubic-bezier(0, 0, 0.6, 1);
  }
  16.3% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}

.squeeze-letter {
  display: inline-block;
  animation: squeezeLetter 4900ms linear infinite;
  animation-delay: 600ms;
}

@keyframes drawIn {
  to { stroke-dashoffset: 0; }
}

/* ─── Previously row ─────────────────────────────────────── */

.hero-previously {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-previously-text {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: #cccccc;
  white-space: nowrap;
  line-height: normal;
}

/* ─── PlayStation icon ───────────────────────────────────── */

.hero-previously svg {
  flex-shrink: 0;
}

/* ─── Projects ───────────────────────────────────────────── */

#projects {
  background-color: #0f0f0f;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 64px 48px 48px;
}

.projects-row {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 29px;
  width: 540px;
  flex-shrink: 0;
}

.project-image {
  width: 100%;
  height: 334px;
  border-radius: 8px;
  border: 1px solid #222;
  background-color: #191919;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
  transform: scale(0.9815, 0.9701);
}

.project-info {
  display: flex;
  flex-direction: column;
  width: 520px;
  position: relative;
}

.project-label {
  font-family: 'Crimson Pro', serif;
  font-size: 24px;
  font-weight: 500;
  font-style: italic;
  color: #ffffff;
}

.project-desc {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #cccccc;
  line-height: normal;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.project-card:hover .project-desc {
  opacity: 1;
  pointer-events: auto;
}

/* ─── MelCourses cover image ─────────────────────────────── */

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

/* ─── PlayStation card animated blobs ────────────────────── */

.ps-card {
  background-color: #07111F;
}

.ps-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

/* Dark navy anchor */
.ps-blob-1 {
  width: 380px;
  height: 380px;
  background: #00256E;
  top: -100px;
  left: -80px;
  animation: psBlob1 4.2s ease-in-out infinite alternate;
}

/* Rich PS blue — mid-card body */
.ps-blob-2 {
  width: 300px;
  height: 300px;
  background: #0050B3;
  top: 30px;
  right: -50px;
  animation: psBlob2 3.4s ease-in-out infinite alternate;
}

/* Sky blue highlight — lifts the centre */
.ps-blob-3 {
  width: 220px;
  height: 220px;
  background: #3D9BD4;
  bottom: -40px;
  left: 80px;
  animation: psBlob3 2.8s ease-in-out infinite alternate;
}

/* Medium cornflower — bottom-right */
.ps-blob-4 {
  width: 280px;
  height: 280px;
  background: #1A6FC4;
  bottom: -60px;
  right: 20px;
  animation: psBlob4 3.8s ease-in-out infinite alternate;
}

@keyframes psBlob1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(150px, 110px) scale(1.12); }
}

@keyframes psBlob2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-130px, 80px) scale(0.85); }
}

@keyframes psBlob3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(100px, -80px) scale(1.25); }
}

@keyframes psBlob4 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-90px, -100px) scale(1.1); }
}

/* ─── PlayStation noise overlay ──────────────────────────── */

.ps-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.43' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.3 -0.59 -0.11 0 1'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.25;
}

/* ─── PlayStation wordmark ───────────────────────────────── */

.ps-wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 342px;
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

/* ─── Netflix card ────────────────────────────────────────── */

.nf-bg {
  position: absolute;
  left: -1px;
  top: -223px;
  width: 556px;
  height: 556px;
  pointer-events: none;
  user-select: none;
  display: block;
}

.nf-glass {
  position: absolute;
  left: 13px;
  top: 49px;
  width: 512px;
  height: 304px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
}

.nf-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* ─── Page content layer (covers fixed footer) ───── */

#page-content {
  position: relative;
  z-index: 1;
  background-color: inherit;
}

/* ─── Site footer (reveal on scroll) ─────────────── */

#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
  background: #000000;
  padding: 48px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.footer-left {
  display: flex;
  align-items: flex-start;
  gap: 77px;
}

.footer-text-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-heading {
  font-family: 'Crimson Pro', serif;
  font-size: 36px;
  font-weight: 500;
  color: #ffffff;
  line-height: normal;
  margin: 0;
  white-space: nowrap;
}

.footer-heading em {
  font-style: italic;
  font-weight: 400;
}

.footer-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: #cccccc;
  line-height: normal;
  margin: 0;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-header {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  line-height: normal;
  margin-bottom: 4px;
}

.footer-link--muted {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.footer-link {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #cccccc;
  text-decoration: none;
  line-height: normal;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-doggo-wrap {
  flex-shrink: 0;
  position: relative;
}

.footer-doggo-wrap img.doggo-img {
  display: block;
  width: 288px;
  height: auto;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform 0.25s ease;
}

.footer-doggo-wrap:hover img.doggo-img {
  transform: rotate(-4deg);
}

@keyframes heartFloat {
  0%   { opacity: 1; transform: translateY(0)    scale(0.7); }
  60%  { opacity: 1; transform: translateY(-30px) scale(1);   }
  100% { opacity: 0; transform: translateY(-55px) scale(1.1); }
}

.doggo-heart {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  animation: heartFloat 0.9s ease-out forwards;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: #cccccc;
  line-height: normal;
}

