/* Minsoo Son — shared stylesheet
   Aesthetic: warm graphite lab notebook. Wide spacing, hairlines, mono only for tags. */

:root {
  --bg:        #15140f;
  --bg-2:      #1b1a14;       /* subtle band for tools/surfaces strip */
  --fg:        #e8e3d6;       /* warm off-white */
  --fg-soft:   #c8c2b3;
  --muted:     #7a766c;
  --rule:      #2a2823;
  --rule-2:    #3a3730;
  --accent:    #b87333;       /* oxidized copper */
  --accent-d:  #8a5524;

  --font-sans-en: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans-ko: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
                  system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
                  Menlo, Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[lang^="en"] body { font-family: var(--font-sans-en); }
html[lang^="ko"] body { font-family: var(--font-sans-ko); letter-spacing: -0.005em; }

/* ---------- Layout ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 6.5rem 1.75rem 5rem;
  animation: fadein 500ms ease-out both;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}

section { margin: 4.5rem 0 0; }
section:first-of-type { margin-top: 0; }

/* ---------- Type ---------- */
h1 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.hero {
  font-size: 1.75rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 0 0 1.5rem;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

html[lang^="ko"] .hero { font-weight: 500; letter-spacing: -0.02em; }

.hero-sub {
  color: var(--fg-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  transform: translateY(-0.25em);
}

h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1rem; max-width: 64ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede p { color: var(--fg-soft); }

/* ---------- Identity block ---------- */
.identity {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.identity .name {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.identity .role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Achievements ---------- */
.achievements {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.achievements li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}

.achievements li:last-child { border-bottom: 1px solid var(--rule); }

.achievements .year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.achievements .body { color: var(--fg); }

.achievements .body .meta {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.15rem;
}

/* ---------- What I work on (compact tag grid) ---------- */
.surfaces {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 1.5rem;
}

.surfaces li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-soft);
  letter-spacing: 0.01em;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

html[lang^="ko"] .surfaces li {
  font-family: var(--font-sans-ko);
  font-size: 0.92rem;
  letter-spacing: -0.005em;
}

/* ---------- Selected work entries ---------- */
.work {
  display: flex;
  flex-direction: column;
}

.work-item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem;
}

.work-item:last-child { border-bottom: 1px solid var(--rule); }

.work-item .num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 0.25rem;
}

.work-item h2 { margin: 0 0 0.4rem; }

.work-item .desc {
  color: var(--fg-soft);
  margin: 0 0 0.9rem;
}

.work-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.work-item ul li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--fg-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.work-item ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.55rem;
  height: 1px;
  background: var(--accent-d);
}

/* ---------- Tools / surfaces — flowing tag string ---------- */
.tags {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-soft);
  line-height: 2.1;
  letter-spacing: 0.01em;
}

html[lang^="ko"] .tags { font-size: 0.85rem; }

.tags .tag {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  margin: 0 0.25rem 0.35rem 0;
  border: 1px solid var(--rule-2);
  border-radius: 1px;
  color: var(--fg-soft);
}

/* ---------- Notes ---------- */
.notes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notes li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  color: var(--fg-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.notes li:last-child { border-bottom: 1px solid var(--rule); }

.notes .date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.notes .draft {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.5rem;
  letter-spacing: 0.06em;
}

/* ---------- Contact ---------- */
.contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.contact li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}

.contact li:last-child { border-bottom: 1px solid var(--rule); }

.contact .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- Links ---------- */
a {
  color: var(--fg);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: color 180ms ease, background-size 180ms ease;
}

a:hover, a:focus-visible {
  color: var(--accent);
}

a:focus-visible {
  outline: 1px dotted var(--accent);
  outline-offset: 3px;
}

/* The single ornamental detail: a thin copper tick before the hero. */
.hero-mark {
  display: inline-block;
  width: 1.25rem;
  height: 1px;
  background: var(--accent);
  vertical-align: 0.4em;
  margin-right: 0.6rem;
}

/* ---------- Language switcher ---------- */
.lang-switch {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--bg);
  padding: 0.25rem 0.1rem;
}

.lang-switch a {
  color: var(--muted);
  background: none;
  padding: 0;
}

.lang-switch a:hover { color: var(--fg); }

.lang-switch .current {
  color: var(--fg);
}

.lang-switch .sep {
  color: var(--rule-2);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

footer p { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  main { padding: 5rem 1.25rem 4rem; }
  .hero { font-size: 1.5rem; }
  .surfaces { grid-template-columns: 1fr; }
  .achievements li,
  .work-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .achievements .year, .work-item .num { font-size: 0.72rem; }
  .contact li { grid-template-columns: 4rem 1fr; }
  .lang-switch { top: 1rem; right: 1rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent-d);
  color: var(--fg);
}
