:root {
  --bg: #09111f;
  --bg-soft: rgba(12, 24, 43, 0.78);
  --surface: rgba(11, 22, 39, 0.78);
  --surface-strong: rgba(8, 18, 33, 0.96);
  --border: rgba(108, 140, 187, 0.22);
  --border-strong: rgba(93, 168, 255, 0.34);
  --text: #f2f6fb;
  --muted: #9eb2cb;
  --primary: #1f8fff;
  --accent: #2fd58f;
  --accent-soft: rgba(47, 213, 143, 0.14);
  --shadow: 0 1.75rem 5rem rgba(0, 0, 0, 0.35);
  --radius-lg: 1.75rem;
  --radius-md: 1.25rem;
  --radius-sm: 0.875rem;
  --container: 66.25rem;
  --header-height: 4.75rem;
  --font-display: "Trebuchet MS", "Gill Sans", sans-serif;
  --font-body: Verdana, Geneva, sans-serif;
  --canvas-opacity: 0.8;
  --page-bg:
    radial-gradient(circle at top left, rgba(31, 143, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(47, 213, 143, 0.12), transparent 28%),
    linear-gradient(180deg, #06101d 0%, #081321 44%, #091624 100%);
  --page-overlay:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 32%),
    linear-gradient(180deg, transparent 0%, rgba(4, 9, 18, 0.36) 100%);
  --header-bg: rgba(5, 13, 24, 0.52);
  --header-border: rgba(109, 140, 185, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --control-bg: rgba(255, 255, 255, 0.04);
  --control-border: rgba(255, 255, 255, 0.08);
  --nav-toggle-bg: rgba(9, 18, 31, 0.8);
  --nav-toggle-border: rgba(255, 255, 255, 0.12);
  --secondary-bg: rgba(255, 255, 255, 0.03);
  --secondary-border: rgba(255, 255, 255, 0.12);
  --accent-button-bg: rgba(47, 213, 143, 0.12);
  --accent-button-border: rgba(47, 213, 143, 0.22);
  --card-layer: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  --card-gloss: linear-gradient(140deg, rgba(255, 255, 255, 0.14), transparent 36%);
  --modal-backdrop: rgba(3, 10, 19, 0.76);
  --modal-surface:
    radial-gradient(circle at top right, rgba(31, 143, 255, 0.16), transparent 22%),
    radial-gradient(circle at top left, rgba(47, 213, 143, 0.12), transparent 18%),
    rgba(7, 16, 29, 0.96);
  --modal-close-bg: rgba(255, 255, 255, 0.04);
  --modal-close-hover-bg: rgba(255, 255, 255, 0.08);
  --surface-panel: rgba(255, 255, 255, 0.035);
  --scroll-track: rgba(255, 255, 255, 0.06);
  --scroll-thumb-border: rgba(7, 16, 29, 0.96);
  --project-button-sheen: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.24) 50%, transparent 85%);
  --theme-toggle-bg: linear-gradient(135deg, rgba(10, 18, 31, 0.96), rgba(22, 33, 50, 0.94));
  --theme-toggle-border: rgba(255, 255, 255, 0.1);
  --theme-toggle-shadow: 0 1.15rem 2.5rem rgba(0, 0, 0, 0.24);
  --theme-option-bg: rgba(255, 255, 255, 0.06);
  --theme-option-text: #e7f0fc;
  --theme-option-muted: #90a6bf;
  --theme-dot-dark-bg: linear-gradient(135deg, #0f1827, #1a2940);
  --theme-dot-light-bg: linear-gradient(135deg, #ffffff, #dfe7f2);
  --theme-dot-dark-icon: #bcd2ff;
  --theme-dot-light-icon: #d5a21a;
  --theme-active-ring: rgba(31, 143, 255, 0.2);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4fb;
  --bg-soft: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(247, 250, 254, 0.97);
  --border: rgba(93, 120, 153, 0.16);
  --border-strong: rgba(15, 125, 232, 0.26);
  --text: #102033;
  --muted: #61758b;
  --primary: #0f7de8;
  --accent: #1ea36d;
  --accent-soft: rgba(30, 163, 109, 0.12);
  --shadow: 0 1.2rem 3.6rem rgba(61, 83, 111, 0.14);
  --canvas-opacity: 0.34;
  --page-bg:
    radial-gradient(circle at top left, rgba(15, 125, 232, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(30, 163, 109, 0.12), transparent 28%),
    linear-gradient(180deg, #fcfdff 0%, #f2f6fb 48%, #e7eef6 100%);
  --page-overlay:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 36%),
    linear-gradient(180deg, transparent 0%, rgba(204, 216, 229, 0.3) 100%);
  --header-bg: rgba(247, 250, 255, 0.74);
  --header-border: rgba(105, 129, 161, 0.16);
  --chip-bg: rgba(16, 32, 51, 0.06);
  --control-bg: rgba(255, 255, 255, 0.58);
  --control-border: rgba(98, 121, 152, 0.18);
  --nav-toggle-bg: rgba(255, 255, 255, 0.86);
  --nav-toggle-border: rgba(98, 121, 152, 0.18);
  --secondary-bg: rgba(255, 255, 255, 0.74);
  --secondary-border: rgba(98, 121, 152, 0.18);
  --accent-button-bg: rgba(30, 163, 109, 0.11);
  --accent-button-border: rgba(30, 163, 109, 0.22);
  --card-layer: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 253, 0.7));
  --card-gloss: linear-gradient(140deg, rgba(255, 255, 255, 0.88), transparent 48%);
  --modal-backdrop: rgba(226, 235, 245, 0.78);
  --modal-surface:
    radial-gradient(circle at top right, rgba(15, 125, 232, 0.12), transparent 24%),
    radial-gradient(circle at top left, rgba(30, 163, 109, 0.1), transparent 20%),
    rgba(249, 251, 255, 0.96);
  --modal-close-bg: rgba(16, 32, 51, 0.06);
  --modal-close-hover-bg: rgba(16, 32, 51, 0.1);
  --surface-panel: rgba(255, 255, 255, 0.68);
  --scroll-track: rgba(87, 114, 147, 0.14);
  --scroll-thumb-border: rgba(244, 247, 251, 0.96);
  --project-button-sheen: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.58) 50%, transparent 85%);
  --theme-toggle-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 241, 248, 0.96));
  --theme-toggle-border: rgba(98, 121, 152, 0.18);
  --theme-toggle-shadow: 0 1rem 2.4rem rgba(58, 82, 111, 0.14);
  --theme-option-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(231, 238, 245, 0.92));
  --theme-option-text: #1f3044;
  --theme-option-muted: #6c8197;
  --theme-dot-dark-bg: linear-gradient(135deg, #152131, #2a3b54);
  --theme-dot-light-bg: linear-gradient(135deg, #ffffff, #e2eaf4);
  --theme-dot-dark-icon: #dfe9fb;
  --theme-dot-light-icon: #d59a10;
  --theme-active-ring: rgba(15, 125, 232, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 80%;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--page-bg);
  overflow-x: hidden;
  transition: background 280ms ease, color 280ms ease;
}

body.menu-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--page-overlay);
  pointer-events: none;
  z-index: -2;
  transition: background 280ms ease;
}

