:root {
  --bg: #f4f1ea;
  --surface: #fbfaf7;
  --surface-strong: #e7eee9;
  --text-main: #1e2925;
  --text-muted: #5d6963;
  --text-dim: #87918b;
  --border: #d5dcd6;
  --border-strong: #1e2925;
  --accent: #e76f51;
  --accent-soft: #f3c7b7;
  --code-bg: #e6ebe7;
  --mono: "IBM Plex Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Space Grotesk", "Inter", sans-serif;
  --max-w: 1080px;
}

[data-theme="dark"] {
  --bg: #17201d;
  --surface: #202b27;
  --surface-strong: #263833;
  --text-main: #f0f3ed;
  --text-muted: #b1beb6;
  --text-dim: #7d8c83;
  --border: #354640;
  --border-strong: #f0f3ed;
  --accent: #f08b6f;
  --accent-soft: #6e4036;
  --code-bg: #2c3a35;
}

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

html {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-main);
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  font-size: 15px;
  line-height: 1.6;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-location,
.section-tag,
.skill-category,
.contact-entry .label,
.meta-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.site-nav a,
.theme-toggle {
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.nav-cv-link {
  color: var(--text-main) !important;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.theme-toggle,
.copy-trigger {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.theme-toggle {
  width: 30px;
  height: 28px;
  padding: 0;
  line-height: 1;
}

.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle svg circle {
  fill: currentColor;
  stroke: none;
}

.theme-toggle:hover,
.copy-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px 96px;
}

.hero-section {
  padding: 76px 0 70px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.35fr);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
}

.hero-media {
  width: 100%;
  max-width: 310px;
  justify-self: end;
}

.photo-frame {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  position: relative;
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--accent-soft);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--text-dim);
}

.hero-intro {
  max-width: 600px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  background: #3b9b69;
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, #3b9b69 18%, transparent);
}

.hero-name {
  max-width: 8ch;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  font-weight: 700;
}

.hero-role {
  margin-top: 18px;
  color: var(--accent);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
}

.hero-statement {
  max-width: 590px;
  margin: 18px 0 26px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.action-btn {
  border: 1px solid var(--border-strong);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 500;
}

.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.action-primary {
  background: var(--text-main);
  color: var(--bg);
}

.action-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section-tag {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
}

.section-heading {
  max-width: 540px;
  margin-bottom: 34px;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-item {
  padding: 26px 0 30px;
}

.entry-item + .entry-item {
  margin-top: 20px;
}

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

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 10px;
}

.entry-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.entry-company,
.entry-desc {
  color: var(--text-muted);
}

.entry-company {
  font-size: 13px;
}

.entry-sep {
  padding: 0 4px;
  color: var(--accent);
}

.entry-date {
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
}

.entry-desc {
  max-width: 690px;
  margin-bottom: 12px;
  font-size: 13.5px;
}

.entry-bullets {
  max-width: 790px;
  padding-left: 18px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.65;
}

.entry-bullets li {
  margin-bottom: 5px;
  padding-left: 3px;
}

.entry-bullets li::marker {
  color: var(--accent);
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.entry-tags code {
  padding: 3px 7px;
  background: var(--code-bg);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.skills-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 16px 0;
  font-size: 13.5px;
}

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

.skill-items {
  color: var(--text-main);
}

.edu-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.edu-degree {
  font-size: 16px;
  font-weight: 600;
}

.edu-school {
  color: var(--text-muted);
  font-size: 13.5px;
}

.edu-date {
  margin-top: 6px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
}

.edu-meta {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

.meta-label {
  color: var(--accent);
  font-size: 10px;
}

.meta-val {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 500;
}

.meta-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px 48px;
}

.contact-entry:last-child {
  grid-column: 1 / -1;
}

.contact-entry .label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 10px;
}

.copy-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-link,
.contact-val {
  font-size: 14px;
}

.contact-link,
.links-row a {
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 4px;
}

.contact-link:hover,
.links-row a:hover {
  color: var(--accent);
}

.copy-trigger {
  padding: 3px 7px;
  color: var(--text-muted);
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  padding: 9px 13px;
  background: var(--text-main);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .header-inner {
    padding: 0 20px;
  }

  .site-main {
    padding: 0 20px 72px;
  }

  .hero-section {
    padding: 52px 0 54px;
  }

  .hero-grid {
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
    gap: 28px;
  }

  .hero-media {
    max-width: none;
  }

  .hero-name {
    font-size: clamp(2.8rem, 8vw, 4.3rem);
  }

  .hero-statement {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 116px;
  }

  .header-inner {
    min-height: 0;
    padding: 13px 24px 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .brand {
    justify-content: space-between;
  }

  .site-nav {
    width: calc(100vw - 48px);
    margin-right: -4px;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .theme-toggle {
    margin-left: auto;
    flex-shrink: 0;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-main {
    padding: 0 24px 60px;
  }

  .hero-section {
    padding: 30px 0 38px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    column-gap: 18px;
    row-gap: 0;
    align-items: start;
  }

  .hero-media {
    width: 108px;
    margin-left: 0;
    justify-self: end;
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .photo-frame {
    box-shadow: 8px 8px 0 var(--accent-soft);
  }

  .hero-intro {
    display: contents;
  }

  .status-pill {
    width: fit-content;
    margin-bottom: 12px;
    padding: 4px 7px;
    border-left: 2px solid #3b9b69;
    background: var(--surface-strong);
    font-size: 8px;
    line-height: 1.3;
    grid-column: 1;
    grid-row: 1;
  }

  .hero-name {
    max-width: none;
    font-size: clamp(2.5rem, 12vw, 4rem);
    grid-column: 1;
    grid-row: 2;
  }

  .hero-role {
    margin-top: 14px;
    font-size: 16px;
    grid-column: 1;
    grid-row: 3;
  }

  .hero-statement {
    max-width: 34em;
    margin: 24px 0 19px;
    font-size: 13.5px;
    line-height: 1.6;
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .action-btn {
    padding: 8px 11px;
    font-size: 11px;
  }

  .hero-links {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading {
    max-width: 18ch;
    margin-bottom: 20px;
    font-size: 2rem;
    line-height: 1;
  }

  .entry-item {
    padding: 20px 0 24px;
  }

  .entry-item + .entry-item {
    margin-top: 10px;
  }

  .entry-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .entry-title {
    font-size: 17px;
  }

  .entry-date {
    font-size: 9px;
  }

  .entry-desc,
  .entry-bullets {
    font-size: 12.5px;
  }

  .entry-desc {
    line-height: 1.55;
  }

  .entry-bullets {
    line-height: 1.6;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 6px 0;
  }

  .skill-items {
    font-size: 13px;
    line-height: 1.55;
  }

  .edu-card,
  .contact-box {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .edu-card {
    padding: 18px;
  }

  .edu-meta {
    border-top: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    padding-top: 16px;
    padding-left: 14px;
  }

  .contact-entry:last-child {
    grid-column: auto;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}
