*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
  height: auto;
  background-color: #000000;
  overflow: auto;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  color: #1a1a1a;
}

canvas {
  width: 100%;
  height: 100vh;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Page content layered above the canvas */
.page-content {
  position: relative;
  z-index: 1;
}

header {
  padding: 80px 60px 60px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: #e8d48a;
  text-shadow: 0 0 20px rgba(232, 212, 138, 0.25), 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  user-select: none;
}

.logo:hover {
  color: #f5e8b0;
  text-shadow: 0 0 30px rgba(245, 232, 176, 0.6), 0 0 60px rgba(245, 232, 176, 0.2);
}

.logo span {
  color: #c9a84c;
  text-shadow: none;
}

/* The Z — gentle idle pulse to hint it's interactive */
.logo-z {
  display: inline-block;
  color: #f5d96e;
  text-shadow: 0 0 12px rgba(245, 217, 110, 0.5), 0 0 24px rgba(245, 217, 110, 0.2);
  animation: zPulse 3s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zPulse {
  0%, 100% {
    text-shadow: 0 0 12px rgba(245, 217, 110, 0.3), 0 0 24px rgba(245, 217, 110, 0.1);
    opacity: 0.7;
  }
  50% {
    text-shadow: 0 0 20px rgba(245, 217, 110, 0.65), 0 0 40px rgba(245, 217, 110, 0.25);
    opacity: 1;
  }
}

.logo:active .logo-z {
  transform: scale(1.4) rotate(10deg);
}

.logo.pulse {
  animation: logoPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoPulse {
  0%   { transform: scale(1); color: #e8d48a; }
  40%  { transform: scale(1.35); color: #fff; text-shadow: 0 0 40px rgba(245,232,176,0.9); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); color: #e8d48a; }
}

/* Screen flash on logo click */
.screen-flash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
}

.screen-flash.active {
  animation: screenFlash 0.55s ease-out forwards;
}

@keyframes screenFlash {
  0%   { opacity: 0; background: rgba(255,255,255,0); }
  15%  { opacity: 1; background: rgba(255,255,255,0.18); }
  100% { opacity: 0; background: rgba(255,255,255,0); }
}

.header-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #1a1a1a;
  opacity: 0.35;
  margin-top: 18px;
}

.hero {
  padding: 100px 60px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 6.5vw, 82px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.85);
}

.hero-title em {
  font-style: italic;
  opacity: 0.65;
}

.hero-sub {
  margin-top: 36px;
  font-size: 15px;
  font-weight: 300;
  color: #aaaaaa;
  max-width: 360px;
  line-height: 1.85;
}

.divider {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 60px;
}

.divider hr {
  border: none;
  border-top: 1px solid rgba(20, 20, 20, 0.08);
}

.projects-section {
  padding: 70px 60px 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #aaaaaa;
  opacity: 0.6;
  margin-bottom: 50px;
}

.projects-list {
  list-style: none;
}

.project-item {
  border-top: 1px solid rgba(20, 20, 20, 0.08);
}

.project-item:last-child {
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}

.project-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 24px 0;
  text-decoration: none;
  color: #1a1a1a;
  transition: padding-left 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  gap: 40px;
}

.project-link:hover {
  padding-left: 14px;
}

.project-link:hover .project-name {
  color: #F5E6D3;
}

.project-link:hover .project-arrow {
  opacity: 1;
  transform: translateX(6px);
}

.project-link:hover .project-desc {
  opacity: 0.7;
}

.project-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.5s ease, text-shadow 0.3s ease;
}

.project-link:hover .project-name {
  color: #FFD700;
  text-shadow: 0 0 12px rgba(255,215,0,0.8), 0 0 24px rgba(255,215,0,0.4);
}

.project-desc {
  font-size: 15px;
  font-weight: 300;
  color: #aaaaaa;
  opacity: 0.7;
  flex: 1;
  max-width: 300px;
  text-align: right;
  transition: opacity 0.5s ease;
}

.project-arrow {
  font-size: 17px;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  flex-shrink: 0;
}

footer {
  padding: 70px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.footer-text {
  font-size: 13px;
  font-weight: 300;
  color: #aaaaaa;
  opacity: 0.5;
  letter-spacing: 0.08em;
}

.footer-text a {
  color: #aaaaaa;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-text a:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  header { padding: 55px 28px 40px; }
  .hero { padding: 70px 28px 60px; }
  .projects-section { padding: 45px 28px 70px; }
  .divider { padding: 0 28px; }
  footer { padding: 55px 28px; }
  .project-link { flex-direction: column; gap: 6px; }
  .project-desc { text-align: left; max-width: 100%; }
  .project-arrow { display: none; }
}