html.cursorly-active body,
html.cursorly-active body * {
  cursor: none !important;
}

html.cursorly-active input,
html.cursorly-active textarea,
html.cursorly-active select,
html.cursorly-active [contenteditable]:not([contenteditable="false"]),
html.cursorly-active [contenteditable]:not([contenteditable="false"]) * {
  cursor: auto !important;
}

a {
  color: inherit;
}

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

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  opacity: var(--canvas-opacity);
  transition: opacity 280ms ease;
}

.container {
  width: min(calc(100% - 2.5rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.875rem 0;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: background 240ms ease, border-color 240ms ease;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.125rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.site-nav a {
  position: relative;
  padding: 0.5rem 0.625rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--chip-bg);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.4375rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem;
  border-radius: 999px;
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.lang-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

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

.lang-button.active {
  color: #06111d;
  background: linear-gradient(135deg, rgba(31, 143, 255, 1), rgba(47, 213, 143, 0.95));
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0.25rem;
  border: 1px solid var(--theme-toggle-border);
  border-radius: 999px;
  background: var(--theme-toggle-bg);
  box-shadow: var(--theme-toggle-shadow);
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(47, 213, 143, 0.55);
  outline-offset: 3px;
}

.theme-toggle-thumb {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--theme-dot-dark-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0.75rem 1.4rem rgba(0, 0, 0, 0.14);
  transition: background 240ms ease, box-shadow 240ms ease;
}

.theme-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
}

.theme-toggle-icon::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  background-color: var(--theme-dot-dark-icon);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.2 14.1A8.5 8.5 0 0 1 9.9 3.8a.75.75 0 0 0-.93-.94A9.5 9.5 0 1 0 21.14 15a.75.75 0 0 0-.94-.9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.2 14.1A8.5 8.5 0 0 1 9.9 3.8a.75.75 0 0 0-.93-.94A9.5 9.5 0 1 0 21.14 15a.75.75 0 0 0-.94-.9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 320ms ease, opacity 220ms ease, background-color 240ms ease, -webkit-mask 220ms ease, mask 220ms ease;
}

html[data-theme="light"] .theme-toggle-thumb {
  background: var(--theme-dot-light-bg);
}

html[data-theme="light"] .theme-toggle-icon::before {
  background-color: var(--theme-dot-light-icon);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 3m0 14.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m9-5.25a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 21 12m-15.75.75H3.75a.75.75 0 0 1 0-1.5h1.5a.75.75 0 0 1 0 1.5M18.19 5.81a.75.75 0 0 1 0 1.06l-1.06 1.06a.75.75 0 1 1-1.06-1.06l1.06-1.06a.75.75 0 0 1 1.06 0M7.93 16.07a.75.75 0 0 1 0 1.06l-1.06 1.06a.75.75 0 1 1-1.06-1.06l1.06-1.06a.75.75 0 0 1 1.06 0m10.26 2.12a.75.75 0 0 1-1.06 0l-1.06-1.06a.75.75 0 0 1 1.06-1.06l1.06 1.06a.75.75 0 0 1 0 1.06M7.93 7.93a.75.75 0 0 1-1.06 0L5.81 6.87a.75.75 0 0 1 1.06-1.06l1.06 1.06a.75.75 0 0 1 0 1.06M12 7.25A4.75 4.75 0 1 1 7.25 12 4.76 4.76 0 0 1 12 7.25m0 1.5A3.25 3.25 0 1 0 15.25 12 3.25 3.25 0 0 0 12 8.75'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 3m0 14.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m9-5.25a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 21 12m-15.75.75H3.75a.75.75 0 0 1 0-1.5h1.5a.75.75 0 0 1 0 1.5M18.19 5.81a.75.75 0 0 1 0 1.06l-1.06 1.06a.75.75 0 1 1-1.06-1.06l1.06-1.06a.75.75 0 0 1 1.06 0M7.93 16.07a.75.75 0 0 1 0 1.06l-1.06 1.06a.75.75 0 1 1-1.06-1.06l1.06-1.06a.75.75 0 0 1 1.06 0m10.26 2.12a.75.75 0 0 1-1.06 0l-1.06-1.06a.75.75 0 0 1 1.06-1.06l1.06 1.06a.75.75 0 0 1 0 1.06M7.93 7.93a.75.75 0 0 1-1.06 0L5.81 6.87a.75.75 0 0 1 1.06-1.06l1.06 1.06a.75.75 0 0 1 0 1.06M12 7.25A4.75 4.75 0 1 1 7.25 12 4.76 4.76 0 0 1 12 7.25m0 1.5A3.25 3.25 0 1 0 15.25 12 3.25 3.25 0 0 0 12 8.75'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle.is-changing .theme-toggle-icon::before {
  transform: rotate(180deg) scale(0.92);
}

.nav-toggle {
  display: none;
  width: 2.875rem;
  height: 2.875rem;
  border: 1px solid var(--nav-toggle-border);
  border-radius: 1rem;
  background: var(--nav-toggle-bg);
  padding: 0;
  cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease;
}

.nav-toggle span {
  display: block;
  width: 1.375rem;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle span + span {
  margin-top: 0.3125rem;
}

main {
  position: relative;
  overflow: hidden;
}

section {
  padding: 4.5rem 0;
  scroll-margin-top: calc(var(--header-height) + 2rem);
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 1.25rem);
}

.hero-grid,
.about-layout,
.project-card,
.contact-card {
  display: grid;
  gap: 1.25rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(18.75rem, 0.82fr);
  align-items: center;
}

.anchor-point {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--header-height) + 0.875rem);
}

