:root {
  --bg: #0b0d10;
  --bg-secondary: #101318;
  --surface: #14171c;
  --surface-raised: #191d23;
  --border: #252a32;
  --border-light: #333a45;
  --text: #ffffff;
  --text-soft: #d9dde4;
  --text-muted: #9ca3af;
  --accent: #facc15;
  --accent-hover: #eab308;
  --accent-fill: #facc15;
  --accent-fill-hover: #eab308;
  --accent-ink: #171300;
  --font-sans: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --radius: 16px;
  --header-height: 72px;
  --transition: 240ms ease;
}

html[data-theme="light"] {
  --bg: #f4f5f2;
  --bg-secondary: #e9ebe7;
  --surface: #ffffff;
  --surface-raised: #f8f9f6;
  --border: #d6dad3;
  --border-light: #bfc5bb;
  --text: #17191d;
  --text-soft: #34383f;
  --text-muted: #626a74;
  --accent: #795c00;
  --accent-hover: #5f4800;
  --accent-fill: #facc15;
  --accent-fill-hover: #eab308;
  --accent-ink: #171300;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  transition: color var(--transition), background-color var(--transition);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
pre {
  margin-top: 0;
}

::selection {
  color: var(--accent-ink);
  background: var(--accent-fill);
}

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

.container,
.container-wide {
  width: min(100% - 40px, 1120px);
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

.container-wide {
  width: min(100% - 48px, 1280px);
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  min-height: 44px;
  padding: 9px 16px;
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-radius: 8px;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  color: var(--accent-ink);
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  background: rgba(11, 13, 16, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(11, 13, 16, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: var(--accent-fill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links .nav-contact {
  min-height: 40px;
  padding: 0 17px;
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-radius: 8px;
}

.nav-links .nav-contact:hover,
.nav-links .nav-contact:focus-visible {
  color: var(--accent-ink);
  background: var(--accent-fill-hover);
}

.nav-links .nav-contact::after {
  display: none;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  cursor: pointer;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.theme-icon {
  grid-area: 1 / 1;
  font-size: 1.1rem;
  line-height: 1;
}

.theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

html[data-theme="light"] .theme-icon-moon {
  display: block;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 18px;
  height: 2px;
  display: block;
  margin: auto;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before { top: -6px; }
.menu-toggle-lines::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.section-grid {
  position: relative;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 78% 32%, rgba(250, 204, 21, 0.07), transparent 34%);
  background-size: 48px 48px, 48px 48px, auto;
}

.hero {
  min-height: 760px;
  height: max(760px, 100svh);
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 64px) 0 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: 15%;
  right: -280px;
  border: 1px solid rgba(250, 204, 21, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(250, 204, 21, 0.012), 0 0 0 180px rgba(250, 204, 21, 0.008);
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(48px, 7vw, 112px);
}

.hero-layout > *,
.about-grid > *,
.experience-layout > * {
  min-width: 0;
}

.eyebrow,
.section-index,
.project-category {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.eyebrow span {
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 5.4vw, 5.7rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 span {
  display: inline-block;
  margin-top: 0.24em;
  color: var(--text-muted);
  font-size: 0.56em;
  font-weight: 550;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.87rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: var(--accent-ink);
  background: var(--accent-fill-hover);
  border-color: var(--accent-fill-hover);
}

.button-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-light);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.button-disabled {
  color: #777e88;
  background: #1a1e24;
  border-color: var(--border);
  cursor: not-allowed;
}

.button-disabled:hover {
  color: #777e88;
  transform: none;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 48px;
  color: #6f7783;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--border-light);
  border-radius: 50%;
}

.terminal-wrap {
  min-width: 0;
  perspective: 1200px;
}

.terminal {
  position: relative;
  overflow: hidden;
  background: rgba(16, 19, 24, 0.96);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.33);
  animation: terminal-float 6s ease-in-out infinite;
}

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.025), transparent 70%);
}

.terminal-bar {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  color: #737b87;
  background: #12151a;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i,
.preview-bar > span {
  width: 8px;
  height: 8px;
  display: block;
  background: #414852;
  border-radius: 50%;
}

.window-dots i:first-child { background: #665f33; }
.terminal-status { justify-self: end; color: #7f8b74; }

.terminal-code {
  min-height: 400px;
  margin: 0;
  padding: 28px clamp(20px, 3vw, 36px) 32px;
  color: #c2c8d0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.05vw, 0.82rem);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-comment { color: #646c76; }
.code-keyword, .code-prompt { color: var(--accent); }
.code-variable { color: #c7a7ff; }
.code-property { color: #7cb7ff; }
.code-string { color: #a8c98d; }
.cursor { width: 8px; height: 1.15em; display: inline-block; margin-left: 5px; vertical-align: -0.18em; background: var(--accent-fill); animation: blink 1s steps(1) infinite; }

.scroll-cue {
  position: absolute;
  bottom: 25px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #68707b;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue:hover { color: var(--accent); }
.scroll-cue span { width: 1px; height: 28px; display: block; background: linear-gradient(var(--accent), transparent); }

.section {
  position: relative;
  padding: clamp(88px, 10vw, 140px) 0;
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 58px;
}

.section-heading .section-index {
  margin-bottom: 17px;
}

.section-heading h2,
.blog-card h2,
.contact-inner h2,
.github-cta h2 {
  margin-bottom: 20px;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  font-weight: 720;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.section-heading > p:last-child,
.section-heading-row > p,
.blog-card p,
.contact-inner > p,
.github-cta-inner > div:last-child p {
  color: var(--text-muted);
}

.section-heading-row {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.section-heading-row > p {
  max-width: 420px;
  margin-bottom: 11px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(50px, 9vw, 120px);
  align-items: start;
}

.about-copy {
  color: var(--text-muted);
}

.about-copy p {
  margin-bottom: 20px;
}

.about-copy .lead-copy {
  margin-bottom: 26px;
  color: var(--text);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 550;
  line-height: 1.5;
}

.info-card {
  margin-bottom: 0;
  padding: 8px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-card > div {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.info-card > div:last-child { border-bottom: 0; }
.info-card dt { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.info-card dd { margin: 0; color: var(--text); font-weight: 650; text-align: right; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; background: var(--accent-fill); border-radius: 50%; box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.08); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.skill-card {
  position: relative;
  min-height: 220px;
  grid-column: span 2;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.skill-card:nth-child(4),
.skill-card:nth-child(5) {
  grid-column: span 3;
}

.skill-card:hover {
  background: var(--surface-raised);
  border-color: rgba(250, 204, 21, 0.75);
  transform: translateY(-4px);
}

.skill-card h3 {
  margin: 30px 0 24px;
  font-size: 1.18rem;
}

.skill-number {
  position: absolute;
  top: 22px;
  right: 24px;
  color: #555d68;
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

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

.skill-tags span,
.project-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  transition: color var(--transition), border-color var(--transition);
}

.skill-card:hover .skill-tags span { border-color: #555b39; }
.skill-tags span:hover { color: var(--accent); border-color: var(--accent) !important; }

.project-group + .project-group {
  margin-top: 82px;
}

.project-group-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.project-group-heading h3 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.project-group-heading span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

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

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

.project-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.18);
  transform: translateY(-5px);
}

.project-preview {
  min-height: 235px;
  margin: 14px 14px 0;
  overflow: hidden;
  background: #20252c;
  border: 1px solid #303741;
  border-radius: 10px;
}

.preview-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: #171b20;
  border-bottom: 1px solid #303741;
}

.preview-bar > span { width: 6px; height: 6px; }
.preview-bar > span:first-child { background: var(--accent-fill); }
.preview-bar small { margin-left: auto; color: #646d79; font-family: var(--font-mono); font-size: 0.54rem; }

.preview-content {
  position: relative;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.preview-content::before,
.preview-content::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.preview-content::before { width: 160px; height: 160px; right: -65px; bottom: -65px; border-radius: 50%; }
.preview-content::after { width: 100px; height: 1px; right: 22px; top: 45px; border-width: 1px 0 0; transform: rotate(-35deg); }
.preview-label { margin-bottom: 13px; color: var(--accent); font-family: var(--font-mono); font-size: 0.57rem; letter-spacing: 0.13em; }
.preview-content strong { position: relative; z-index: 1; color: #edf0f4; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.06; letter-spacing: -0.04em; }
.preview-content i { width: 38px; height: 3px; margin-top: 20px; background: var(--accent-fill); }
.preview-spa { background: #25241f; }
.preview-spa .preview-content::before { border-radius: 0; transform: rotate(18deg); }
.preview-data { background: #18242a; }
.preview-data .preview-content { background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 24px 24px; }

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.project-category {
  margin-bottom: 10px;
  font-size: 0.64rem;
}

.project-body h4 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.project-body > p:not(.project-category) {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.project-tags {
  margin-top: auto;
  margin-bottom: 22px;
}

.project-tags span {
  min-height: 26px;
  padding: 2px 9px;
  color: #afb5be;
  background: transparent;
  font-size: 0.61rem;
}

.project-actions {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.project-actions a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-actions a:hover,
.project-actions a:focus-visible { color: var(--accent); }
.action-disabled { color: #656c76; font-family: var(--font-mono); font-size: 0.7rem; }

.compact-card,
.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.project-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 24px 0 24px 24px;
  color: var(--accent);
  background: #1c2026;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 750;
}

.app-visual {
  width: 180px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 25px;
  color: #8b939f;
  background: #1b2027;
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.6;
  text-align: center;
}

.app-visual-quiz { background: #22221b; }
.app-device { width: 76px; height: 132px; display: grid; place-items: center; border: 2px solid #464e59; border-radius: 16px; box-shadow: inset 0 0 0 5px #13161a; }
.app-device::before { content: ""; position: absolute; width: 22px; height: 3px; margin-top: -116px; background: #414852; border-radius: 3px; }
.app-device i { width: 42px; height: 42px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent-fill); border-radius: 11px; font-style: normal; font-weight: 800; }
.multi-actions { gap: 8px; }
.multi-actions a { min-height: 36px; padding: 4px 11px; border: 1px solid var(--border-light); border-radius: 7px; }
.multi-actions a:hover { border-color: var(--accent); }

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(50px, 8vw, 100px);
  align-items: start;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 34px;
  padding: 0 0 48px 30px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--accent-fill);
  border: 3px solid var(--bg-secondary);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline li::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--border-light);
}

.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline-time { margin: 0; color: var(--accent); font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0em; }
.timeline h3 { margin-bottom: 6px; font-size: 1.08rem; }
.timeline div p { margin-bottom: 0; color: var(--text-muted); font-size: 0.86rem; }

.journey-card {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.journey-card ol { margin: 25px 0 0; padding: 0; counter-reset: path; list-style: none; }
.journey-card li { position: relative; min-height: 55px; display: flex; align-items: start; padding-left: 44px; color: var(--text-soft); font-size: 0.86rem; }
.journey-card li::before { counter-increment: path; content: "0" counter(path); position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); font-size: 0.65rem; }
.journey-card li::after { content: "↓"; position: absolute; bottom: 9px; left: 6px; color: #555c66; font-size: 0.75rem; }
.journey-card li:last-child { min-height: 20px; }
.journey-card li:last-child::after { display: none; }

.github-cta {
  padding: clamp(85px, 10vw, 130px) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.github-cta-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}

.github-cta h2 { margin: 14px 0 0; }
.github-cta h2 span,
.contact-inner h2 span { color: var(--accent); }
.github-cta-inner > div:last-child { padding-bottom: 8px; text-align: right; }
.github-cta-inner > div:last-child p { margin-bottom: 20px; }
.github-buttons { justify-content: flex-end; }

.blog-card {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: clamp(50px, 8vw, 100px);
  padding: clamp(34px, 6vw, 72px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.blog-card h2 { margin-top: 16px; font-size: clamp(2rem, 4.4vw, 3.8rem); }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; margin-top: 15px; color: var(--accent); font-size: 0.86rem; font-weight: 750; }
.text-link:hover { color: var(--accent-hover); }
.blog-card ul { margin: 0; padding: 0; list-style: none; }
.blog-card li { min-height: 76px; display: flex; align-items: center; gap: 20px; color: var(--text-soft); border-bottom: 1px solid var(--border); }
.blog-card li:first-child { border-top: 1px solid var(--border); }
.blog-card li span { color: var(--accent); font-family: var(--font-mono); font-size: 0.63rem; }

.contact-section {
  text-align: center;
  background-image: radial-gradient(circle at 50% 62%, rgba(250, 204, 21, 0.07), transparent 34%);
}

.contact-inner { max-width: 760px; }
.contact-inner h2 { margin-top: 20px; font-size: clamp(3.3rem, 8vw, 7.2rem); }
.contact-inner > p { max-width: 600px; margin: 0 auto 32px; }
.contact-inner .button-group { justify-content: center; }

.site-footer {
  padding: 34px 0;
  color: var(--text-muted);
  background: #080a0d;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p { margin-bottom: 3px; color: var(--text); font-size: 0.82rem; font-weight: 700; }
.footer-inner span { font-family: var(--font-mono); font-size: 0.65rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-inner a { min-height: 44px; display: inline-flex; align-items: center; font-size: 0.75rem; }
.footer-inner a:hover { color: var(--accent); }

.modal-backdrop.show { opacity: 0.78; }
.modal-dialog { width: min(92vw, 520px); margin-inline: auto; }
.modal-content { color: var(--text); background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: 0 25px 80px rgba(0,0,0,.5); }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-header { align-items: center; padding: 18px 22px; }
.modal-title { margin: 0; font-size: 1.08rem; }
.modal-header .close { min-width: 44px; min-height: 44px; margin: -10px -10px -10px auto; padding: 0; color: var(--text); text-shadow: none; opacity: .72; }
.modal-header .close:hover { color: var(--accent); opacity: 1; }
.modal-body { padding: 28px; }
.modal-body img { max-height: 55vh; margin: auto; border-radius: 8px; }
.listing-note { margin: 18px 0 0; color: var(--text-muted); font-size: .8rem; }
.modal-footer { gap: 8px; padding: 16px 22px; }

html[data-theme="light"] .site-header {
  background: rgba(244, 245, 242, 0.78);
  border-bottom-color: rgba(23, 25, 29, 0.09);
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(244, 245, 242, 0.96);
  box-shadow: 0 10px 30px rgba(30, 35, 28, 0.09);
}

html[data-theme="light"] .theme-toggle {
  background: rgba(23, 25, 29, 0.025);
}

html[data-theme="light"] .section-grid {
  background-image:
    linear-gradient(rgba(23, 25, 29, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 29, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 78% 32%, rgba(250, 204, 21, 0.15), transparent 34%);
}

html[data-theme="light"] .hero-meta,
html[data-theme="light"] .scroll-cue {
  color: #6d746e;
}

html[data-theme="light"] .terminal {
  border-color: #343b45;
  box-shadow: 0 28px 70px rgba(43, 47, 40, 0.18);
}

html[data-theme="light"] .code-keyword,
html[data-theme="light"] .code-prompt,
html[data-theme="light"] .preview-label,
html[data-theme="light"] .project-icon {
  color: var(--accent-fill);
}

html[data-theme="light"] .skill-tags span,
html[data-theme="light"] .project-tags span {
  background: rgba(23, 25, 29, 0.025);
}

html[data-theme="light"] .project-card {
  box-shadow: 0 18px 40px rgba(43, 47, 40, 0.07);
}

html[data-theme="light"] .project-card:hover {
  box-shadow: 0 22px 46px rgba(43, 47, 40, 0.13);
}

html[data-theme="light"] .site-footer {
  color: var(--text-muted);
  background: #e3e5e0;
}

html[data-theme="light"] .footer-inner p {
  color: var(--text);
}

html[data-theme="light"] .modal-backdrop.show {
  opacity: 0.58;
}

html[data-theme="light"] .modal-header .close {
  color: var(--text);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes terminal-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (max-width: 1199.98px) {
  .container-wide { width: min(100% - 40px, 1040px); }
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); gap: 48px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid .project-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 10px); }
  .project-grid-two .project-card:last-child:nth-child(odd) { max-width: none; }
}

@media (max-width: 991.98px) {
  .nav-actions { gap: 8px; }
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    display: block;
    padding: 0 24px;
    background: rgba(11, 13, 16, 0.98);
    border-bottom: 1px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: max-height 360ms ease, padding 360ms ease, opacity var(--transition), visibility var(--transition), border-color var(--transition);
  }
  .nav-links.is-open { max-height: calc(100vh - var(--header-height)); padding-top: 16px; padding-bottom: 24px; border-color: var(--border); opacity: 1; visibility: visible; }
  .nav-links a { min-height: 52px; display: flex; border-bottom: 1px solid rgba(255,255,255,.04); }
  .nav-links .nav-contact { justify-content: center; margin-top: 14px; border: 0; }
  .nav-links a::after { display: none; }
  html[data-theme="light"] .nav-links {
    background: rgba(244, 245, 242, 0.99);
  }
  html[data-theme="light"] .nav-links a {
    border-bottom-color: rgba(23, 25, 29, 0.07);
  }
  .hero { height: auto; min-height: 0; padding-top: calc(var(--header-height) + 90px); }
  .hero-layout { grid-template-columns: 1fr; gap: 70px; }
  .hero-copy { max-width: 780px; }
  .terminal-wrap { max-width: 680px; }
  .scroll-cue { display: none; }
  .about-grid { gap: 50px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-card, .skill-card:nth-child(4), .skill-card:nth-child(5) { grid-column: span 1; }
  .skill-card:last-child { grid-column: 1 / -1; }
  .experience-layout { grid-template-columns: 1fr 280px; gap: 50px; }
  .timeline li { grid-template-columns: 125px minmax(0, 1fr); gap: 22px; }
  .app-card { grid-template-columns: 145px minmax(0, 1fr); }
  .app-visual { width: 145px; padding-inline: 16px; }
  .github-cta-inner { align-items: center; }
}

@media (max-width: 767.98px) {
  :root { --header-height: 66px; }
  .container, .container-wide { width: min(100% - 32px, 680px); }
  .hero { padding-top: calc(var(--header-height) + 70px); padding-bottom: 70px; }
  .hero::before { display: none; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.5rem); }
  .hero h1 span { max-width: 100%; font-size: .46em; line-height: 1.25; }
  .hero-meta { flex-direction: column; gap: 7px; margin-top: 35px; }
  .terminal-code { min-height: 0; padding: 22px 17px 26px; font-size: clamp(.61rem, 2.65vw, .76rem); line-height: 1.72; }
  .terminal-bar { grid-template-columns: auto 1fr; gap: 14px; }
  .terminal-bar > span:nth-child(2) { text-align: right; }
  .terminal-status { display: none; }
  .section { padding: 88px 0; }
  .section-heading { margin-bottom: 42px; }
  .section-heading-row { display: block; }
  .section-heading-row > p { margin-top: 20px; }
  .about-grid, .blog-card { grid-template-columns: 1fr; }
  .info-card { padding-inline: 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card, .skill-card:nth-child(4), .skill-card:nth-child(5), .skill-card:last-child { grid-column: 1; min-height: 190px; }
  .project-grid, .project-grid-two { grid-template-columns: 1fr; }
  .project-grid .project-card:last-child:nth-child(odd) { grid-column: auto; max-width: none; }
  .project-group + .project-group { margin-top: 64px; }
  .project-preview { min-height: 215px; }
  .preview-content { height: 180px; }
  .compact-card { grid-template-columns: auto minmax(0, 1fr); }
  .app-card { grid-template-columns: 1fr; }
  .app-visual { width: auto; min-height: 250px; border-right: 0; border-bottom: 1px solid var(--border); }
  .experience-layout { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 7px; padding-left: 28px; }
  .journey-card { position: static; }
  .github-cta-inner { display: block; }
  .github-cta-inner > div:last-child { margin-top: 38px; text-align: left; }
  .github-buttons { justify-content: flex-start; }
  .blog-card { padding: 30px 24px; }
  .contact-inner h2 { font-size: clamp(3rem, 16vw, 5.5rem); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .modal-footer .button { width: 100%; }
}

@media (max-width: 479.98px) {
  .brand { font-size: .72rem; letter-spacing: .12em; }
  .brand-mark { width: 32px; height: 32px; }
  .button-group .button { width: 100%; }
  .hero h1 { letter-spacing: -.055em; }
  .hero-layout { gap: 54px; }
  .terminal { margin-inline: -4px; }
  .terminal-code { font-size: .59rem; }
  .project-group-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .compact-card { grid-template-columns: 1fr; }
  .project-icon { margin-bottom: 0; }
  .project-actions { align-items: stretch; }
  .multi-actions a { min-height: 44px; justify-content: center; }
  .info-card > div { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 0; }
  .info-card dd { text-align: left; }
  .footer-inner nav { gap: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
