/* ==========================================================================
   1. DESIGN TOKENS & FONTS
   ========================================================================== */

:root {
  --color-black: #0a0a0a;
  --color-white: #ffffff;
  --color-red: #b40000;

  --font-display: 'Aovel_Sans', sans-serif;
  --font-body: 'Aovel_Sans', sans-serif;
  --font-size-label: 1.5rem;
}

@font-face {
  font-family: 'Aovel_Sans';
  src: url('../fonts/aovel_sans/AovelSans-Rounded.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

/* ==========================================================================
   2. RESET & BASE ELEMENTS
   ========================================================================== */

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

html, body {
  height: 100%;
  overflow: hidden; 
}

body {
  background: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-label);
  font-weight: 400;
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */

.page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh; /* Lock page to viewport height */
}

.page-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  height: 100vh;
  overflow-y: auto; /* Allows left pane to scroll smoothly if drawer exceeds space */
}

.main {
  padding: 4rem 2rem;
}

.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 2rem; 
}

/* ==========================================================================
   4. NAVIGATION & HEADER
   ========================================================================== */

.header {
  display: flex;
  align-items: flex-start;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.header-name {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.2; /* Tightened line height for visual alignment */
}

.logo img {
  height: 40px; 
  width: auto;
  display: block;
}

.menu ul {
  display: flex;
  list-style: none;
}

.menu a {
  color: var(--color-black);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.menu a:hover {
  color: var(--color-red);
}

.projects-nav {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.projects-nav h2 {
  font-size: var(--font-size-label);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.projects-nav ul {
  list-style: none;
}

.projects-nav a {
  color: var(--color-black);
  text-decoration: none;
}

.projects-nav a:hover {
  color: var(--color-red);
}

.page-content {
  position: relative;
}

.projects-nav {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   5. COMPONENTS & DRAWERS
   ========================================================================== */

/* Hero Section */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.hero-text-main p {
  font-size: var(--font-size-label);
}
.hero-text-main h1 {
  line-height: 1; 
  margin: 0;
}

.hero-image {
position: absolute;
inset: 0;
height: 100%;
}

.hero-image[hidden] {
display: none;
}

.hero-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.hero-image figcaption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
max-height: 45vh;
overflow-y: auto;
padding: 2rem;
background: rgba(10, 10, 10, 0.6);
color: var(--color-white);
}

.hero-image figcaption h3 {
font-family: var(--font-display);
font-weight: 400;
font-size: 1.25rem;
margin-bottom: 0.5rem;
}

.hero-image figcaption p {
font-size: 0.9rem;
line-height: 1.4;
}
.hero-visual {
position: relative;
height: 100vh;
overflow: hidden;
}
:root {
  --hero-title-offset: 4.5rem;
}

.hero-article {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: var(--color-white);
  padding: var(--hero-title-offset) 3rem 3rem;
}

.hero-article[hidden] {
display: none;
}

.hero-article h3 {
font-family: var(--font-display);
font-weight: 400;
font-size: 4rem;
color: var(--color-red);
margin-bottom: 1rem;
}

.hero-article .meta {
font-size: 0.95rem;
margin-bottom: 0.25rem;
}

.hero-article .intro {
margin-top: 2rem;
}

.hero-article .intro p {
margin-bottom: 1rem;
line-height: 1.5;
}

.hero-article img {
width: 100%;
height: auto;
display: block;
margin-top: 2rem;
}


.project-gallery {
margin-top: 2rem;
display: flex;
flex-direction: column;
gap: 3rem;
}
.project-gallery img {
width: 100%;
height: auto;
display: block;
}
.project-gallery img {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.project-gallery img:hover {
  filter: grayscale(0%);
}

.about-trigger {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-black);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
}

.about-trigger:hover {
  color: var(--color-red);
}
.about-trigger.is-active,
.project-trigger.is-active {
  color: var(--color-red);
}

.about-drawer {
  margin-top: 1rem;
  max-width: 70%; 
}

.about-drawer[hidden] {
  display: none;
}

.about-drawer p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.about-drawer p:last-child {
  margin-bottom: 0;
}
@media (max-width: 768px) {

  html, body {
    overflow-y: auto;
  }

  .page {
    grid-template-columns: 1fr;
    height: auto;
  }

  .page-content {
    height: auto;
    overflow-y: visible;
    padding: 1rem 1.25rem;
  }

  .header-brand {
    gap: 0.5rem;
  }

  .header-name {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 0;
  }

  .projects-nav {
    text-align: left;
  }

  .hero-text-main p {
    font-size: 1.1rem;
  }

  .hero-visual {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .hero-image {
    position: static;
    height: 50vh;
  }

  .hero-article {
    position: static;
    overflow-y: visible;
    padding: 1.5rem;
  }

  .hero-article h3 {
    font-size: 1.75rem;
  }

  .project-gallery img {
    max-width: 100%;
  }

}