:root {
  color-scheme: dark;
  --bg: #101010;
  --bg-soft: #151515;
  --surface: #191919;
  --surface-strong: #202020;
  --text: #f3f1ec;
  --muted: #bcb8b0;
  --subtle: #8f8a82;
  --line: rgba(224, 219, 209, 0.14);
  --accent: #c7bda9;
  --accent-2: #e0dbd1;
  --accent-dark: #29241d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 80% 8%, rgba(224, 219, 209, 0.045), transparent 30rem),
    linear-gradient(180deg, #111 0%, var(--bg) 36rem);
  color: var(--text);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: #101010;
  border-radius: var(--radius);
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 16, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  min-height: 72px;
  padding: 0 1.25rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  aspect-ratio: 1;
  background: var(--accent);
  border-radius: 6px;
  color: #101010;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  justify-content: center;
  width: 2.2rem;
}

.nav-menu {
  align-items: center;
  display: flex;
  gap: 0.2rem;
}

.nav-menu a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 0.7rem;
  transition: background 160ms ease, color 160ms ease;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: none;
  height: 2.6rem;
  justify-content: center;
  padding: 0;
  width: 2.6rem;
}

.nav-toggle span:not(.sr-only) {
  background: currentColor;
  display: block;
  height: 2px;
  position: absolute;
  width: 1.1rem;
}

