/* ==========================================================================
   bulluraj mutum — Portfolio Layout (Refined Editorial)
   ========================================================================== */

/* Design Tokens & Reset */
:root {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-highlight: #e53935;
  --color-surface: #f5f5f5;
  --color-success: #16a34a;
  --color-placeholder: #e5e5e5;
  --font-primary: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-photo: 0px; /* Hard 90° corners */
  --page-padding-x: clamp(24px, 4.5vw, 64px);
  --page-padding-y: clamp(12px, 1.5vw, 24px);
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}


body.force-dark {
  --color-bg: #0e100f;
  --color-text: #f5f5f7;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #666666;
  --color-highlight: #ff5252;
  --color-surface: #1a1a1a;
  --color-success: #22c55e;
  --color-placeholder: #2a2a2a;
}

body.force-light {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-highlight: #e53935;
  --color-surface: #f5f5f5;
  --color-success: #16a34a;
  --color-placeholder: #e5e5e5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: visible;
  text-transform: uppercase;
}

/* Page Frame Container */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.canvas-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--page-padding-y) var(--page-padding-x);
  box-sizing: border-box;
  animation: pageFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Entrance Animations */
.reveal-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  flex-shrink: 0;
  min-width: min-content;
  padding: 0.1em;
  margin: -0.1em;
}

.reveal-text {
  display: inline-block;
  transform: translateY(110%);
  animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
  0% { transform: translateY(110%); }
  100% { transform: translateY(0); }
}

.image-reveal {
  opacity: 0;
  transform: scale(0.6);
  animation: scaleUpReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
}

@keyframes scaleUpReveal {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Case Study Layout
   ========================================================================== */
.case-study-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.case-study-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.case-study-subtitle {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  max-width: 250px;
  text-align: right;
  margin-top: 0.5em; /* Optical alignment with huge text */
}

.case-study-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-placeholder);
  margin-bottom: clamp(48px, 8vw, 96px);
  border-radius: 8px; /* Optional, depending on global aesthetic */
}

.case-study-body {
  display: flex;
  gap: clamp(32px, 6vw, 80px);
  align-items: flex-start;
}

.case-study-nav {
  position: sticky;
  top: clamp(80px, 10vw, 120px);
  width: clamp(200px, 20vw, 250px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-study-nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
  opacity: 0.6;
}

.case-study-nav-link:hover,
.case-study-nav-link.active {
  opacity: 1;
}

.case-study-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.case-study-section {
  scroll-margin-top: clamp(80px, 10vw, 120px); /* Account for sticky nav */
}

.case-study-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.case-study-section-line {
  width: 32px;
  height: 6px;
  background-color: #3b82f6;
  border-radius: 4px;
}

.case-study-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
}

.case-study-section p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 1rem;
}

#introduction p {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ==========================================================================
   Top Header Bar
   ========================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 10;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.brand-name {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}

.symbol {
  font-size: clamp(1.25rem, 1.5vw, 1.4rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  user-select: none;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(40px, 8vw, 120px);
}

/* Left Column: Navigation & Footer */
.left-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  flex: 1;
  max-width: 600px;
}

/* Primary Navigation */
.primary-nav {
  margin-bottom: clamp(40px, 6vw, 80px);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(0.2rem, 0.4vw, 0.5rem);
}

.nav-link {
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--color-text);
  text-decoration: none;
  display: inline-block;
  transition: color var(--transition-fast);
}

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

.nav-link.hover-red:hover {
  color: var(--color-highlight);
}

/* Bottom Footer Social Links */
.bottom-bar {
  margin-top: auto;
}

.social-list {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  flex-wrap: wrap;
}

.social-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Right Column Profile Photo & Info
   ========================================================================== */
.profile-section {
  flex-shrink: 0;
  width: clamp(320px, 35vw, 480px);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.photo-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.photo-wrapper {
  width: 100%;
  border-radius: var(--radius-photo);
  overflow: hidden;
  line-height: 0;
  background-color: var(--color-surface);
}

.profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 308 / 344;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-photo);
}

/* Profile Info Block */
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.role-caption .separator {
  color: var(--color-text-tertiary);
  font-weight: 400;
}

.description {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.4;
  max-width: 440px;
}

.availability {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-success); /* Professional green */
  margin-top: 8px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .main-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 48px;
  }

  .profile-section {
    width: min(100%, 400px);
  }

  .left-column {
    max-width: 100%;
  }
}

/* ==========================================================================
   Projects Gallery Grid
   ========================================================================== */
.projects-container {
  width: 100%;
  max-width: 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px; /* Increased spacing based on user request */
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-placeholder); /* Dynamic placeholder */
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.project-meta {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1.4;
}

.project-meta-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.project-meta-bottom {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   Image Asset Protection
   ========================================================================== */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
