/* =========================================================
   Jericho — Portfolio Stylesheet
   Sections: Reset & Root, Layout, Nav, Hero, About, Stack,
             Projects, Contact/Footer
   ========================================================= */

/* ---------- Root & Reset ---------- */
:root{
  --paper: #f6f3ec;
  --paper-line: #dad2bf;
  --ink: #1C2541;
  --ink-soft: #2d2a23;
  --oxblood: #8B3A3A;
  --forest: #3E6259;
  --card: #FBF9F4;
  --max: 1100px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

::selection{ background: var(--oxblood); color: var(--paper); }

a{ color: inherit; }

h1, h2, h3{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
}

/* ---------- Nav ---------- */
nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--paper-line);
}

nav .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 19px;
  text-decoration: none;
}

.brand .dot{ color: var(--oxblood); }

.navlinks{
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.navlinks a{
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}

.navlinks a:hover{ color: var(--ink); }

.navlinks a:focus-visible,
a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 640px){
  .navlinks{ display: none; }
}

.navlinks a.active{ color: var(--oxblood); }

/* ---------- Hero ---------- */
.hero{
  padding: 84px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero .wrap{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .board{ margin: 0 auto; }
}

.hero h1{
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  margin: 14px 0 18px;
}

.hero h1 em{
  font-style: italic;
  color: var(--oxblood);
}

.hero p.lede{
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-cta{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary{
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--paper-line);
}

.btn-ghost{
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.btn-ghost:hover{
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--paper);
}

.hero .wrap,
section .wrap {
  background: #ffffff;                 /* Pure white card face */
  border: 1.5px solid var(--ink);      /* Crisp signature border */
  border-radius: 8px;                  /* Clean, matching corners */
  padding: 48px;                       /* Generous breathing room inside the container */
  box-shadow: 8px 8px 0 var(--ink);    /* Bold, solid offset shadow (or use var(--oxblood)!) */
}

/* Signature: coordinate / chessboard grid */
.board{
  --n: 8;
  width: min(360px, 90vw);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  grid-template-rows: repeat(var(--n), 1fr);
  border: 1.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--oxblood);
}

.board div{
  opacity: 0;
  animation: cellIn .4s ease forwards;
}

.board div.dark{ background: var(--ink); }
.board div.light{ background: var(--card); }

.board div.marked::after{
  content: '';
  display: block;
  width: 34%;
  height: 34%;
  margin: 33% auto;
  border-radius: 50%;
  background: var(--oxblood);
}

@keyframes cellIn{
  to{ opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .board div{ animation: none; opacity: 1; }
}

.coords{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: right;
  width: min(360px, 90vw);
}

/* ---------- Page Header (standalone section pages) ---------- */
.page-header{
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--paper-line);
}

.page-header .eyebrow{ margin-bottom: 10px; }

.page-header h1{
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.06;
}

.back-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.back-link:hover{ color: var(--oxblood); }

/* ---------- Section Shell ---------- */
section{ padding: 76px 0; }
section + section{ border-top: 1px solid var(--paper-line); }

.section-head{
  margin-bottom: 40px;
  max-width: 60ch;
}

.section-head h2{
  font-size: clamp(28px, 3.6vw, 38px);
  margin-top: 8px;
}

/* ---------- Hero Profile Picture ---------- */
.hero-pfp-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-pfp-large {
  width: min(340px, 80vw);            /* Restrains the image size perfectly */
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;                 /* Makes it a clean circle */
  border: 1.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--oxblood); /* Shadow style matching your site */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pfp-large:hover {
  transform: translateY(-4px);
  box-shadow: 12px 12px 0 var(--ink);
}

/* ---------- About ---------- */
.about-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 780px){
  .about-grid{ grid-template-columns: 1fr; }
}

.about-grid p{
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.fact-list{
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px;
}

.fact-list li{
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--paper-line);
}

.fact-list span:first-child{ color: var(--ink-soft); }
.fact-list span:last-child{ text-align: right; font-weight: 500; }

/* ---------- Stack / Skills ---------- */
.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 3px;
  background: var(--card);
  border: 1px solid var(--paper-line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge .sw{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Projects ---------- */
.projects{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

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

.card{
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover{
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--ink);
}

.card .tag{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
}

.card h3{ font-size: 21px; line-height: 1.25; }

.card p{
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0;
  flex-grow: 1;
}

.card .stack{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.card .links{
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.card .links a{
  text-decoration: none;
  border-bottom: 1.5px solid var(--oxblood);
  padding-bottom: 1px;
}

/* Project 1 mini visual: chess notation strip */
.viz-chess{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  background: repeating-linear-gradient(90deg, var(--paper) 0 18px, var(--card) 18px 36px);
  border: 1px solid var(--paper-line);
  padding: 10px 12px;
  letter-spacing: 0.03em;
}

/* Project 2 mini visual: loading bars evoking factor loadings */
.viz-bars{
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
}

.viz-bars span{
  flex: 1;
  background: var(--forest);
  opacity: .85;
  border-radius: 1px 1px 0 0;
}

/* Project 3 mini visual: frame corners evoking a UI wireframe */
.viz-frame{
  height: 40px;
  border: 1.5px dashed var(--paper-line);
  position: relative;
}

.viz-frame::before,
.viz-frame::after{
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--oxblood);
}

.viz-frame::before{ top: -1.5px; left: -1.5px; border-right: none; border-bottom: none; }
.viz-frame::after{ bottom: -1.5px; right: -1.5px; border-left: none; border-top: none; }

/* ---------- Contact / Footer ---------- */
footer {
  background: rgba(245, 241, 232, 0.86);   /* Matches your header's frosted glass */
  backdrop-filter: blur(6px);              /* Matches your header's blur */
  border-top: 1px solid var(--paper-line); /* Elegant top divider line */
  padding: 40px 0;                         /* Generous, even breathing room */
  margin-top: 40px;                        /* Pushes it comfortably away from the last card */
}



.contact-inner{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px;
}

footer h2{ font-size: clamp(30px, 5vw, 46px); }

.contact-links{
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.contact-links a{
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}

.contact-links a:hover{
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.fine{
  margin-top: 32px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', monospace;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px dashed var(--paper-line);
  padding-top: 24px;
}
