/* Japanese Minimalism Portfolio Styles */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --japanese-red: #B5524C;
  --japanese-red-dark: #8A2E2E;
  --cream-bg: #FAF8F4;
  --text-dark: #2C2C2C;
  --text-light: #666666;
  --white: #FFFFFF;
  --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --gradient-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 248, 244, 0.95) 100%);
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background: #FAF8F4;
  color: var(--text-dark);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* Background pattern with pagoda image */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    url('https://images.unsplash.com/photo-1528164344705-47542687000d?w=1200&q=80') no-repeat center center,
    linear-gradient(135deg, rgba(250, 248, 244, 0.7) 0%, rgba(255, 248, 240, 0.75) 100%);
  background-size: cover, cover;
  background-blend-mode: overlay;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

body.portfolio-active {
  position: relative;
}

body.portfolio-active::before {
  opacity: 0.5;
}

/* Portfolio Container */
.portfolio-container {
  display: none !important;
  opacity: 0 !important;
  transition: opacity 0.8s ease-in-out !important;
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  min-height: 100vh !important;
  background: transparent !important;
}

/* Debug: Uncomment the line below to show portfolio immediately for testing */
/* .portfolio-container { display: block !important; opacity: 1 !important; } */

.portfolio-container.active {
  display: block !important;
  opacity: 1 !important;
}

/* Language Toggle Button - góc phải trên cùng */
.language-toggle {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 50px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  animation: slideInRight 0.6s ease-out 0.3s both;
}

.language-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

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

.lang-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 24px;
  transition: all 0.3s ease;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: var(--japanese-red);
  background: rgba(181, 82, 76, 0.05);
}

.lang-btn.active {
  color: white;
  background: linear-gradient(135deg, var(--japanese-red), var(--japanese-red-dark));
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.3);
}

.lang-divider {
  color: var(--text-light);
  font-weight: 300;
  opacity: 0.5;
  font-size: 1.1rem;
}

/* Language content transition */
.lang-en, .lang-jp {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in-lang {
  animation: fadeInLang 0.4s ease-out;
}

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

/* Ensure scene is hidden when portfolio is active */
body.portfolio-active .scene {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.portfolio-active .background {
  display: none !important;
}

/* Override Webflow body opacity when portfolio is active */
body.portfolio-active {
  opacity: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
}

/* Ensure body class from Webflow also allows scrolling */
.body.portfolio-active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
}

/* Profile Header Section - Hero với ảnh nền pagoda */
.profile-header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(250, 248, 244, 0.85) 0%, rgba(255, 252, 248, 0.9) 50%, rgba(250, 248, 244, 0.85) 100%);
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 70%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1528164344705-47542687000d?w=1200&q=80') no-repeat center right;
  background-size: cover;
  opacity: 0.35;
  z-index: 0;
  border-radius: 0 0 0 120px;
  filter: blur(0.5px);
  transform: scale(1.1);
}

.profile-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(250, 248, 244, 0.7) 30%, rgba(250, 248, 244, 0.95) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content > div:first-child {
  position: relative;
}

.hero-content > div:first-child::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  background: radial-gradient(circle at center, rgba(181, 82, 76, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.hero-avatar {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 5px solid white;
  object-fit: cover;
  box-shadow: 
    0 20px 60px rgba(181, 82, 76, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 0 0 10px rgba(181, 82, 76, 0.05);
  margin: 0 auto;
  animation: fadeInUp 1s ease-out, float 6s ease-in-out infinite;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-avatar:hover {
  transform: scale(1.05) translateY(-8px);
  box-shadow: 
    0 24px 72px rgba(181, 82, 76, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.1),
    0 0 0 12px rgba(181, 82, 76, 0.08);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-text {
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--japanese-red) 0%, var(--japanese-red-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.hero-name::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--japanese-red), transparent);
  border-radius: 2px;
}

.hero-role {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 30px;
  font-weight: 400;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(250, 248, 244, 0.8));
  backdrop-filter: blur(10px);
  border-radius: 50px;
  display: inline-block;
  border: 1px solid rgba(181, 82, 76, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.9;
  max-width: 600px;
  padding: 20px 0;
  position: relative;
}

.hero-description::before {
  content: '"';
  font-size: 4rem;
  color: var(--japanese-red);
  opacity: 0.15;
  position: absolute;
  top: -10px;
  left: -20px;
  font-family: Georgia, serif;
}

/* Profile Header Styles - tận dụng ảnh nền pagoda */
.profile-name {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--japanese-red) 0%, var(--japanese-red-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: -0.01em;
}

.profile-roles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.role-tag {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(181, 82, 76, 0.3);
  border-radius: 24px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.role-tag.primary {
  background: linear-gradient(135deg, rgba(181, 82, 76, 0.15), rgba(181, 82, 76, 0.1));
  border-color: var(--japanese-red);
  color: var(--japanese-red);
}

.role-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.2);
}

.profile-summary {
  margin-bottom: 24px;
  line-height: 1.8;
}

.summary-text {
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.8;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  border-left: 3px solid rgba(181, 82, 76, 0.3);
  margin-bottom: 0;
}

.summary-text.lang-jp {
  font-family: 'Noto Sans JP', sans-serif;
}

.profile-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  color: var(--text-dark);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.meta-icon {
  color: var(--japanese-red);
  flex-shrink: 0;
}

.profile-status {
  margin-top: 16px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.1));
  color: #2e7d32;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 24px;
  border: 1.5px solid rgba(76, 175, 80, 0.4);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

/* Section Styles */
section {
  padding: 100px 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Alternating section backgrounds với ảnh nền pagoda */
.cv-section {
  position: relative;
  padding: 80px 40px;
  margin: 40px auto;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: all 0.4s ease;
  z-index: 1;
}

.cv-section:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cv-section:nth-child(even) {
  background: rgba(250, 248, 244, 0.75);
}

.cv-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1528164344705-47542687000d?w=800&q=80') no-repeat center right;
  background-size: cover;
  opacity: 0.22;
  z-index: 0;
  border-radius: 0 24px 24px 0;
  filter: blur(1px);
  pointer-events: none;
}

.cv-section > * {
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--japanese-red);
  margin-bottom: 60px;
  text-align: center;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  position: relative;
  padding-bottom: 20px;
}