.eyebrow,
.project-tag,
.profile-card-label {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker {
  margin: 0 0 0.875rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title,
.section-title,
.profile-card-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-title {
  font-size: clamp(2.55rem, 5vw, 4.15rem);
  max-width: 11ch;
}

.section-title {
  max-width: 16ch;
  font-size: clamp(1.62rem, 2.5vw, 2.08rem);
  line-height: 1.02;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.role-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  min-height: 2rem;
}

.role-prefix {
  color: var(--muted);
  font-size: 0.9375rem;
}

.role {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  font-weight: 700;
  text-shadow: 0 0 24px rgba(47, 213, 143, 0.22);
}

.hero-text,
.about-copy p,
.skill-card p,
.education-card p,
.contact-text,
.project-copy p:not(.project-tag),
.profile-card-text,
.about-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.68;
}

.hero-text {
  max-width: 56ch;
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.25rem;
  padding: 0.75rem 1.125rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

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

.btn-primary {
  color: #07111d;
  background: linear-gradient(135deg, rgba(31, 143, 255, 1), rgba(47, 213, 143, 0.95));
  box-shadow: 0 20px 40px rgba(31, 143, 255, 0.2);
}

.btn-secondary {
  color: var(--text);
  background: var(--secondary-bg);
  border-color: var(--secondary-border);
}

.btn-accent {
  color: var(--text);
  background: var(--accent-button-bg);
  border-color: var(--accent-button-border);
}

.btn-icon {
  gap: 0.625rem;
}

.btn-icon::before {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  background-color: currentColor;
  -webkit-mask: var(--button-icon) center / contain no-repeat;
  mask: var(--button-icon) center / contain no-repeat;
}

.btn-linkedin {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.94 8.5H3.56V20h3.38zM5.25 3A1.97 1.97 0 1 0 5.3 6.94 1.97 1.97 0 0 0 5.25 3m6.99 5.5H8.9V20h3.34v-6.03c0-1.6.3-3.14 2.29-3.14 1.96 0 1.99 1.84 1.99 3.24V20h3.35v-6.61c0-3.25-.7-5.75-4.5-5.75-1.82 0-3.04 1-3.54 1.95h-.05z'/%3E%3C/svg%3E");
}

.btn-email {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6.75A2.75 2.75 0 0 1 5.75 4h12.5A2.75 2.75 0 0 1 21 6.75v10.5A2.75 2.75 0 0 1 18.25 20H5.75A2.75 2.75 0 0 1 3 17.25zm2.29-.75 6.71 5.24L18.71 6zM19 7.02l-5.87 4.58a1.8 1.8 0 0 1-2.26 0L5 7.02v10.23c0 .41.34.75.75.75h12.5c.41 0 .75-.34.75-.75z'/%3E%3C/svg%3E");
}

.btn-github {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.38 7.85 10.9.57.1.78-.25.78-.55 0-.27-.01-.99-.02-1.95-3.19.69-3.86-1.54-3.86-1.54-.52-1.33-1.27-1.68-1.27-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.67 1.24 3.32.95.1-.74.4-1.24.72-1.52-2.55-.29-5.23-1.27-5.23-5.67 0-1.25.45-2.26 1.18-3.05-.12-.29-.51-1.45.11-3.03 0 0 .97-.31 3.17 1.17a10.9 10.9 0 0 1 5.78 0c2.2-1.48 3.17-1.17 3.17-1.17.62 1.58.23 2.74.11 3.03.73.79 1.18 1.8 1.18 3.05 0 4.41-2.69 5.37-5.25 5.66.41.35.78 1.03.78 2.08 0 1.5-.01 2.72-.01 3.09 0 .3.21.66.79.55A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5'/%3E%3C/svg%3E");
}

.contact-actions .btn {
  justify-content: flex-start;
  min-width: 14.5rem;
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    filter 180ms ease;
}

.contact-actions .btn:hover {
  transform: translate3d(0.25rem, -2px, 0);
  filter: brightness(1.05);
}

.contact-actions .btn-linkedin {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1rem 2.2rem rgba(10, 102, 194, 0.12);
}

.contact-actions .btn-linkedin:hover {
  background: rgba(10, 102, 194, 0.12);
  border-color: rgba(10, 102, 194, 0.32);
  box-shadow: 0 1.2rem 2.7rem rgba(10, 102, 194, 0.2);
}

.contact-actions .btn-email {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

.contact-actions .btn-email:hover {
  background: rgba(47, 213, 143, 0.12);
  border-color: rgba(47, 213, 143, 0.3);
  box-shadow: 0 1rem 2.2rem rgba(47, 213, 143, 0.14);
}

html[data-theme="light"] .contact-actions .btn-email {
  color: var(--text);
  background: var(--secondary-bg);
  border-color: var(--secondary-border);
  box-shadow: 0 1rem 2rem rgba(58, 82, 111, 0.12);
}

html[data-theme="light"] .contact-actions .btn-email:hover {
  background: rgba(30, 163, 109, 0.11);
  border-color: rgba(30, 163, 109, 0.28);
  box-shadow: 0 1rem 2.2rem rgba(30, 163, 109, 0.14);
}

.contact-actions .btn-github {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, 0.22);
}

.contact-actions .btn-github:hover {
  background: #1f2630;
  border-color: #4a5565;
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .contact-actions .btn-github {
  color: var(--text);
  background: var(--secondary-bg);
  border-color: var(--secondary-border);
  box-shadow: 0 1rem 2rem rgba(58, 82, 111, 0.14);
}

html[data-theme="light"] .contact-actions .btn-github:hover {
  background: rgba(16, 32, 51, 0.06);
  border-color: rgba(98, 121, 152, 0.24);
  box-shadow: 0 1rem 2.3rem rgba(58, 82, 111, 0.18);
}

.contact-actions .btn-linkedin::before {
  background-color: #0a66c2;
}

.contact-actions .btn-email::before {
  background-color: #2fd58f;
}

.contact-actions .btn-github::before {
  background-color: #f0f6fc;
}

html[data-theme="light"] .contact-actions .btn-github::before {
  background-color: #161b22;
}

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

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-layer), var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--card-gloss);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.stat,
.skill-card,
.education-card,
.badge-card,
.profile-card,
.about-media,
.contact-card {
  padding: 1.125rem;
}

.stat strong {
  display: block;
  margin-bottom: 0.625rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.5vw, 1.8rem);
  letter-spacing: -0.04em;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.profile-card {
  width: min(100%, 26.25rem);
  padding: 0.875rem;
  overflow: hidden;
}

.avatar {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-body {
  padding: 1.125rem 0.5rem 0.5rem;
}

.profile-card-title {
  margin-top: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
}

.profile-card-text {
  margin-top: 0.875rem;
}

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

.section-heading .section-title {
  max-width: 18ch;
}

.about-layout {
  grid-template-columns: minmax(15.75rem, 0.84fr) minmax(0, 1.16fr);
  align-items: start;
  justify-items: start;
}

.about-media {
  display: grid;
  width: 100%;
  max-width: 21.5rem;
  align-self: start;
  justify-self: start;
  padding: 0.875rem;
}

.about-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3.7;
  border-radius: calc(var(--radius-lg) - 6px);
  object-fit: cover;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  margin-top: 1.125rem;
}

.about-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
}

