/* ======================================
   About page styles (clean + simplified)
   - Allows scrolling (overrides home grid/overflow)
   - Reuses Projects/Home menu styles from styles.css
   - Lines background animation
   - Mobile: avatar full-bleed at bottom
   ====================================== */

/* Google Font: Montserrat */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

/* Tokens */
:root{
  --bg: #fff;
  --text: #111;
  --muted: #555;
  --brand: #cc1f1a;
  --accent: #e11; /* Projects underline color */
  --container-w: 1040px;
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Motion */
  --fade-duration: 600ms;
  --fade-ease: cubic-bezier(.2,.7,.3,1);
}

/* --- Critical overrides so About scrolls like Projects --- */
html { height: auto; }                  /* don't lock to 100% height */
body.page-about{
  display: block;                       /* undo home page grid centering */
  height: auto;                         /* allow natural document height */
  overflow-y: auto;                     /* restore scrolling */
  overflow-x: clip;                     /* avoid sideways scroll with full-bleed image */
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ Lines background (behind content) ============ */
.lines{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  width: 100vw;
  height: 100vh;
}
.line{ position: relative; }
.line::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 16vh;
  opacity: 0.7;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0) 100%);
  animation: drop 8.5s linear infinite;
}
.line:nth-child(3n)::after  { animation-delay: .8s;  opacity: .55; height: 14vh; }
.line:nth-child(4n)::after  { animation-delay: 1.6s; opacity: .45; height: 12vh; }
.line:nth-child(5n)::after  { animation-delay: 2.4s; opacity: .65; height: 18vh; }
.line:nth-child(7n)::after  { animation-delay: 3.2s; opacity: .50; height: 20vh; }
.line:nth-child(11n)::after { animation-delay: 4.0s; opacity: .40; height: 10vh; }

@keyframes drop{
  0%   { top: -20vh; opacity: 0; }
  10%  { opacity: 1; }
  100% { top: 120vh; opacity: 0; }
}

/* ============ Header (small floating pill) ============ */
.site-header{
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(140%) blur(6px);
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.logo{ text-decoration: none; color: var(--text); font-weight: 600; }

/* ============ Content shell ============ */
.page{
  position: relative;           /* used for mobile avatar anchoring */
  z-index: 1;                   /* above lines */
  max-width: var(--container-w);
  margin: 120px auto 80px;
  padding: 0 20px;

  /* room for bottom menu on normal/tall screens */
  padding-bottom: clamp(96px, 12vh, 160px);
}
.hero h1{
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 10px 0;
}
.lead{
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  margin: 0 0 24px 0;
  color: var(--muted);
}

/* Two-column bio on wide screens */
.bio{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
.bio h2{ font-size: 1.25rem; margin: 0 0 8px 0; }
.highlights{ margin: 12px 0 0; padding-left: 18px; }

/* ===== Avatar ===== */
.bio-aside{
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}
.avatar{
  display: block;
  width: clamp(520px, 56vw, 1200px);
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  image-rendering: auto;
}

/* Contact */
.contact{ margin-top: 40px; }
.contact .links{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.btn{
  --btn-bg: #111;
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 22px rgba(0,0,0,.12); }
.btn:active{ transform: translateY(0); box-shadow: 0 8px 18px rgba(0,0,0,.10); opacity: .9; }

/* ============ Bottom-left Site Menu (position only) ============ */
/* We intentionally do NOT restyle .menu-link/.menu-list here so
   they look exactly like the Projects menu from styles.css */
.site-menu{
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 5; /* above content & lines */
}

/* Active underline to match Projects */
.menu-link.is-active{
  font-weight: 700;
  position: relative;
}
.menu-link.is-active::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 24px;
  background: var(--accent);
}

/* ============ Responsive ============ */
/* Tablet & down: single column */
@media (max-width: 980px){
  .bio{ grid-template-columns: 1fr; gap: 16px; }
  .avatar{ width: clamp(260px, 70vw, 640px); margin: 8px auto 0; }
}

/* Phones & short heights:
   - reserve space at the bottom for the avatar + fixed menu
   - anchor avatar full-bleed to the bottom
*/
@media (max-width: 640px), (max-height: 740px){
  body.page-about{ overflow-x: hidden; }

  .page{
    /* original padding for avatar (100vw) + extra for menu */
    padding-bottom: calc(100vw + 120px);
  }

  .avatar{
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100vw;
    max-width: none;
    height: auto;
  }

  .site-menu { bottom: 10px; left: 10px; }
  .site-header { top: 10px; left: 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .line::after{ animation: none; opacity: .15; }
  .btn{ transition: none !important; }
}

/* ===== Fade-in utilities ===== */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  will-change: opacity, transform;
  transition:
    opacity var(--fade-duration) var(--fade-ease) var(--d, 0ms),
    transform var(--fade-duration) var(--fade-ease) var(--d, 0ms);
}
.reveal.in{ opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none !important; transition:none !important; }
}

