:root {
  --ink-black: #1a1a1a;
  --ink-gray: #2d2d2d;
  --ink-light: #f5f5f5;
  --ink-accent: #4a5568;
  --ink-wash: rgba(74, 85, 104, 0.1);
  --paper-white: #f7fafc;
  --text-primary: #2d2d2d;
  --text-secondary: #666;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@font-face {
  font-family: 'ThuPhap';
  src: url('public/fonts/DL-ThuPhap.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}


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

html {
  scroll-behavior: smooth;
  overflow: hidden;
}

body {
  font-family: 'ThuPhap', 'Noto Serif', serif;
  background: var(--paper-white);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 100vh;
  height: 100vh;
}

/* Language Toggle */
.language-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-family: 'Noto Sans', sans-serif;
}

.lang-btn.active {
  background: #718096;
  color: white;
}

.lang-btn:hover:not(.active) {
  background: rgba(113, 128, 150, 0.1);
  color: #718096;
}

/* Ink Wash Background */
.ink-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: 
    linear-gradient(rgba(247, 250, 252, 0.9), rgba(247, 250, 252, 0.9)),
    url('public/bg.jpg') center/cover no-repeat fixed;
}

#ink-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.ink-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(74, 85, 104, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74, 85, 104, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Main Content */
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 20px 40px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 120px);
  gap: 40px;
}

/* Left Section - Portrait */
.left-section {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeInUp 1.2s ease-out;
}

/* Right Section - Poetry */
.right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeInUp 1.2s ease-out 0.3s both;
}

.portrait-section {
  margin-bottom: 0;
}

.ink-circle {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ink-circle::before {
  content: '';
  position: absolute;
  top: -64px;
  left: -56px;
  width: 350px;
  height: 350px;
  background: url('public/avatar-shape.png') center/contain no-repeat;
  z-index: 2;
  pointer-events: none;
}

.portrait {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  position: relative;
  z-index: 1;
  background: #f0f0f0;
  transition: var(--transition);
  filter: grayscale(10%) contrast(1.1);
}

.portrait:hover {
  transform: scale(1.05);
  filter: grayscale(20%) contrast(1.2);
}

.name {
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 10px;
  position: relative;
}

.name::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: #718096;
  opacity: 0.5;
}

/* Contact Info */
.contact-info {
  margin-top: 20px;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);  text-decoration: none;
}

.contact-icon {
  width: 14px;
  height: 14px;
  margin-right: 10px;
  color: var(--ink-accent);
  opacity: 0.7;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.contact-text {
  text-decoration: none;
  color: var(--text-secondary);

  font-weight: 400;
}

/* Poetry Section */
.poetry-section {
  margin-bottom: 0;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.zen-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: url('public/zen.png') center/contain no-repeat;
  opacity: 0.15;
  animation: zenRotate 60s linear infinite;
  z-index: 0;
}

.poem-container {
  position: relative;
  z-index: 1;

  max-width: 320px;
  width: 320px;
  text-align: center;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.poem-text {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.poem-line {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.poem-line.empty {
  height: 8px;
  margin-bottom: 8px;
}

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

.poem-author {
  position: relative;
  margin-left: auto;
  margin-right: 10px;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.7rem;
  opacity: 0.7;
  text-align: right;
  font-weight: 300;
  align-self: flex-end;
}

/* Connect Section */
.connect-section {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
}

.connect-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.connect-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(74, 85, 104, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.connect-btn svg {
  width: 16px;
  height: 16px;
}

.connect-btn:hover {
  background: #718096;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 85, 104, 0.3);
}

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

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

/* Zen Animation */
@keyframes zenRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    gap: 20px;
    padding: 60px 20px 30px;
    text-align: center;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
  }
  
  .left-section {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .right-section {
    flex: none;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .poetry-section {
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .poem-container {
    max-width: 90vw;
    width: 280px;
    min-height: 280px;
    padding: 40px 20px 20px 20px;
  }
  
  .zen-background {
    width: 500px;
    height: 500px;
  }
  
  .poem-line {
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
  }
  
  .portrait {
    width: 200px;
    height: 200px;
  }
  
  .ink-circle {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
  }
  
  .ink-circle::before {
    top: -57px;
    left: -43px;
    width: 280px;
    height: 280px;
  }
  
  .name {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  
  .contact-info {
    margin-top: 15px;
    width: 100%;
    max-width: 300px;
  }
  
  .contact-item {
    font-size: 0.8rem;
    margin-bottom: 6px;
    justify-content: center;
  }
  
  .contact-icon {
    width: 12px;
    height: 12px;
    margin-right: 8px;
  }
  
  .poem-line {
    font-size: 0.9rem;
  }
  
  .connect-btn {
    width: 30px;
    height: 30px;
  }
  
  .connect-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .language-toggle {
    top: 15px;
    right: 15px;
  }
  
  .connect-section {
    right: 15px;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-x: hidden;
  }
  
  .main-content {
    gap: 15px;
    padding: 50px 15px 20px;
    min-height: 100vh;
    justify-content: center;
  }
  
  .left-section {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
  
  .poem-line {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
  }
  
  .poem-container {
  
    width: 330px;
    min-height: 250px;
    padding: 30px 15px 15px 15px;
  }
  
  .zen-background {
    width: 450px;
    height: 450px;
  }
  
  .portrait {
    width: 200px;
    height: 200px;
  }
  
  .ink-circle {
    width: 200px;
    height: 200px;
    margin-bottom: 15px;
  }
  
  .ink-circle::before {
    top: -46px;
    left: -35px;
    width: 270px;
    height: 270px;
  }
  
  .name {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }
  
  .contact-info {
    margin-top: 12px;
    width: 100%;
    max-width: 280px;
  }
  
  .contact-item {
    font-size: 0.75rem;
    margin-bottom: 5px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .contact-icon {
    width: 11px;
    height: 11px;
    margin-right: 7px;
  }
  
  .connect-section {
    right: 10px;
  }
  
  .connect-btn {
    width: 28px;
    height: 28px;
  }
  
  .connect-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

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