/* --- Modern CSS Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  font-family: var(--font-body, sans-serif);
  background-color: var(--bg);
  color: var(--secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.no-scroll {
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --- Global Variables --- */
:root {
  --bg: #0a0a0a;
  --bg-light: #1a1a1a;
  --primary: #eaeaea;
  --secondary: #999999;
  --accent-primary: #03dac6;
  --border-color: rgba(3, 218, 198, 0.2);
  --shadow-color: rgba(3, 218, 198, 0.1);
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
  --transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Core App Shell --- */
body:not(.no-cursor) * {
  cursor: none;
}
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  outline: none;
  z-index: -1;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent-primary);
  color: var(--bg);
  padding: 10px;
  z-index: 1000;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--accent-primary);
  z-index: 100;
  transform-origin: left;
  transform: scaleX(0);
}
#loading-screen {
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
.loader {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Sleek Cursor --- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border: 2px solid transparent;
  border-radius: 50%;
  transition: width 0.4s ease, height 0.4s ease, background-color 0.4s ease,
    border-color 0.4s ease;
}
.cursor-dot.interactive {
  width: 32px;
  height: 32px;
  background-color: transparent;
  border-color: var(--accent-primary);
}

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 3rem;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding var(--transition), background-color var(--transition),
    backdrop-filter var(--transition), border-bottom-color var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding: 1rem 3rem;
  background-color: rgba(10, 10, 10, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border-color);
}
.logo-link {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.nav-links a {
  font-weight: 600;
  color: var(--secondary);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header-icon-button {
  display: flex;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--secondary);
  transition: color var(--transition), transform var(--transition);
}
.header-icon-button:hover,
.header-icon-button.active {
  color: var(--primary);
}

/* --- Typography & Section Layout --- */
.content-section {
  width: 90%;
  max-width: 900px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem;
}
.reveal-wrapper {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  color: var(--primary);
}
.reveal-content {
  will-change: transform, opacity;
}
h1,
h2 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
h1 {
  font-size: clamp(3.5rem, 7vw, 6rem);
}
h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 650px;
  margin: 1.5rem auto 0;
  color: var(--secondary);
}
.char-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.char {
  display: inline-block;
}

/* --- Components --- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
  text-align: left;
}
.team-member-placeholder {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: rgba(35, 35, 35, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition), background-color var(--transition);
}
.team-member-placeholder:hover {
  transform: translateY(-5px);
  background-color: rgba(35, 35, 35, 0.7);
}
.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}
.team-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.team-info h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}
.team-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--secondary);
  margin: 0;
  max-width: 100%;
}
.team-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
}
.team-links a svg {
  width: 24px;
  height: 24px;
  fill: var(--secondary);
  transition: fill 0.3s ease, transform 0.3s ease;
}
.team-links a:hover svg {
  fill: var(--primary);
  transform: scale(1.1);
}
.portfolio-button {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  margin-left: auto;
  white-space: nowrap;
}
.portfolio-button:hover {
  background-color: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}
.project-card {
  position: relative;
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px -12px var(--shadow-color);
  border-color: rgba(3, 218, 198, 0.4);
}
.project-image-placeholder {
  width: 100%;
  height: 270px;
  background-color: #000;
  overflow: hidden;
}
.project-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-image-placeholder img {
  transform: scale(1.05);
}
.project-content {
  padding: 2rem;
  text-align: left;
  position: relative;
}
.project-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--bg-light), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-content::after {
  opacity: 1;
}
.project-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
}
.project-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.75rem 0 0;
  max-width: 100%;
}
.project-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-primary);
  font-weight: 600;
  transition: letter-spacing 0.3s ease, transform 0.3s ease;
}
.project-card:hover .project-link {
  letter-spacing: 0.05em;
  transform: translateX(5px);
}

/* --- Contact Button --- */
.conversation-button {
  background: var(--accent-primary);
  border: none;
  border-radius: 50px;
  padding: 1.25rem 3.5rem;
  transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
  color: #000;
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.conversation-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(3, 218, 198, 0.2);
  filter: brightness(1.1);
}

/* --- Scroll To Top Button --- */
#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  width: 3rem;
  height: 3rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2rem);
  transition: var(--transition);
}
#scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#scroll-to-top:hover {
  background-color: var(--accent-primary);
  color: var(--bg);
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--shadow-color);
}

/* --- Footer & Responsive --- */
.site-footer-main {
  position: relative;
  z-index: 5;
  padding: 4rem 3rem;
  background-color: transparent;
  border-top: 1px solid var(--border-color);
}
.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary);
}
@media (max-width: 768px) {
  .cursor-dot {
    display: none;
  }
  .site-header,
  .site-header.scrolled {
    padding: 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .site-nav.active .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 20;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
  .site-nav.active .nav-links a {
    font-size: 1.8rem;
  }
  .header-icon-button.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    z-index: 21;
  }
  .bar {
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform-origin: center;
  }
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(0.4rem) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-0.4rem) rotate(-45deg);
  }
  .team-member-placeholder {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .team-info {
    align-items: center;
    gap: 0.75rem;
  }
  .team-links {
    justify-content: center;
    width: 100%;
  }
  .portfolio-button {
    display: flex;
    margin-left: 1;
  }
}
