/* =========================
   Chaise Coffey Portfolio
   Glassmorphism + Dark Mode
   Responsive + Animations
   ========================= */

:root{
  --bg: #eef2f4;
  --surface: rgba(255,255,255,0.60);
  --surface-strong: rgba(255,255,255,0.78);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15,23,42,0.12);

  --brand: #53d6d4;
  --brand-2: #6ae0ff;
  --glow: rgba(83,214,212,0.55);

  --shadow: 0 18px 50px rgba(15,23,42,0.12);
  --shadow-soft: 0 10px 30px rgba(15,23,42,0.10);

  --radius: 20px;
  --radius-sm: 14px;

  --container: 1100px;
}

html{
  scroll-behavior: smooth;
}

*{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(83,214,212,0.20), transparent 65%),
    radial-gradient(800px 450px at 85% 15%, rgba(106,224,255,0.18), transparent 55%),
    radial-gradient(900px 600px at 60% 100%, rgba(83,214,212,0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

body.dark{
  --bg: #0b1220;
  --surface: rgba(15,23,42,0.55);
  --surface-strong: rgba(15,23,42,0.70);
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --border: rgba(226,232,240,0.14);
  --shadow: 0 18px 55px rgba(0,0,0,0.40);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.30);
}

a{
  color: inherit;
  text-decoration: none;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.page{
  padding: 18px 0 40px;
}

.section{
  margin-top: 18px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transform: translateZ(0);
}

.card.pad{
  padding: 18px;
}

/* Hover animation cards */
.hover-card{
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hover-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(83,214,212,0.35);
}

/* Header banner */
.banner{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
}

.banner img{
  width: 100%;
  height: clamp(160px, 22vw, 260px);
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02);
}

/* Top bar (nav + controls) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  margin-top: -12px;
  padding-top: 12px;
}

.navwrap{
  margin-top: -22px;
  padding: 14px;
}

.navbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand{
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 6px;
}
.brand .name{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand .tag{
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.navlinks{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.navlinks a{
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 13px;
  color: var(--text);
  opacity: 0.95;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.navlinks a:hover{
  background: rgba(83,214,212,0.14);
  box-shadow: 0 0 0 1px rgba(83,214,212,0.25) inset;
  transform: translateY(-1px);
}

.navlinks a.active{
  background: rgba(83,214,212,0.20);
  box-shadow: 0 0 0 1px rgba(83,214,212,0.35) inset;
}

/* Buttons */
.btn{
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(83,214,212,0.35);
  box-shadow: 0 0 22px rgba(83,214,212,0.15);
}

.btn.primary{
  background: linear-gradient(135deg, rgba(83,214,212,0.95), rgba(106,224,255,0.90));
  border-color: rgba(83,214,212,0.55);
  color: #062a2d;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset, 0 18px 45px rgba(83,214,212,0.20);
}

.btn.glow{
  position: relative;
}
.btn.glow::after{
  content:"";
  position: absolute;
  inset: -10px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 40%, rgba(83,214,212,0.45), transparent 55%),
              radial-gradient(circle at 70% 60%, rgba(106,224,255,0.35), transparent 55%);
  filter: blur(12px);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: -1;
}
.btn.glow:hover::after{ opacity: 1; }

/* Hamburger + mobile drawer */
.hamburger{
  display: none;
  gap: 8px;
  align-items: center;
}
.iconbtn{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.iconbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(83,214,212,0.12);
}
.bars{
  width: 18px;
  height: 12px;
  position: relative;
}
.bars span{
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform .22s ease, top .22s ease, opacity .22s ease;
}
.bars span:nth-child(1){ top: 0; }
.bars span:nth-child(2){ top: 5px; }
.bars span:nth-child(3){ top: 10px; }

.drawer{
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}
.drawer.open{ display: block; }
.drawer .backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
}
.drawer .panel{
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: var(--surface-strong);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
  transform: translateX(105%);
  transition: transform .28s ease;
}
.drawer.open .panel{ transform: translateX(0); }

