/* ============================================================
   Forrest Li — ME Portfolio — shared stylesheet
   Original visual language preserved as-is.
   Additions are clearly marked (nav bar, card links, placeholders).
   ============================================================ */

:root{
  --bg: #5d84aa;
  --bg-deep: #52779a;

  --ink: #f5f9fc;
  --muted: #d2dfeb;

  --line: #edf5fb;
  --line-faint: rgba(237,245,251,.18);
  --line-faint2: rgba(237,245,251,.06);

  --accent: #ff851f;

  --grid: 42px;
}

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

html{scroll-behavior:smooth;}

body{
  background:
    linear-gradient(var(--line-faint2) 1px, transparent 1px) 0 0/var(--grid) var(--grid),
    linear-gradient(90deg, var(--line-faint2) 1px, transparent 1px) 0 0/var(--grid) var(--grid),
    var(--bg);
  color:var(--ink);
  font-family:'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;}

.stencil{
  font-family:'Big Shoulders Stencil', sans-serif;
  text-transform:uppercase;
  letter-spacing:0.02em;
}

.mono{
  font-family:'IBM Plex Mono', monospace;
  letter-spacing:0.04em;
}

/* corner coordinate marks */
.crosshair{
  position:fixed;
  width:22px;height:22px;
  pointer-events:none;
  opacity:0.55;
  z-index:5;
}
.crosshair::before, .crosshair::after{
  content:"";
  position:absolute;
  background:var(--line);
}
.crosshair::before{width:100%;height:1px;top:50%;left:0;}
.crosshair::after{width:1px;height:100%;left:50%;top:0;}
.ch-tl{top:18px;left:18px;}
.ch-tr{top:18px;right:18px;}
.ch-bl{bottom:18px;left:18px;}
.ch-br{bottom:18px;right:18px;}

/* ============================================================
   NEW — GLOBAL TOP NAVIGATION
   Static (not fixed) so it never collides with the corner
   crosshairs, and stays "not flashy" per the brief.
   Reused, unchanged, across every page.
   ============================================================ */
.site-nav{
  border-bottom:1px solid var(--line-faint);
  padding: 22px 8vw;
  position:relative;
  z-index:10;
}
.nav-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
}
.nav-brand{
  font-family:'Big Shoulders Stencil', sans-serif;
  text-transform:uppercase;
  letter-spacing:0.04em;
  font-size:1.15rem;
  font-weight:700;
  text-decoration:none;
  color:var(--ink);
}
.nav-brand span{color:var(--accent);}
.nav-links{
  display:flex;
  gap:30px;
  list-style:none;
}
.nav-link{
  font-family:'IBM Plex Mono', monospace;
  letter-spacing:0.06em;
  font-size:11.5px;
  text-decoration:none;
  color:var(--muted);
  padding-bottom:5px;
  border-bottom:1px solid transparent;
  transition:color 0.2s ease, border-color 0.2s ease;
}
.nav-link:hover{color:var(--ink);}
.nav-link[aria-current="page"]{
  color:var(--accent);
  border-color:var(--accent);
}

/* ===== HERO ===== */
.hero{
  min-height:90vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: 6vh 8vw 6vh;
  position:relative;
  border-bottom:1px solid var(--line-faint);
}

.sheet-tag{
  position:absolute;
  top:40px; right:8vw;
  text-align:right;
  font-size:11px;
  color:var(--muted);
  line-height:1.6;
}
.sheet-tag span{color:var(--accent);}

.eyebrow{
  font-size:12px;
  color:var(--muted);
  margin-bottom:18px;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:26px;height:1px;
  background:var(--accent);
  display:inline-block;
}

h1.stencil{
  font-size:clamp(3rem, 9vw, 7.5rem);
  font-weight:900;
  line-height:0.86;
  color:var(--ink);
}
h1.stencil .thin{
  -webkit-text-stroke: 1.5px var(--ink);
  color:transparent;
  display:block;
}

.role-line{
  margin-top:22px;
  font-size:clamp(1rem, 2vw, 1.25rem);
  color:var(--muted);
  max-width:640px;
  font-weight:400;
}
.role-line b{color:var(--ink); font-weight:600;}

.dim-line{
  margin-top:56px;
  display:flex;
  align-items:center;
  gap:14px;
  color:var(--line);
  font-size:12px;
  max-width:520px;
}
.dim-line .arrow{color:var(--accent);}
.dim-line .track{
  flex:1;
  height:1px;
  background:
    repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}

