/* Danny Siu portfolio — lightweight, responsive, and dependency-free. */
:root {
  --navy-950: #061624;
  --navy-900: #0a2033;
  --navy-800: #10314c;
  --blue-600: #147eaa;
  --blue-500: #20a2ce;
  --blue-300: #8dd8ee;
  --sky-100: #e8f7fb;
  --cream: #f8f6ef;
  --paper: #fffefa;
  --ink: #122433;
  --muted: #546674;
  --line: rgba(18, 36, 51, 0.14);
  --shadow: 0 22px 70px rgba(3, 21, 34, 0.15);
  --radius-sm: 0.75rem;
  --radius-md: 1.35rem;
  --radius-lg: 2rem;
  --shell: 72rem;
}

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

html {
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--navy-950);
  background-image: linear-gradient(115deg, rgba(3, 20, 34, 0.97) 0%, rgba(5, 34, 52, 0.92) 48%, rgba(8, 61, 77, 0.78) 100%), url("../img/mountain-background.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(3.25rem, 7vw, 6.65rem);
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 4vw, 4rem);
}

h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  color: var(--navy-950);
  background: var(--paper);
  border-radius: 0.5rem;
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: relative;
  z-index: 20;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(6, 22, 36, 0.72);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  color: var(--navy-950);
  background: var(--blue-300);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.3rem);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-block: 0.65rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0.35rem;
  left: 0;
  height: 2px;
  content: "";
  background: var(--blue-300);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links .nav-resume {
  padding: 0.65rem 1rem;
  color: var(--navy-950);
  background: var(--blue-300);
  border-radius: 999px;
}

.nav-links .nav-resume::after {
  display: none;
}

.hero {
  display: grid;
  min-height: 43rem;
  padding-block: clamp(4rem, 8vw, 7.5rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.7fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 6.5rem);
  color: #fff;
}

.hero-copy {
  max-width: 44rem;
  animation: rise-in 520ms ease-out both;
}

.eyebrow,
.project-kicker {
  margin-bottom: 1rem;
  color: var(--blue-500);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero .eyebrow,
.about-hero .eyebrow,
.projects-hero .eyebrow {
  color: var(--blue-300);
}

.hero-lede {
  max-width: 46rem;
  margin-bottom: 1.2rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
}

.hero-body {
  max-width: 38rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--navy-950);
  background: var(--blue-300);
  border-color: var(--blue-300);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #b7edfa;
  border-color: #b7edfa;
}

.button-secondary {
  color: inherit;
  border-color: currentColor;
  background: transparent;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--navy-950);
  background: var(--paper);
  border-color: var(--paper);
}

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

.skill-list li,
.project-index span {
  padding: 0.45rem 0.78rem;
  color: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  line-height: 1.2;
}

.hero-portrait {
  width: min(100%, 25rem);
  margin: 0 auto;
  animation: rise-in 620ms 80ms ease-out both;
}