.highlight-label,
.skill-index {
  display: inline-grid;
  place-items: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.75rem;
  border-radius: 0.875rem;
  background: var(--accent-soft);
  border: 1px solid rgba(47, 213, 143, 0.14);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.highlight-label {
  width: fit-content;
  min-width: 2.375rem;
  height: 2.125rem;
  padding: 0 0.5625rem;
  font-size: 0.75rem;
}

.about-copy {
  display: grid;
  gap: 0.875rem;
  width: 100%;
  max-width: 60ch;
  align-self: start;
  justify-self: start;
}

.about-copy p {
  font-size: 0.9rem;
  line-height: 1.62;
}

.skills-grid,
.education-grid,
.badges,
.projects-grid {
  display: grid;
  gap: 0.875rem;
}

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

.skill-card h3,
.education-card h3,
.project-card h3 {
  margin: 1rem 0 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.15;
}

.project-card {
  grid-template-columns: minmax(0, 1fr) minmax(16.25rem, 0.92fr);
  align-items: center;
  padding: 0.875rem;
  overflow: hidden;
}

.project-copy {
  display: grid;
  align-content: start;
  gap: 0.875rem;
  padding: 0.625rem;
}

.project-copy h3 {
  margin-top: 0;
  margin-bottom: 0;
}

.project-tag {
  margin-bottom: 0.875rem;
}

.project-detail-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 10.25rem;
  padding: 0.8125rem 1.125rem;
  border: 1px solid rgba(47, 213, 143, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(47, 213, 143, 0.18), rgba(31, 143, 255, 0.14)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.project-detail-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--project-button-sheen);
  transform: translateX(-140%);
  transition: transform 320ms ease;
}

