/* Tamme e-portfolio — styles.css (no build tools) */

:root{
  --green-900:#283618;
  --green-700:#606C38;
  --green-400:#AFB38C;

  --sand-500:#DED597;
  --sand-300:#E9E3BA;
  --sand-100:#FEFAE0;

  --orange-700:#BC6C25;
  --orange-500:#DDA15E;
  --orange-300:#E6B87F;

  --bg:var(--sand-100);
  --ink:#111;
  --muted:#3a3a3a;
  --line:rgba(0,0,0,.12);

  --r:22px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --maxw:1080px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Harmattan",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:16px;
  line-height:1.35;
}

/* Typography (style book) */
h1,h2,h3{
  font-family:"Assistant",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  margin:0 0 .25rem 0;
}
h1{font-size:32px;font-weight:700;letter-spacing:-0.02em}
h2{font-size:24px;font-weight:700}
h3{font-size:18px;font-weight:700}
p{margin:0 0 1rem 0;color:var(--muted)}
a{color:inherit}

/* App shell */
.shell{
  min-height:100%;
  display:grid;
  grid-template-columns:90px 1fr;
}
.rail{
  padding:14px 12px;
  position:sticky;
  top:0;
  align-self:start;
  height:100vh;
}
.rail .pill{
  height:14px;border-radius:999px;background:rgba(0,0,0,.14);
  margin:10px 0;
}
.rail .pill:nth-child(1){width:64px}
.rail .pill:nth-child(2){width:58px}
.rail .pill:nth-child(3){width:52px}
.rail .nav{margin-top:18px;display:grid;gap:10px}
.rail button{
  all:unset;
  cursor:pointer;
  display:grid;
  place-items:center;
  width:64px;
  height:56px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.55);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transition:transform .12s ease, background .12s ease;
  text-align:center;
  font-family:"Assistant",sans-serif;
  font-weight:700;
  font-size:12px;
  letter-spacing:.02em;
}
.rail button:hover{transform:translateY(-1px)}
.rail button[aria-current="page"]{
  background:linear-gradient(180deg, rgba(221,161,94,.35), rgba(175,179,140,.25));
  border-color:rgba(0,0,0,.18);
}

.main{padding:22px 18px 70px}

/* Top bar (mobile / tablet) */
.topbar{
  max-width:var(--maxw);
  margin:0 auto 16px;
  padding:14px 16px;
  border-radius:var(--r);
  background:rgba(255,255,255,.65);
  border:1px solid var(--line);
  box-shadow:0 10px 22px rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  backdrop-filter:blur(6px);
}
.brand{font-family:"Assistant",sans-serif;font-weight:700;letter-spacing:.02em}
.hamburger{
  width:42px;height:42px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.8);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  display:grid;place-items:center;cursor:pointer;
}
.hamburger .lines{width:18px;height:12px;display:grid;gap:3px}
.hamburger .lines span{height:2px;border-radius:999px;background:rgba(0,0,0,.6)}

/* Drawer */
.drawer-backdrop{
  position:fixed;inset:0;background:rgba(0,0,0,.35);
  display:none;z-index:50;
}
.drawer{
  position:fixed;right:14px;top:70px;
  width:min(320px, calc(100vw - 28px));
  border-radius:var(--r);
  border:1px solid var(--line);
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow);
  padding:12px;
  display:none;
  z-index:60;
}
.drawer .navbtn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid transparent;
  background:transparent;
  cursor:pointer;
  font-family:"Assistant",sans-serif;
  font-weight:700;
}
.drawer .navbtn:hover{background:rgba(175,179,140,.18)}
.drawer .navbtn[aria-current="page"]{
  border-color:rgba(0,0,0,.14);
  background:linear-gradient(180deg, rgba(221,161,94,.28), rgba(175,179,140,.18));
}

/* Pages */
.page{max-width:var(--maxw);margin:0 auto;display:none}
.page.is-active{display:block}

/* Blocks */
.grid{display:grid;gap:18px}
.card{
  border-radius:var(--r);
  background:rgba(255,255,255,.8);
  border:1px solid var(--line);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  overflow:hidden;
}
.card .pad{padding:16px}
.imgbox{
  border-radius:18px;
  background:rgba(0,0,0,.05);
  border:1px solid rgba(0,0,0,.10);
  overflow:hidden;
}
.imgbox img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(.95) contrast(1.02);
}

