/* style.css — dark gaming style, fixed text color + stable background (no banding) */

:root{
  --bg: #0b1220;
  --surface: #0f1a2e;
  --card: #111f36;
  --text: #e7eefc;
  --muted: #b9c6e4;
  --line: rgba(231,238,252,.14);
  --brand: #6aa7ff;
  --brand-2:#8a7bff;
  --ok: #34d399;
  --warning: #fbbf24;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 16px;
}

/* RESET + make sure browser stays in dark mode */
*{ box-sizing: border-box; }
html{
  min-height: 100%;
  color-scheme: dark;
}
body{
  margin:0;
  min-height: 100vh;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color: var(--text);
  line-height: 1.55;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* Stable gradient background layer (fix “buggy strip/banding”) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 450px at 20% 10%, rgba(106,167,255,.22), transparent 60%),
    radial-gradient(800px 420px at 80% 0%, rgba(138,123,255,.18), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(52,211,153,.12), transparent 65%);
  transform: translateZ(0); /* helps GPU rendering */
}

/* FORCE TEXT COLOR so it never turns black */
h1,h2,h3,h4,h5,h6{ color: var(--text); margin-top: 0; }
p,li,span,small,label,td,th{ color: inherit; }
.muted{ color: var(--muted) !important; }

a, a:visited{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.skip-link{
  position:absolute;
  left:-999px; top:auto;
  width:1px; height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 16px; top: 16px;
  width:auto; height:auto;
  padding:10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 9999;
}

header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.55);
  border-bottom: 1px solid var(--line);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: .3px;
}
.brand-badge{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(106,167,255,.25);
}
.brand small{
  display:block;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .2px;
}

nav ul{
  list-style:none;
  display:flex;
  gap: 6px;
  padding:0;
  margin:0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
nav a:hover{
  border-color: var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-decoration:none;
}
nav a.active,
nav a[aria-current="page"]{
  background: rgba(106,167,255,.14);
  border-color: rgba(106,167,255,.35);
  color: var(--text);
}

main{ padding: 26px 0 56px; }

.hero{
  padding: 42px 0 18px;
}
.hero-card{
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,31,54,.92), rgba(15,26,46,.72));
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.hero h1{
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}
.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 68ch;
}

.actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-decoration:none;
  font-weight: 650;
}
.btn:hover{
  background: rgba(255,255,255,.07);
  text-decoration:none;
}
.btn.primary{
  border-color: rgba(106,167,255,.35);
  background: linear-gradient(135deg, rgba(106,167,255,.22), rgba(138,123,255,.18));
}
.btn.primary:hover{
  background: linear-gradient(135deg, rgba(106,167,255,.28), rgba(138,123,255,.22));
}

.grid{ display:grid; gap: 14px; }
.grid.cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section{ margin-top: 24px; }
.section h2{
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing:.2px;
}
.section p.lead{
  margin: 0 0 14px;
  color: var(--muted);
}

.card{
  border: 1px solid var(--line);
  background: rgba(17,31,54,.70);
  border-radius: var(--radius);
  padding: 16px;
}
.card h3{
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text);
}
.card p{
  margin: 0;
  color: var(--muted);
}

.kpi{ display:flex; align-items: baseline; gap: 10px; }
.kpi strong{ font-size: 28px; color: var(--text); }
.kpi span{ color: var(--muted); }

hr{
  border: none;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

.footer{
  border-top: 1px solid var(--line);
  background: rgba(11,18,32,.55);
  padding: 18px 0;
  color: var(--muted);
}
.footer .row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footer a{ color: var(--muted); }
.footer a:hover{ color: var(--text); }

/* Gallery (fixed image position — no crop, centered) */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item{
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* This is the key: contain + padding + fixed aspect box */
.gallery-item img{
  width: 100%;
  aspect-ratio: 4 / 3;      /* keeps all 6 boxes same size */
  object-fit: contain;      /* no crop */
  display: block;
  padding: 18px;            /* looks like your table spacing */
  background: rgba(255,255,255,.04);
}

/* Keep captions aligned at bottom */
.gallery-item .caption{
  margin-top: auto;
  padding: 12px 14px 14px;
}

/* Better responsiveness (optional but nice) */
@media (max-width: 1000px){
  .gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .gallery-grid{ grid-template-columns: 1fr; }
}

/* More gap between name and the "Sanrio" badge */
.gallery-item .caption{
  display: flex;
  align-items: center;
  gap: 12px;          /* increase this for more space */
  flex-wrap: wrap;    /* if small screen, badge goes next line */
}

.gallery-item .caption strong{
  margin-right: 0;    /* not needed now, gap handles spacing */
}


/* Table (Info page) */
.table-wrap{
  overflow-x:auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17,31,54,.55);
}
table{
  width:100%;
  border-collapse: collapse;
  min-width: 520px;
}
th, td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align:left;
}
th{ color: var(--text); background: rgba(255,255,255,.03); }
td{ color: var(--muted); }
tr:last-child td{ border-bottom: none; }

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text); /* changed from muted so badge text never looks “black” */
  font-weight: 600;
}

/* code blocks (prevents “black code text”) */
code, pre{
  color: var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 10px;
}
code{ padding: 2px 6px; }
pre{ padding: 12px; overflow:auto; }

/* Forms (Contact page) */
form{ display:grid; gap: 12px; }
label{ font-weight: 650; color: var(--text); }
input, textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus{
  border-color: rgba(106,167,255,.45);
  box-shadow: 0 0 0 4px rgba(106,167,255,.12);
}
textarea{ min-height: 120px; resize: vertical; }

/* Responsive */
@media (max-width: 900px){
  .grid.cols-3{ grid-template-columns: 1fr; }
  .grid.cols-2{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: 1fr; }
  nav ul{ justify-content: flex-start; }
}

/* Contact form extras (Formspree) */
select{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}
select:focus{
  border-color: rgba(106,167,255,.45);
  box-shadow: 0 0 0 4px rgba(106,167,255,.12);
}

.btn.full{
  width: 100%;
}

.form-note{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Honeypot hidden */
.hp{
  display:none;
}

/* --- Mobile fix: stop profile photo from overflowing the card --- */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* If your about header uses .resume-header / .resume-avatar */
.resume-header{
  overflow: hidden;           /* clips anything inside the card */
}

@media (max-width: 640px){
  .resume-header{
    flex-direction: column;   /* stack image + text */
    align-items: flex-start;
    gap: 12px;
  }

  /* Make the photo fit nicely on mobile */
  .resume-avatar{
    width: 100%;
    height: auto;
    border-radius: 14px;      /* nice corners */
    overflow: hidden;         /* clip image to corners */
    border: 1px solid var(--line);
  }

  .resume-avatar img{
    width: 100%;
    height: 320px;            /* control the height */
    object-fit: cover;        /* fill box without stretching */
    object-position: center;  /* keep face centered */
  }
}