.project-detail-button::after {
  content: ">>";
  position: relative;
  margin-left: 0.625rem;
  font-size: 0.9em;
}

.project-detail-button:hover {
  transform: translateY(-0.125rem);
  border-color: rgba(47, 213, 143, 0.42);
  box-shadow: 0 1.25rem 2.5rem rgba(20, 77, 145, 0.22);
}

.project-detail-button:hover::before {
  transform: translateX(140%);
}

.project-detail-button:focus-visible,
.project-modal-close:focus-visible {
  outline: 2px solid rgba(47, 213, 143, 0.6);
  outline-offset: 3px;
}

.project-media img {
  width: 100%;
  height: 100%;
  min-height: 13.125rem;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(14px);
  transition: background 240ms ease;
}

.project-modal-dialog {
  position: relative;
  width: min(100%, 56rem);
  max-height: min(88vh, 52rem);
  padding: 0.75rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--modal-surface);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.44);
  overflow: hidden;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.project-modal-scroll {
  max-height: calc(min(88vh, 52rem) - 5.5rem);
  margin: 3.25rem 0.35rem 0.55rem 0;
  overflow-y: auto;
  border-radius: calc(1.75rem - 0.75rem);
  padding: 0.75rem 1.75rem 1.5rem 2rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 213, 143, 0.55) rgba(255, 255, 255, 0.06);
}

