:root {
  --bg-dark: #050505;
  --text-dark: #f5f5f5;
  --accent: #ffd54d;
  --border-dark: #2a2a2a;
  --card-dark: #111111;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  cursor: url('https://cdn.cursors-4u.net/previews/the-infamous-middle-finger-ed11cdae-32.webp') 43 43, auto !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.bg-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  animation: bg-scroll 22s linear infinite;
  z-index: -3;
}

.bg-logo-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  opacity: 0.22;
  z-index: -2;
}

.bg-logo {
  width: 210px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.4));
  animation: bg-float 7s ease-in-out infinite;
}

.site-header,
main,
.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-dark);
}

.brand {
  display: flex;
  align-items: center;
}

.logo {
  height: 56px;
  width: auto;
  animation: logo-glow 4s ease-in-out infinite;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  color: inherit;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.15s ease;
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  margin-top: 1.5rem;
  padding: 1.7rem;
  border-radius: 10px;
  background-color: var(--card-dark);
  border: 1px solid var(--border-dark);
  position: relative;
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.1rem;
}

.hero p {
  margin: 0;
  font-size: 1rem;
}

.hero-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 213, 77, 0.0);
  pointer-events: none;
  animation: hero-pulse 4.5s ease-out infinite;
}

.section {
  margin-top: 2.1rem;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.underline {
  position: relative;
  display: inline-block;
}

.underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 40%;
  height: 2px;
  background-color: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: underline-grow 0.5s ease forwards;
}

.project-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.project {
  padding: 1rem;
  border-radius: 8px;
  background-color: var(--card-dark);
  border: 1px solid var(--border-dark);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
  border-color: var(--accent);
}

.project h3 {
  margin: 0 0 0.25rem;
}

.project p {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.project a {
  font-size: 0.9rem;
  color: inherit;
  text-decoration: underline;
}

.contact-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.25rem;
}

.site-footer {
  margin-top: 2.3rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-dark);
  text-align: center;
}

@keyframes bg-float {
  0% { transform: translateY(10px); }
  50% { transform: translateY(0); }
  100% { transform: translateY(10px); }
}

@keyframes bg-scroll {
  from { background-position: 0 0; }
  to { background-position: 80px 80px; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes hero-pulse {
  0% { border-color: rgba(255, 213, 77, 0.0); }
  35% { border-color: rgba(255, 213, 77, 0.5); }
  100% { border-color: rgba(255, 213, 77, 0.0); }
}

@keyframes logo-glow {
  0% { filter: drop-shadow(0 0 0 rgba(255, 213, 77, 0.0)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 213, 77, 0.6)); }
  100% { filter: drop-shadow(0 0 0 rgba(255, 213, 77, 0.0)); }
}

.fade-in {
  animation: fade-in 0.5s ease-out both;
}

.fade-in-late {
  animation: fade-in 0.7s ease-out both;
}

.slide-down {
  animation: slide-down 0.4s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

.float-up {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.3s ease-out,
    transform 0.3s ease-out;
  transition-delay: calc(var(--i, 0) * 0.08s);
}

.float-up--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .bg-logo-wrap {
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
  }

  .bg-logo {
    width: 170px;
  }

  .logo {
    height: 52px;
  }
}