:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-accent: #0f172a;
  --surface: rgba(12, 18, 32, 0.8);
  --surface-strong: #0f172a;
  --text: #edf2ff;
  --muted: #9aa8c7;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #67e8f9;
  --accent-dark: #22d3ee;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 24%),
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12), transparent 20%),
    linear-gradient(180deg, #050816 0%, #060b1c 42%, #091225 100%);
}

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

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

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(12, 18, 32, 0.9), rgba(15, 23, 42, 0.78)),
    linear-gradient(135deg, rgba(103, 232, 249, 0.14), rgba(99, 102, 241, 0.08));
  box-shadow: var(--shadow);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -120px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.16), transparent 68%);
  pointer-events: none;
}

.topbar,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow,
.section-label,
.project-tag {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
}

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

h1,
h2,
.brand {
  line-height: 0.96;
}

h1 {
  margin-bottom: 18px;
  max-width: 30ch;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

li {
  margin-bottom: 6px;
}

.lede,
.section-copy,
.project-card p,
.modal-text {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.02rem;
  margin-top: 18px;
}

.section {
  display: block;
  margin-top: 32px;
}

.section-heading {
  max-width: 1400px;
  margin-bottom: 18px;
  padding: 0 8px;
}

.content-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.profile-card,
.subjects-card,
.ethos-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 20px;
}

.profile-section,
.subjects-section,
.ethos-section {
  margin-top: 34px;
}

.gallery-section {
  margin-top: 34px;
}

.profile-card {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: center;
}

.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.8);
}

.profile-copy,
.subject-item,
.ethos-item {
  display: grid;
  gap: 10px;
}

.subject-item,
.ethos-item {
  padding: 4px 4px 2px;
}

.subjects-card,
.ethos-card {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auto-carousel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 18, 32, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 40px 18px 30px;
}

.auto-carousel-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: auto-scroll 240s linear infinite;
  will-change: transform;
}

.auto-slide {
  flex: 0 0 500px;
  margin: 0;
  padding: 0;
}

.auto-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.auto-slide figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

main {
  padding: 28px 6px 0;
}

.content-card,
.contact-card {
  padding: 28px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.project-card:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(179, 92, 46, 0.35);
  outline-offset: 3px;
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 24px 24px 0 0;
  object-fit: cover;
}

.project-content {
  padding: 18px 22px 22px;
}

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

.contact-card {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 10px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 10px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-contact {
  display: grid;
  gap: 6px;
}

.footer-contact p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

.footer-email {
  width: fit-content;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.88);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.footer-button:hover {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.footer-button-secondary {
  border-color: rgba(148, 163, 184, 0.28);
}

.project-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
  z-index: 50;
}

.project-modal:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  display: block;
  cursor: zoom-out;
}

@keyframes auto-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.98);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.modal-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100%, 100%);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-bottom: 18px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.modal-carousel::-webkit-scrollbar {
  height: 10px;
}

.modal-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.modal-carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

.carousel-slide {
  margin: 0;
  scroll-snap-align: start;
}

.image-link {
  display: block;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  margin: 0 0 16px auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.9);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.modal-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 18px;
}

.image-link .modal-image {
  cursor: zoom-in;
}

.image-modal .modal-panel {
  width: min(960px, 100%);
}

.modal-image-full {
  aspect-ratio: auto;
  max-height: 78vh;
  margin: 0 auto;
}

.carousel-slide .modal-image,
.carousel-slide video {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.modal-hint {
  margin: 20px 0 18px;
  color: var(--accent);
  font-size: 0.9rem;
}

.carousel-slide video {
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: cover;
}

.modal-text {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}

@media (max-width: 960px) {
  .profile-card,
  .subjects-card,
  .ethos-card,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    padding: 0 8px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .hero {
    padding: 12px;
    border-radius: 22px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

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

  h1 {
    max-width: none;
  }

  .project-modal {
    padding: 16px;
  }

  .modal-panel {
    padding: 16px;
  }

  .profile-card,
  .subjects-card,
  .ethos-card {
    padding: 16px;
  }

  .auto-slide {
    flex-basis: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auto-carousel-track {
    animation: none;
    transform: none;
  }
}