.drawer .panel .drawer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.drawer .panel nav{
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.drawer .panel nav a{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  font-weight: 800;
}
.drawer .panel nav a:hover{
  border-color: rgba(83,214,212,0.35);
}

/* Typography */
h1,h2,h3{
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
h1{
  font-size: clamp(28px, 4vw, 44px);
}
h2{
  font-size: clamp(22px, 2.6vw, 30px);
}
p{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* Home hero */
.hero{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 18px;
  align-items: stretch;
}

.hero-left{
  display: grid;
  gap: 12px;
}

.typewrap{
  /* Fixes the “text cutting off” problem */
  min-height: 56px;
  padding: 8px 0 0;
  overflow: visible; /* important */
}

.typewriter{
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
  word-break: normal;
  white-space: normal;
}

.cursor{
  display: inline-block;
  width: 10px;
  margin-left: 2px;
  border-left: 2px solid rgba(83,214,212,0.9);
  transform: translateY(2px);
  animation: blink 1s step-end infinite;
}
@keyframes blink{
  50%{ opacity: 0; }
}

.hero-media{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-media img{
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.quick{
  display: grid;
  gap: 10px;
}

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
}
.mini b{
  display:block;
  margin-bottom: 6px;
  color: var(--text);
}

.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Split section (image + content) */
.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px;
  align-items: start;
}

.figure{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.figure img{
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* About cards */
.triple{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

/* Skills bars */
.skills{
  display: grid;
  gap: 12px;
}
.skill{
  display: grid;
  gap: 6px;
}
.skill .row{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  color: var(--text);
}
.track{
  height: 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.10);
  border: 1px solid var(--border);
  overflow: hidden;
}
body.dark .track{
  background: rgba(255,255,255,0.08);
}
.fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(83,214,212,0.95), rgba(106,224,255,0.9));
  box-shadow: 0 0 22px rgba(83,214,212,0.25);
  transition: width 1.1s ease;
}

/* Contact form */
.form{
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.row2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label{
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--text);
}

input, textarea, select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.18); /* FIX: visible input “bars” */
  background: rgba(255,255,255,0.70);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.dark input,
body.dark textarea,
body.dark select{
  background: rgba(15,23,42,0.60);
  border-color: rgba(226,232,240,0.16);
}
input:focus, textarea:focus, select:focus{
  border-color: rgba(83,214,212,0.55);
  box-shadow: 0 0 0 4px rgba(83,214,212,0.18);
}

textarea{
  min-height: 140px;
  resize: vertical;
}

fieldset{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

legend{
  padding: 0 8px;
  font-weight: 900;
}

.checkgrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.inline{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}
.inline input{
  width: auto;
  padding: 0;
  box-shadow: none;
}

.form-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Badges grid */
.badge-links{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.badges{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
}
.badge{
  padding: 14px;
}
.badge img{
  width: 100%;
  height: 220px;            /* FIX: not huge */
  object-fit: contain;      /* keeps circle badges nice */
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
}

/* Resume */
.resume-frame{
  width: 100%;
  height: min(78vh, 820px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

/* Footer */
footer{
  margin-top: 18px;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 980px){
  .hero{
    grid-template-columns: 1fr;
  }
  .hero-media img{
    height: 260px;
  }
  .grid-3{
    grid-template-columns: 1fr;
  }
  .split{
    grid-template-columns: 1fr;
  }
  .figure img{
    height: 340px;
  }
  .triple{
    grid-template-columns: 1fr;
  }
  .badges{
    grid-template-columns: 1fr;
  }
  .badge-links{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px){
  .navlinks{
    display: none;
  }
  .hamburger{
    display: flex;
  }
}

@media (max-width: 640px){
  .row2{
    grid-template-columns: 1fr;
  }
  .checkgrid{
    grid-template-columns: 1fr;
  }
}
/* ===== About page fixes (no more face-cropping) ===== */
.about-grid{
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
  align-items: start;
}

.figure.portrait{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: rgba(255,255,255,0.08);
}

.figure.portrait img{
  width: 100%;
  height: clamp(280px, 46vw, 520px); /* responsive height */
  object-fit: cover;
  object-position: center 15%; /* pulls the image DOWN so your eyes/forehead don't get chopped */
}

/* Right-side cards */
.about-cards{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 980px){
  .about-grid{
    grid-template-columns: 1fr;
  }
  .about-cards{
    grid-template-columns: 1fr;
  }
  .figure.portrait img{
    height: clamp(260px, 70vw, 520px);
    object-position: center 12%;
  }
}