:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: #eef2ef;
  --text: #171b19;
  --text-soft: #313a36;
  --muted: #69736e;
  --line: rgba(23, 27, 25, 0.12);
  --line-strong: rgba(23, 27, 25, 0.22);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #ccfbf1;
  --warm: #f59e0b;
  --warm-soft: #fef3c7;
  --shadow: 0 18px 60px rgba(18, 55, 47, 0.12);
  --container: 920px;
  --header-height: 76px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: rgba(19, 27, 23, 0.78);
  --surface-solid: #131b17;
  --surface-soft: #17221d;
  --text: #f5f7f5;
  --text-soft: #d9e0dc;
  --muted: #9ba8a1;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --warm: #fbbf24;
  --warm-soft: rgba(251, 191, 36, 0.12);
  --shadow: 0 20px 65px rgba(0, 0, 0, 0.36);
}

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

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 78% 52% at 50% -8%, color-mix(in srgb, var(--warm) 17%, transparent), transparent 72%),
    radial-gradient(circle at 88% 32%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 25%),
    var(--bg);
}

.page-background::after {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.025;
  pointer-events: none;
}

.section-container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 14px;
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.header-shell {
  display: grid;
  width: min(calc(100% - 28px), 980px);
  min-height: 50px;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  pointer-events: auto;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled .header-shell {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  box-shadow: 0 12px 38px rgba(17, 24, 20, 0.11);
  backdrop-filter: blur(18px);
}

.mini-brand {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-right: 8px;
  font-size: 0.83rem;
  font-weight: 850;
  text-decoration: none;
}

.mini-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.main-nav a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  background: var(--warm-soft);
  color: var(--text);
}

.header-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.control-button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.control-button:hover,
.control-button:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.language-button {
  font-size: 0.7rem;
  font-weight: 900;
}

.theme-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.hero {
  padding-top: clamp(138px, 18vw, 184px);
  padding-bottom: clamp(82px, 12vw, 124px);
}

.hero-identity {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 78px;
}

.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--warm) 34%, transparent);
  filter: blur(15px);
}

.avatar {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: var(--bg);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--warm) 65%, transparent), var(--shadow);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.location-badge {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 6.25rem);
  font-weight: 820;
  letter-spacing: -0.067em;
  line-height: 0.97;
}

.gradient-name {
  background: linear-gradient(130deg, var(--accent-strong) 8%, var(--accent) 55%, var(--warm) 120%);
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(1.08rem, 2.2vw, 1.34rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 32px;
}

.action-pill {
  display: inline-flex;
  min-height: 47px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.action-pill svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.action-pill:hover,
.action-pill:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translateY(-2px);
}

.action-primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--bg);
}

:root[data-theme="dark"] .action-primary {
  color: #07110e;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 62px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.hero-highlights li {
  display: grid;
  gap: 2px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.hero-highlights li:first-child {
  padding-left: 0;
}

.hero-highlights li:last-child {
  border-right: 0;
}

.hero-highlights strong {
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.hero-highlights span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.content-section {
  padding-top: clamp(72px, 10vw, 112px);
  padding-bottom: clamp(72px, 10vw, 112px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 46px;
}

.section-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(18, 55, 47, 0.06);
}

.section-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.section-kicker {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  min-height: 182px;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-rail::after {
  position: absolute;
  top: 12px;
  bottom: -12px;
  left: 50%;
  width: 2px;
  background: var(--line-strong);
  content: "";
  transform: translateX(-50%);
}

.timeline-item:last-child .timeline-rail::after {
  bottom: 44px;
}

.timeline-rail span {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 7px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--warm) 52%, transparent);
}

.timeline-summary {
  padding-bottom: 34px;
}

.timeline-summary h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.timeline-summary p {
  margin: 2px 0;
  color: var(--text-soft);
  font-weight: 800;
}

.timeline-summary time,
.location {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.timeline-detail {
  padding: 3px 0 34px;
  color: var(--muted);
}

.timeline-detail p {
  margin: 0 0 10px;
}

.location {
  display: inline-flex;
  align-items: center;
}

.location::before {
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.skill-card {
  position: relative;
  min-height: 320px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(18, 55, 47, 0.04);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.skill-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-5px);
}

.skill-card-accent {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--bg);
}

:root[data-theme="dark"] .skill-card-accent {
  color: #07110e;
}

.skill-number {
  display: inline-grid;
  width: 39px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
}

.skill-card-accent .skill-number {
  background: color-mix(in srgb, var(--bg) 20%, transparent);
  color: inherit;
}

.skill-card h3 {
  margin: 40px 0 20px;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.skill-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.skill-card-accent ul {
  color: color-mix(in srgb, currentColor 76%, transparent);
}

.skill-card li {
  position: relative;
  padding-left: 16px;
  font-size: 0.88rem;
}

.skill-card li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warm);
  content: "";
}

