/* ===== Design Tokens ===== */
:root {
  --color-1: #141416;
  --color-2: #23262f;
  --color-3: #353945;
  --color-4: #777e90;
  --color-6: #e6e8ec;
  --color-7: #f4f5f6;
  --color-white: #ffffff;

  --font-heading: 'Josefin Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'DM Sans', sans-serif;

  --header-height: 96px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --radius-full: 999px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
address { font-style: normal; }
a { text-decoration: none; color: inherit; }

/* ===== Keyframes ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInBottom { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Scroll Entrance ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Base ===== */
html, body {
  background: var(--color-white);
  color: var(--color-1);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ===== Page Wrapper ===== */
.about-page {
  background: var(--color-white);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 56px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 331px;
  flex-shrink: 0;
  cursor: pointer;
}

.header-logo {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.header-name {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-1);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-4);
  cursor: pointer;
  transition: color var(--transition-fast);
  user-select: none;
}
.nav-item:hover { color: var(--color-1); }
.nav-item.selected {
  font-weight: 700;
  color: var(--color-1);
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 24px;
  border-radius: var(--radius-full);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  white-space: nowrap;
  border: none;
  outline: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-2);
  color: var(--color-2);
}
.btn-outline:hover { background: var(--color-7); transform: translateY(-1px); }
.btn-filled {
  background: var(--color-2);
  color: var(--color-white);
}
.btn-filled:hover { background: #363b48; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(35,38,47,0.25); }

/* ===== Page Body ===== */
.about-body {
  display: flex;
  padding-top: calc(var(--header-height) + 104px);
  position: relative;
}

/* ===== Left Sidebar ===== */
.about-sidebar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding: 0 56px 56px 56px;
}

.sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 209px;
}

.sidebar-info-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  white-space: nowrap;
}
.sidebar-info-label { font-weight: 700; }

.sidebar-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-photo {
  width: 280px;
  height: 400px;
  object-fit: cover;
  display: block;
  /* Matches Figma: scaleY(-1) rotate(180deg) = horizontal mirror */
  transform: scaleX(-1);
}

/* ===== Right Panel ===== */
.about-right {
  width: 50%;
  margin-left: 50%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 56px;
}

/* ===== Content Column ===== */
.about-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-right: 200px;
  margin-left: -70px;
}

/* ===== Section Label ===== */
.section-label {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--color-4);
  font-weight: 400;
  margin-bottom: 0;
}

/* ===== About Me ===== */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-intro p {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-3);
}

/* ===== Experience ===== */
.section-experience {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exp-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.exp-item {
  list-style: none;
  border-bottom: 1px solid var(--color-6);
  padding: 20px 0;
}

.exp-item-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  cursor: pointer;
}

.exp-item-text {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-item-title {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-3);
  font-weight: 700;
}

.exp-item-date {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  font-style: italic;
}

.exp-expand-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-4);
  border-radius: var(--radius-full);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-fast), transform var(--transition-base);
}
.exp-expand-btn:hover { border-color: var(--color-2); }
.exp-expand-btn svg { transition: transform var(--transition-base); }
.exp-item.open .exp-expand-btn svg { transform: rotate(45deg); }

.exp-item-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding-top 0.35s ease;
  padding-top: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
}
.exp-item.open .exp-item-body {
  max-height: 1000px;
  padding-top: 12px;
}

/* ===== Exp Body List ===== */
.exp-body-list {
  list-style: disc;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-body-list li {
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.15px;
}

.exp-body-list li strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16px;
}

.exp-body-sublist {
  list-style: circle;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-body-link {
  color: #1769ff;
}
.exp-body-link:hover { text-decoration: underline; }

/* ===== Personal Project Sub-sections ===== */
.exp-pp-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.exp-pp-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-pp-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-pp-title {
  font-size: 16px;
  line-height: 24px;
  color: var(--color-3);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.16px;
}

.exp-pp-subtitle {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  font-style: italic;
}

.exp-body-dark {
  color: var(--color-3);
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.15px;
}

/* ===== Skills ===== */
.section-skills {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.skill-group-title {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-3);
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--color-7);
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.tag:hover { background: #e9eaec; color: var(--color-3); }

/* ===== Tools ===== */
.section-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Education ===== */
.section-education {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edu-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edu-item-name {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-3);
  font-weight: 700;
}

.edu-item-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  font-style: italic;
}

.edu-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== Certifications ===== */
.section-certifications {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cert-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-item-name {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16px;
  color: var(--color-3);
  font-weight: 700;
}

.cert-item-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-4);
  font-style: italic;
}

/* ===== Bottom Logo ===== */
.about-logo {
  position: fixed;
  right: 56px;
  bottom: 56px;
  z-index: 10;
  width: 264px;
  height: 292px;
}

.about-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .header { padding: 16px 32px; }
  .header-brand { width: auto; }
  .about-content { padding-right: 80px; margin-left: 0; }
  .about-sidebar { padding: 0 40px 48px 40px; }
  .sidebar-photo { width: 220px; height: 320px; }
  .about-logo { width: 180px; height: 200px; right: 32px; bottom: 32px; }
}

@media (max-width: 767px) {
  .header { padding: 16px 24px; height: 72px; }
  .header-name { display: none; }
  .header-actions { display: none; }
  .about-body {
    flex-direction: column;
    padding-top: calc(72px + 40px);
  }
  .about-sidebar {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    order: 2;
    padding: 32px 24px 48px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
  }
  .sidebar-photo-wrap { display: none; }
  .about-right {
    width: 100%;
    margin-left: 0;
    order: 1;
    padding-bottom: 0;
  }
  .about-content {
    padding-right: 24px;
    padding-left: 24px;
    margin-left: 0;
  }
  .about-logo { display: none; }
}
