/* =========================
   VIBRANT COLOR PALETTE
   ========================= */
:root {
  --lavender: #f7f5f2;
  --coral: #fe5f55;
  --coral-strong: #ff3b2d;
  --ink: #171717;
  --muted: #5c5c5c;
  --paper: #fffdfa;
  --line: rgba(254, 95, 85, 0.22);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Avenir Next', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  --scroll-progress: 0;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(254, 95, 85, 0.1), transparent 28%),
    radial-gradient(ellipse at 80% 10%, rgba(254, 95, 85, 0.08), transparent 24%),
    linear-gradient(115deg, transparent 0 44%, rgba(254, 95, 85, 0.09) 44% 46%, transparent 46% 100%),
    linear-gradient(145deg, transparent 0 58%, rgba(254, 95, 85, 0.07) 58% 60%, transparent 60% 100%);
  background-size: 680px 680px, 760px 760px, 900px 900px, 980px 980px;
  background-position: 0 0, 0 0, calc(-12% + var(--scroll-progress) * 12%) 50%, calc(8% - var(--scroll-progress) * 8%) 50%;
  animation: crossFlow 22s linear infinite;
  filter: blur(0.15px);
  opacity: calc(0.85 + var(--scroll-progress) * 0.12);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(254, 95, 85, 0.02), transparent 58%),
    radial-gradient(circle at 50% 80%, rgba(254, 95, 85, 0.03), transparent 22%);
  animation: glowPulse 14s ease-in-out infinite;
}

@keyframes crossFlow {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-200px, -200px, 0) scale(1.08); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

/* =========================
   LOADING SCREEN
   ========================= */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #fff4ef;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
  pointer-events: all;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-shell {
  width: min(90vw, 540px);
  padding: 2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--coral);
  box-shadow: 0 18px 60px rgba(254, 95, 85, 0.16);
  position: relative;
  overflow: hidden;
}

.loading-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(254, 95, 85, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(254, 95, 85, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.8;
}

.loading-grid {
  position: relative;
  height: 140px;
  border: 1px solid var(--coral);
  background: linear-gradient(135deg, rgba(254, 95, 85, 0.08), rgba(255, 255, 255, 0.85));
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.loading-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(254, 95, 85, 0.18) 0 1px, transparent 1px 44px);
  animation: cutGrid 1.4s linear infinite;
}

.loading-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  animation: sweep 1.4s ease-in-out infinite;
}

.loading-copy {
  position: relative;
  z-index: 1;
}

.loading-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.8rem;
}

.loading-bar {
  height: 8px;
  background: rgba(254, 95, 85, 0.16);
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), #ff9c92);
  animation: loadBar 4.2s ease-in-out forwards;
}

.loading-status {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.23em;
  color: var(--muted);
}

@keyframes cutGrid {
  0% { transform: translateX(-20px); }
  100% { transform: translateX(20px); }
}

@keyframes sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes loadBar {
  0% { width: 0; }
  100% { width: 100%; }
}

/* =========================
   NAVIGATION
   ========================= */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 250, 244, 0.55);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(254, 95, 85, 0.18);
  z-index: 100;
  box-shadow: 0 6px 24px rgba(254, 95, 85, 0.08);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--coral);
  text-shadow: 0 0 20px rgba(254, 95, 85, 0.3);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 0.95rem;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 1.9rem);
}

.nav-link:hover {
  color: var(--coral);
  background: rgba(254, 95, 85, 0.08);
}

