/* ========== THEME VARS ========== */
:root{
  --bg:#ffffff;
  --fg:#0a0a0a;
  --muted:#6a6a6a;
  --link:#0a0a0a;
  --border:#eaeaea;
  --max:960px;
  --radius:12px;
  --shadow:0 1px 2px rgba(0,0,0,.04);
  color-scheme: light;
}
[data-theme="dark"]{
  --bg:#0b0b0b;
  --fg:#f5f5f5;
  --muted:#9a9a9a;
  --link:#f5f5f5;
  --border:#1e1e1e;
  color-scheme: dark;
}

/* ========== BASE ========== */
html{ box-sizing:border-box; }
*,*::before,*::after{ box-sizing:inherit; }
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font:16px/1.5 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
::selection{ background:rgba(127,127,255,.25); color:inherit; }
a{ color:var(--link); text-decoration:none; transition: color .15s ease, opacity .15s ease; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }
.wrap{ max-width:var(--max); margin:0 auto; padding:32px 20px 80px; }

/* ========== HEADER / NAV ========== */
header{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:nowrap;
}
header>*{ min-width:0; }
.brand{ font-weight:700; }
nav{
  flex:1 1 auto; min-width:0; display:flex; gap:16px; justify-content:center;
  overflow-x:auto; -webkit-overflow-scrolling:touch; font-size:15px;
}
nav::-webkit-scrollbar{ display:none; }
nav a[aria-current="page"]{ text-decoration:underline; text-underline-offset:4px; }

/* Theme toggle */
.theme-toggle{
  background:none; border:1px solid var(--border); padding:6px 12px; border-radius:8px; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px; line-height:1; height:36px; flex:0 0 auto; white-space:nowrap;
}
.theme-toggle i{ font-size:18px; line-height:1; display:inline-block; }
.theme-toggle:hover{ opacity:.9; }
.theme-toggle:active{ transform:translateY(1px); }
.theme-toggle:focus-visible{ outline:2px solid #7c87ff77; outline-offset:2px; border-color:#7c87ff55; }

/* ========== HERO ========== */
.kicker{ color:var(--muted); font-size:14px; letter-spacing:.08em; text-transform:uppercase; }
h1{ font-size:clamp(28px,6vw,54px); line-height:1.1; margin:8px 0 12px; font-weight:800; }
.lede{ max-width:80ch; color:var(--muted); }

/* On-load animation */
.animated-headline{ opacity:0; transform:translateY(20px); animation:fadeSlideIn 1.2s ease-out forwards; }
@keyframes fadeSlideIn{ to{ opacity:1; transform:translateY(0); } }

/* ========== LAYOUT: ABOUT + CONTACT GRID ========== */
.info-grid{
  display:grid; grid-template-columns:1.5fr 1fr; gap:24px; margin-top:24px; align-items:stretch;
}
@media (max-width:820px){
  .info-grid{ grid-template-columns:1fr; }
}

/* Cards */
.card{
  border:1px solid var(--border); border-radius:var(--radius); padding:18px;
  box-shadow:var(--shadow); background:transparent;
}

/*=============== Work (banner cards) ===============*/
.project-banner{
  padding:0; overflow:hidden;
  border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); background:var(--bg);
}
.project-cover{
  display:block; 
  width:100%; 
  height:200px;
  background-size:cover; 
  background-position:center;
  border-bottom:1px solid var(--border);
}
.project-content{ position:relative; padding:16px; }
.project-content h3{ margin:0 0 6px; }

/* Pills pinned top-right */
.proj-links--pills{
  position:absolute; top:14px; right:16px;
  display:flex; gap:12px;
}
.proj-links--pills a{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px;
  border:2px solid var(--fg);
  border-radius:999px;
  background:transparent;
  font-size:14px; font-weight:600;
  text-decoration:none;
}
.proj-links--pills a:hover{ background:rgba(127,127,127,.06); text-decoration:none; }

/* small screens: stack pills under title */
@media (max-width:560px){
  .proj-links--pills{ position:static; margin-top:8px; justify-content:flex-start; }
  .project-content{ padding-top:14px; }
}

/* About header with inline picture */
.about-title{
  display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;
}
.about-pic-inline{
  width:100px; height:100px; border-radius:50%; object-fit:cover; border:2px solid var(--border);
}

/* ========== CONTACT CARD ========== */
.contact-card{ display:flex; flex-direction:column; justify-content:center; min-height:340px; }
.contact-card h2{ margin-bottom:12px; }
.contact-note{ margin-bottom:24px; font-size:14px; color:var(--muted); text-align:center; }
.contact-list{ list-style:none; padding:0; margin:0 0 24px; display:grid; gap:12px; }
/* plain-text email row */
.contact-email{ display:flex; align-items:center; gap:10px; font-size:15px; padding:6px 0; color:var(--fg); }
/* linked rows */
.contact-link{
  display:flex; align-items:center; gap:10px; padding:10px 12px;
  border:1px solid var(--border); border-radius:10px; text-decoration:none; font-size:15px;
}
.contact-link i{ font-size:18px; line-height:1; }
.contact-link:hover{ background:rgba(127,127,127,.06); text-decoration:none; }
.contact-actions{ margin-top:auto; display:flex; gap:20px; justify-content:center; text-align:center; }
.arrow-link{ display:inline-flex; align-items:center; gap:6px; position:relative; text-decoration:none; }
.arrow-link::after{ content:"→"; transition:transform .15s ease; }
.arrow-link:hover::after{ transform:translateX(3px); }

/* ========== Legacy project list styles (kept for compatibility) ========== */
.grid{ display:grid; gap:20px; }
.projects{ margin-top:16px; }
.project{
  border-top:1px solid var(--border); padding-top:18px;
  display:grid; grid-template-columns:1fr auto; align-items:start; gap:12px;
}
.project h3{ margin:0; font-size:clamp(18px,2.4vw,22px); }
.meta{ color:var(--muted); font-size:14px; }
.tags{ display:inline-flex; gap:8px; flex-wrap:wrap; }
.tag{ border:1px solid var(--border); padding:2px 8px; border-radius:999px; font-size:12px; color:var(--muted); }
.proj-links{ display:flex; gap:10px; }
.proj-links a{
  border:1px solid var(--border); padding:6px 10px; border-radius:8px; font-size:13px;
  display:inline-flex; align-items:center; gap:6px;
}
.proj-links a:hover{ text-decoration:none; opacity:.85; }

/* ========== RESUME (PDF) ========== */
.pdf-frame{
  width:100%; height:72vh; border:1px solid var(--border); border-radius:var(--radius);
  margin-top:16px; background:var(--bg);
}
.resume-actions{ display:flex; gap:12px; align-items:center; margin:12px 0 0; }

/* ========== FOOTER ========== */
.site-footer{ margin-top:64px; border-top:1px solid var(--border); padding:20px 0; color:var(--muted); font-size:14px; }
.footer-inner{ display:flex; gap:16px; justify-content:space-between; flex-wrap:wrap; }

/* ========== EXTRA RESPONSIVE TWEAKS ========== */
@media (max-width:420px){
  nav{ gap:10px; font-size:14px; }
  .brand{ font-size:15px; }
}

.project-cover {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.cover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
