@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --primary-bg: #fdf4f4;
  --secondary-bg: #fff9f9;
  --card-bg: #ffffff;
  --accent: #b56576;
  --accent-light: #f2a3b3;
  --accent-dark: #7d3d4e;
  --text: #3a2020;
  --text-muted: #8a6060;
  --border: #f0d8da;
  --shadow: 0 4px 20px rgba(181, 101, 118, 0.1);
  --shadow-hover: 0 12px 36px rgba(181, 101, 118, 0.2);
  --radius: 16px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--primary-bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 1rem;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--accent); line-height: 1.2; }
h2 { font-size: 1.8rem; margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 1.2rem; color: var(--text); }
p { color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-dark); }

.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

header {
  position: relative;
  background: linear-gradient(135deg, #fce8ec 0%, #fdf4f0 50%, #fef5fb 100%);
  padding: 100px 24px 90px;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
}

canvas#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.b1 { width: 380px; height: 380px; background: #f2a3b3; opacity: 0.22; top: -100px; right: -80px; animation: drift1 8s ease-in-out infinite; }
.b2 { width: 260px; height: 260px; background: #b56576; opacity: 0.1; bottom: -60px; left: 5%; animation: drift2 10s ease-in-out infinite; }
.b3 { width: 180px; height: 180px; background: #ffd6a0; opacity: 0.18; top: 30%; left: 55%; animation: drift1 12s ease-in-out infinite reverse; }

@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px,-20px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-15px,15px); } }

.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1.5px;
  background: var(--accent-light);
  border-radius: 2px;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.08;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s forwards;
}
.hero-name .highlight { color: var(--accent); font-style: italic; }

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.7s forwards;
}

.hero-sub2 {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.85s forwards;
}

.hero-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s ease 1s forwards;
}

.chip {
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(181, 101, 118, 0.08);
  border: 1px solid rgba(181, 101, 118, 0.2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.1s forwards;
}

.hero-photo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.photo-ring {
  position: relative;
  width: 200px;
  height: 200px;
}

.ring-svg {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  animation: spin 6s linear infinite;
}

.hero-photo {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 4px solid #fce8ec;
  z-index: 1;
}

.hero-stats {
  display: flex;
  gap: 14px;
}

.stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(240, 216, 218, 0.9);
  border-radius: 12px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; color: var(--accent); display: block; }
.stat-lbl { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  animation: fadeIn 1s ease 1.6s forwards;
  z-index: 2;
}
.scroll-hint span { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; color: var(--text-muted); text-transform: uppercase; }
.scroll-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-light); animation: bounce 1.4s ease-in-out infinite; }
.scroll-dot:nth-child(3) { animation-delay: 0.2s; opacity: 0.6; }
.scroll-dot:nth-child(4) { animation-delay: 0.4s; opacity: 0.3; }

#dark-mode-toggle {
  position: absolute;
  top: 24px; right: 24px;
  background: rgba(255,255,255,0.6);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#dark-mode-toggle:hover { transform: scale(1.1) rotate(15deg); background: rgba(255,255,255,0.9); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  box-shadow: 0 4px 15px rgba(181, 101, 118, 0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(181, 101, 118, 0.4); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }

