:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --accent-soft: #eff6ff;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
  overflow-x: hidden;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 5rem 0;
}

/* Typography */
h1, h2, h3 {
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 5vw, 1.875rem); margin-bottom: 2.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }

.section-title {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Background Mesh */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

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

.mesh-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}

.mesh-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  top: 40%;
  left: -150px;
  animation-delay: -7s;
}

.mesh-3 {
  width: 450px;
  height: 450px;
  background: var(--accent-3);
  bottom: -100px;
  right: 10%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Floating Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-logo a {
  font-weight: 800;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--text-main); }

.cta-button-small {
  background: var(--text-main);
  color: var(--bg) !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button-small:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem 0;
  text-align: left;
}

.hero-content {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem 0;
    text-align: center;
  }
  .hero-content {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
}

/* Avatar */
.hero-avatar {
  flex-shrink: 0;
}

.avatar-ring {
  width: 128px;
  height: 128px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hero-avatar:hover .avatar-ring {
  transform: scale(1.05);
}

.avatar-ring.spinning {
  animation: spin-once 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spin-once {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

.burst-particle {
  position: fixed;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, opacity;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

@media (max-width: 640px) {
  .avatar-ring { width: 112px; height: 112px; }
}

/* Hero Text */
.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-transform: none;
}

.gradient-name {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.hero .bio {
  font-size: 1.125rem;
  max-width: 600px;
}

@media (max-width: 640px) {
  .hero .bio { margin: 0 auto; }
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; }
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.cta-button.secondary {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.cta-button:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.cta-button.secondary:hover {
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
}

.cta-button:active { transform: translateY(0); }

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 100px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .stats-bar { gap: 1.5rem 1rem; padding: 1.5rem; }
  .stat { min-width: 45%; }
  .stat-number { font-size: 1.75rem; }
  .stat-plus { font-size: 1.25rem; }
}

/* Experience Section */
.experience-item {
  margin-bottom: 3rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s;
}

.experience-item:hover {
  border-left-color: var(--accent);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

.experience-company {
  font-size: 1.125rem;
  font-weight: 700;
}

.experience-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.15rem 0.6rem;
  background: var(--bg-soft);
  border-radius: 6px;
}

.experience-role {
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.experience-list { list-style: none; }

.experience-list li {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-main);
  font-size: 0.95rem;
}

.experience-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Skills Section */
.skills-section { padding: 3rem 0; }

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: default;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

@media (max-width: 640px) {
  .apps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

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

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

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

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.app-card:hover .app-icon { transform: scale(1.05); }

.app-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.app-card p {
  font-size: 0.875rem;
  flex-grow: 1;
}

.app-card .tech-stack {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  align-self: flex-start;
}

.app-link:hover {
  transform: translateY(-2px);
  background: var(--accent-2);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.app-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Contact & Footer */
#contact { text-align: center; }

.contact-container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .social-links { flex-direction: column; gap: 1rem; align-items: center; }
}

.social-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}

.social-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.social-links a:hover { color: var(--accent); }
.social-links a:hover::after { width: 100%; }

.copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 2.5rem; }
  .header-nav { gap: 1rem; }
  .header-nav a { font-size: 0.75rem; }
  .cta-button-small { padding: 0.4rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mesh-blob { animation: none; }
  .avatar-ring.spinning { animation: none; }
}
