/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --color-bg: #0e0e0e;
  --color-surface: #1a1a1a;
  --color-text: #f0f0f0;
  --color-text-muted: #888888;
  --color-accent: #c8a96e;
  --color-overlay: rgba(0, 0, 0, 0.55);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --transition-default: 0.3s ease;
}

/* ==========================================================================
   Base Reset & Global Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .display-text {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Info Section / Header
   ========================================================================== */
#info-section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.info-personal,
.info-tile {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end; /* Align text to bottom */
  overflow: hidden;
}

.info-personal {
  min-height: 50vh;
  padding: var(--spacing-md);
}

.info-tile {
  min-height: 33.33vh; /* Fallback for mobile stack */
  padding: var(--spacing-md);
  cursor: pointer;
}

/* Typography Overlays */
.info-personal__content {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.info-personal__name {
  font-size: 3rem;
  margin-bottom: var(--spacing-xs);
}

.info-personal__title {
  font-size: 1.25rem;
  color: var(--color-accent);
}

.info-tile__label {
  position: relative;
  z-index: 2;
  font-size: 2.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-default);
}

/* Hover Overlays */
.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity var(--transition-default);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-md);
  z-index: 1; /* Above background, below main text */
}

.info-personal:hover .overlay {
  opacity: 1;
}

.info-tile:hover .overlay {
  opacity: 1;
}

.info-personal__bio,
.info-personal__socials {
  color: var(--color-text);
  font-family: var(--font-body);
}

.info-personal__socials {
  margin-top: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-sm);
}

.info-personal__social-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-default);
}

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

.info-tile__hover-text {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  transform: translateY(10px);
  transition: transform var(--transition-default), opacity var(--transition-default);
}

.info-tile:hover .info-tile__hover-text {
  transform: translateY(0);
}

/* Responsive Grid Layout for Info Section */
.info-tiles-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 768px) {
  #info-section {
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
  }
  
  .info-personal {
    flex: 0 0 35%; /* Tablet layout */
    min-height: 100vh; /* Match full height */
  }

  .info-tiles-container {
    flex: 0 0 65%;
  }

  .info-tile {
    flex: 1; /* Evenly space the tiles vertically */
  }
}

@media (min-width: 1024px) {
  .info-personal {
    flex: 0 0 30%; /* 30% width on Desktop */
  }

  .info-tiles-container {
    flex: 0 0 70%; /* 70% width on Desktop */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  /* 2 on top, 1 full width on bottom */
  .info-tile:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  .info-tile:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .info-tile:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
  }
}

/* ==========================================================================
   Category Section Layout
   ========================================================================== */
section {
  display: block;
}

.category-banner {
  width: 100%;
  height: 80px;
  background-color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--color-bg);
}

.category-banner__label {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  color: var(--color-text);
  text-transform: uppercase;
}

/* ==========================================================================
   Project Blocks
   ========================================================================== */

/* 1. Project Hero */
.project-hero {
  position: relative;
  width: 100%;
  height: 80vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--spacing-md);
}

.project-hero__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay);
  z-index: 1;
}

.project-hero__title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.project-hero__tools {
  position: relative;
  z-index: 2;
  display: flex;
  gap: var(--spacing-sm);
}

.project-hero__tool-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

@media (max-width: 767px) {
  .project-hero {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: var(--spacing-sm);
  }
}

/* 2. Stage Images */
.project-stage {
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 3. Final Render */
.project-final {
  width: 100%;
  height: auto; /* Allow image to determine height, or lock to viewport depending on image AR */
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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