section {
  padding: 56px 40px;
  margin: 28px auto;
  max-width: 860px;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
section.visible { opacity: 1; transform: translateY(0); }
.section-icon { font-size: 1.4rem; }

#about p { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; }
#about strong { color: var(--accent); font-weight: 600; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 0; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-light), var(--border));
}
.timeline-item {
  display: flex;
  gap: 24px;
  padding: 0 0 32px 0;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -22px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 3px solid var(--accent);
  z-index: 1;
}
.timeline-item.job .timeline-dot { background: var(--accent); }
.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  flex: 1;
  transition: all 0.3s ease;
}
.timeline-content:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); border-color: var(--accent-light); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.timeline-item h3 { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--text); }
.date { font-size: 0.82rem; font-weight: 600; color: var(--accent); background: rgba(181, 101, 118, 0.08); padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.timeline-item p { font-size: 0.95rem; margin: 0; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 20px; }
.skill {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 10px;
  transition: all 0.3s ease;
}
.skill:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--accent-light); }
.skill img { width: 42px; height: 42px; }
.skill p { font-weight: 600; font-size: 0.88rem; color: var(--text); margin: 0; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateY(16px);
  display: flex; flex-direction: column; gap: 8px;
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); border-color: var(--accent-light); }
.project-icon { font-size: 2rem; margin-bottom: 4px; }
.project-card h3 { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem; color: var(--text); }
.project-tech { font-size: 0.8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.project-card p { font-size: 0.92rem; flex: 1; }
.project-link { font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-top: 8px; display: inline-block; }
.project-link:hover { color: var(--accent-dark); }

.languages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.lang-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all 0.3s ease;
  opacity: 0; transform: translateY(12px);
}
.lang-card.visible { opacity: 1; transform: translateY(0); }
.lang-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--accent-light); }
.lang-flag { font-size: 2rem; }
.lang-card strong { display: block; font-size: 1rem; color: var(--text); font-weight: 600; }
.lang-level { font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-top: 3px; display: inline-block; }
.lang-level.fluent { background: rgba(181, 101, 118, 0.12); color: var(--accent); }
.lang-level.intermediate { background: rgba(255, 160, 80, 0.12); color: #c07040; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all 0.3s ease;
  color: var(--text);
  opacity: 0; transform: translateY(12px);
}
.contact-card.visible { opacity: 1; transform: translateY(0); }
.contact-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--accent-light); color: var(--text); }
.contact-icon { font-size: 1.6rem; }
.contact-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 0; }
.contact-value { font-size: 0.9rem; font-weight: 500; color: var(--text); margin: 2px 0 0 0; }

footer { text-align: center; padding: 40px 24px 50px; color: var(--text-muted); font-size: 0.9rem; }
footer strong { color: var(--accent); }

#menu-toggle {
  position: fixed; top: 20px; left: 20px;
  font-size: 1.4rem;
  background: rgba(255,255,255,0.85);
  color: var(--accent);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer; z-index: 1001;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}
#menu-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.05); }

#sidebar {
  position: fixed; top: 0; left: -260px;
  width: 240px; height: 100%;
  background: var(--secondary-bg);
  border-right: 1px solid var(--border);
  padding: 70px 28px 40px;
  display: flex; flex-direction: column; gap: 8px;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 4px 0 24px rgba(181, 101, 118, 0.08);
}
#sidebar.active { left: 0; }
.sidebar-logo { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--accent); margin-bottom: 24px; }
#sidebar a { font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 500; color: var(--text-muted); padding: 10px 14px; border-radius: var(--radius-sm); transition: all 0.25s; }
#sidebar a:hover { color: var(--accent); background: rgba(181, 101, 118, 0.08); transform: translateX(4px); text-decoration: none; }

body.dark-mode {
  --primary-bg: #191213;
  --secondary-bg: #221618;
  --card-bg: #2c1c1e;
  --text: #f5e8e8;
  --text-muted: #c4a0a5;
  --border: #3a2428;
  --accent: #f2a3b3;
  --accent-light: #f7c6d0;
  --accent-dark: #f7d8de;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 36px rgba(0,0,0,0.5);
}
body.dark-mode header { background: linear-gradient(135deg, #191213 0%, #221618 50%, #1a1020 100%); }
body.dark-mode .b1 { opacity: 0.18; }
body.dark-mode .b2 { opacity: 0.15; }
body.dark-mode .b3 { opacity: 0.08; }
body.dark-mode .hero-photo { border-color: #2c1c1e; }
body.dark-mode .stat { background: rgba(44,28,30,0.8); border-color: rgba(58,36,40,0.9); }
body.dark-mode .chip { background: rgba(242,163,179,0.08); border-color: rgba(242,163,179,0.18); color: var(--accent); }
body.dark-mode #dark-mode-toggle { background: rgba(255,255,255,0.05); border-color: var(--border); }
body.dark-mode .btn-outline { border-color: var(--accent); color: var(--accent); }
body.dark-mode .btn-outline:hover { background: var(--accent); color: #191213; }
body.dark-mode #menu-toggle { background: rgba(255,255,255,0.05); border-color: var(--border); color: var(--accent); }
body.dark-mode .lang-level.fluent { background: rgba(242,163,179,0.15); }
body.dark-mode #about strong { color: var(--accent); }

@media (max-width: 640px) {
  header { padding: 90px 20px 70px; min-height: auto; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 32px; }
  .hero-photo-wrap { align-self: center; }
  .photo-ring { width: 150px; height: 150px; }
  section { padding: 40px 24px; margin: 16px auto; }
  .projects-grid, .languages-grid, .contact-grid { grid-template-columns: 1fr; }
  .timeline-header { flex-direction: column; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 10px; }
  .stat { padding: 8px 12px; }
}
