/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-max: 1920px;
  --gutter: 18px;
  --columns: 12;
}

html,
body {
  height: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-weight: 700;
  background-color: var(--color-white);
  color: var(--color-black);
  line-height: 1;
  cursor: default;
}

* {
  cursor: inherit;
}

/* 12-Column Grid Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Header - Full Width with Internal Grid */
.header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-top: 30px;
  align-items: start;
}

/* Name - Spans columns 1-4 */
.name {
  grid-column: 1 / 5;
  font-size: clamp(32px, 3.5vw, 50px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
}

.name span {
  display: block;
}

/* Role - Spans columns 5-8 */
.role {
  grid-column: 5 / 8;
  font-size: clamp(16px, 1.7vw, 24px);
  line-height: 1.125;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  padding-top: 7px;
}

.role span {
  display: block;
}

/* Location - Spans columns 9-12 */
.location {
  grid-column: 9 / 13;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  font-size: clamp(16px, 1.7vw, 24px);
  line-height: 1.56;
  letter-spacing: -0.03em;
  justify-content: flex-end;
}

.arrow {
  font-family: 'Inter', sans-serif;
}

.location span {
  display: inline-block;
}

/* Main Content Area */
.main {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr;
  position: relative;
  overflow: hidden;
}

/* Bio Text - Columns 2-4 */
.bio {
  grid-column: 2 / 5;
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.155;
  letter-spacing: -0.03em;
  padding-top: 15vh;
  align-self: start;
}

.bio p {
  margin-bottom: 0;
}

/* Hero Image - Columns 5-12 */
.hero-image {
  grid-column: 5 / 13;
  grid-row: 1 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-top: 20vh;
  padding-bottom: 4vh;
  overflow: hidden;
}

.image-wrapper {
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 902 / 601;
}

.shader-canvas {
  width: 100%;
  height: 100%;
}

.shader-canvas canvas {
  display: block;
}

/* Contact Section - Columns 1-4 */
.contact {
  grid-column: 1 / 4;
  align-self: end;
  padding-bottom: 4vh;
}

.contact-label {
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.155;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.contact-link {
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.9;
  letter-spacing: -0.03em;
  color: var(--color-black);
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.contact-link:hover {
  opacity: 0.7;
}

/* Responsive Breakpoints */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --gutter: 24px;
  }

  .header {
    gap: 20px;
  }

  .location {
    gap: 15px;
  }

  .bio {
    grid-column: 1 / 5;
    padding-top: 100px;
  }

  .hero-image {
    padding-top: 180px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .header {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .name {
    grid-column: 1 / 2;
    font-size: 36px;
  }

  .role {
    grid-column: 2 / 3;
    font-size: 16px;
    padding-top: 4px;
    text-align: right;
  }

  .location {
    grid-column: 1 / -1;
    justify-content: flex-start;
    font-size: 18px;
    gap: 20px;
    margin-top: -10px;
  }

  .main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 40px;
    overflow: visible;
  }

  .bio {
    grid-column: 1;
    padding-top: 0;
    order: 1;
    font-size: 12px;
  }

  .hero-image {
    grid-column: 1;
    grid-row: auto;
    padding-top: 0;
    order: 2;
    align-items: center;
    justify-content: center;
  }

  .image-wrapper {
    aspect-ratio: 1 / 1;
  }

  .contact {
    grid-column: 1;
    padding-bottom: 20px;
    order: 3;
  }

  .contact-label {
    font-size: 12px;
  }

  .contact-link {
    font-size: 16px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  .name {
    font-size: 32px;
  }

  .role {
    font-size: 14px;
  }

  .location {
    font-size: 12px;
    gap: 15px;
  }
}

/* ===== Page Load Animations ===== */

@keyframes maskReveal {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

@keyframes imageReveal {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

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

/* Mask containers */
.name,
.role,
.location,
.bio,
.contact {
  overflow: hidden;
}

/* Animated elements */
.name span,
.role span,
.location .city,
.location .arrow {
  display: inline-block;
  animation: maskReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.bio p {
  display: block;
  animation: maskReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.contact-label,
.contact-link {
  display: block;
  animation: maskReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Staggered delays */
.name span:nth-child(1) {
  animation-delay: 0.1s;
}

.name span:nth-child(2) {
  animation-delay: 0.2s;
}

.role span:nth-child(1) {
  animation-delay: 0.25s;
}

.role span:nth-child(2) {
  animation-delay: 0.35s;
}

.location .city:nth-child(1) {
  animation-delay: 0.4s;
}

.location .arrow {
  animation-delay: 0.5s;
}

.location .city:nth-child(3) {
  animation-delay: 0.6s;
}

.bio p:nth-child(1) {
  animation-delay: 0.5s;
}

.bio p:nth-child(2) {
  animation-delay: 0.6s;
}

.bio p:nth-child(3) {
  animation-delay: 0.7s;
}

.contact-label {
  animation-delay: 0.8s;
}

.contact-link {
  animation-delay: 0.9s;
}

/* Image animation */
.image-wrapper {
  animation: imageReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

/* Custom cursor */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: difference;
}