.project-modal-scroll::-webkit-scrollbar {
  width: 0.45rem;
}

.project-modal-scroll::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}

.project-modal-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(47, 213, 143, 0.72), rgba(31, 143, 255, 0.72));
  border: 1px solid var(--scroll-thumb-border);
  border-radius: 999px;
}

.project-modal-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(47, 213, 143, 0.9), rgba(31, 143, 255, 0.9));
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: var(--modal-close-bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, border-color 240ms ease;
}

.project-modal-close:hover {
  transform: scale(1.04);
  background: var(--modal-close-hover-bg);
}

.project-modal-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-modal-title {
  margin: 0 0 1.25rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.04;
}

.project-modal-content {
  display: grid;
  gap: 1.25rem;
}

.project-modal-content p,
.project-modal-content li {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.68;
}

.project-modal-intro {
  display: grid;
  gap: 0.875rem;
}

.project-modal-section {
  display: grid;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 1.25rem;
  background: var(--surface-panel);
  border: 1px solid var(--control-border);
  transition: background 240ms ease, border-color 240ms ease;
}

.project-modal-section h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.project-modal-list {
  margin: 0;
  padding-left: 1.125rem;
  display: grid;
  gap: 0.625rem;
}

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

.badges {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.375rem;
}

.badge-card {
  display: grid;
  place-items: center;
  min-height: 9.25rem;
}

