:root {
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --bg: #FFFFFF;
  --text: #1a1a1a;
  --text-muted: #6c757d;
  --card-bg: #ffffff;
  --border: rgba(0, 0, 0, .06);
  --shadow: rgba(0, 0, 0, .08);
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-bg: #000000;
  --header-text: #ffffff;
  --footer-bg: #000000;
  --footer-text: #f8f9fa;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #f8f9fa;
  --text-muted: #a0a0a0;
  --card-bg: #1a1a1a;
  --border: rgba(255, 255, 255, .1);
  --shadow: rgba(0, 0, 0, .3);
  --header-bg: #000000;
  --header-text: #ffffff;
  --footer-bg: #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

/* LOADING */
.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(165deg, #0f172a 0%, #1e3a8a 35%, #3b82f6 65%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.5s ease 2s forwards;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  animation: bounce 1s ease-in-out infinite;
}

.loader-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 10px;
  animation: loadProgress 2s ease forwards;
}

@keyframes loadProgress {
  0% { width: 0% }
  100% { width: 100% }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-20px) }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

/* HEADER */
header {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.logo {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: var(--header-text);
}

.github-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  transition: var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.github-link:hover {
  transform: scale(1.1);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.github-link:active {
  transform: scale(0.95);
}

/* HERO */
.hero {
  min-height: 80vh;
  background: linear-gradient(165deg, #0f172a 0%, #1e3a8a 35%, #3b82f6 65%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 120px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(30, 58, 138, 0.4) 0%, transparent 40%);
  opacity: 0.6;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M30 0v60M0 30h60' stroke='rgba(255,255,255,.03)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
  animation: fadeInUp 0.8s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 50px;
  padding: 8px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  animation: float 3s ease-in-out infinite;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  color: #fff;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 16px;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero h1 .highlight {
  color: #60a5fa;
}

.hero p {
  font-size: clamp(20px, 2.5vw, 28px);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 24px;
  min-height: 40px;
}

/* TYPING EFFECT */
.typing-text {
  display: inline-block;
}

.cursor {
  display: inline-block;
  margin-left: 4px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

/* SCROLL INDICATOR */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce-smooth 2s ease-in-out infinite;
}

.scroll-indicator i {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
}

@keyframes bounce-smooth {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ABOUT - ENHANCED FLOATING EFFECT */
.about {
  max-width: 1100px;
  margin: -120px auto 120px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.about-card {
  background: var(--card-bg);
  border-radius: 32px;
  padding: 60px;
  box-shadow: 
    0 30px 80px var(--shadow),
    0 0 0 1px var(--border);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
  animation: 
    cardPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards,
    floatingCard 6s ease-in-out infinite;
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.about-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light), transparent, transparent);
  border-radius: 32px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.about-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 40px 100px rgba(59, 130, 246, 0.25),
    0 0 0 1px var(--accent-light);
}

.about-card:hover::before {
  opacity: 0.3;
}

@keyframes cardPop {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(60px) rotateX(15deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
  }
}

@keyframes floatingCard {
  0%, 100% {
    transform: translateY(0) rotateZ(0deg);
  }
  25% {
    transform: translateY(-15px) rotateZ(0.5deg);
  }
  50% {
    transform: translateY(-8px) rotateZ(0deg);
  }
  75% {
    transform: translateY(-15px) rotateZ(-0.5deg);
  }
}

.about img {
  width: 100%;
  max-width: 220px;
  border-radius: 50%;
  border: 5px solid var(--bg);
  box-shadow: 
    0 12px 32px var(--shadow),
    0 0 0 2px var(--accent-light);
  transition: var(--transition);
  animation: imageFloat 4s ease-in-out infinite;
}

@keyframes imageFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

.about img:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 20px 48px rgba(59, 130, 246, 0.3),
    0 0 0 2px var(--accent);
}

.about-text h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: var(--text);
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text p {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.8;
}

.quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 16px;
  padding-left: 20px;
  border-left: 4px solid var(--accent);
  margin-top: 24px;
  position: relative;
}

.quote::before {
  content: """;
  position: absolute;
  left: -8px;
  top: -8px;
  font-size: 48px;
  color: var(--accent);
  opacity: 0.3;
}

/* SECTION */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.section-title p {
  color: var(--text-muted);
  font-size: 17px;
}

/* GRID - LARGER CARDS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* CARD - ENHANCED SIZE */
.card {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

.card-inner {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  height: 100%;
  min-height: 220px;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--shadow);
  position: relative;
  overflow: hidden;
}

.card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffffff 0%, #e0f2fe 50%, #3b82f6 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.card:hover .card-inner::after {
  opacity: 1;
}

.card:hover .card-inner {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 
    0 20px 48px rgba(13, 110, 253, 0.2),
    0 0 0 2px var(--accent-light);
  border-color: var(--accent-light);
}

.card:active .card-inner {
  transform: translateY(-6px) scale(1.01);
}

.icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.card:hover .icon {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.card p {
  font-size: 16px;
  color: var(--text-muted);
}

/* FOOTER */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 24px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-social a:hover {
  background: var(--accent);
  transform: translateY(-4px);
}

.footer-social a:active {
  transform: translateY(-2px) scale(0.95);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* MOBILE */
@media(max-width: 768px) {
  header {
    padding: 20px 24px;
  }
  
  .hero {
    min-height: 90vh;
    padding-bottom: 100px;
  }
  
  .about {
    margin: -100px auto 80px;
  }
  
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 48px 32px;
  }
  
  .about img {
    margin: 0 auto;
  }
  
  .quote {
    border-left: none;
    border-top: 4px solid var(--accent);
    padding-left: 0;
    padding-top: 16px;
  }
  
  .quote::before {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media(max-width: 480px) {
  header {
    padding: 16px 20px;
  }
  
  .logo {
    font-size: 24px;
  }
  
  .github-link {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .about-card {
    padding: 36px 24px;
  }
  
  .card-inner {
    padding: 32px 24px;
  }
  
  .icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}
