:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b23;
  --panel-soft: #10161f;
  --ink: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --accent: #2f81f7;
  --accent-strong: #58a6ff;
  --green: #3fb950;
  --shadow: 0 24px 70px rgba(1, 4, 9, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 82% 12%, rgba(47, 129, 247, 0.18), transparent 26rem),
    var(--bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(13, 17, 23, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand::before {
  content: ">";
  color: var(--green);
}

.top-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  scrollbar-width: none;
}

.top-tabs::-webkit-scrollbar {
  display: none;
}

.top-tabs a {
  min-width: 62px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.top-tabs a:hover,
.top-tabs a.active {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(47, 129, 247, 0.14);
  color: var(--accent-strong);
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0 80px;
}

.page-section {
  scroll-margin-top: 88px;
  padding: 128px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.72);
}

.page-section:last-child {
  border-bottom: 0;
}

.profile-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 150px);
  padding-top: 28px;
  padding-bottom: 70px;
}

.profile-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  aspect-ratio: 1.08;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    var(--panel);
  box-shadow: var(--shadow);
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 78px;
  font-weight: 800;
}

.profile-photo::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff7b72;
  box-shadow: 18px 0 #f2cc60, 36px 0 var(--green);
}

.profile-photo::after {
  content: "student.profile";
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.intro {
  max-width: 760px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(42px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.3;
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.subtitle {
  margin-bottom: 22px;
  color: var(--accent-strong);
  font-size: 19px;
  font-weight: 800;
}

.summary,
.page-title p,
.panel p,
.info-list,
.link-list {
  color: var(--muted);
  font-size: 16px;
}

.summary {
  max-width: 680px;
}

.quick-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.quick-links a,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.quick-links a:hover,
.text-button:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.quick-links a:nth-child(2),
.text-button {
  background: rgba(47, 129, 247, 0.12);
  color: var(--accent-strong);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 27, 35, 0.76);
}

.stat-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.stat-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.section-block {
  margin-bottom: 28px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.section-heading > p:last-child {
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--muted);
}

.section-lead {
  font-size: 18px;
}

.subheading {
  margin-top: 34px;
  margin-bottom: 16px;
}

.subheading h3 {
  font-size: 25px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 46px),
    var(--panel-soft);
  box-shadow: 0 12px 34px rgba(1, 4, 9, 0.18);
}

.panel:hover {
  border-color: rgba(88, 166, 255, 0.42);
}

.panel.wide {
  grid-column: span 2;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.project-card p {
  margin-bottom: 0;
}

.project-card .text-button {
  align-self: flex-start;
  margin-top: auto;
}

.featured-card {
  border-color: rgba(88, 166, 255, 0.48);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-card .card-actions .text-button {
  margin-top: 0;
}

.text-button.secondary {
  background: var(--panel);
  color: var(--ink);
}

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

.repo-name {
  color: var(--accent-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 800;
}

.repo-language {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.repo-language.python {
  background: rgba(242, 204, 96, 0.13);
  color: #f2cc60;
}

.repo-language.cpp {
  background: rgba(255, 123, 114, 0.13);
  color: #ff7b72;
}

.repo-language.web {
  background: rgba(88, 166, 255, 0.13);
  color: var(--accent-strong);
}

.tag-list,
.link-list,
.note-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.note-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.note-list li {
  position: relative;
  padding-left: 18px;
}

.note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.tag-list li {
  padding: 7px 11px;
  border: 1px solid rgba(63, 185, 80, 0.32);
  border-radius: 6px;
  background: rgba(63, 185, 80, 0.09);
  color: #7ee787;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.page {
  padding-top: 72px;
}

.page-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.page-title h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.stack {
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list dt {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

.about-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-grid .panel:first-child {
  grid-row: span 2;
}

.interest-grid .panel,
.web-section-grid .panel {
  height: 100%;
}

.detail-panel,
.implementation-panel {
  padding: clamp(24px, 4vw, 38px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.implementation-panel {
  margin-top: 16px;
}

.implementation-panel h3 {
  margin-bottom: 22px;
  font-size: 24px;
}

.tech-line {
  display: flex;
  gap: 18px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tech-line strong {
  flex: 0 0 auto;
  color: var(--green);
}

.tech-line span,
.learning-note {
  color: var(--muted);
}

.learning-note {
  margin: 18px 0 22px;
}

.learning-note strong {
  color: var(--ink);
}

.career-route {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.career-route li {
  position: relative;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.career-route li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -13px;
  z-index: 1;
  color: var(--accent-strong);
  transform: translateY(-50%);
}

.career-route li > span {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.career-route strong {
  display: block;
  line-height: 1.4;
}

.career-route p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.career-tags {
  margin-top: 24px;
}

.contact-section {
  min-height: 62vh;
}

.contact-section .section-heading {
  margin-bottom: 42px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 860px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  text-decoration: none;
}

.contact-card .panel-label {
  display: block;
  margin: 0;
}

.contact-card strong {
  display: block;
  color: var(--accent-strong);
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

a:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-list a {
  color: var(--accent-strong);
  font-weight: 800;
}

.note-list a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.note-list a:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .site-header {
    gap: 12px;
    padding-inline: 18px;
  }

  .top-tabs {
    flex: 1 1 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
  }

  .top-tabs a {
    flex: 0 0 auto;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 12px;
  }

  .profile-photo {
    width: 210px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .about-grid .panel:first-child {
    grid-row: auto;
  }

  .stats-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }

  .detail-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }

  .career-route {
    grid-template-columns: 1fr;
  }

  .career-route li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: auto;
    bottom: -17px;
    left: 28px;
    transform: none;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 28px, 1120px);
    padding-top: 34px;
  }

  .site-header {
    padding: 10px 14px;
  }

  .brand {
    display: none;
  }

  .top-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    gap: 2px;
    overflow: visible;
  }

  .top-tabs a {
    min-width: auto;
    padding: 7px 2px;
    font-size: 11px;
    white-space: nowrap;
  }

  .panel {
    padding: 22px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page-section {
    padding: 84px 0;
  }

  .profile-hero {
    padding-top: 20px;
  }

  .profile-photo {
    width: 180px;
  }

  .tech-line {
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