.section-heading {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--japanese-red);
  margin-bottom: 50px;
  text-align: center;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  position: relative;
  padding-bottom: 20px;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--japanese-red), transparent);
  border-radius: 4px;
}

.section-heading .lang-jp {
  font-family: 'Noto Sans JP', sans-serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--japanese-red), transparent);
  border-radius: 4px;
}

/* About Section */
.about-section {
  background: var(--white);
  border-radius: 20px;
  padding: 60px;
  margin: 40px auto;
  max-width: 1200px;
  box-shadow: 0 10px 40px var(--shadow-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  margin-bottom: 60px;
  align-items: start;
}

.about-text {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-dark);
}

.about-text p {
  margin-bottom: 24px;
  padding-left: 20px;
  border-left: 3px solid rgba(181, 82, 76, 0.2);
  transition: all 0.3s ease;
}

.about-text p:hover {
  border-left-color: var(--japanese-red);
  padding-left: 28px;
}

.timeline {
  position: relative;
  padding-left: 40px;
  padding-top: 6px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--japanese-red), rgba(181, 82, 76, 0.3));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 32px;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  padding-left: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--japanese-red), var(--japanese-red-dark));
  border: 4px solid var(--white);
  box-shadow: 
    0 0 0 2px var(--japanese-red),
    0 4px 12px rgba(181, 82, 76, 0.3);
  transition: all 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.15);
  box-shadow: 
    0 0 0 3px var(--japanese-red),
    0 6px 16px rgba(181, 82, 76, 0.4);
}

.timeline-year {
  font-weight: 700;
  color: var(--japanese-red);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.timeline-text {
  color: var(--text-dark);
  font-size: 1rem;
}

/* Skills Section */
.skills-table {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  overflow: visible;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 10;
}

.skill-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid rgba(240, 240, 240, 0.8);
  position: relative;
  z-index: 2;
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-label {
  padding: 24px;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(5px);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(240, 240, 240, 0.8);
}

.skill-values {
  padding: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 3;
}

.skill-values span {
  padding: 8px 16px;
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(5px);
  border: 1.5px solid rgba(181, 82, 76, 0.25);
  border-radius: 16px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 100;
}

.skill-values span:hover {
  background: rgba(181, 82, 76, 0.15);
  border-color: var(--japanese-red);
  color: var(--japanese-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.25);
  z-index: 101;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--japanese-red), #D4A373);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(181, 82, 76, 0.2);
}

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

.skill-category {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--japanese-red);
  margin-bottom: 25px;
  font-family: 'Noto Sans JP', sans-serif;
}

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

.skill-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1rem;
  color: var(--text-dark);
}

.skill-item::before {
  content: '▸';
  color: var(--japanese-red);
  margin-right: 10px;
  font-size: 1.2rem;
}

/* Experience Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 40px;
  align-items: stretch;
}

.project-card {
  background: var(--gradient-soft);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(181, 82, 76, 0.3);
}

.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  transition: transform 0.4s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 30px;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--japanese-red);
  margin-bottom: 15px;
}

.project-description,
.project-desc {
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Project Details - Fix spacing để tech tags không đè lên GitHub link */
.project-details {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
}

.detail-item:last-child {
  padding-bottom: 0;
}