/* Home */
.home{
  display:grid;
  grid-template-columns:380px 1fr;
  gap:18px;
  align-items:start;
}
.home .portrait{aspect-ratio:3/5;min-height:520px}
.home .hero{padding:6px 2px 0}
.home .stack{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.home .stack .wide{grid-column:span 2}

/* Projects */
.projects .grid{grid-template-columns:repeat(3, 1fr)}
.repo{display:flex;flex-direction:column;gap:10px;height:100%}
.repo .meta{
  display:flex;flex-wrap:wrap;gap:8px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px dashed rgba(0,0,0,.18);
}
.tag{
  font-size:13px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  background:rgba(254,250,224,.65);
  color:rgba(0,0,0,.75);
  line-height:1;
}
.tag.em{
  background:rgba(221,161,94,.25);
  border-color:rgba(188,108,37,.25);
}
.repo a{text-decoration:none}
.repo a:hover{text-decoration:underline}

/* About */
.about{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:18px;
}
.about .side{display:grid;gap:12px;align-content:start}
.hl{
  display:grid;
  gap:8px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.12);
  background:linear-gradient(180deg, rgba(175,179,140,.22), rgba(233,227,186,.18));
}
.hl h3{margin-bottom:6px}
.bullet{display:flex;gap:10px;align-items:start;color:rgba(0,0,0,.72)}
.bullet .dot{
  width:10px;height:10px;border-radius:999px;
  background:var(--green-700);
  margin-top:6px;flex:0 0 auto;
}

/* Contact */
.contact{
  display:grid;
  grid-template-columns:1fr 300px;
  gap:18px;
}
form{display:grid;gap:12px}
label{
  font-family:"Assistant",sans-serif;
  font-weight:700;
  font-size:14px;
  color:rgba(0,0,0,.75);
}
input,textarea{
  width:100%;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.14);
  background:rgba(255,255,255,.92);
  padding:12px 12px;
  font:inherit;
  outline:none;
}
textarea{min-height:160px;resize:vertical}
input:focus,textarea:focus{
  border-color:rgba(96,108,56,.55);
  box-shadow:0 0 0 4px rgba(175,179,140,.25);
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  background:linear-gradient(180deg, rgba(221,161,94,.35), rgba(175,179,140,.25));
  cursor:pointer;
  font-family:"Assistant",sans-serif;
  font-weight:700;
  letter-spacing:.02em;
}
.btn:active{transform:translateY(1px)}
.small{font-size:13px;color:rgba(0,0,0,.62)}

/* Footer */
.foot{
  max-width:var(--maxw);
  margin:20px auto 0;
  padding:10px 2px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:rgba(0,0,0,.55);
  font-size:13px;
  flex-wrap:wrap;
}

/* Responsive */
@media (max-width:980px){
  .shell{grid-template-columns:1fr}
  .rail{display:none}
  .home{grid-template-columns:1fr}
  .home .portrait{min-height:360px}
  .projects .grid{grid-template-columns:1fr 1fr}
  .about{grid-template-columns:1fr}
  .contact{grid-template-columns:1fr}
}
@media (max-width:520px){
  .home .stack{grid-template-columns:1fr}
  .home .stack .wide{grid-column:auto}
  .projects .grid{grid-template-columns:1fr}
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto !important;transition:none !important}
}


/* =========================
   Separate Desktop vs Mobile
   ========================= */
.desktopStage{display:block}
.mobileStage{display:none}

/* Desktop: show 4 panels like the lo-fi screenshot */
.shell--desktop{grid-template-columns:90px 1fr}
.main--desktop{padding-top:18px}
.panelRow{
  max-width: calc(var(--maxw) + 520px); /* allow wider than normal */
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}
.panel{
  min-height: calc(100vh - 140px);
}
.panelTop{
  font-family:"Assistant",sans-serif;
  font-weight:700;
  font-size:14px;
  color: rgba(0,0,0,.45);
  margin: 0 0 8px 2px;
}
.panelCard{
  border-radius: var(--r);
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  overflow:hidden;
  height: calc(100vh - 160px);
  display:flex;
  flex-direction:column;
}
.panelPad{
  padding: 14px;
}
.panelCard .panelPad + .panelPad{
  border-top: 1px dashed rgba(0,0,0,.14);
}
.repoGridMini{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.miniRepo{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(254,250,224,.55);
  padding: 12px;
}
.miniRepo a{ text-decoration:none; }
.miniRepo a:hover{ text-decoration:underline; }
.miniRepo .meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.miniInput{
  display:grid;
  gap:8px;
}
.miniInput input{
  width: 100%;
}
.miniInput .btn{
  width: 100%;
}
.contactBlock{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.65);
  padding: 10px 12px;
}
.foot--desktop{
  max-width: calc(var(--maxw) + 520px);
}

/* Hide mobile UI parts on desktop */
.shell--desktop .topbar,
.shell--desktop .drawer,
.shell--desktop .drawer-backdrop{
  display:none !important;
}

/* Mobile breakpoint: switch to mobileStage */
@media (max-width: 980px){
  .desktopStage{display:none}
  .mobileStage{display:block}
}

/* Extra-wide: add breathing room so 4 panels feel like the screenshot */
@media (min-width: 1320px){
  .panelRow{
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    gap: 18px;
  }
}