.scroll-cue{
  margin-top:70px;
  font-size:11px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
}
.scroll-cue .bounce{
  display:inline-block;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(5px);}
}

/* ===== INDEX OF DRAWINGS / PROJECT GRID ===== */
.index-section{
  padding: 60px 8vw 60px;
}
.index-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  border-bottom:1px solid var(--line-faint);
  padding-bottom:18px;
  margin-bottom:48px;
  flex-wrap:wrap;
  gap:16px;
}
.index-head h2.stencil{
  font-size:clamp(1.6rem, 3vw, 2.4rem);
  font-weight:700;
}
.index-head .count{
  font-size:12px;
  color:var(--muted);
}

.grid-sheets{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1px;
  background:var(--line-faint);
  border:1px solid var(--line-faint);
}
@media(max-width:820px){
  .grid-sheets{grid-template-columns:1fr;}
}

.sheet{
  background:var(--bg);
  padding:38px 34px;
  position:relative;
  transition:background 0.25s ease;
  cursor:default;
}
.sheet:hover{background:var(--bg-deep);}
.sheet:hover .sheet-icon svg{stroke:var(--accent);}
.sheet:hover .dwg-no{color:var(--accent);}

/* NEW — makes whole card clickable while preserving all hover effects above */
a.sheet{
  display:block;
  text-decoration:none;
  color:inherit;
}

.sheet-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:22px;
}
.dwg-no{
  font-size:12px;
  color:var(--muted);
  transition:color 0.25s ease;
}
.sheet-icon svg{
  width:46px;height:46px;
  stroke:var(--line);
  fill:none;
  stroke-width:1.4;
  transition:stroke 0.25s ease;
}

.sheet h3.stencil{
  font-size:1.7rem;
  font-weight:700;
  margin-bottom:10px;
}
.sheet p{
  font-size:14px;
  line-height:1.6;
  color:var(--muted);
  max-width:38ch;
  margin-bottom:16px;
}
.sheet .tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.sheet .tags span{
  font-size:10.5px;
  color:var(--line);
  border:1px solid var(--line-faint);
  padding:4px 9px;
  letter-spacing:0.06em;
}

/* NEW — small link under the featured grid on the homepage, pointing to the full archive */
.view-all{
  margin-top:36px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:var(--muted);
  text-decoration:none;
  border-bottom:1px solid var(--line-faint);
  padding-bottom:4px;
  transition:color 0.2s ease, border-color 0.2s ease;
}
.view-all:hover{color:var(--accent); border-color:var(--accent);}

/* ===== SECONDARY STRIP: research + other work ===== */
.strip{
  padding: 20px 8vw 90px;
}
.strip-inner{
  border:1px solid var(--line-faint);
  padding:36px 34px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:30px;
}
@media(max-width:820px){
  .strip-inner{grid-template-columns:1fr;}
}
.strip-block .mono.label{
  font-size:11px;
  color:var(--accent);
  margin-bottom:10px;
  display:block;
}
.strip-block h4.stencil{
  font-size:1.3rem;
  margin-bottom:10px;
  font-weight:700;
}
.strip-block p{
  font-size:13.5px;
  color:var(--muted);
  line-height:1.6;
}

/* ===== NEW — generic page header, used on Projects / Resume / Contact ===== */
.page-header{
  padding: 70px 8vw 20px;
  border-bottom:1px solid var(--line-faint);
}
.page-header .eyebrow{margin-bottom:18px;}
.page-header h1.stencil{
  font-size:clamp(2.2rem, 6vw, 4rem);
  font-weight:900;
  line-height:0.9;
  margin-bottom:18px;
}
.page-header p{
  font-size:1rem;
  color:var(--muted);
  max-width:640px;
  line-height:1.6;
  padding-bottom:50px;
}

/* ===== NEW — simple placeholder block for Resume / Contact stubs ===== */
.placeholder{
  padding: 90px 8vw 120px;
}
.placeholder-box{
  border:1px dashed var(--line-faint);
  padding:60px 34px;
  text-align:center;
}
.placeholder-box .mono{
  font-size:11px;
  color:var(--accent);
  display:block;
  margin-bottom:14px;
}
.placeholder-box h2.stencil{
  font-size:2rem;
  margin-bottom:14px;
}
.placeholder-box p{
  font-size:14px;
  color:var(--muted);
  max-width:46ch;
  margin:0 auto;
  line-height:1.6;
}

