/*
  Author: Sthefanny Silva
  Class: CIS 4004 – Project 1
  Assignment: Résumé Website
  Date: September 2025
  Description: CSS styling for résumé website (minimal · modern · professional theme).
*/

:root{
  --bg:#ffffff;
  --text:#161616;
  --muted:#6b6b6b;
  --beige:#efe7dc;          /* soft tan */
  --accent:#111111;         /* near-black accents */
  --card-bg:#f5f5f5;        /* light gray for cards/sidebar */
  --link:#161616;

  --radius:14px;
  --shadow:0 10px 24px rgba(0,0,0,.08);

  --font-body:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  --font-heading:Cambria,Georgia,"Times New Roman",serif;

  --size-0:12px;
  --size-1:14px;
  --size-2:16px; /* base */
  --size-3:18px;
  --size-4:22px;
  --size-5:28px;
  --size-6:36px;

  /* Fluid container: grows with viewport, capped at 1400px */
  --container-max: min(100%, 1400px);
}

/* -------------------- Reset & base -------------------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:var(--size-3);
  line-height:1.6;
}

img,iframe{ max-width:100%; height:auto; display:block; }
h1,h2,h3,h4{ font-family:var(--font-heading); color:#000; margin:0 0 .5rem; }
.site-title{ font-size:clamp(var(--size-5),3.2vw,42px); }
p{ margin:0 0 1rem; }
a{ color:var(--link); }

/* Prevent sideways scroll everywhere */
html,body{ max-width:100%; overflow-x:hidden; }

/* -------------------- Skip link -------------------- */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  position:static; width:auto; height:auto; padding:.5rem .75rem; background:var(--beige); border-radius:6px;
}

/* -------------------- Nav -------------------- */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;   /* push nav to the right */
  flex-wrap: wrap;
}
.site-nav a.nav-pill{
  text-decoration:none; color:var(--link);
  background:var(--card-bg);
  border:1px solid rgba(0,0,0,.12);
  padding:.5rem .75rem; border-radius:8px; display:inline-block;
}
.site-nav a.nav-pill[aria-current="page"]{ font-weight:600; }
.site-nav a.nav-pill:hover,
.site-nav a.nav-pill:active{ transform:none; box-shadow:none; }

/* -------------------- Universal container -------------------- */
.site-header,
.layout,
.narrow,
.site-footer{
  max-width:var(--container-max);
  margin-left:auto;
  margin-right:auto;
  padding-left:clamp(12px,3vw,24px);
  padding-right:clamp(12px,3vw,24px);
}

/* -------------------- Main layout -------------------- */
.layout{
  display:grid; gap:1.5rem; padding:1.25rem 0;  /* vertical padding only; sides handled by container */
}
@media (min-width: 900px) {
  .layout {
    grid-template-columns: minmax(240px, 280px) 1fr;
  }
}

.sidebar{
  display:grid; gap:1rem; align-content:start;
  background:var(--card-bg); padding:1rem; border-radius:var(--radius); box-shadow:var(--shadow);
}
.main-column{ display:grid; gap:1rem; }

@media (max-width:899px){
  .sidebar{ margin-bottom:1rem; }
}

/* -------------------- Cards & general blocks -------------------- */
.card{
  background:var(--card-bg);
  padding:1rem;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid rgba(0,0,0,.06);
}
/* --- Headshot image fix --- */

.headshot{
  width: min(100%, 350px);  /* never exceed the sidebar; cap at 350px */
  aspect-ratio: 1 / 1;      /* keep it square without hard-coding height */
  object-fit: cover;        /* crop nicely */
  border-radius: 12px;

  display: block;
  margin-left: auto;
  margin-right: auto;       /* centers it horizontally */
}

.contact-list{ list-style:none; padding:0; margin:0; }
.contact-list li{ margin:.25rem 0; }
.skill-groups{ display:grid; gap:.75rem; }
.skill-groups article{ background:rgba(0,0,0,.03); padding:.75rem; border-radius:10px; }

/* -------------------- Projects (home) -------------------- */
.project-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}

