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

:root {
  color-scheme: light dark;
  --accent: #ff8d28;
  --accent-hover: #f2831c;
  --accent-active: #e67d18;
  --accent-focus: rgba(255, 141, 40, 0.28);
  --accent-secondary-focus: rgba(255, 141, 40, 0.16);
  --text-primary: #000;
  --text-secondary: rgba(0, 0, 0, 0.8);
  --text-muted: rgba(0, 0, 0, 0.52);
  --text-footer: rgba(0, 0, 0, 0.42);
  --page-background: #fff;
  --card-background: rgba(0, 0, 0, 0.028);
  --card-border: rgba(0, 0, 0, 0.06);
  --badge-background: rgba(255, 141, 40, 0.14);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --radius-pill: 999px;
  --radius-card: 1.55rem;
  --radius-card-mobile: 1.35rem;
  --icon-size-footer: 0.95rem;
  --icon-size-footer-linkedin-box: 1.34rem;
  --icon-size-footer-linkedin-glyph: 4rem;
  --icon-divider-height: 0.8rem;
  --font-stack: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--page-background);
  color: var(--text-primary);
  font-family: var(--font-stack);
}

.site-header {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
}

.page-home,
.page-404 {
  align-items: center;
  justify-content: flex-start;
}

.page-projects {
  align-items: center;
  justify-content: flex-start;
}

.page-about {
  align-items: center;
  justify-content: flex-start;
}

.hero {
  text-align: left;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  opacity: 0;
  filter: blur(10px);
  animation: appleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.hero h2 {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-secondary);
  opacity: 0;
  filter: blur(8px);
  animation: appleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards;
}

.page-home .hero,
.page-404 .hero {
  padding: 6rem 1.25rem 4rem;
}

.page-projects main,
.page-about main {
  flex: 1;
  display: flex;
  align-items: center;
  width: min(100%, 56rem);
  margin: 0 auto;
  padding: 6rem 1.25rem 4rem;
}

.page-projects .content,
.page-about .content {
  width: min(100%, 38rem);
  margin: 0 auto;
}

.page-projects .hero,
.page-about .hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.page-projects .hero h2,
.page-about .hero h2 {
  max-width: 34rem;
}

.actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

.top-action {
  width: 100%;
  margin-bottom: var(--space-5);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(6px);
  animation: appleButtonReveal 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

.page-projects .actions,
.page-about .actions {
  width: 100%;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(6px);
  animation: appleButtonReveal 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.16rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
  box-shadow: 0 0 0 0 rgba(255, 141, 40, 0);
  -webkit-font-smoothing: antialiased;
}

.page-home .button,
.page-404 .button {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(6px);
  animation: appleButtonReveal 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
}

.button:hover {
  background: var(--accent-hover);
  transform: scale(1.01);
}

.button:active {
  background: var(--accent-active);
  transform: scale(0.99);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-focus);
}

.button.secondary,
.secondary-link {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

.button.secondary:hover,
.secondary-link:hover {
  background: var(--accent);
  color: #fff;
}

.button.secondary:active,
.secondary-link:active {
  background: var(--accent-active);
  color: #fff;
}

.button.secondary:focus-visible,
.secondary-link:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-secondary-focus);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(6px);
  animation: appleButtonReveal 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
  transition: color 160ms ease, transform 160ms ease;
}

.social-link svg {
  width: 1.02rem;
  height: 1.02rem;
  fill: currentColor;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-1) + 0.05rem);
  margin-bottom: var(--space-1);
}