.nav-link.active {
  color: #fffdfa;
  background: linear-gradient(135deg, var(--coral), #ff756c);
  box-shadow: 0 10px 24px rgba(254, 95, 85, 0.22);
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-top: 5rem;
  position: relative;
  user-select: none;
  cursor: grab;
}

.hero.active {
  cursor: grabbing;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title,
.hero-subtitle,
.hero-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em;
}

.hero-title {
  font-size: clamp(4.4rem, 8.8vw, 8.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.6rem;
  line-height: 0.95;
  letter-spacing: -0.05em;
  position: relative;
  text-align: center;
  justify-content: center;
}

.hero-title .hero-word {
  position: relative;
  display: inline-block;
}

.hero-title .hero-word.painting {
  color: white;
  background: var(--coral);
  padding: 0 0.2em;
  border-radius: 0.1em;
}

.hero-subtitle {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  color: var(--muted);
  margin-top: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-hint {
  font-size: 1.03rem;
  color: var(--coral);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-top: 1.15rem;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.hero-word .hero-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.hero-word .hero-char.typed {
  opacity: 1;
  transform: translateY(0);
}

.hero-word.typed {
  opacity: 1;
  transform: translateY(0);
}

.hero-word.exploded {
  animation: explodeWord 2s cubic-bezier(.16, .84, .44, 1) forwards;
}

.hero-word.recovering {
  animation: recoverWord 1.1s cubic-bezier(.16, .84, .44, 1) forwards;
}

.hero.bursting {
  animation: heroRattle 0.34s ease-in-out infinite;
}

.floating-elements {
  position: relative;
  height: 380px;
  margin-top: 3.5rem;
}

.float-item {
  position: absolute;
  min-width: 66px;
  height: 66px;
  padding: 0 0.8rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--coral);
  border-radius: 999px;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(254, 95, 85, 0.15);
  transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  animation: satelliteDrift 5.2s ease-in-out infinite;
}

.float-item::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--coral);
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px white;
}

.float-item::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--coral);
  border-right: 2px solid var(--coral);
  left: -16px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.8;
}

#float-1 { top: 10px; left: 8%; animation-delay: 0s; }
#float-2 { top: 90px; right: 14%; animation-delay: 0.8s; }
#float-3 { top: 150px; left: 2%; animation-delay: 1.2s; }
#float-4 { top: 70px; right: 6%; animation-delay: 1.6s; }
#float-5 { top: 190px; left: 24%; animation-delay: 2.1s; }

.float-item.active {
  box-shadow: 0 16px 40px rgba(254, 95, 85, 0.24);
  transform: translate(var(--satX, 0px), var(--satY, 0px)) rotate(var(--satRot, 0deg));
  background: var(--coral);
  color: white;
}

.float-item.active::before,
.float-item.active::after {
  background: white;
  border-color: white;
}

@keyframes satelliteDrift {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes explodeWord {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 0px), var(--ty, -40px)) scale(0.4) rotate(var(--rot, 18deg));
    opacity: 0;
  }
}

@keyframes recoverWord {
  0% {
    transform: translate(var(--tx, 0px), var(--ty, -40px)) scale(0.4) rotate(var(--rot, 18deg));
    opacity: 0;
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes heroRattle {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 2px); }
}

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

/* =========================
   FEATURED SECTION
   ========================= */
.featured {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem;
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.featured h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.featured-card {
  background: var(--paper);
  border: 2px solid var(--coral);
  padding: 2.4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(254, 95, 85, 0.12);
  transition: all 0.35s ease;
  cursor: pointer;
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 55px rgba(254, 95, 85, 0.2);
  background: var(--coral);
  color: white;
  border-color: var(--ink);
}

.featured-card:hover .featured-accent {
  width: 100%;
  background: white;
}

.featured-card:hover .featured-content h3,
.featured-card:hover .featured-content p,
.featured-card:hover .cta-button {
  color: white;
}

.featured-card:hover .cta-button {
  background: white;
  color: var(--coral);
  box-shadow: none;
}

.featured-content h3 {
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.featured-content p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.media-slot {
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(254, 95, 85, 0.4);
  background: rgba(254, 95, 85, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--coral);
  margin-bottom: 1.5rem;
}

.media-slot-large {
  min-height: 180px;
  aspect-ratio: auto;
  border-style: solid;
  border-color: rgba(254, 95, 85, 0.22);
  background: rgba(255, 250, 244, 0.9);
}

.page-media-grid,
.project-media-grid,
.contact-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.featured-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--coral);
  transition: width 0.35s ease;
}

