/* ================================================
   RESET & BASE
================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F8F4EC;
  --bg-alt: #FFFDF8;
  --surface: #FFFFFF;
  --accent: #8B5E3C;
  --accent-hover: #A06A42;
  --text: #2C2C2C;
  --text-muted: #666666;
  --border: #E8E0D4;

  --glass-bg: rgba(255, 253, 248, 0.65);
  --glass-border: rgba(232, 224, 212, 0.7);
  --glass-shadow: 0 4px 40px rgba(44, 44, 44, 0.06), 0 1px 2px rgba(44, 44, 44, 0.04);
  --glass-shadow-hover: 0 12px 60px rgba(44, 44, 44, 0.10), 0 2px 8px rgba(44, 44, 44, 0.06);

  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

img { display: block; max-width: 100%; }

/* ================================================
   UTILITY
================================================ */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 64px;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.section-desc {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ================================================
   GLASS CARDS
================================================ */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-hover);
}

/* ================================================
   NAV
================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(248, 244, 236, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  padding: 8px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px 0 20px;
  background: rgba(248, 244, 236, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-mobile a {
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav-mobile.open { display: flex; }

/* ================================================
   HERO
================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px 80px;
  background: var(--bg);
}

/* Blobs */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: blobFloat 14s ease-in-out infinite;
}

.blob-1 {
  width: 600px; height: 600px;
  top: -100px; left: -200px;
  background: radial-gradient(circle, #D4A86A 0%, #C49A5A 60%, transparent 100%);
  animation-delay: 0s;
}

.blob-2 {
  width: 500px; height: 500px;
  top: 20%; right: -150px;
  background: radial-gradient(circle, #E8D4B8 0%, #D4C0A0 60%, transparent 100%);
  animation-delay: -5s;
}

.blob-3 {
  width: 400px; height: 400px;
  bottom: 0; left: 40%;
  background: radial-gradient(circle, #C8B89A 0%, #B8A888 60%, transparent 100%);
  animation-delay: -9s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.04); }
  66% { transform: translate(-20px, 20px) scale(0.97); }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
}

.hero-glass {
  padding: 56px 60px;
  border-radius: var(--radius-xl);
  display: flex;
  gap: 56px;
  align-items: center;
}

.hero-avatar {
  flex-shrink: 0;
}

.avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), #D4A86A, #E8D4B8);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 1.8em;
}

.typing-prefix { color: var(--text-muted); }

.typing-text {
  color: var(--accent);
  font-weight: 600;
}

.typing-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

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

.hero-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 94, 60, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 1;
  opacity: 0.6;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ================================================
   ABOUT
================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.about-bio {
  padding: 40px 44px;
}

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

.about-bio p:last-child { margin-bottom: 0; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  padding: 24px 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(139, 94, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.lang-list { flex: 1; }

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.9rem;
}

.lang-name { font-weight: 500; color: var(--text); }
.lang-level { color: var(--text-muted); font-size: 0.82rem; }

/* ================================================
   STATS
================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.stat-suffix {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ================================================
   SKILLS
================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-group {
  padding: 28px 32px;
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-group-header i {
  font-size: 1.1rem;
  color: var(--accent);
  width: 20px;
}

.skill-group-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(139, 94, 60, 0.07);
  border: 1px solid rgba(139, 94, 60, 0.12);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}

.skill-tag i {
  font-size: 0.78rem;
  color: var(--accent);
}

.skill-tag:hover {
  background: rgba(139, 94, 60, 0.14);
  border-color: rgba(139, 94, 60, 0.2);
  transform: translateY(-2px);
}

/* ================================================
   INTERESTS
================================================ */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.interest-card {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  cursor: default;
}

.interest-card i {
  font-size: 1.5rem;
  color: var(--accent);
}

.interest-card span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ================================================
   INFRASTRUCTURE
================================================ */
.infra-highlight {
  padding: 36px 40px;
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
}

.infra-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.infra-highlight-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: -0.01em;
}

.infra-highlight-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.infra-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.infra-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}

.infra-tag i { color: var(--accent); font-size: 0.82rem; }

.infra-tag:hover {
  background: rgba(139, 94, 60, 0.08);
  border-color: rgba(139, 94, 60, 0.2);
  color: var(--text);
  transform: translateY(-2px);
}

/* ================================================
   PROJECTS
================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-featured {
  grid-column: span 2;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(139, 94, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
}

.project-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.status-live {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-soon {
  background: rgba(251, 191, 36, 0.12);
  color: #d97706;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  padding: 5px 12px;
  border: 1px solid rgba(139, 94, 60, 0.2);
  border-radius: 100px;
  transition: all var(--transition);
}

.project-link:hover {
  background: rgba(139, 94, 60, 0.08);
  transform: translateY(-1px);
}

.project-link.muted {
  color: var(--text-muted);
  border-color: var(--border);
}

.project-server {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.project-future {
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.8), rgba(248, 244, 236, 0.5));
  border-style: dashed;
}

/* ================================================
   TIMELINE
================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 680px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(139, 94, 60, 0.1));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.7rem;
  z-index: 1;
}

.timeline-card {
  padding: 24px 28px;
}

.timeline-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.timeline-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ================================================
   CONTACT
================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
}

.contact-card {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(139, 94, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.contact-icon-yt {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.contact-card:hover .contact-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.contact-card:hover .contact-icon-yt {
  background: #ef4444;
  color: #fff;
}

.contact-platform {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-handle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.contact-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: transform var(--transition), color var(--transition);
}

.contact-card:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ================================================
   FOOTER
================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--border);
  margin-top: 8px;
}

/* ================================================
   SCROLL REVEAL ANIMATIONS
================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered delays for children */
.reveal-child:nth-child(1) { transition-delay: 0.1s; }
.reveal-child:nth-child(2) { transition-delay: 0.2s; }
.reveal-child:nth-child(3) { transition-delay: 0.3s; }
.reveal-child:nth-child(4) { transition-delay: 0.4s; }
.reveal-child:nth-child(5) { transition-delay: 0.5s; }

/* ================================================
   REDUCED MOTION
================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-child {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .interests-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 80px 20px 60px; }
  .hero-glass {
    flex-direction: column;
    padding: 36px 28px;
    gap: 28px;
    text-align: center;
  }
  .hero-intro { max-width: 100%; }
  .hero-actions { justify-content: center; }

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

  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: span 1; }

  .contact-grid { grid-template-columns: 1fr; max-width: 100%; }

  .interests-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3rem; }
  .section-title { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
  .infra-highlight { flex-direction: column; }
}
