:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --text: #1d2330;
  --muted: #5f6675;
  /* Accent (cloud sky) */
  --primary: #1d9bf0;
  --name-color: #1d9bf0;
  --line: #e3e6ef;
  --shadow: 0 12px 32px rgba(76, 94, 172, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  line-height: 1.65;
  font-size: 15px;
}

body {
  min-height: 100vh;
  padding-bottom: 54px;
}

.hero,
main,
.footer {
  width: min(920px, 88%);
  margin: 0 auto;
}

.hero {
  min-height: 60vh;
  display: grid;
  grid-template-columns: 380px 1fr auto;
  align-items: center;
  gap: 56px;
  padding: 20px 0;
  justify-items: center;
}

.hero__profile {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__content {
  text-align: left;
}

.profile-frame {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  border-radius: 999px;
  padding: 6px;
  background: linear-gradient(145deg, #ffffff, #e6e8ef);
  box-shadow: 0 20px 35px rgba(99, 93, 173, 0.2);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid #f3f4f8;
}

.status-pill {
  position: absolute;
  right: 28px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1fcf63;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(31, 207, 99, 0.35);
}

.eyebrow {
  color: var(--primary);
  letter-spacing: 0.08em;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 10px 0;
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  color: var(--text);
  font-weight: 500;
}

.subtitle {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 8px;
}

.contact-list li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.contact-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 18px;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--name-color);
  text-decoration: underline;
}

a:focus-visible {
  color: var(--name-color);
}

.hero__quick-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 16px;
  text-align: right;
  z-index: 20;
}

.hero__quick-nav a {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.hero__quick-nav a.active,
.hero__quick-nav a:hover {
  color: var(--name-color);
  transform: translateX(-4px);
}

.section {
  margin: 54px 0 0;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.section > h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
}

.section > h2::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--text);
  margin-top: 12px;
}

.intro p {
  line-height: 1.8;
  color: var(--text);
  white-space: pre-line;
}

.stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.stats article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.stats h3 {
  margin: 0;
  color: var(--primary);
}

.stats p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline article {
  border-left: 0;
  padding-left: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

#project .cards {
  grid-template-columns: 1fr;
  gap: 0;
}

#project .dated-item + .dated-item {
  border-top: 1px solid var(--line);
}

.card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.card h3 {
  margin-top: 0;
}

.card p,
.card li {
  color: var(--text);
}

.card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.project-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-item__header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.project-item__links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.project-item__role {
  font-weight: 600;
  color: var(--primary);
}

.project-item__sep {
  color: var(--line);
  user-select: none;
}

.project-item__link {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-item__link:hover {
  color: var(--primary);
  text-decoration: none;
}

.project-item__problems-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 10px 0 4px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.skill-groups article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.skill-groups h3 {
  margin: 0 0 8px;
}

.skill-groups p {
  margin: 0;
  color: var(--text);
}

.simple-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.8;
  color: var(--text);
}

.dated-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: start;
  padding: 14px 0;
}

.dated-item__date {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-size: 0.92rem;
}

.dated-item__body {
  min-width: 0;
  text-align: left;
}

.dated-item__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.dated-item__text {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.dated-item__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.dated-item__list {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.75;
  color: var(--text);
  text-align: left;
}

@media (max-width: 900px) {
  .dated-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 32px auto 0;
  color: var(--muted);
}

.floating-actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
}

.floating-actions button {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.floating-actions button:hover {
  transform: translateY(-1px);
}

.floating-actions img {
  width: 68px;
  height: 68px;
  display: block;
}

body.dark {
  color-scheme: dark;
  --bg: #0f1117;
  --surface: #161a23;
  --surface-soft: #1c2230;
  --text: #ffffff;
  --muted: #ffffff;
  /* Accent (cloud sky) */
  --primary: #63c7ff;
  --name-color: #63c7ff;
  --line: #2a3245;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.print-light {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --text: #1d2330;
  --muted: #5f6675;
  /* Accent (cloud sky) */
  --primary: #1d9bf0;
  --name-color: #1d9bf0;
  --line: #e3e6ef;
  --shadow: 0 12px 32px rgba(76, 94, 172, 0.12);
}

body.dark .profile-frame {
  background: linear-gradient(145deg, #232938, #1a1f2c);
}

body.dark .profile-frame img {
  border-color: #2a3245;
}

body.dark .timeline article {
  border-left-color: #334057;
}

body.dark .hero__quick-nav a {
  color: #d7deef;
}

@media (max-width: 900px) {
  body {
    padding-bottom: 88px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 24px;
    padding-top: 44px;
  }

  .hero__profile {
    justify-content: flex-start;
  }

  .hero__quick-nav {
    display: none;
  }

  .stats,
  .cards,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 0;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
  }
}

@media print {
  .hero,
  main,
  .footer {
    width: 100%;
    margin: 0;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 310px 1fr;
    gap: 28px;
    align-items: center;
    padding: 20px 0 12px;
  }

  .hero__profile {
    justify-content: flex-start;
  }

  .profile-frame {
    width: 210px;
    height: 210px;
  }

  .hero__quick-nav,
  .floating-actions {
    display: none !important;
  }

  .section {
    box-shadow: none;
    break-inside: avoid;
    background: #ffffff;
    border-color: #d8dbe4;
  }

  .stats article,
  .card,
  .skill-groups article {
    background: #ffffff;
    border-color: #d8dbe4;
  }

  .profile-frame,
  .profile-frame img,
  .section,
  .stats article,
  .card,
  .skill-groups article {
    box-shadow: none !important;
  }
}