.project-tile{
  display:grid; grid-template-columns:110px 1fr; gap:.85rem; align-items:start;
  padding:.9rem; border-radius:14px; background:var(--card-bg);
  border:1px solid rgba(0,0,0,.06);
  text-decoration:none; color:inherit;
  box-shadow:0 1px 0 rgba(0,0,0,.05);
  transition:none;
  cursor:default;
}
.project-tile:hover,
.project-tile:active,
.project-tile:focus-within{
  transform:none;
  box-shadow:0 1px 0 rgba(0,0,0,.05);
}
.project-tile img{ border-radius:10px; }
.project-tile h3{ margin:0 0 .25rem; }
.project-tile p{ margin:0; color:var(--muted); }

.badges{
  list-style:none; padding:0; margin:.5rem 0 0;
  display:flex; gap:.5rem; flex-wrap:wrap;
}
.badges li{
  background:#e8e2d7;
  padding:.2rem .55rem;
  border-radius:999px;
  font-size:var(--size-1);
  transition:none;
}
.badges li:hover{ background:#e8e2d7; color:var(--text); }

/* -------------------- Project pages -------------------- */
.narrow{ max-width:900px; }
.project-figure{ margin:1rem 0; }
.project-figure img{ border-radius:12px; }

/* -------------------- Footer -------------------- */
.site-footer{ padding:2rem 0; text-align:center; color:var(--muted); }

/* -------------------- Focus styles -------------------- */
:focus-visible{ outline:3px solid #3b82f6; outline-offset:2px; border-radius:6px; }

/* -------------------- Embedded demo (EDESim) -------------------- */
.embed iframe{
  width:100%; height:520px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px; background:#fff;
}

/* Demo disclaimer */
.disclaimer{
  font-size:var(--size-1);
  color:var(--muted);
  margin:.25rem 0 .5rem;
}

/* -------------------- Print -------------------- */
@media print{
  .site-header,.site-footer,.header-actions,.project-grid img{ display:none !important; }
  .layout{ display:block; padding:0; }
  .card,.sidebar{ box-shadow:none; background:#fff; }
}

/* -------------------- CUSTOM OVERRIDES -------------------- */

/* Home page layout centered like project pages */
@media (min-width: 900px){
  .layout{
    grid-template-columns: minmax(240px, 300px) minmax(0, 880px);
    justify-content: center;
    column-gap: 1.5rem;
  }
}
.main-column > .card { max-width: 880px; }

/* Project 1 screenshot bigger & centered */
.project-figure img{
  width: clamp(560px, 62vw, 960px);
  height: auto;
  margin-inline: auto;
}

/* -------------------- Project 2 Demo -------------------- */
.codeblock{
  background:#111;
  color:#eee;
  padding:1rem;
  border-radius:10px;
  overflow:auto;
  max-height:420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:14px;
  line-height:1.45;
  border:1px solid rgba(0,0,0,.2);
}

/* -------------------- Header -------------------- */
.site-header{
  display:flex;                 /* one layout system: flex */
  align-items:center;
  gap:1rem;
  padding:.75rem 1rem;
  background:var(--bg);
  border-bottom:1px solid rgba(0,0,0,.06);

  /* keep header constrained like the rest */
  max-width:var(--container-max);
  margin-inline:auto;
  padding-left:clamp(12px,3vw,24px);
  padding-right:clamp(12px,3vw,24px);
}

.brand{ flex:1 1 auto; }        /* brand stays on the left */

.site-nav{ margin-left:auto; }  /* nav moves to the right of brand */

.site-nav ul{
  list-style:none; margin:0; padding:0;
  display:flex; gap:.5rem; justify-content:flex-end; flex-wrap:wrap;
}

.icon-button,.action-button{
  font:inherit; border:1px solid rgba(0,0,0,.12); background:var(--card-bg); color:var(--text);
  padding:.5rem .75rem; border-radius:8px; cursor:pointer;
}
.action-button{ text-decoration:none; display:inline-block; }

.header-actions{
  margin-left:.75rem;           /* download button at the far right */
  display:flex; gap:.5rem;
}

@media (max-width:720px){
  .site-header{
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .brand{ flex-basis:100%; }

  /* Make nav take a full row and center its items */
  .site-nav{
    margin-left: 0;
    flex-basis: 100%;
  }
  .site-nav ul{
    justify-content: center;   /* was flex-end on desktop */
  }

  /* Make the right-side buttons (e.g., Download Resume) center on their own row */
  .header-actions{
    margin-left: 0;            /* remove right-leaning offset */
    flex-basis: 100%;          /* new line under nav */
    justify-content: center;   /* center the buttons */
  }
}
