@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg: #eef3f4;
  --bg-elevated: #f7fafb;
  --ink: #1a2832;
  --ink-muted: #5a6b76;
  --ink-soft: #7a8b95;
  --line: rgba(26, 40, 50, 0.12);
  --accent: #1f7a6c;
  --accent-deep: #165a50;
  --accent-soft: rgba(31, 122, 108, 0.12);
  --shadow: 0 12px 40px rgba(26, 40, 50, 0.08);
  --radius: 14px;
  --nav-h: 64px;
  --max: 1080px;
  --side: 280px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(31, 122, 108, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(70, 110, 140, 0.12), transparent 50%),
    linear-gradient(180deg, #e8eef1 0%, var(--bg) 40%, #e6ecee 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-deep);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1.1em;
  color: var(--ink-muted);
}

p:last-child {
  margin-bottom: 0;
}

/* ----- Layout ----- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(247, 250, 251, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav__brand:hover {
  color: var(--accent);
}

.site-nav__links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent-soft);
}

.page {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 2.75rem 0 4.5rem;
}

.page--home {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
  padding-top: 3.5rem;
}

/* ----- Sidebar / identity ----- */

.identity {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  text-align: center;
  animation: fade-in 0.7s ease both;
}

.identity__photo {
  width: 168px;
  height: 168px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  /* Avoid parent transform blur on retina; keep pixels on whole numbers */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.identity__name {
  font-size: 1.55rem;
  margin-bottom: 0.35em;
}

.identity__role {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.identity__role a {
  font-weight: 500;
}

.identity__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.identity__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.identity__links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.identity__links a:hover {
  color: var(--accent);
}

/* ----- Content sections ----- */

.content-panel {
  animation: fade-in 0.75s ease 0.08s both;
}

.section + .section {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.12rem;
  color: var(--ink);
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.interest-list li {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
}

.timeline__year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.timeline__body {
  margin: 0;
  font-size: 0.98rem;
}

.featured-projects {
  display: grid;
  gap: 1rem;
}

.featured-link {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-link:hover {
  border-color: rgba(31, 122, 108, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}

.featured-link img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.featured-link h3 {
  font-size: 1rem;
  margin: 0 0 0.2em;
}

.featured-link p {
  margin: 0;
  font-size: 0.88rem;
}

.featured-link__arrow {
  margin-left: auto;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ----- Projects index ----- */

.page-header {
  margin-bottom: 2.25rem;
  animation: rise 0.65s ease both;
}

.page-header h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.45rem);
  margin-bottom: 0.45em;
}

.page-header p {
  max-width: 42rem;
  font-size: 1.08rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.35rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 18px rgba(26, 40, 50, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: rise 0.7s ease both;
}

.project-card:nth-child(2) {
  animation-delay: 0.08s;
}

.project-card:nth-child(3) {
  animation-delay: 0.16s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(31, 122, 108, 0.3);
  color: inherit;
}

.project-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d8e2e6;
}

.project-card__media img,
.project-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .project-card__media img,
.project-card:hover .project-card__media video {
  transform: scale(1.04);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.3rem 1.4rem;
}

.project-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.project-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35em;
}

.project-card p {
  font-size: 0.95rem;
  flex: 1;
}

.project-card__cta {
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

/* ----- Project detail ----- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.project-hero {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease both;
}

.project-hero__text h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  margin-bottom: 0.35em;
}

.project-hero__subtitle {
  font-size: 1.1rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.project-hero__media {
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d8e2e6;
  box-shadow: var(--shadow);
}

.project-hero__media img,
.project-hero__media video {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.project-body {
  display: grid;
  gap: 2rem;
  animation: rise 0.75s ease 0.1s both;
}

.project-body h2 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.resource-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resource-list a:hover {
  border-color: rgba(31, 122, 108, 0.35);
  box-shadow: 0 6px 20px rgba(26, 40, 50, 0.06);
}

.resource-list span {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.note {
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (min-width: 900px) {
  .project-hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

@media (max-width: 860px) {
  .page--home {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-top: 2rem;
  }

  .identity {
    position: static;
    max-width: 28rem;
    margin: 0 auto;
  }

  .timeline li {
    grid-template-columns: 4.5rem 1fr;
  }
}

@media (max-width: 540px) {
  .site-nav {
    padding: 0 1rem;
  }

  .page {
    width: min(100% - 1.75rem, var(--max));
    padding-top: 2rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