.education-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(18, 55, 47, 0.04);
}

.education-main {
  display: flex;
  gap: 18px;
  align-items: center;
}

.education-mark {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.education-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.education-card p {
  margin: 0;
  color: var(--muted);
}

.education-card time {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 850;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(34px, 7vw, 72px);
  align-items: center;
}

.about-copy {
  color: var(--text-soft);
  font-size: 1.05rem;
}

.about-copy p {
  margin: 0 0 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.about-monogram {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 21px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: var(--bg);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.about-card dl {
  display: grid;
  gap: 15px;
  margin: 0;
}

.about-card div {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.about-card dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.about-card dd {
  margin: 3px 0 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
  margin-top: clamp(62px, 9vw, 100px);
  margin-bottom: clamp(62px, 9vw, 100px);
  padding: clamp(30px, 6vw, 58px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--warm) 16%, transparent), transparent 35%),
    var(--surface-solid);
  box-shadow: var(--shadow);
}

.contact-section h2 {
  max-width: 15ch;
}

.contact-section p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
}

.contact-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.text-link {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  min-height: 105px;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.footer-inner p {
  margin: 0;
}

.footer-inner p:nth-child(2) {
  text-align: center;
}

.footer-inner a {
  justify-self: end;
  color: var(--text-soft);
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

.reveal-delay-3 {
  transition-delay: 260ms;
}

.reveal-delay-4 {
  transition-delay: 340ms;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--warm) 76%, white);
  outline-offset: 3px;
}

@media (max-width: 830px) {
  :root {
    --header-height: 112px;
  }

  .site-header {
    top: 10px;
  }

  .header-shell {
    width: min(calc(100% - 20px), 720px);
    grid-template-columns: 1fr auto;
    border-color: var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
    box-shadow: 0 10px 34px rgba(17, 24, 20, 0.08);
    backdrop-filter: blur(18px);
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 1px 2px;
    scrollbar-width: none;
  }

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

  .main-nav a {
    flex: 0 0 auto;
  }

  .header-controls {
    grid-column: 2;
    grid-row: 1;
  }

  .timeline-item {
    grid-template-columns: 30px minmax(190px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
  }

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

  .skill-card-accent {
    grid-column: 1 / -1;
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .section-container {
    width: min(calc(100% - 30px), var(--container));
  }

  .mini-brand-text {
    display: none;
  }

  .hero {
    padding-top: 158px;
  }

  .hero-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: clamp(3.25rem, 16vw, 5rem);
  }

  .hero-description {
    font-size: 1.06rem;
  }

  .hero-actions,
  .action-pill {
    width: 100%;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .hero-highlights li,
  .hero-highlights li:first-child {
    padding: 15px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-highlights li:last-child {
    border-bottom: 0;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .timeline-item {
    grid-template-columns: 28px 1fr;
    gap: 14px;
    min-height: 0;
  }

  .timeline-summary {
    padding-bottom: 12px;
  }

  .timeline-detail {
    grid-column: 2;
    padding: 0 0 44px;
  }

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

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

  .skill-card,
  .skill-card-accent {
    grid-column: auto;
    min-height: 280px;
  }

  .education-card {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .about-card {
    transform: none;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 28px;
    width: calc(100% - 20px);
    border-radius: 24px;
  }

  .contact-actions {
    justify-items: stretch;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: center;
    padding: 26px 0;
    text-align: center;
  }

  .footer-inner a {
    justify-self: center;
  }
}

@media (max-width: 420px) {
  .header-shell {
    gap: 8px;
  }

  .main-nav {
    gap: 0;
  }

  .main-nav a {
    padding-inline: 9px;
    font-size: 0.73rem;
  }

  .location-badge {
    align-items: flex-start;
    border-radius: 15px;
    line-height: 1.35;
  }

  .status-dot {
    margin-top: 4px;
  }
}

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

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

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