@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&family=Song+Myung&display=swap');

:root {
  --bg-color: #f4f3ec; /* Warm off-white (Grayish/Yellowish) */
  --text-color: #000000; /* Pitch black */
  --point-color: #9a0000; /* Blood-red */
  --font-serif: 'Nanum Myeongjo', 'Song Myung', serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-serif);
  line-height: 1.8;
  overflow-x: hidden;
  word-break: keep-all;
  white-space: pre-wrap; /* Preserve spaces in text */
}

[contenteditable="true"] {
  outline: none;
  white-space: pre-wrap;
}

section {
  min-height: 80vh; /* Consistent size for better vertical symmetry */
  padding: 80px 50px; /* Increased padding for breathing room */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.05em;
}

/* Page 1: Hero Section */
.hero-content {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(5px);
  animation: fadeIn 3s forwards ease-out;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.slogan {
  font-size: 3rem;
  margin-bottom: 2rem;
  position: relative;
}

.keywords {
  margin-bottom: 3rem;
  font-size: 1.2rem;
  color: var(--point-color);
}

.keywords span {
  margin: 0 10px;
}

.profile-img-container {
  width: 300px;
  max-width: 80vw;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 1.5rem auto;
  border: 1px solid var(--text-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: sepia(0.5) contrast(1.1);
  transition: all 0.5s;
  position: relative;
}

.profile-img-container:hover {
  filter: grayscale(1);
}

.profile-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This fills the 1:1 square; centered by default. */
  display: block;
}

/* Page 2: Skills & Stats */
.skills-container {
  width: 95%; /* Increased width for more horizontal space */
  max-width: 900px; /* Increased from 800px to prevent wrapping */
  text-align: center;
}

.typewriter-item {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  list-style: none;
}

.typewriter-item.active {
  opacity: 1;
  visibility: visible;
}

/* Stats Row Layout */
.stats-list-container {
  width: 100%;
}

.stats-row {
  display: flex;
  margin-bottom: 1rem;
  border-bottom: 0.5px solid rgba(46, 46, 46, 0.1);
  padding-bottom: 0.3rem;
  align-items: baseline;
  white-space: nowrap; /* Ensure one line */
}

.stats-year {
  flex: 0 0 200px; /* FIXED WIDTH for consistent alignment of the border-right */
  font-weight: 800;
  color: var(--point-color);
  text-align: right; /* Content grows to the left, sticking to the line */
  border-right: 1.5px solid var(--text-color);
  margin-right: 15px;
  padding-right: 10px;
}

.stats-content {
  flex: 1;
  text-align: left;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis; /* Optional: if it still overflows */
  white-space: nowrap !important; /* Force to be on one line, ignore source newlines */
}

.skill-name {
  color: var(--point-color);
  font-weight: 800;
}

.stats-list {
  margin-top: 3rem;
  font-style: italic;
  font-size: 1.1rem;
  padding: 20px;
  border-top: 1px solid var(--point-color);
  border-bottom: 1px solid var(--point-color);
  display: inline-block;
}

/* Page 3: Vision (Manuscript Paper) */
.vision-section {
  background-color: var(--bg-color); /* Uniform background */
}

.vision-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--point-color);
  white-space: nowrap !important; /* Permanently fix multi-line issues */
}

.vision-body {
  max-width: 700px;
  font-size: 1.3rem;
  line-height: 2.2;
  text-align: center; /* Changed from justify for symmetry */
  margin: 0 auto;
}

.drawing-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.grid-line {
  stroke: var(--point-color);
  stroke-width: 0.5;
  opacity: 0.2;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

.grid-line.draw {
  animation: drawLine 4s forwards ease-in-out;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Page 4: Contact (Post) */
.contact-item {
  margin: 1rem 0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 20px;
  transition: all 0.5s;
  position: relative;
  display: inline-block;
  z-index: 1;
  border: 1px solid transparent;
}

.seal-effect::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(166, 58, 45, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
  z-index: -1;
}

.contact-item:hover::before {
  width: 150px;
  height: 150px;
}

.closing {
  margin-top: 5rem;
  font-size: 1.2rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .slogan { font-size: 2rem; }
  section { padding: 50px 20px; }
}
