﻿:root {
  color-scheme: dark;
  --bg: #000116;
  --panel: #010221;
  --text: #e6efe7;
  --muted: #9aa69c;
  --accent: #010221;
  --border: rgba(1, 2, 33, 0.5);
  --sidebar-width: 256px;
  --content-width: 640px;
  --layout-gap: 88px;
  --max-width: calc(var(--sidebar-width) + var(--content-width) + var(--layout-gap));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-y: scroll;
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px 24px 88px;
}

.mobile-header {
  display: none;
  margin-bottom: 24px;
}

.mobile-name {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: var(--panel);
  color: var(--text);
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 10px;
  transition: 0.4s cubic-bezier(0, 0, 0, 1);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: 0.4s cubic-bezier(0, 0, 0, 1);
}

.nav-toggle-icon::before {
  top: 0;
}

.nav-toggle-icon::after {
  bottom: 0;
}

body.nav-open .nav-toggle-icon::before {
  transform: translateY(4px) rotate(45deg);
}

body.nav-open .nav-toggle-icon::after {
  transform: translateY(-4px) rotate(-45deg);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  gap: var(--layout-gap);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.nav-close {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: var(--panel);
  color: var(--text);
  align-items: center;
  justify-content: center;
}

.nav-close::before,
.nav-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav-close::before {
  transform: rotate(45deg);
}

.nav-close::after {
  transform: rotate(-45deg);
}

.sidebar-name {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.sidebar-name:hover {
  color: var(--muted);
}

.sidebar-title {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-size: 0.92rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sidebar-link.external::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: auto;
  background-color: var(--muted);
  -webkit-mask: url("/assets/images/icons/arrow-up-right.svg") no-repeat center / contain;
  mask: url("/assets/images/icons/arrow-up-right.svg") no-repeat center / contain;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.sidebar-link.external:hover::after,
.sidebar-link.external:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
  background-color: var(--text);
}

.sidebar-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-logo {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link .year {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  background-color: var(--muted);
  -webkit-mask: var(--icon-url) no-repeat center / contain;
  mask: var(--icon-url) no-repeat center / contain;
  flex: 0 0 auto;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: var(--content-width);
}

.hero-image {
  width: min(100%, 640px);
  aspect-ratio: 8 / 5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f1712;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.intro {
  display: grid;
  gap: 16px;
  max-width: 60ch;
}

.intro-lead {
  font-weight: 600;
  font-size: 1.05rem;
}

.intro-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.intro-list li::before {
  content: "- ";
  color: var(--muted);
}

.intro-note {
  color: var(--muted);
}

.content-section {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.content-section h2 {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

.principles {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--text);
  max-width: 68ch;
}

.principles li {
  display: grid;
  gap: 6px;
  color: var(--text);
}

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

.education {
  display: grid;
  gap: 18px;
}

.education-item {
  display: grid;
  gap: 4px;
}

.education-item span {
  color: var(--muted);
}

.project-block {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.project-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.project-title {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

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

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-year {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-desc {
  color: var(--muted);
  margin: 0;
}

.project-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.project-links li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-links a {
  color: var(--text);
  text-decoration: none;
}

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

.project-page-header {
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--border);
}

.project-page-header h1 {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.project-meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.project-page-body {
  padding-top: 22px;
  display: grid;
  gap: 18px;
}

.project-page-body p {
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.back-link:hover {
  color: var(--text);
}

.case-studies-list {
  display: grid;
  gap: 40px;
}

.case-study-card {
  display: grid;
  gap: 20px;
}

.case-study-media {
  width: 100%;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 20% 20%, rgba(90, 120, 98, 0.22), rgba(15, 23, 18, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
}

.case-study-media img {
  width: 100%;
  height: auto;
  display: block;
}

.case-study-hero {
  margin-bottom: 12px;
}

.case-study-hero img {
  max-height: 420px;
  object-fit: cover;
}

.case-video {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1712;
}

.project-page-body h2 {
  margin: 26px 0 10px;
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
}

.project-page-body ul {
  margin: 0;
  padding-left: 20px;
}

.case-study-text h2 {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.35rem;
  margin: 0 0 10px;
}

.case-study-text h2 a {
  color: var(--text);
}

.case-study-text h2 a:hover {
  color: var(--accent);
}

.case-study-tldr {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.case-study-summary {
  margin: 0;
  color: var(--text);
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.project-list li {
  display: grid;
  gap: 4px;
}

.project-list span {
  color: var(--muted);
}

.project-card {
  display: grid;
  gap: 12px;
}

.project-thumb {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #101914;
}

.project-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.project-info {
  display: grid;
  gap: 4px;
}

.recommendations-list {
  display: grid;
  gap: 16px;
}

.recommendation {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.recommendation-header {
  display: grid;
  gap: 4px;
}

.recommendation-meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
}

.recommendation-body {
  overflow: hidden;
  max-height: 5.1em;
  transition: max-height 0.4s cubic-bezier(0, 0, 0, 0.3);
  will-change: max-height;
}

.recommendation-text {
  margin: 0;
  color: var(--text);
}

.recommendation-text + .recommendation-text {
  margin-top: 10px;
}

.recommendation-toggle {
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.recommendation-toggle:hover {
  color: var(--text);
}

.recommendation-toggle::after {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("/assets/images/icons/caret-down.svg") no-repeat center / contain;
  mask: url("/assets/images/icons/caret-down.svg") no-repeat center / contain;
  transition: transform 0.2s ease;
}

.recommendation.expanded .recommendation-toggle::after {
  -webkit-mask: url("/assets/images/icons/caret-up.svg") no-repeat center / contain;
  mask: url("/assets/images/icons/caret-up.svg") no-repeat center / contain;
}

.recommendation.expanded .recommendation-body {
  max-height: 1000px;
}

.case-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--border);
}

.case-header h1 {
  font-family: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.case-logo {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
}

.case-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.case-role {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.case-body {
  padding-top: 22px;
  max-width: 68ch;
  display: grid;
  gap: 18px;
}

.case-body p {
  margin: 0;
}

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

  .sidebar {
    position: fixed;
    inset: 0;
    padding: 96px 24px 40px;
    background: rgba(1, 2, 33, 0.98);
    transform: scale(0.98);
    transform-origin: center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0, 0, 0, 1), opacity 0.4s cubic-bezier(0, 0, 0, 1);
    z-index: 1000;
    overflow-y: auto;
    max-height: none;
    padding-right: 24px;
  }

  .mobile-header {
    display: block;
    padding-top: 48px;
  }

  .nav-toggle {
    display: inline-flex;
    opacity: 0.7;
  }

  .nav-close {
    display: inline-flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .nav-toggle {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .page {
    padding: 40px 18px 80px;
  }

  .layout {
    gap: 32px;
  }

  .sidebar {
    gap: 20px;
  }

  .sidebar-link {
    font-size: 0.88rem;
  }
}

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