:root {
  --bg-color: #faf9f6;
  --text-main: #000000;
  --text-muted: #555555;
  --border-light: #e8e6e1;
  --font-serif: "Times New Roman", Times, Georgia, serif;
  --max-width: 860px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-main);
}

body {
  font-family: var(--font-serif);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text-main);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.header {
  padding: 2.5rem 0 1.5rem 0;
  background: transparent;
  width: 100%;
}

.header-inner {
  width: 100%;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 680px) {
  .header-inner {
    padding: 0 1.5rem;
  }
}

.header-logo img {
  height: 65px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-portfolio-link {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: all 0.2s ease;
}

.nav-portfolio-link:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.bio-section {
  padding: 1.5rem 0 3.5rem 0;
}

.bio-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 3.5rem;
  align-items: flex-start;
}

@media (max-width: 680px) {
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.avatar-wrapper {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #eee9e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-content h1 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.bio-text {
  font-size: 1.3rem;
  color: var(--text-main);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.social-btn-raw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  transition: opacity 0.2s ease;
}

.social-btn-raw:hover {
  opacity: 0.55;
}

.social-btn-raw svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.social-btn-raw img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.writings-section {
  padding: 1.5rem 0 4rem 0;
  border-top: 1px solid var(--border-light);
}

.projects-feed {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 2rem;
}

.project-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.project-item:last-child {
  border-bottom: none;
}

@media (max-width: 580px) {
  .project-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.project-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-date {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666666;
  padding-top: 0.2rem;
}

.project-left-img {
  max-width: 110px;
  height: auto;
  object-fit: contain;
  margin-top: 0.25rem;
}

.project-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  transition: text-decoration 0.2s ease;
}

.project-item:hover .project-title-text {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-desc {
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: #ffffff;
  color: var(--text-main);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 8px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.modal-header-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.modal-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.modal-body p {
  margin-bottom: 1.25rem;
}

.modal-body h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem 0;
}

.modal-body ul {
  margin-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.modal-btn {
  display: inline-block;
  background-color: var(--text-main);
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.modal-btn:hover {
  opacity: 0.85;
}

.footer {
  margin-top: auto;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