.footer-divider {
  width: 1px;
  height: var(--icon-divider-height);
  background: rgba(0, 0, 0, 0.16);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.footer-social svg {
  width: var(--icon-size-footer);
  height: var(--icon-size-footer);
  fill: currentColor;
}

.footer-social-linkedin svg {
  width: var(--icon-size-footer-linkedin-glyph);
  height: var(--icon-size-footer-linkedin-glyph);
}

.footer-social-linkedin {
  width: var(--icon-size-footer-linkedin-box);
  height: var(--icon-size-footer-linkedin-box);
}

.footer-social:hover {
  color: var(--accent);
}

.footer-social:active {
  color: var(--accent-active);
  transform: none;
}

.footer-social:focus-visible {
  outline: none;
  color: var(--accent);
  transform: none;
}

.social-link:hover {
  color: var(--accent-hover);
  transform: scale(1.03);
}

.social-link:active {
  color: var(--accent-active);
  transform: scale(0.98);
}

.social-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-secondary-focus);
  border-radius: 999px;
}

.project-list {
  margin-top: var(--space-7);
  opacity: 0;
  filter: blur(8px);
  animation: appleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.about-stack {
  margin-top: var(--space-7);
  opacity: 0;
  filter: blur(8px);
  animation: appleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.about-section {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-card);
  background: var(--card-background);
  border: 1px solid var(--card-border);
}

.about-section + .about-section {
  margin-top: var(--space-3);
}

.about-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.about-text {
  margin-top: 0.6rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.72);
}

.project {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-card);
  background: var(--card-background);
  border: 1px solid var(--card-border);
}

.project + .project {
  margin-top: var(--space-3);
}

.project-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.project-title {
  margin-top: 0.42rem;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.42rem;
}

.project-header .project-title {
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.58rem;
  border-radius: var(--radius-pill);
  background: var(--badge-background);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.project-copy {
  margin-top: 0.6rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
}

.project-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.project-link:hover {
  color: var(--accent-hover);
}

.acknowledgements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.65rem;
}

footer {
  width: 100%;
  margin-top: auto;
  padding: 0 var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-footer);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.75rem;
  }

  .hero h2 {
    font-size: 1.875rem;
  }
}

@media (max-width: 640px) {
  .page-home .hero,
  .page-404 .hero {
    padding: 3rem var(--space-4);
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.1rem);
  }

  .hero h2 {
    font-size: clamp(1.15rem, 5.4vw, 1.4rem);
  }

  .page-home .actions,
  .page-projects .actions {
    justify-content: flex-start;
  }

  .page-projects main,
  .page-about main {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .page-projects .content,
  .page-about .content {
    width: 100%;
  }

  .page-projects .hero h2,
  .page-about .hero h2,
  .page-404 .hero h2 {
    max-width: 18rem;
  }

  .project-list {
    margin-top: 2rem;
  }

  .project {
    padding: 1.15rem 1.1rem;
    border-radius: var(--radius-card-mobile);
  }

  .about-section {
    padding: 1.15rem 1.1rem;
    border-radius: var(--radius-card-mobile);
  }

  .project-title {
    font-size: 1.28rem;
  }

  .project-copy,
  .about-text {
    font-size: 0.96rem;
  }

  .acknowledgements {
    gap: 0.65rem 0.9rem;
  }

  footer {
    padding-bottom: 1.5rem;
    font-size: 0.72rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff9230;
    --accent-hover: #ffa24d;
    --accent-active: #ff8d28;
    --text-primary: rgb(246, 248, 249);
    --text-secondary: rgba(246, 248, 249, 0.8);
    --text-muted: rgba(246, 248, 249, 0.52);
    --text-footer: rgba(246, 248, 249, 0.42);
    --page-background: #000;
    --card-background: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --badge-background: rgba(255, 146, 48, 0.18);
  }

  .project-copy,
  .about-text {
    color: rgba(246, 248, 249, 0.8);
  }

  .footer-divider {
    background: rgba(246, 248, 249, 0.16);
  }
}

@keyframes appleReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes appleButtonReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero h2,
  .top-action,
  .actions,
  .button,
  .social-link,
  .project-list,
  footer {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .page-home .button,
  .page-404 .button,
  .top-action,
  .page-projects .actions,
  .footer-social,
  .footer-socials {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}
