:root {
  --cream: #fff8ef;
  --green: #5b8c5a;
  --light-green: #8ebf7b;
  --blue: #6aa8c8;
  --dark-blue: #35607a;
  --orange: #e78b3c;
  --brown: #5a4735;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  background: linear-gradient(#bfe8ff, #f5f2e8);
  color: var(--brown);
  overflow-x: hidden;
  line-height: 1.7;
}

#sky {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.7), transparent 30%);
  pointer-events: none;
}

header {
  text-align: center;
  padding: 4rem 2rem;
}

.sun {
  font-size: 3rem;
  cursor: pointer;
  transition: transform 0.5s;
}

.sun:hover {
  transform: rotate(180deg) scale(1.1);
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
}

h1 {
  font-size: 4rem;
  color: var(--green);
}

.tagline {
  color: var(--dark-blue);
  margin: 1rem 0 2rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  background: rgba(255,255,255,0.7);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  color: var(--green);
  border: 2px solid var(--light-green);
  transition: 0.3s;
}

nav a:hover {
  transform: translateY(-3px);
  background: var(--light-green);
  color: white;
}

main {
  width: min(1100px, 90%);
  margin: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.machine-box {
  background: rgba(255,248,239,0.9);
  border: 3px solid var(--green);
  border-radius: 25px;
  padding: 2rem;
  text-align: center;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.button {
  display: inline-block;
  margin-top: 1rem;
  background: var(--orange);
  color: white;
  text-decoration: none;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.button:hover {
  transform: scale(1.05);
}

.card {
  background: rgba(255,248,239,0.85);
  border: 2px solid var(--light-green);
  border-radius: 25px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.interests {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.interests span {
  background: #ffffffaa;
  padding: 0.8rem 1rem;
  border-radius: 999px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(255,248,239,0.9);
  border: 2px solid var(--blue);
  border-radius: 20px;
  padding: 1.5rem;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
}

.status {
  display: inline-block;
  margin-top: 1rem;
  font-weight: bold;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.art {
  background: var(--blue);
  color: white;
  padding: 3rem 1rem;
  border-radius: 20px;
  text-align: center;
  font-size: 1.2rem;
}

.link-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.link-buttons a {
  background: var(--green);
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 1rem;
  border-radius: 20px;
  transition: 0.3s;
}

.link-buttons a:hover {
  background: var(--dark-blue);
  transform: translateY(-4px);
}

.music-box {
  background: #ffffff80;
  border-radius: 15px;
  padding: 1rem;
}

.quote-box {
  text-align: center;
}

.small-text {
  margin-top: 1rem;
  opacity: 0.7;
}

#cat {
  position: fixed;
  bottom: 10px;
  left: -100px;
  font-size: 3rem;
  animation: walk 30s linear infinite;
}

@keyframes walk {
  from { left: -100px; }
  to { left: 100vw; }
}

.leaf {
  position: fixed;
  top: -20px;
  font-size: 1.5rem;
  animation: fall linear forwards;
  pointer-events: none;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--brown);
}

.night {
  background: linear-gradient(#1d3557, #2f4f4f);
  color: #f5f2e8;
}

.night .card,
.night .project-card,
.night .machine-box,
.night nav a {
  background: rgba(40, 50, 60, 0.9);
  color: #f5f2e8;
}

.night h1 {
  color: #a8e6a1;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.7rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-text h2 {
    font-size: 2rem;
  }
}