:root{
  --bg:#0a0e1a;
  --card:#0d1117;
  --muted:#a8b8d8;
  --accent:#00e5ff;
  --accent-glow:#80ffdb;
  --text:#f0f6fc;
  --container:1200px;
  --radius:16px;
  --card-pad: 32px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.7);
  --gradient-1: #00e5ff;
  --gradient-2: #ff3cac;
  --gradient-3: #ffb703;
}

*{box-sizing:border-box}
html,body{height:100%; overflow-x: hidden;}
body{
  margin:0;
  font-family:'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 16px;
  background:#050812;
  background-image: 
    radial-gradient(ellipse at 10% 20%, rgba(0, 229, 255, 0.18) 0px, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(255, 60, 172, 0.18) 0px, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 183, 3, 0.10) 0px, transparent 50%),
    linear-gradient(135deg, #0a192f 0%, #112240 50%, #0a192f 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding-bottom:60px;
  position: relative;
  overflow-x: hidden;
}

.container{
  max-width:var(--container);
  width: 100%;
  margin:0 auto;
  padding:32px;
  position: relative;
  z-index: 1;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.9) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
  opacity: 0.5;
}

.particle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.particle:nth-child(2) {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 5s;
  animation-duration: 30s;
  background: radial-gradient(circle, rgba(255, 60, 172, 0.75) 0%, transparent 70%);
}

.particle:nth-child(3) {
  width: 250px;
  height: 250px;
  bottom: 20%;
  left: 50%;
  animation-delay: 10s;
  animation-duration: 35s;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.65) 0%, transparent 70%);
}

.particle:nth-child(4) {
  width: 180px;
  height: 180px;
  top: 40%;
  left: 30%;
  animation-delay: 15s;
  animation-duration: 28s;
  background: radial-gradient(circle, rgba(255, 60, 172, 0.6) 0%, transparent 70%);
}

.particle:nth-child(5) {
  width: 220px;
  height: 220px;
  bottom: 10%;
  right: 25%;
  animation-delay: 20s;
  animation-duration: 32s;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.65) 0%, transparent 70%);
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, -100px) scale(0.9);
  }
  75% {
    transform: translate(-70px, -50px) scale(1.05);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

.site-header{
  padding:80px 0 40px;
  text-align:center;
  position: relative;
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
}

.site-header h1{
  margin:0;
  font-size:3.5rem;
  font-weight:800;
  letter-spacing: -0.02em;
  animation: fadeInDown 0.8s ease;
  line-height: 1.2;
}

.gradient-text{
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.gradient-text i {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.subtitle{
  color:var(--muted);
  margin:20px 0 0;
  font-size:1.4rem;
  font-weight: 400;
  animation: fadeIn 1s ease 0.3s both;
  letter-spacing: 0.01em;
}

.subtitle i {
  color: var(--accent);
  margin-right: 8px;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section-header {
  text-align: center;
  margin: 60px 0 40px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(320px, 100%), 1fr));
  gap:32px;
  margin-top:48px;
}

.grid .card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.grid .card:nth-child(1) { animation-delay: 0.1s; }
.grid .card:nth-child(2) { animation-delay: 0.2s; }
.grid .card:nth-child(3) { animation-delay: 0.3s; }
.grid .card:nth-child(4) { animation-delay: 0.4s; }
.grid .card:nth-child(5) { animation-delay: 0.5s; }
.grid .card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card{
  background: rgba(13, 17, 23, 0.6);
  backdrop-filter: blur(12px);
  border:1px solid rgba(0, 229, 255, 0.18);
  padding: var(--card-pad);
  border-radius:var(--radius);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  min-width: 0;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  box-shadow: 0 0 20px rgba(88, 208, 255, 0.6);
}

.card-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover .card-glow {
  opacity: 1;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover{
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(0, 229, 255, 0.3), 
    0 8px 24px rgba(255, 60, 172, 0.15),
    0 8px 24px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  border-color: rgba(0, 229, 255, 0.6);
  background: rgba(13, 17, 23, 0.8);
}

.card-thumbnail {
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--card-pad);
  height: 160px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.card-thumb--cyan {
  background: linear-gradient(135deg, #003d5c 0%, #006b8f 50%, #00a8cc 100%);
}
.card-thumb--pink {
  background: linear-gradient(135deg, #5c0038 0%, #8f006b 50%, #cc0099 100%);
}
.card-thumb--gold {
  background: linear-gradient(135deg, #3d2800 0%, #7a5200 50%, #c48400 100%);
}

.card-thumb-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.card:hover .card-thumb-icon {
  transform: scale(1.15);
  color: #fff;
  filter: drop-shadow(0 0 24px rgba(255,255,255,0.5));
}

.card-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.card:hover .card-thumb-img {
  transform: scale(1.05);
}

.card-title{
  margin:0 0 16px;
  font-size:1.5rem;
  font-weight:700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.card-title a{
  color:var(--text);
  text-decoration:none;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
}

.card-title a:hover{
  color:var(--accent);
  background-size: 100% 2px;
}

.card-desc{
  margin:0 0 24px;
  color:var(--muted);
  font-size:1.05rem;
  line-height:1.8;
  flex-grow: 1;
  overflow-wrap: anywhere;
}

.card-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.card-meta{
  font-size:0.95rem;
  color:var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.card-meta a,
.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
}

.card-meta a:hover,
.repo-link:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.4);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid rgba(255, 183, 3, 0.45);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--gradient-3);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}

.tag:hover {
  background: rgba(255, 183, 3, 0.25);
  border-color: var(--gradient-3);
  transform: translateY(-1px);
}

.notes{
  margin-top:48px;
  color:var(--muted);
  padding:24px;
  background:rgba(255,255,255,0.02);
  border-left:3px solid var(--accent);
  border-radius:var(--radius);
  font-size:1.05rem;
}
.notes h2 {
  margin-top:0;
  color:var(--text);
  font-size:1.35rem;
}
.notes code {
  background:rgba(94, 200, 255, 0.15);
  padding:3px 8px;
  border-radius:4px;
  color:var(--accent);
}
.site-footer{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  background:rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-top:1px solid rgba(0, 229, 255, 0.25);
  padding:16px 0;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}

.site-footer .container{
  display:flex;
  justify-content:center;
  align-items:center;
}

.footer-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-footer small {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.heart-beat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.1); }
  20%, 40% { transform: scale(1); }
}

.social-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.social-link:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.5);
}
a{
  color:var(--accent);
  transition: color 0.2s ease;
}
a:hover{
  color:var(--accent-glow);
}
.error{
  color:#ffb4b4;
  text-align:center;
  padding:40px;
  font-size:1.1rem;
}

@media (max-width: 768px) {
  .site-header h1 {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .card {
    --card-pad: 24px;
  }
  
  .container {
    padding: 20px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 12px;
  }
}
