:root {
  --bg: #1e1e1e;
  --bg-elevated: #252526;
  --bg-tab: #2d2d2d;
  --bg-tab-active: #1e1e1e;
  --bg-titlebar: #323233;
  --bg-statusbar: #007acc;
  --border: #3c3c3c;
  --text: #d4d4d4;
  --text-dim: #8a8a8a;
  --text-bright: #ffffff;
  --comment: #6a9955;
  --keyword: #569cd6;
  --string: #ce9178;
  --func: #dcdcaa;
  --type: #4ec9b0;
  --var: #9cdcfe;
  --accent: #007acc;
  --accent-bright: #3794ff;
  --sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --activitybar-w: 48px;
  --sidebar-w: 230px;
  --titlebar-h: 32px;
  --tabbar-h: 38px;
  --chrome-h: calc(var(--titlebar-h) + var(--tabbar-h));
  --statusbar-h: 24px;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--comment);
  margin-bottom: 14px;
}

/* ---------- SCROLLBARS ---------- */
.editor,
.explorer {
  scrollbar-color: #4a4a4a transparent;
  scrollbar-width: thin;
}

.editor::-webkit-scrollbar,
.explorer::-webkit-scrollbar {
  width: 10px;
}

.editor::-webkit-scrollbar-thumb,
.explorer::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 6px;
}

.editor::-webkit-scrollbar-track,
.explorer::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- CHROME: TITLEBAR + TABBAR ---------- */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: var(--bg-titlebar);
}

.titlebar {
  height: var(--titlebar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.tl-dots {
  display: flex;
  gap: 7px;
}

.tl-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5a5a5c;
}

.tl-title {
  margin: 0 auto;
  letter-spacing: 0.02em;
}

.tabbar {
  height: var(--tabbar-h);
  display: flex;
  align-items: stretch;
  background: var(--bg-tab);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s;
}

.chrome.scrolled .tabbar {
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.8);
}

.tab-toggle {
  display: none;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  width: 44px;
  cursor: pointer;
}

.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  position: relative;
  transition:
    color 0.2s,
    background 0.2s;
}

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

.tab.active {
  color: var(--text-bright);
  background: var(--bg-tab-active);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1.5px;
  background: var(--accent-bright);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lang-color, var(--text-dim));
  flex-shrink: 0;
  display: inline-block;
}

/* ---------- LANGUAGE COLORS ---------- */
[data-lang="html"] {
  --lang-color: #ff6b57;
}

[data-lang="css"] {
  --lang-color: #b18cff;
}

[data-lang="js"] {
  --lang-color: #f1e05a;
}

[data-lang="react"] {
  --lang-color: #61dafb;
}

[data-lang="flutter"] {
  --lang-color: #54c5f8;
}

[data-lang="java"] {
  --lang-color: #f89820;
}

[data-lang="python"] {
  --lang-color: #ffd43b;
}

[data-lang="node"] {
  --lang-color: #83cd29;
}

[data-lang="c"] {
  --lang-color: #a8b9cc;
}

[data-lang="mysql"] {
  --lang-color: #5dade2;
}

[data-lang="supabase"] {
  --lang-color: #3fcf8e;
}

[data-lang="github"] {
  --lang-color: #d4d4d4;
}

[data-lang="intellij"] {
  --lang-color: #fe315d;
}

[data-lang="vscode"] {
  --lang-color: #3794ff;
}

[data-lang="androidstudio"] {
  --lang-color: #3ddc84;
}

[data-lang="tsx"] {
  --lang-color: #3794ff;
}

[data-lang="json"] {
  --lang-color: #cbcb41;
}

[data-lang="md"] {
  --lang-color: #519aba;
}

[data-lang="velog"] {
  --lang-color: #20c997;
}

[data-lang="instagram"] {
  --lang-color: #e1306c;
}

[data-lang="mail"] {
  --lang-color: #569cd6;
}

[data-lang="ts"] {
  --lang-color: #3178c6;
}

/* ---------- IDE LAYOUT ---------- */
.ide {
  position: fixed;
  top: var(--chrome-h);
  bottom: var(--statusbar-h);
  left: 0;
  right: 0;
  display: flex;
}

.activitybar {
  width: var(--activitybar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
}

.ab-ico {
  font-size: 18px;
  color: var(--text-dim);
  width: 24px;
  text-align: center;
}

.ab-ico.active {
  color: var(--text-bright);
  border-left: 2px solid var(--accent-bright);
  margin-left: -2px;
  padding-left: 2px;
}

.explorer {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 14px 0 24px;
}

.explorer-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0 18px;
  margin-bottom: 10px;
}

.explorer-folder {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  padding: 4px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.caret {
  color: var(--text-dim);
  font-size: 10px;
}

.explorer-files {
  list-style: none;
}

.explorer-files li a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 6px 18px 6px 30px;
  border-left: 2px solid transparent;
  transition:
    background 0.2s,
    color 0.2s;
}

.explorer-files li a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lang-color, var(--text-dim));
  flex-shrink: 0;
}

.explorer-files li a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.explorer-files li a.active {
  background: #2a2d2e;
  color: var(--text-bright);
  border-left-color: var(--accent-bright);
}

.editor {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
}

/* ---------- FILE CARD (shared window chrome) ---------- */
.file-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 48px -30px rgba(0, 0, 0, 0.65);
}

.file-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-tab);
  border-bottom: 1px solid var(--border);
}

.file-card-head .dots {
  display: flex;
  gap: 6px;
}

.file-card-head .dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.file-card-head .dots i:nth-child(1) {
  background: #ff5f56;
}

.file-card-head .dots i:nth-child(2) {
  background: #ffbd2e;
}

