:root {
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #0284c7;
  --secondary: #2563eb;
  --accent: #7c3aed;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.blob-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-color);
}

.blob {
  position: absolute;
  filter: blur(120px);
  border-radius: 50%;
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--secondary) 0%, rgba(79,172,254,0) 70%);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--accent) 0%, rgba(155,81,224,0) 70%);
  animation-duration: 25s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--primary) 0%, rgba(0,242,254,0) 70%);
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.1); }
}

/* --- Typography & Utilities --- */
h1, h2, h3, h4, .logo {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shine 5s linear infinite;
  display: inline-block;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.padding-section {
  padding: 100px 5% 50px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 3rem;
  text-align: center;
  font-weight: 700;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 30px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 242, 254, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  z-index: 9999;
}

.glass-nav {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-nav.scrolled {
  padding: 10px 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  top: 15px;
}

.logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -2px;
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-btn {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 1.05rem;
  position: relative;
  transition: color 0.3s;
}

.nav-btn::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-btn:hover {
  color: var(--primary);
}

.nav-btn:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-main);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 100px;
  gap: 60px;
}

.hero-content {
  flex: 1.2;
  max-width: 700px;
}

.greeting {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 25px;
  display: block;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  margin-bottom: 25px;
  color: var(--text-main);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 45px;
  max-width: 550px;
}

.hero-cta {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 16px 36px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.3);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.5);
  color: #fff;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

.btn.small {
  padding: 10px 24px;
  font-size: 0.95rem;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cartoon-guy {
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 50% 50% 40% 40%;
  position: relative;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.head {
  width: 180px;
  height: 200px;
  background: #fde047;
  border-radius: 100px 100px 80px 80px;
  position: relative;
  box-shadow: inset -10px -10px 20px rgba(0,0,0,0.05);
}

.eye {
  width: 45px;
  height: 55px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.left-eye { left: 35px; }
.right-eye { right: 35px; }

.pupil {
  width: 20px;
  height: 20px;
  background: #1e293b;
  border-radius: 50%;
  position: absolute;
}

.mouth {
  width: 40px;
  height: 15px;
  border: 4px solid transparent;
  border-bottom-color: #d97706;
  border-radius: 50%;
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
}

.blush {
  width: 20px;
  height: 12px;
  background: rgba(239, 68, 68, 0.3);
  border-radius: 50%;
  position: absolute;
  top: 120px;
}
.blush.left { left: 20px; }
.blush.right { right: 20px; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.bento-grid .bento-item {
  width: 100%;
}

.frontend-card {
  grid-column: 1 / 3 !important;
}

.tech-card {
  display: flex;
  flex-direction: column;
}

.card-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 25px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-card h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--text-main);
}

.skill-list {
  list-style: none;
  color: var(--text-muted);
}

.skill-list li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 24px;
}

.skill-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-size: 1.2rem;
  line-height: 1.2;
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.project-block {
  width: 100%;
  position: relative;
  display: flex;
}

.project-grid .project-block:nth-child(odd) {
  justify-content: flex-start;
}

.project-grid .project-block:nth-child(even) {
  justify-content: flex-end;
}

.project-card {
  width: 70%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  margin: 0 !important;
  z-index: 2;
}

.project-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
  display: inline-block;
  background: rgba(0, 242, 254, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
}

.project-info h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-main);
}

.project-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1.05rem;
}

.project-links {
  margin-top: auto;
}

.skills, .projects, .about {
  position: relative;
}

.inline-illustration {
  grid-column: 3 / 4;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 280px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.side-illustration {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 25%;
  max-width: 300px;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.project-grid .project-block:nth-child(odd) .side-illustration {
  right: 2%; /* Positioned loosely in the empty right space */
}

.project-grid .project-block:nth-child(even) .side-illustration {
  left: 2%; /* Positioned loosely in the empty left space */
}

.about-char {
  position: absolute;
  top: -60px;
  right: -30px;
  transform: rotate(15deg);
  animation: peek-char 5s infinite ease-in-out alternate;
  z-index: 5;
  pointer-events: none;
}

.about-char .cartoon-guy {
  transform: scale(0.5);
}

@keyframes peek-char {
  0% { transform: rotate(15deg) translateY(0); }
  100% { transform: rotate(15deg) translateY(-20px); }
}

.split-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.about {
  padding: 40px;
}

.about-content .lead {
  font-size: 1.3rem;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 25px;
}

.about-content p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact {
  padding: 40px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 35px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--text-main);
  padding: 18px 25px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

.contact-item i {
  font-size: 1.8rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.contact-item:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
  transform: translateX(10px);
  color: var(--text-main);
}

.contact-item:hover i {
  transform: scale(1.1);
}

.glass-footer {
  text-align: center;
  padding: 40px;
  margin-top: 50px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bento-item, .project-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

.visible:nth-child(1) { transition-delay: 0.1s; }
.visible:nth-child(2) { transition-delay: 0.2s; }
.visible:nth-child(3) { transition-delay: 0.3s; }
.visible:nth-child(4) { transition-delay: 0.4s; }

@media (max-width: 1024px) {
  .hero-title { font-size: 4rem; }
  .split-section { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 160px;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-image {
    max-width: 350px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3.2rem;
  }
  
  .glass-nav {
    padding: 15px 30px;
    top: 15px;
    width: 95%;
  }
  
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 25px 0;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    gap: 20px;
    text-align: center;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  }
  
  .nav-links.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  
  .padding-section {
    padding: 60px 4% 30px;
  }
  
  .section-title {
    font-size: 2.5rem;
  }

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

  .frontend-card, .inline-illustration {
    grid-column: 1 / -1 !important;
  }
  .inline-illustration {
    margin: 20px auto 40px;
  }

  .project-block {
    flex-direction: column !important;
    justify-content: center !important;
  }

  .bento-grid .bento-item,
  .project-card {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin-left: 0 !important;
    align-self: center !important;
  }
  
  .side-illustration {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    width: 60% !important;
    margin: 30px auto 0 !important;
    right: auto !important;
    left: auto !important;
  }
}