.portrait-frame {
  position: relative;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13rem 13rem var(--radius-lg) var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.portrait-frame::before {
  position: absolute;
  top: 2rem;
  right: -1.25rem;
  width: 4.4rem;
  height: 4.4rem;
  z-index: -1;
  content: "";
  background: var(--blue-500);
  border-radius: 50%;
  filter: blur(0.3px);
}

.portrait-frame img {
  width: 100%;
  height: clamp(27rem, 44vw, 36rem);
  object-fit: cover;
  object-position: center 32%;
  border-radius: 12.5rem 12.5rem 1.55rem 1.55rem;
}

.hero-portrait figcaption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.section {
  padding-block: clamp(5rem, 9vw, 8rem);
}

.section-light {
  background: var(--cream);
}

.section-intro {
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-intro > p:last-child {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-intro.narrow {
  max-width: 56rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.impact-card {
  min-height: 22rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(3, 21, 34, 0.06);
}

.impact-card:nth-child(2) {
  background: var(--sky-100);
}

.impact-card:nth-child(3) {
  color: #fff;
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.impact-number {
  display: block;
  margin-bottom: 3rem;
  color: var(--blue-600);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 5vw, 4.35rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.impact-card:nth-child(3) .impact-number {
  color: var(--blue-300);
}

.impact-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.impact-card:nth-child(3) p {
  color: rgba(255, 255, 255, 0.67);
}

.values-section {
  color: #fff;
  background: rgba(6, 22, 36, 0.9);
}

.values-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr;
  gap: clamp(3rem, 8vw, 8rem);
}

.values-copy {
  padding-top: 2.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.06rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue-600);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  transition: color 160ms ease, gap 160ms ease;
}

.values-section .text-link {
  color: var(--blue-300);
}

.text-link:hover,
.text-link:focus-visible {
  gap: 0.7rem;
  color: var(--blue-500);
}

/* About */
.about-hero {
  display: grid;
  min-height: 48rem;
  padding-block: clamp(4rem, 8vw, 7.5rem);
  grid-template-columns: minmax(18rem, 0.7fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
  color: #fff;
}

.about-photo-wrap {
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  animation: rise-in 540ms ease-out both;
}

.about-photo-wrap img {
  width: 100%;
  height: clamp(30rem, 52vw, 41rem);
  object-fit: cover;
  object-position: center 25%;
  border-radius: 1.55rem;
}

.about-hero-copy {
  animation: rise-in 620ms 60ms ease-out both;
}

.about-hero-copy h1 {
  font-size: clamp(3rem, 5.5vw, 5.7rem);
}

.about-hero-copy > p:not(.eyebrow):not(.hero-lede) {
  color: rgba(255, 255, 255, 0.68);
}

.about-hero-copy .button {
  margin-top: 0.65rem;
}

.journey-list {
  border-top: 1px solid var(--line);
}

.journey-item {
  display: grid;
  padding-block: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(10rem, 0.45fr) minmax(0, 1.55fr);
  gap: clamp(2rem, 6vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.journey-label {
  display: flex;
  gap: 1rem;
  color: var(--blue-600);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journey-label span {
  color: var(--muted);
}

.journey-item h3 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.journey-item > div:last-child p {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
}

.personal-section {
  color: #fff;
  background: rgba(6, 22, 36, 0.9);
}

.personal-card {
  display: grid;
  padding: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(2rem, 7vw, 7rem);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.personal-card > div:last-child > p {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.69);
}

.personal-card .text-link {
  color: var(--blue-300);
}

/* Projects */
.projects-hero {
  max-width: 59rem;
  padding-block: clamp(5rem, 10vw, 9rem);
  color: #fff;
  text-align: center;
  animation: rise-in 540ms ease-out both;
}

.projects-hero h1 {
  font-size: clamp(3.4rem, 7vw, 6.6rem);
}

.projects-hero .hero-lede {
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.72);
}

.project-index {
  display: flex;
  margin-top: 2.25rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.projects-section {
  padding-block: clamp(4rem, 8vw, 7.5rem);
  background: var(--cream);
}

.project-list {
  display: grid;
  gap: clamp(3rem, 8vw, 7rem);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  content-visibility: auto;
  contain-intrinsic-block-size: auto 780px;
}

.project-card-reverse .project-media {
  order: 2;
}

.project-media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #dce7e9;
  box-shadow: var(--shadow);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.025);
}

.project-copy h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.35rem, 4vw, 3.8rem);
}

.project-copy > p:not(.project-kicker):not(.project-note) {
  color: var(--muted);
}

.project-footer {
  display: flex;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1rem;
}

.result-chip {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.result-chip strong {
  margin-right: 0.22rem;
  color: var(--ink);
  font-size: 1rem;
}

.project-note {
  margin: 1.4rem 0 0;
  color: #758490;
  font-size: 0.72rem;
  line-height: 1.5;
}

.project-cta {
  color: #fff;
  background: rgba(6, 22, 36, 0.9);
}

.cta-card {
  display: flex;
  padding: clamp(2rem, 5vw, 4rem);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, rgba(32, 162, 206, 0.14), rgba(255, 255, 255, 0.04));
}

.cta-card h2 {
  max-width: 42rem;
  margin-bottom: 0;
}

.cta-card .button {
  flex: 0 0 auto;
}

/* Footer */
.site-footer {
  padding-block: 4rem 1.5rem;
  color: #fff;
  background: var(--navy-950);
}

.footer-grid,
.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.footer-name {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
}

.footer-grid p,
.footer-bottom {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

.footer-grid p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links a,
.footer-bottom a {
  transition: color 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: var(--blue-300);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin-bottom: 0;
}

.footer-utility {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.footer-utility .version-link {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.76rem;
}

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 4px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

@media (max-width: 900px) {
  .hero,
  .about-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero-portrait {
    width: min(100%, 33rem);
  }

  .portrait-frame img {
    height: 34rem;
  }

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

  .impact-card {
    min-height: 0;
  }

  .impact-number {
    margin-bottom: 1.8rem;
  }

  .values-grid,
  .personal-card {
    grid-template-columns: 1fr;
  }

  .values-copy {
    padding-top: 0;
  }

  .about-photo-wrap {
    width: min(100%, 32rem);
    margin-inline: auto;
  }

  .about-photo-wrap img {
    height: 39rem;
  }

  .about-hero-copy {
    padding-bottom: 1rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card-reverse .project-media {
    order: initial;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 1.5rem), var(--shell));
  }

  .site-nav {
    min-height: auto;
    padding-block: 0.75rem;
    flex-direction: column;
    gap: 0.65rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.68rem;
  }

  .nav-links a {
    padding: 0.55rem 0.5rem;
  }

  .nav-links .nav-resume {
    padding-inline: 0.65rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.25rem);
  }

  .hero,
  .about-hero {
    padding-block: 3.75rem;
    gap: 2.75rem;
  }

  .hero-body {
    font-size: 0.98rem;
  }

  .button-row .button {
    width: 100%;
  }

  .hero-portrait {
    width: min(100%, 25rem);
  }

  .portrait-frame img {
    height: 30rem;
  }

  .portrait-frame::before {
    right: 0.25rem;
  }

  .section {
    padding-block: 4.25rem;
  }

  .journey-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-photo-wrap img {
    height: 33rem;
  }

  .projects-hero {
    padding-block: 4.5rem;
  }

  .projects-hero h1 {
    font-size: clamp(3.2rem, 15vw, 4.4rem);
  }

  .project-footer,
  .cta-card,
  .footer-grid,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-links {
    justify-content: flex-start;
  }

  .project-media {
    aspect-ratio: 4 / 3;
  }

  .cta-card .button {
    width: 100%;
  }

  .footer-links {
    gap: 1rem;
  }
}

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

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