.file-card-head .dots i:nth-child(3) {
  background: #27c93f;
}

.file-card-head .fname {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.file-card-body {
  padding: clamp(24px, 4vw, 36px);
}

/* ---------- HERO ---------- */
.hero {
  min-height: calc(100vh - var(--chrome-h) - var(--statusbar-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 40px;
}

.hero h1 {
  font-size: clamp(56px, 14vw, 160px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: var(--text-bright);
}

.hero .role {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.hero .role .ko {
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 700;
  color: var(--text-bright);
}

.hero .role .en {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.hero .tagline {
  margin-top: 18px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text);
  max-width: 560px;
  word-break: keep-all;
}

.hero .file-card {
  margin-top: 36px;
  max-width: 560px;
}

.compile {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}

.compile .gutter {
  display: flex;
  flex-direction: column;
  color: #4d4d4d;
  text-align: right;
  user-select: none;
}

.compile .lines {
  flex: 1;
  min-width: 0;
}

.compile .ln {
  white-space: pre-wrap;
  min-height: 1.9em;
}

.compile .prompt {
  color: var(--comment);
}

.compile .ok {
  color: #8fb97a;
}

.compile .accent {
  color: var(--accent-bright);
}

.compile .cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent-bright);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.scrollcue {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.scrollcue .line {
  width: 46px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scrollcue .line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--accent-bright);
  animation: slide 2.2s ease-in-out infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(280%);
  }
}

/* ---------- SECTION SHELL ---------- */
section.block {
  padding: clamp(64px, 10vw, 112px) 0;
  border-top: 1px solid var(--border);
}

.sec-head {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.sec-head h2 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-bright);
}

.sec-head .sub {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 940px) {
  .about-grid {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

.portrait {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(150deg, #2a2d2e, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-align: center;
  padding: 0 12px;
}

.about-body {
  min-width: 0;
}

.about-body p {
  font-size: clamp(14.5px, 1.6vw, 16px);
  margin-bottom: 16px;
  max-width: 60ch;
  color: var(--text);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.values li {
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--bg-tab);
}

.values li b {
  color: var(--accent-bright);
  font-weight: 500;
}

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

.stack-cell h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 13px 7px 11px;
  background: var(--bg-tab);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lang-color, var(--text));
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lang-color, var(--text-dim));
  flex-shrink: 0;
}

/* ---------- TIMELINE (git log style) ---------- */
.timeline {
  position: relative;
  margin-left: 4px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
  background-image: linear-gradient(var(--border) 60%, transparent 0%);
  background-size: 1px 8px;
}

.tl-item {
  position: relative;
  padding: 0 0 26px 30px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item .node {
  position: absolute;
  left: -4.5px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--text-dim);
}

.tl-item.award .node {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.tl-date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.tl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin: 6px 0 0 -12px;
  padding: 7px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.tl-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hash {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--keyword);
  background: var(--bg-tab);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.tl-row .name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-bright);
}

.tl-row .org {
  font-size: 13px;
  color: var(--text-dim);
}

.tl-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tl-badge.win {
  background: rgba(0, 122, 204, 0.18);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

/* ---------- PROJECTS ---------- */
.proj-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--comment);
  margin: 6px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.proj-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.proj-label:not(:first-of-type) {
  margin-top: 48px;
}

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

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 18px 38px -28px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 56px -28px rgba(0, 0, 0, 0.75);
}

.card .shot {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.cp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-tab);
  border-bottom: 1px solid var(--border);
}

.cp-head i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.cp-head i:nth-child(1) {
  background: #ff5f56;
}

.cp-head i:nth-child(2) {
  background: #ffbd2e;
}

.cp-head i:nth-child(3) {
  background: #27c93f;
}

.cp-head span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.card .shot pre {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.shot-imgs {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.shot-imgs::-webkit-scrollbar {
  display: none;
}

.shot-imgs img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: var(--bg);
  display: block;
}

.card .body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card .pnum {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.card h3 {
  font-size: 21px;
  font-weight: 800;
  margin: 8px 0 4px;
  color: var(--text-bright);
}

.card .stacktags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.card .stacktags span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lang-color, var(--text-dim));
  background: var(--bg-tab);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
}

.card p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}

.proj-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-tab);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.proj-links a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.proj-links a:hover {
  color: var(--text-bright);
  border-color: var(--accent-bright);
  background: var(--bg-tab-active);
}

/* ---------- CONTACT (terminal) ---------- */
.term-body {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
}

.term-row .prompt {
  color: var(--comment);
  margin-right: 8px;
}

.term-row.out {
  color: var(--text-dim);
}

.term-row.out.indent {
  padding-left: 20px;
}

.term-row .v {
  color: var(--string);
}

.term-row .v::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--lang-color, var(--text-dim));
  vertical-align: 1px;
}

.term-row a.v:hover {
  color: var(--accent-bright);
}

.term-row a.v:hover::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lang-color, var(--text-dim)) 35%, transparent);
}

.cursor2 {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent-bright);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

.foot {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* ---------- STATUS BAR ---------- */
.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--statusbar-h);
  background: var(--bg-statusbar);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  z-index: 80;
}

.sb-spacer {
  flex: 1;
}

.sb-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
}

.sb-ok::before {
  content: "";
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .activitybar {
    display: none;
  }

  .explorer {
    display: none;
  }

  .explorer.open {
    display: block;
    position: fixed;
    top: var(--chrome-h);
    bottom: var(--statusbar-h);
    left: 0;
    width: 240px;
    z-index: 95;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.5);
  }

  .tab-toggle {
    display: block;
  }

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

  .portrait {
    max-width: 200px;
  }

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

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

  .sb-item:not(.sb-branch):not(#sbFile) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