.badge-card a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.badge-card img {
  width: min(100%, 9.375rem);
  height: auto;
  object-fit: contain;
}

.contact-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 1.375rem;
}

.contact-copy .section-title {
  max-width: 14ch;
}

.contact-text {
  max-width: 58ch;
  margin-top: 1.125rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-top-link {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.site-footer {
  padding: 1.75rem 1.25rem 2.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.fade {
  opacity: 0;
  transition: opacity 420ms ease;
}

.fade.visible {
  opacity: 1;
}

@media (max-width: 1080px) {
  html {
    font-size: 85%;
  }

  .hero-grid,
  .about-layout,
  .project-card,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-visual {
    order: -1;
  }

  .hero-title,
  .section-title,
  .contact-copy .section-title {
    max-width: none;
  }

  .about-media {
    max-width: none;
    justify-self: stretch;
  }

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

  .project-modal-dialog {
    max-height: 84vh;
  }

  .project-modal-scroll {
    max-height: calc(84vh - 5.5rem);
  }

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

  .contact-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 840px) {
  html {
    font-size: 90%;
  }

  .site-header {
    padding: 0.875rem 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 1.25rem;
    right: 1.25rem;
    width: auto;
    max-width: none;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1.125rem;
    border-radius: 1.5rem;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
  }

  .nav-panel.open {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.875rem 1rem;
  }

  .site-nav a.active::after {
    left: 1rem;
    right: 1rem;
    bottom: 0.5rem;
  }

  .lang {
    align-self: center;
    justify-content: center;
  }

  .theme-toggle {
    width: 2.85rem;
    min-width: 2.85rem;
    align-self: center;
  }

  section {
    padding: 4.75rem 0;
  }

  .hero-section {
    padding-top: calc(var(--header-height) + 1.25rem);
  }

  .project-modal {
    padding: 1rem;
  }

  .project-modal-scroll {
    padding: 0.75rem 1rem 1.15rem 1.125rem;
  }

  .project-modal-title {
    max-width: none;
  }

}

@media (max-width: 640px) {
  html {
    font-size: 100%;
  }

  .container {
    width: min(calc(100% - 1.75rem), var(--container));
  }

  .brand-text {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.2rem, 12vw, 3.25rem);
  }

  .role-line {
    min-height: 4.25rem;
  }

  .hero-stats,
  .skills-grid,
  .education-grid,
  .badges {
    grid-template-columns: 1fr;
  }

  .stat,
  .skill-card,
  .education-card,
  .badge-card,
  .profile-card,
  .about-media,
  .contact-card {
    padding: 1rem;
  }

  .project-card {
    padding: 0.75rem;
  }

  .project-copy {
    padding: 0.5rem;
  }

  .project-detail-button {
    width: 100%;
    justify-self: stretch;
  }

  .project-media img {
    min-height: 12rem;
  }

  .project-modal-close {
    top: 0.75rem;
    right: 1rem;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .contact-top-link .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade {
    opacity: 1;
    transform: none;
  }
}
