/* Reset-ish */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; height: auto; }

:root{
  --bg: #0f1115;
  --panel: #161a22;
  --ink: #e7edf5;
  --muted: #a8b3c7;
  --brand: #70b8ff;
  --brand-ink: #0a0f1a;
  --ring: 0 0 0 3px rgba(112,184,255,.35);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

body{
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 70% -10%, #1a2233 0%, #0f1115 60%) no-repeat fixed, var(--bg);
}

/* Header / Nav */
.site-header{
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem;
  background: rgba(15,17,21,.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand{
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink);
  font-weight: 700; letter-spacing: .2px;
}
.brand-mark{
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: red;
  color: white; font-weight: 900;
  box-shadow: var(--shadow);
}
.nav-toggle{
  display: inline-flex; flex-direction: column; gap: 4px; background: transparent; border: 0; cursor: pointer;
  z-index: 101;
  position: relative;
}
.nav-toggle .bar{ width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Mobile menu overlay background */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}
.nav-overlay.open { display: block; }

.nav{ 
  display: none; 
  position: fixed;
  top: 70px; right: 1rem;
  z-index: 100;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 200px;
  box-shadow: var(--shadow);
}
.nav.open{ display: block; }
.nav-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.nav a, .submenu-toggle{
  color: var(--ink) !important; text-decoration: none !important; background: transparent !important; border: 0; font: inherit; cursor: pointer;
  padding: .4rem .6rem; border-radius: 8px;
}
.nav a:hover, .submenu-toggle:hover{ 
  color: red !important; 
  text-decoration: underline !important;
  background: transparent !important; 
}
.nav a:visited {
  color: var(--ink) !important;
  background: transparent !important;
}
.nav a:visited:hover {
  color: red !important;
  text-decoration: underline !important;
  background: transparent !important;
}
.has-submenu{ position: relative; }
.submenu{ display:none; position: static; list-style: none; padding: .8rem 0 0; margin: 0; }
.has-submenu.open > .submenu{ display:block; }
.submenu a{ font-size: .9rem; }

/* Layout */
.hero{
  display: grid; gap: 2rem; padding: 2rem 1rem; align-items: center; max-width: 1100px; margin: 0 auto;
}
.hero-media{
  text-align: center;
}
.hero-media img{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-copy h1{ margin: 0 0 .4rem; font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.lead{ color: var(--muted); font-size: 1.05rem; }
.cta-row{ display: flex; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }
.button{
  display: inline-block; padding: .6rem 1rem; border-radius: 10px; text-decoration: none; color: var(--ink);
  border: 1px solid rgba(255,255,255,.12); transition: transform .05s ease-in-out, background .2s;
}
.button:hover{ transform: translateY(-1px); background: rgba(255,255,255,.06); }
.button.primary{ background: linear-gradient(135deg, var(--brand), #9ad3ff); color: var(--brand-ink); border: 0; }

.highlights{ padding: 1rem 1rem 3rem; max-width: 1100px; margin: 0 auto; }
.highlights h2{ font-size: 1.4rem; margin: 0 0 1rem;}
.grid{
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.grid li{
  list-style: none; padding: 1rem; background: var(--panel); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
div.embed {
    text-align: center;
    height: 100%;
}

iframe {
    height: 80vh;
}

/* Desktop tweaks */
@media (min-width: 900px){
  .hero{ grid-template-columns: 1fr 1.2fr; padding: 3rem 2rem; gap: 3rem; }
  .hero-media{ text-align: left; }
  .nav-toggle{ display: none !important; }
  .nav-overlay{ display: none !important; }
  .nav{ 
    display: block !important; 
    position: static;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    z-index: auto;
    border: none;
    box-shadow: none;
    min-width: auto;
  }
  .nav-list{ grid-auto-flow: column; align-items: center; gap: .2rem; text-align: left; }
  .submenu{
    position: absolute; top: 100%; left: 0;
    background: var(--panel); border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px; padding: .4rem; min-width: 220px; box-shadow: var(--shadow);
    margin: 0;
  }
  .has-submenu .submenu li a{ display: block; }
  .submenu a{ font-size: inherit; }
}

.site-footer{
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.2rem; text-align: center; color: var(--muted);
}
/* Resume iframe styles */
.resume-iframe {
  width: 80%;
  height: 80vh;
  border: none;
}

/* Mobile: full width iframe with zoom parameter */
@media (max-width: 899px) {
  .resume-iframe {
    width: 100%;
    height: 70vh;
  }
}

/* Focus styles */
a:focus, button:focus{ outline: none; box-shadow: var(--ring); }

/* Main content links */
main a:hover {
  color: red !important;
  font-weight: bold;
  text-decoration: underline !important;
}
main a {
    color: white !important;
    font-weight: bold;
    text-decoration: underline !important;
}
main a:visited {
  color: var(--ink) !important;
}
main a:visited:hover {
  font-weight: bold;
  color: red !important;
  text-decoration: underline !important;
}

/* Project page button styling - override main link styles */
main a.button.primary {
  background: red !important;
  color: white !important;
}
main a.button.primary:hover {
  background: #cc0000 !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}
main a.button.primary:visited {
  background: red !important;
  color: white !important;
}
main a.button.primary:visited:hover {
  background: #cc0000 !important;
  color: white !important;
  text-decoration: none !important;
}
