/* ==========================================================
   Spencer Dickson — Portfolio Site (Projects layout tuned)
   Full replacement style.css
   ========================================================== */

:root{
  --bg:#0b0f17;
  --panel:#121a26;
  --panel2:#0f1623;
  --text:#e8eefc;
  --muted:#a8b4d6;
  --line:#22304a;

  --accent:#7aa2ff;
  --accent2:#5ef0c6;

  --radius:14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --max: 980px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 600px at 50% 0%, rgba(122,162,255,.10), transparent 60%),
              radial-gradient(900px 600px at 0% 10%, rgba(94,240,198,.08), transparent 55%),
              var(--bg);
  color:var(--text);
  line-height:1.45;
}
a{ color:inherit; text-decoration:none; }
.container{ width:min(var(--max), calc(100% - 32px)); margin:0 auto; }
main{ padding:30px 0 46px; }

/* ================= Header / Nav (single line) ================= */
header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,23,.72);
  border-bottom:1px solid rgba(34,48,74,.65);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:12px 0;
  flex-wrap:nowrap;
  min-width:0;
}
.brand{ display:flex; align-items:center; gap:12px; white-space:nowrap; flex:0 0 auto; font-weight:700; }
.logo-badge{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(122,162,255,.18);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.logo-img{ width:78%; height:78%; object-fit:contain; display:block; opacity:.92; }

.navlinks{
  display:flex; align-items:center; justify-content:center; gap:10px;
  flex:1 1 auto; min-width:0;
  flex-wrap:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.navlinks::-webkit-scrollbar{ display:none; }
.navlinks a{
  padding:9px 12px;
  border:1px solid rgba(34,48,74,.9);
  border-radius:999px;
  color:var(--muted);
  white-space:nowrap;
  flex:0 0 auto;
}
.navlinks a[aria-current="page"]{
  color:var(--text);
  border-color: rgba(122,162,255,.95);
  box-shadow: 0 0 0 3px rgba(122,162,255,.15);
}
.navlinks a:hover{
  border-color: rgba(122,162,255,.55);
  box-shadow: 0 0 0 3px rgba(122,162,255,.12);
}

.nav-cta{ display:flex; align-items:center; gap:10px; flex:0 0 auto; white-space:nowrap; }

/* ================= Buttons ================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(34,48,74,.9);
  color:var(--text);
  background: rgba(15,22,35,.65);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  white-space:nowrap;
}
.btn:hover{
  border-color: rgba(122,162,255,.55);
  box-shadow: 0 0 0 3px rgba(122,162,255,.12), 0 18px 34px rgba(0,0,0,.22);
}
.btn.primary{
  background: rgba(122,162,255,.18);
  border-color: rgba(122,162,255,.75);
}
.btn.small{ padding:8px 12px; border-radius:999px; }

/* ================= Cards / Typography ================= */
.card{
  background: linear-gradient(180deg, rgba(18,26,38,.92), rgba(18,26,38,.70));
  border:1px solid rgba(34,48,74,.85);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.hero{
  background: linear-gradient(180deg, rgba(18,26,38,.92), rgba(18,26,38,.65));
  border:1px solid rgba(34,48,74,.9);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
}
.kicker{ color:var(--accent2); font-weight:700; letter-spacing:.8px; font-size:12px; text-transform:uppercase; }
.small{ font-size:13px; color:var(--muted); }
h1{ margin:8px 0 10px; font-size: clamp(28px, 4vw, 40px); letter-spacing:-.5px; }
.h3, h3{ margin:16px 0 8px; font-size:16px; }
p{ color:var(--muted); }
ul{ color:var(--muted); }

/* ================= Projects layout ================= */
.project{ margin-top:16px; }
.full{ width:100%; }

.split{
  display:grid;
  grid-template-columns: 1.45fr 1fr;
  gap:18px;
  align-items:start;
}
@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; }
}

.proj-text{ min-width:0; }
.proj-media{
  min-width:0;               /* important: allow grid items to shrink */
  overflow:hidden;           /* prevent spill outside right column */
}

/* Media cards */
.media-card{
  background: rgba(11,15,20,.55);
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  padding:12px;
}

/* --- Vertical stack for Project 1/3/5 (fills blue space) --- */
.media-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.media-stack figure{
  margin:0;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
  aspect-ratio: 16 / 9;
}
.media-stack img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.media-stack figcaption{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* --- Project 2: big videos, no overlay --- */
.video-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.video-card{
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:16/9;
  position:relative;
}
.video-card video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* rotate helper for the pour video (inside a container) */
.video-rotate-left{
  transform: rotate(-90deg) scale(1.12);
  transform-origin:center;
}

/* captions */
.video-caption{
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
}

/* Project 2 image grid (bigger + contained) */
.media-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 980px){
  .media-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .media-grid{ grid-template-columns: 1fr; }
}
.media-grid figure{
  margin:0;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:16/9;
}
.media-grid img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#0b0f14;
  display:block;
}
.media-grid figcaption{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* Footer */
footer{
  border-top:1px solid rgba(34,48,74,.55);
  padding:18px 0 26px;
  color: var(--muted);
  margin-top: 22px;
}


/* Embedded media (e.g., YouTube) */
.media-embed{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
}
.media-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* Media stack captions */
.media-stack figcaption{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* ==========================================================
   Hobbies + Roadster pages — missing layout utilities
   (Added to support grid layouts & media on secondary pages)
   ========================================================== */

/* Generic grid utilities */
.grid{ display:grid; gap:16px; }
.third{ grid-column: span 4; }
@media (max-width: 980px){
  .third{ grid-column: 1 / -1; }
}

/* Button row */
.buttonrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

/* Two-up media (before/after, etc.) */
.media-two{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 720px){
  .media-two{ grid-template-columns: 1fr; }
}
.media-two figure{
  margin:0;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
}
.media-two img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.media-two figcaption{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* Highlight badges */
.badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.badge{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(34,48,74,.6);
  border-radius:999px;
  background: rgba(18,26,38,.55);
  color: var(--text);
  font-size:13px;
}
.badge .dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: var(--accent2);
  box-shadow: 0 0 0 3px rgba(94,240,198,.12);
}

/* Gallery grid */
.gallery{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 980px){
  .gallery{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .gallery{ grid-template-columns: 1fr; }
}
.gallery figure{
  margin:0;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
}
.gallery img{
  width:100%;
  height:210px;
  object-fit:cover;
  display:block;
}
.gallery figcaption{
  padding:10px 10px 12px;
  color:var(--muted);
  font-size:13px;
}

/* Responsive iframe ratio helper */
.ratio{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#0b0f14;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
}
.ratio iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* Simple table styling */
.table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(34,48,74,.6);
}
.table th, .table td{
  text-align:left;
  padding:12px 12px;
  border-bottom:1px solid rgba(34,48,74,.45);
}
.table thead th{
  background: rgba(18,26,38,.55);
  color: var(--text);
  font-weight:700;
}
.table tbody td{
  color: var(--muted);
}
.table tbody tr:last-child td{ border-bottom:0; }

/* Two-tile Hobbies layout */
.hobby-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:16px;
}
@media (max-width: 980px){
  .hobby-grid{ grid-template-columns: 1fr; }
}
.hobby-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.hobby-kicker{
  color:var(--accent2);
  font-weight:700;
  letter-spacing:.6px;
  font-size:12px;
  text-transform:uppercase;
}
.hobby-title{
  margin:8px 0 6px;
  font-size:18px;
}
.hobby-desc{ margin:0; color:var(--muted); }
.hobby-media{ display:block; margin-top:4px; }
.hobby-thumb{
  width:100%;
  aspect-ratio:16/9;
  background:#0b0f14 center/cover no-repeat;
  border:1px solid rgba(34,48,74,.75);
  border-radius:12px;
  overflow:hidden;
}
.hobby-media:hover .hobby-thumb,
.hobby-media:hover .media-two figure{
  border-color: rgba(122,162,255,.55);
  box-shadow: 0 0 0 3px rgba(122,162,255,.12);
}
.hobby-note{
  margin-top:14px;
  color:var(--muted);
}
