:root {
  --ink: #f1f5f9;
  --muted: #c7ccd5;
  --paper: #1f2421;
  --panel: #212020;
  --panel-soft: #26292b;
  --line: rgba(255, 73, 158, 0.18);
  --accent: #a480cf;
  --accent-dark: #ff499e;
  --accent-hot: #cf1259;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--accent-hot);
  color: #fff;
  border-radius: var(--radius);
  transition: top 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(31, 36, 33, 0.92);
  border-bottom: 1px solid rgba(255, 73, 158, 0.14);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-hot);
  color: #fff;
  font-size: 0.95rem;
}

.nav-links {
  gap: 0.4rem;
}

.nav-links a {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(164, 128, 207, 0.14);
  color: var(--accent-dark);
}

.nav-links .nav-resume {
  margin-left: 0.2rem;
  background: var(--accent);
  color: #fff;
}

.nav-links .nav-resume:hover,
.nav-links .nav-resume:focus-visible {
  background: var(--accent-hot);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-top: 64px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  max-width: 840px;
  color: var(--accent-dark);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
}

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

h3 {
  font-size: 1.25rem;
}

.hero-text {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 2vw, 1.2rem);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.1;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(207, 18, 89, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-hot);
}

.button.secondary {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--accent-hot);
  border-color: var(--accent-hot);
  color: #fff;
}

.hero-panel {
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -12px 16px 16px -12px;
  z-index: -1;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 73, 158, 0.25);
  background: transparent;
}

.profile-card,
.skills-panel,
.project-card,
.timeline-item,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: repeat(2, minmax(120px, 1fr));
  gap: 0.75rem;
  overflow: hidden;
  border-radius: var(--radius);
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-grid img:first-child {
  grid-row: span 2;
}

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

.stats div {
  padding: 0.8rem;
  border-radius: var(--radius);
  background: var(--panel-soft);
  border: 1px solid rgba(164, 128, 207, 0.16);
}

.stats dt {
  color: var(--accent-dark);
  font-size: 1.35rem;
  font-weight: 800;
}

.stats dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1.4rem;
}

.about-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.about-copy p:first-child {
  margin-top: 0;
}

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

.skills-panel {
  padding: 1.25rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.skill-list li {
  padding: 0.48rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.88rem;
}

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

.project-card {
  overflow: hidden;
}

.project-image {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.project-visual {
  position: relative;
  min-height: 190px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.todo-visual {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--panel-soft);
}

.todo-visual span {
  display: block;
  height: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 44px 0 0 var(--accent);
}

.todo-visual span:nth-child(2) {
  width: 84%;
  box-shadow: inset 44px 0 0 var(--accent-dark);
}

.todo-visual span:nth-child(3) {
  width: 68%;
  box-shadow: inset 44px 0 0 var(--accent-hot);
}

.weather-visual {
  background: var(--panel-soft);
}

.weather-visual .sun {
  position: absolute;
  right: 34px;
  top: 28px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
}

.weather-visual .cloud {
  position: absolute;
  left: 36px;
  bottom: 44px;
  width: 150px;
  height: 54px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 44px -24px 0 8px #fff, 88px -6px 0 2px #fff;
}

.weather-visual .temperature {
  position: absolute;
  right: 34px;
  bottom: 30px;
  font-size: 3rem;
  font-weight: 800;
}

.maze-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 28px;
  background: var(--panel-soft);
}

.maze-visual span {
  min-height: 48px;
  border: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

.maze-visual span:nth-child(2),
.maze-visual span:nth-child(5) {
  border-color: var(--accent-dark);
}

.maze-visual span:nth-child(4) {
  background: var(--accent-hot);
}

.portfolio-visual {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 16px;
  padding: 28px;
  background: var(--panel-soft);
}

.portfolio-visual span {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.portfolio-visual span:first-child {
  grid-row: span 2;
  background: var(--accent);
}

.portfolio-visual span:nth-child(2) {
  background: var(--accent-dark);
}

.portfolio-visual span:nth-child(3) {
  background: var(--accent-hot);
}

.project-content {
  padding: 1.25rem;
}

.project-kicker {
  margin: 0 0 0.4rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-content p {
  color: var(--muted);
}

.project-content ul {
  padding-left: 1.1rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 1rem;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.timeline-item {
  padding: 1.25rem;
}

.timeline-date {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-item p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.3rem, 4vw, 2.2rem);
  background: var(--panel);
  color: #fff;
}

.contact-panel .eyebrow,
.contact-panel p {
  color: var(--muted);
}

.contact-panel p {
  max-width: 640px;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.contact-actions .button.secondary {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-actions .button.secondary:hover,
.contact-actions .button.secondary:focus-visible {
  background: var(--accent-hot);
  border-color: var(--accent-hot);
  color: #fff;
}

.text-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem;
  }

  .nav-links .nav-resume {
    margin-left: 0;
    text-align: center;
  }

  .hero,
  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(100% - 24px, 1120px);
    padding: 64px 0;
  }

  .nav {
    width: min(100% - 24px, 1120px);
  }

  .brand span:last-child {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .button,
  .text-link {
    width: 100%;
  }

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

  .project-visual {
    min-height: 168px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .photo-grid img:first-child {
    grid-row: auto;
  }

  .photo-grid img {
    min-height: 220px;
  }

  .project-image {
    height: 190px;
  }
}

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