:root {
  --ink: #171717;
  --muted: #66615c;
  --soft: #f5f2ed;
  --paper: #fffdfa;
  --line: #e7e1d8;
  --accent: #7b5cff;
  --accent-strong: #5c3df5;
  --accent-soft: #ece8ff;
  --mint: #dff7ee;
  --coral: #ffe7dd;
  --shadow: 0 24px 70px rgba(38, 31, 26, 0.13);
  --radius-lg: 34px;
  --radius-md: 24px;
  --radius-sm: 16px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(123, 92, 255, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(255, 151, 111, 0.13), transparent 24rem),
    var(--soft);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
}

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

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

a:focus-visible {
  outline: 3px solid rgba(123, 92, 255, 0.45);
  outline-offset: 4px;
}

.background-orb {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.42;
  animation: floatOrb 15s ease-in-out infinite alternate;
}

.orb-one {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  top: 20rem;
  background: var(--mint);
}

.orb-two {
  width: 16rem;
  height: 16rem;
  right: -4rem;
  bottom: 12rem;
  background: var(--coral);
  animation-delay: -6s;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 32px), var(--container));
  height: 68px;
  margin: 16px auto 0;
  padding: 0 12px 0 22px;
  border: 1px solid rgba(231, 225, 216, 0.88);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: 0 16px 44px rgba(38, 31, 26, 0.08);
  backdrop-filter: blur(20px);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.site-nav a,
.text-link {
  transition: color 180ms ease, transform 180ms ease;
}

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

.nav-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-button,
.button.primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 14px 28px rgba(23, 23, 23, 0.18);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 253, 250, 0.82);
  color: var(--ink);
}

.nav-button:hover,
.button:hover {
  transform: translateY(-3px);
}

.button.primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 18px 34px rgba(92, 61, 245, 0.25);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 54px;
  align-items: center;
  min-height: calc(100vh - 84px);
  padding-top: 74px;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(4.1rem, 10vw, 8.3rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-intro {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.68);
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.portrait-card {
  overflow: hidden;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 56px;
  background: linear-gradient(145deg, #f7f8fb, #e9edf2);
  box-shadow: var(--shadow);
}

.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.04);
}

.floating-note {
  position: absolute;
  width: 220px;
  padding: 18px;
  border: 1px solid rgba(231, 225, 216, 0.85);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: 0 18px 42px rgba(38, 31, 26, 0.12);
  backdrop-filter: blur(18px);
  animation: lift 4.8s ease-in-out infinite alternate;
}

.floating-note strong,
.floating-note span {
  display: block;
}

.floating-note strong {
  margin-bottom: 3px;
  font-size: 0.95rem;
}

.floating-note span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.note-top {
  top: 42px;
  right: -18px;
}

.note-bottom {
  left: -18px;
  bottom: 50px;
  animation-delay: -1.8s;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) 1fr;
  gap: 48px;
  align-items: start;
}

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

.section-heading.centered {
  max-width: 860px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-heading p:not(.section-kicker),
.about-panel > p,
.contact-card > p {
  color: var(--muted);
  font-size: 1.04rem;
}

.about-panel,
.contact-card,
.skill-card,
.project-card,
.credential-card,
.achievement-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.78);
  box-shadow: 0 18px 55px rgba(38, 31, 26, 0.08);
  backdrop-filter: blur(14px);
}

.about-panel {
  padding: 34px;
  border-radius: var(--radius-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.stats-grid article {
  padding: 20px;
  border-radius: 22px;
  background: var(--soft);
}

.stats-grid strong,
.stats-grid span {
  display: block;
}

.stats-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.skills-grid,
.project-grid,
.credential-grid,
.achievement-grid {
  display: grid;
  gap: 22px;
}

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

.skill-card {
  min-height: 280px;
  padding: 28px;
  border-radius: var(--radius-md);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.skill-card:nth-child(2) {
  background: rgba(236, 232, 255, 0.76);
}

.skill-card:nth-child(3) {
  background: rgba(223, 247, 238, 0.74);
}

.skill-card:hover,
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(123, 92, 255, 0.4);
  box-shadow: 0 28px 72px rgba(38, 31, 26, 0.15);
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 800;
}

.skill-card p,
.project-card p,
.achievement-card p {
  color: var(--muted);
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.tech-cloud span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.78);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  margin-top: 44px;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 18px;
  width: 2px;
  background: linear-gradient(var(--accent), rgba(123, 92, 255, 0));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 22px;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 9px solid var(--soft);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(123, 92, 255, 0.25);
}

.timeline-content {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 250, 0.84);
  box-shadow: 0 18px 55px rgba(38, 31, 26, 0.08);
}

.timeline-date,
.company,
.credential-card p {
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 800;
}

.company {
  color: var(--muted);
}

ul {
  margin: 18px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

li + li {
  margin-top: 8px;
}

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

.project-card {
  min-height: 360px;
  padding: 28px;
  border-radius: var(--radius-md);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card.featured {
  grid-column: span 2;
  background: var(--ink);
  color: var(--paper);
}

.project-card.featured p {
  color: rgba(255, 253, 250, 0.72);
}

.project-number {
  margin-bottom: 72px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.project-card.featured .project-tags span {
  border-color: rgba(255, 253, 250, 0.22);
  background: rgba(255, 253, 250, 0.1);
  color: var(--paper);
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--accent-strong);
  font-weight: 800;
}

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

.credential-card,
.achievement-card {
  padding: 26px;
  border-radius: var(--radius-md);
}

.credential-card span {
  color: var(--muted);
}

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

.achievement-card strong {
  display: block;
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.contact-section {
  padding-bottom: 80px;
}

.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 70px);
  border-radius: 42px;
  background:
    radial-gradient(circle at 88% 20%, rgba(123, 92, 255, 0.22), transparent 18rem),
    var(--paper);
}

.contact-card h2 {
  max-width: 780px;
}

.contact-card > p {
  max-width: 680px;
  margin-bottom: 28px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes floatOrb {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(26px, -22px, 0) scale(1.08);
  }
}

@keyframes lift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-12px);
  }
}

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

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

@media (max-width: 1068px) {
  .site-nav {
    gap: 15px;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: auto;
  }

  .portrait-card {
    height: 560px;
  }

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

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: auto auto;
    height: auto;
    padding: 10px 10px 10px 16px;
  }

  .site-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 12px 4px 2px;
  }

  .nav-button {
    min-height: 40px;
    padding: 0 15px;
    font-size: 0.82rem;
  }

  .section-shell {
    padding: 72px 0;
  }

  .hero {
    padding-top: 52px;
  }

  h1 {
    font-size: clamp(3.5rem, 17vw, 5.8rem);
  }

  .portrait-card {
    height: 470px;
    border-radius: 38px;
  }

  .floating-note {
    position: static;
    width: auto;
    margin-top: 14px;
    animation: none;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .section-shell,
  .site-footer {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header {
    top: 10px;
    width: min(calc(100% - 20px), var(--container));
    margin-top: 10px;
    border-radius: 24px;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.82rem;
  }

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

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-meta {
    display: grid;
  }

  .portrait-card {
    height: 390px;
  }

  .about-panel,
  .timeline-content,
  .skill-card,
  .project-card,
  .credential-card,
  .achievement-card {
    padding: 22px;
  }

  .project-number {
    margin-bottom: 44px;
  }
}