.cta-button {
  display: inline-block;
  padding: 0.95rem 1.4rem;
  background: var(--coral);
  color: white;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(254, 95, 85, 0.18);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(254, 95, 85, 0.24);
}

.cta-button:hover::before {
  left: 100%;
}

/* =========================
   ABOUT SECTION
   ========================= */
.about {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem;
  animation: slideInRight 0.8s ease-out 0.4s both;
}

.about h2 {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.about-item {
  background: white;
  padding: 2rem;
  border-left: 4px solid var(--coral);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.about-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(254, 95, 85, 0.2);
  border-left-color: var(--ink);
  background: var(--coral);
  color: white;
}

.about-item:hover h3,
.about-item:hover p,
.about-item:hover .media-slot {
  color: white;
}

.about-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-item p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================
   SCROLL REVEAL ANIMATION
   ========================= */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.red-effect {
  color: var(--coral);
  text-shadow: 0 0 10px rgba(254, 95, 85, 0.3);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================
   CURSOR EFFECT
   ========================= */
.cursor-bounce {
  animation: bounce 0.4s ease-out;
}

.hero-plus {
  position: absolute;
  color: rgba(254, 95, 85, 0.18);
  font-size: 1.2rem;
  font-weight: 700;
  pointer-events: none;
}

.hero-plus.one { top: 8%; left: 12%; }
.hero-plus.two { top: 12%; right: 8%; }
.hero-plus.three { bottom: 16%; left: 18%; }
.hero-plus.four { bottom: 10%; right: 16%; }

.hero-title .hero-word,
.nav-link,
.logo,
a,
button,
.featured-card,
.about-item,
.blog-card,
.contact-info-card,
.skill-category,
.experience-item,
.resource-card {
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-title:hover .hero-word,
.nav-link:hover,
.logo:hover,
.nav-link.active,
a:hover,
button:hover,
.featured-card:hover,
.about-item:hover,
.blog-card:hover,
.contact-info-card:hover,
.skill-category:hover,
.experience-item:hover,
.resource-card:hover {
  color: white;
}

.featured-card:hover,
.about-item:hover,
.blog-card:hover,
.contact-info-card:hover,
.skill-category:hover,
.experience-item:hover,
.resource-card:hover {
  background-color: var(--coral);
  box-shadow: 0 16px 40px rgba(254, 95, 85, 0.18);
}

.featured-card:hover .featured-content h3,
.featured-card:hover .featured-content p,
.about-item:hover h3,
.about-item:hover p,
.blog-card:hover h3,
.blog-card:hover p,
.blog-card:hover .blog-meta,
.contact-info-card:hover h3,
.contact-info-card:hover p,
.skill-category:hover h3,
.skill-category:hover p,
.experience-item:hover h3,
.experience-item:hover li,
.resource-card:hover h3,
.resource-card:hover p {
  color: white;
}

.cursor-dot,
.cursor-ring,
#cursorTrail {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
}

.cursor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(254, 95, 85, 0.16);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--coral);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.95;
}

.cursor-ring.locked {
  width: 52px;
  height: 52px;
  border-color: var(--ink);
  opacity: 1;
}

#cursorTrail {
  width: 100vw;
  height: 100vh;
  mix-blend-mode: screen;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 1rem;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--coral) 0%, rgba(254, 95, 85, 0.4) 100%);
  transform-origin: top;
  transform: scaleY(0);
  z-index: 9997;
  box-shadow: 0 0 16px rgba(254, 95, 85, 0.3);
}

.click-ripple {
  position: fixed;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(254, 95, 85, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  animation: rippleExpand 0.7s ease-out forwards;
  box-shadow: 0 0 0 0 rgba(254, 95, 85, 0.16);
}

@keyframes rippleExpand {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(5.2); opacity: 0; }
}

/* =========================
   FOOTER
   ========================= */
.footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 2px solid var(--coral);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4rem;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .featured-card {
    padding: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}