:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #525252;
  --border: #e5e5e5;
  --accent: #171717;
  --accent-text: #ffffff;
  --hover: #f5f5f5;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --text: #fafafa;
  --text-secondary: #a3a3a3;
  --border: #262626;
  --accent: #fafafa;
  --accent-text: #0a0a0a;
  --hover: #1a1a1a;
}

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

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 2rem;
}

.container {
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 700px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
}

.container.blog-page {
  max-height: none;
  overflow-y: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.back-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--text);
}

.name {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--hover);
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

.section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.section-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

.profile-section {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.profile-image {
  width: 240px;
  height: 240px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.experience-info h3 {
  font-size: 1rem;
  font-weight: 500;
}

.experience-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.experience-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.project-item:hover {
  border-color: var(--text-secondary);
}

.project-info h3 {
  font-size: 0.95rem;
  font-weight: 500;
}

.project-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arrow {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.writing-link {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.writing-link:hover,
.see-all-link:hover {
  color: var(--text);
}

.see-all-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.writing-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.writing-preview-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.writing-preview-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.writing-preview-link:hover {
  background: var(--hover);
}

.writing-preview-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.writing-preview-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.writing-preview-arrow {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-left: 0.75rem;
}

.blog-index {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-index-item {
  border-bottom: 1px solid var(--border);
}

.blog-index-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s;
}

.blog-index-button:hover {
  opacity: 0.7;
}

.blog-index-title {
  font-size: 1rem;
  font-weight: 500;
}

.blog-index-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.blog-post-view {
  animation: fade-in 0.2s ease;
}

.back-to-index {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 2rem;
  padding: 0;
  transition: color 0.15s;
}

.back-to-index:hover {
  color: var(--text);
}

.full-post {
  max-width: 680px;
}

.full-post-header {
  margin-bottom: 1.5rem;
}

.full-post-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.full-post-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.full-post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-full-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 1rem 0;
}

.blog-full-item {
  max-width: 680px;
}

.blog-full-header {
  margin-bottom: 1rem;
}

.blog-full-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-full-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.meta-separator {
  opacity: 0.5;
}

.blog-full-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.contact-section {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
}

.contact-section .contact-list {
  justify-content: center;
}

.contact-list {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.15s;
}

.contact-item:hover {
  opacity: 0.85;
}

footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-top: 1rem;
}

@media (max-width: 768px) {
  html, body {
    overflow: auto;
    height: auto;
  }
  
  body {
    padding: 1.5rem;
    display: block;
  }
  
  .container {
    max-height: none;
    height: auto;
    gap: 2.5rem;
  }
  
  .main-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .profile-section {
    justify-content: center;
  }
  
  .profile-image {
    width: 200px;
    height: 200px;
  }
  
  .blog-full-list {
    gap: 2rem;
  }
  
  .blog-full-header h2 {
    font-size: 1.25rem;
  }
}