/* ===== TITLE BLOCK FOOTER ===== */
footer{
  border-top:1px solid var(--line-faint);
}
.title-block{
  display:grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
}
@media(max-width:820px){
  .title-block{grid-template-columns:repeat(2, 1fr);}
}
.tb-cell{
  border-right:1px solid var(--line-faint);
  border-top:1px solid var(--line-faint);
  padding:18px 20px;
}
.tb-cell:last-child{border-right:none;}
.tb-cell .k{
  font-size:9.5px;
  color:var(--muted);
  margin-bottom:6px;
  display:block;
}
.tb-cell .v{
  font-size:13px;
  color:var(--ink);
}
.tb-cell .v a{
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px solid var(--line-faint);
}
.tb-cell .v a:hover{color:var(--accent); border-color:var(--accent);}

/* ============================================================
   NEW — HERO EDGE MARK
   A quiet vertical annotation on the right edge of the hero,
   in the spirit of margin notes on a drawing sheet. It fills the
   negative space on the right without centering the hero content,
   and doubles as a soft preview of the section that follows.
   ============================================================ */
.hero-edge-mark{
  position:absolute;
  right:8vw;
  top:50%;
  transform:translateY(-50%) rotate(180deg);
  writing-mode:vertical-rl;
  text-orientation:mixed;
  font-size:10.5px;
  letter-spacing:0.22em;
  color:var(--muted);
  opacity:0.5;
  white-space:nowrap;
  pointer-events:none;
}
@media(max-width:900px){
  .hero-edge-mark{display:none;}
}

/* ============================================================
   NEW — CAD SKETCH ANIMATION
   Replaces the old typing-cursor/pencil concept. Mimics sketching
   reference geometry in Fusion 360 / SolidWorks: a construction
   line draws out, a datum point appears at its end, the word
   solidifies from construction-gray to blueprint-white, then the
   construction geometry (line + point) is deleted, leaving only
   the finished word before it dissolves for the next one.
   ============================================================ */
.hero-animation{
  margin-top:46px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
}
.animation-label{
  font-size:11px;
  color:var(--muted);
}
.cad-sketch{
  display:inline-flex;
  align-items:center;
  min-height:1.6em;
}
.construction-line{
  display:inline-block;
  height:1px;
  width:0;
  background:repeating-linear-gradient(90deg, var(--muted) 0 5px, transparent 5px 10px);
  transition:width 0.45s ease, opacity 0.35s ease;
}
.construction-line.grow{margin-right:10px;}
.endpoint-dot{
  width:5px;height:5px;
  border-radius:50%;
  background:var(--accent);
  opacity:0;
  transition:opacity 0.25s ease;
  margin-right:12px;
  flex-shrink:0;
}
.endpoint-dot.show{opacity:1;}
.sketch-word{
  font-size:clamp(1rem, 2vw, 1.3rem);
  color:var(--muted);
  opacity:0;
  transition:opacity 0.5s ease, color 1.1s ease;
}
.sketch-word.reveal{color:var(--ink);}

/* ============================================================
   NEW — ABOUT SECTION
   Sits immediately below the hero animation and bridges into the
   Featured Drawings index. Reuses the same title-block / strip
   visual language already established elsewhere on the site.
   ============================================================ */
.about-section{
  padding:54px 8vw;
  border-bottom:1px solid var(--line-faint);
}
.about-inner{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:30px;
  max-width:900px;
}
@media(max-width:700px){
  .about-inner{grid-template-columns:1fr; gap:14px;}
}
.about-label{
  font-size:11px;
  color:var(--accent);
  padding-top:4px;
  white-space:nowrap;
}
.about-body{
  font-size:14.5px;
  line-height:1.7;
  color:var(--muted);
  max-width:56ch;
}

/* ============================================================
   NEW — SECTION SEAM
   A short leader strip between the About block and the drawing
   index, styled like a fold/break mark on an engineering sheet.
   Strengthens the transition into Featured Drawings.
   ============================================================ */
.section-seam{
  display:flex;
  align-items:center;
  gap:14px;
  padding:20px 8vw 0;
  font-size:10.5px;
  color:var(--muted);
}
.seam-mark{color:var(--accent);}
.seam-line{
  flex:1;
  height:1px;
  background:repeating-linear-gradient(90deg, var(--line-faint) 0 6px, transparent 6px 12px);
}
.seam-text{white-space:nowrap;}