.nav-toggle span:nth-child(2) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(4) {
  transform: translateY(6px);
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.section {
  margin: 0 auto;
  max-width: var(--max);
  padding: 6rem 1.25rem;
}

.section.muted {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.section.muted > * {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.hero {
  min-height: calc(100vh - 72px);
  padding-bottom: 4rem;
  padding-top: 5rem;
}

.hero-grid {
  margin: 0 auto;
  max-width: 900px;
}

.about-grid,
.contact-grid {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 5rem);
  max-width: 13ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 860px;
}

h3 {
  font-size: 1.15rem;
}

.hero-role {
  color: #dedbd4;
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  font-weight: 760;
  margin: 1rem 0 1.25rem;
}

.hero-summary,
.about-copy p,
.contact-grid p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.profile-card {
  background: rgba(25, 25, 25, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-banner {
  background-color: #191919;
  background-image: url("profile-banner.gif");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: clamp(160px, 24vw, 230px);
  position: relative;
}

.profile-banner::after {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.14), transparent 12rem),
    linear-gradient(180deg, transparent, rgba(16, 16, 16, 0.32));
  content: "";
  inset: 0;
  position: absolute;
}

.profile-main {
  align-items: end;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: auto 1fr;
  padding: 0 1.6rem 1rem;
}

.avatar-wrap {
  margin-top: -3.7rem;
  position: relative;
  z-index: 2;
}

.avatar {
  aspect-ratio: 1;
  background-color: #242424;
  border: 7px solid var(--surface);
  border-radius: 24px;
  display: block;
  object-fit: cover;
  object-position: center;
  width: clamp(6.5rem, 16vw, 9.3rem);
}

.status-dot {
  background: #6fcf97;
  border: 5px solid var(--surface);
  border-radius: 50%;
  bottom: 0.65rem;
  box-shadow: 0 0 0 1px rgba(111, 207, 151, 0.35);
  height: 1.4rem;
  position: absolute;
  right: 0.2rem;
  width: 1.4rem;
}

.profile-identity {
  min-width: 0;
  padding-top: 1.2rem;
}

.profile-handle {
  color: var(--subtle);
  font-size: 0.95rem;
  font-weight: 850;
  margin: 0 0 0.2rem;
}

.profile-status {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.96rem;
  gap: 0.5rem;
  margin: 0.8rem 0 0;
}

.profile-status::before {
  background: #6fcf97;
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 0.55rem;
  width: 0.55rem;
}

.profile-badges,
.profile-stats,
.profile-card .hero-summary,
.profile-card .hero-actions {
  margin-left: 1.6rem;
  margin-right: 1.6rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.profile-badge {
  background: rgba(224, 219, 209, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dedbd4;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.35rem 0.62rem;
}

.profile-card .hero-summary {
  border-top: 1px solid var(--line);
  max-width: none;
  padding-top: 1.2rem;
}

.profile-stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.profile-stat {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
}

.profile-stat strong {
  color: var(--text);
  font-size: 1rem;
}

.profile-stat span {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-card .hero-actions {
  border-top: 1px solid var(--line);
  padding-bottom: 1.6rem;
  padding-top: 1.4rem;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  border-color: rgba(224, 219, 209, 0.34);
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #101010;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-top: 4rem;
}

.about-grid {
  align-items: start;
}

.focus-panel,
.project-card,
.compact-card,
.skill-card,
.education-item,
.contact-card {
  background: rgba(25, 25, 25, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.focus-panel {
  padding: 1.4rem;
}

.focus-panel ul {
  color: var(--muted);
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

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

.graph-card {
  background: rgba(25, 25, 25, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
  overflow: hidden;
  padding: 1.25rem;
}

.graph-copy {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.graph-copy h3,
.graph-copy p {
  margin: 0;
}

.graph-copy p:not(.eyebrow),
.graph-hint {
  color: var(--muted);
}

.project-graph {
  background:
    radial-gradient(circle at center, rgba(224, 219, 209, 0.06), transparent 21rem),
    #141414;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: clamp(560px, 60vw, 720px);
  overflow: hidden;
  position: relative;
}

.graph-lines {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.graph-lines line {
  stroke: rgba(224, 219, 209, 0.18);
  stroke-linecap: round;
  stroke-width: 0.28;
  transition: stroke 160ms ease, stroke-width 160ms ease, opacity 160ms ease;
  vector-effect: non-scaling-stroke;
}

.graph-lines line.is-active {
  stroke: rgba(224, 219, 209, 0.46);
  stroke-width: 0.46;
}

.graph-node {
  appearance: none;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  gap: 0.48rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.18;
  max-width: 16rem;
  padding: 0.2rem;
  position: absolute;
  text-align: left;
  transform: translate(0, -50%);
  transition: color 160ms ease, transform 160ms ease;
  white-space: nowrap;
  z-index: 2;
}

.graph-node:hover,
.graph-node.is-active {
  color: var(--text);
  transform: translate(0, -50%) scale(1.04);
}

.graph-node.label-left {
  flex-direction: row-reverse;
  text-align: right;
  transform: translate(-100%, -50%);
}

.graph-node.label-left:hover,
.graph-node.label-left.is-active {
  transform: translate(-100%, -50%) scale(1.04);
}

.node-dot {
  background: #6f6d68;
  border: 2px solid #141414;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(224, 219, 209, 0.28), 0 0 18px rgba(224, 219, 209, 0.08);
  flex: 0 0 auto;
  height: 0.82rem;
  width: 0.82rem;
}

.node-label {
  color: var(--muted);
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.graph-node:hover .node-label,
.graph-node.is-active .node-label {
  color: var(--text);
}

.graph-node:hover .node-dot,
.graph-node.is-active .node-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(224, 219, 209, 0.28), 0 0 24px rgba(224, 219, 209, 0.16);
}

.category-node {
  font-size: 0.86rem;
  font-weight: 900;
}

.category-node .node-dot {
  background: var(--accent);
  height: 1.08rem;
  width: 1.08rem;
}

.category-node .node-label {
  color: #dedbd4;
}

.graph-hint {
  font-size: 0.9rem;
  margin: 0.85rem 0 0;
}

.project-card {
  display: grid;
  min-height: 100%;
  overflow: hidden;
}

.project-visual {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(224, 219, 209, 0.08), transparent 48%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--surface-strong);
  display: grid;
  min-height: 155px;
  padding: 1rem;
  position: relative;
}

.visual-label {
  background: rgba(16, 16, 16, 0.76);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0.45rem 0.7rem;
  position: relative;
  width: fit-content;
}

.project-body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.category {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  margin: 0;
}

.project-body p,
.compact-card p,
.education-item p,
.skill-card p {
  color: var(--muted);
  margin: 0;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

.detail-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.detail-list p {
  font-size: 0.94rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  background: rgba(224, 219, 209, 0.065);
  border: 1px solid rgba(224, 219, 209, 0.16);
  border-radius: 999px;
  color: #dedbd4;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.3rem 0.55rem;
}

.compact-grid,
.skills-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-card,
.skill-card,
.education-item {
  padding: 1.2rem;
}

.compact-card ul,
.education-item ul {
  color: var(--muted);
  margin: 1rem 0 0;
  padding-left: 1.05rem;
}

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

.skill-card .tag-list {
  margin-top: 1rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.education-item {
  display: grid;
  gap: 0.65rem;
}

.education-meta {
  color: var(--accent);
  font-weight: 850;
}

.achievement-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.achievement {
  align-items: start;
  background: rgba(224, 219, 209, 0.065);
  border: 1px solid rgba(224, 219, 209, 0.16);
  border-radius: var(--radius);
  display: flex;
  gap: 0.7rem;
  padding: 1rem;
}

.achievement::before {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 0.55rem;
  margin-top: 0.45rem;
  width: 0.55rem;
}

.contact-section {
  padding-bottom: 4rem;
}

.contact-card {
  padding: 1.4rem;
}

.contact-card p {
  display: grid;
  gap: 0.2rem;
  margin: 0 0 1rem;
}

.contact-card strong {
  color: var(--text);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--subtle);
  padding: 2rem 1.25rem;
  text-align: center;
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    background: rgba(16, 16, 16, 0.98);
    border-bottom: 1px solid var(--line);
    display: none;
    inset: 72px 0 auto;
    padding: 1rem;
    position: fixed;
  }

  .nav-menu.is-open {
    display: grid;
  }

  .nav-menu a {
    font-size: 1rem;
    padding: 0.9rem;
  }

  .section {
    padding-bottom: 4rem;
    padding-top: 4rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .profile-main {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .profile-identity {
    padding-top: 0;
  }

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

  .project-grid,
  .compact-grid,
  .skills-grid,
  .achievement-list {
    grid-template-columns: 1fr;
  }

  .project-graph {
    min-height: 760px;
  }

  .graph-node {
    font-size: 0.72rem;
    max-width: 10.5rem;
    white-space: normal;
  }

  .node-dot {
    height: 0.74rem;
    width: 0.74rem;
  }

  .category-node .node-dot {
    height: 0.96rem;
    width: 0.96rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