.detail-item strong {
  color: var(--text-dark);
  font-weight: 600;
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.detail-item > *:not(strong) {
  flex: 1;
  min-width: 200px;
}

/* Đảm bảo tech tags có spacing riêng và không đè lên GitHub link */
.detail-item .tech-tag {
  margin: 4px 8px 4px 0;
  display: inline-block;
}

.detail-item .project-link {
  margin-top: 4px;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
}

.project-role {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 500;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 244, 0.9));
  color: var(--japanese-red);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid rgba(181, 82, 76, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(181, 82, 76, 0.1);
}

.tech-tag:hover {
  background: var(--japanese-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.25);
}

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

.project-link {
  color: var(--japanese-red);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(181, 82, 76, 0.05);
  border: 1px solid rgba(181, 82, 76, 0.2);
}

.project-link:hover {
  color: white;
  background: linear-gradient(135deg, var(--japanese-red), var(--japanese-red-dark));
  border-color: var(--japanese-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.3);
}

/* Education Section */
.education-list {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.experience-card {
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 2;
  margin-bottom: 30px;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--japanese-red), rgba(181, 82, 76, 0.5));
  border-radius: 0 4px 4px 0;
}

.experience-card:hover {
  transform: translateX(8px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

.project-item {
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.project-item:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.08);
}

.education-item {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 50px;
  border-radius: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  border-left: 6px solid var(--japanese-red);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
}

.education-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
}

.education-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--japanese-red);
  margin-bottom: 10px;
}

.education-period {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.education-description {
  color: var(--text-dark);
  line-height: 1.7;
}

/* Contact Section - using cv-section style */
.contact-section {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--japanese-red);
  margin-bottom: 30px;
  font-family: 'Noto Sans JP', sans-serif;
}

.contact-item {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(181, 82, 76, 0.04);
  transform: translateX(8px);
}

.contact-item a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--japanese-red);
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.social-link {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 244, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--japanese-red);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(181, 82, 76, 0.3);
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.15);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--japanese-red), var(--japanese-red-dark));
  color: var(--white);
  transform: scale(1.15) translateY(-4px) rotate(5deg);
  box-shadow: 0 8px 20px rgba(181, 82, 76, 0.35);
  border-color: var(--japanese-red);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: 16px 18px;
  border: 2px solid rgba(224, 224, 224, 0.6);
  border-radius: 16px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--japanese-red);
  background: white;
  box-shadow: 0 4px 12px rgba(181, 82, 76, 0.15);
  transform: translateY(-2px);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  padding: 18px 48px;
  background: linear-gradient(135deg, var(--japanese-red), var(--japanese-red-dark));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
  box-shadow: 0 6px 20px rgba(181, 82, 76, 0.3);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--japanese-red-dark), #6B1E1E);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 28px rgba(181, 82, 76, 0.4);
}

.submit-btn:hover::before {
  left: 100%;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%);
  backdrop-filter: blur(20px);
  color: var(--white);
  padding: 60px 40px;
  text-align: center;
  border-radius: 40px 40px 0 0;
  margin-top: 80px;
  box-shadow: 
    0 -10px 40px rgba(0, 0, 0, 0.2),
    0 -4px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1528164344705-47542687000d?w=1200&q=80') no-repeat center top;
  background-size: cover;
  opacity: 0.15;
  z-index: 0;
  border-radius: 40px 40px 0 0;
  filter: blur(2px);
  pointer-events: none;
}

.footer > * {
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--japanese-red);
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.fade-in {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Stagger animation delays */
.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }
.skill-card:nth-child(4) { animation-delay: 0.4s; }
.skill-card:nth-child(5) { animation-delay: 0.5s; }

.project-card:nth-child(1) { animation-delay: 0.15s; }
.project-card:nth-child(2) { animation-delay: 0.3s; }
.project-card:nth-child(3) { animation-delay: 0.45s; }

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--japanese-red);
  color: white;
}

::-moz-selection {
  background: var(--japanese-red);
  color: white;
}

/* Responsive Design */
@media (max-width: 968px) {
  .hero-content,
  .profile-main {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-name,
  .profile-name {
    font-size: 2.5rem;
  }

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

  .contact-content {
    grid-template-columns: 1fr;
  }

  .section-title,
  .section-heading {
    font-size: 2rem;
  }

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

  .language-toggle {
    top: 20px;
    right: 20px;
    padding: 10px 16px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .profile-avatar {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 60px 20px;
  }

  .hero-name,
  .profile-name {
    font-size: 2rem;
  }

  .hero-role {
    font-size: 1.2rem;
  }

  .about-section,
  .contact-section,
  .cv-section {
    padding: 40px 24px;
    margin: 20px 10px;
  }

  .profile-main {
    padding: 30px 24px;
  }

  .footer-content {
    flex-direction: column;
  }

  .language-toggle {
    top: 16px;
    right: 16px;
    padding: 8px 12px;
    gap: 6px;
  }

  .lang-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .profile-avatar {
    width: 180px;
    height: 180px;
  }
}

