/* Base */
:root{
  --radius:10px;
  --max-width:1100px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light dark;
}

/* LIGHT THEME: sky blue + soft yellow */
html.theme-light {
  --bg: linear-gradient(180deg,#e8f6ff 0%, #f8fbff 100%);
  --panel: #ffffff;
  --accent: #7cc6ff;     /* sky blue accent */
  --accent-2: #ffeaa7;   /* soft yellow */
  --muted: #5b6b75;
  --card: #ffffff;
  --glass: rgba(15,40,60,0.04);
  --text: #0b1724;
  --shadow: rgba(11,20,32,0.06);
}

/* DARK THEME: complementary (deep navy + warm orange) */
html.theme-dark {
  --bg: linear-gradient(180deg,#071026 0%, #071219 100%);
  --panel: #07122a;
  --accent: #ff9b57;     /* warm orange accent */
  --accent-2: #7cc6ff;   /* sky blue as secondary */
  --muted: #9fb0bd;
  --card: #081425;
  --glass: rgba(255,255,255,0.03);
  --text: #e6eef8;
  --shadow: rgba(2,6,23,0.6);
}

/* Fallback to system pref if no explicit class */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light):not(.theme-dark) {
    --bg: linear-gradient(180deg,#071026 0%, #071219 100%);
    --panel: #07122a;
    --accent: #ff9b57;
    --accent-2: #7cc6ff;
    --muted: #9fb0bd;
    --card: #081425;
    --glass: rgba(255,255,255,0.03);
    --text: #e6eef8;
    --shadow: rgba(2,6,23,0.6);
  }
}
@media (prefers-color-scheme: light) {
  :root:not(.theme-light):not(.theme-dark) {
    --bg: linear-gradient(180deg,#e8f6ff 0%, #f8fbff 100%);
    --panel: #ffffff;
    --accent: #7cc6ff;
    --accent-2: #ffeaa7;
    --muted: #5b6b75;
    --card: #ffffff;
    --glass: rgba(15,40,60,0.04);
    --text: #0b1724;
    --shadow: rgba(11,20,32,0.06);
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:24px;
}

/* Header */
.site-header{
  width:100%;
  max-width:var(--max-width);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  background:var(--panel);
  border-radius:calc(var(--radius) + 4px);
  margin-bottom:22px;
  box-shadow:0 6px 20px var(--shadow);
}

.brand-link{
  font-size:20px;
  font-weight:800;
  color:var(--accent);
  text-decoration:none;
  letter-spacing:0.4px;
}

/* Nav */
.main-nav .menu{
  display:flex;
  gap:12px;
  list-style:none;
  margin:0;
  padding:0;
  align-items:center;
}

.menu-item{position:relative}
.dropbtn{
  background:transparent;
  color:var(--muted);
  border:1px solid transparent;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}
.dropbtn:hover{color:var(--text); background:var(--glass)}
.dropdown-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:160px;
  background:var(--panel);
  border-radius:10px;
  padding:8px 0;
  list-style:none;
  box-shadow:0 8px 30px var(--shadow);
  transform-origin:top right;
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px) scale(.98);
  transition:all .16s ease;
  z-index:40;
}
.dropdown-menu.open{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.dropdown-menu li{padding:0}
.dropdown-menu a{
  display:block;
  padding:10px 14px;
  color:var(--muted);
  text-decoration:none;
  font-size:14px;
  border-left:4px solid transparent;
}
.dropdown-menu a:hover{background:rgba(0,0,0,0.04); color:var(--text); border-left-color:var(--accent)}

/* Theme toggle */
.controls { display:flex; align-items:center; gap:8px; margin-left:12px; }
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:8px;
  background:transparent;
  border:1px solid transparent;
  cursor:pointer;
  color:var(--muted);
  font-weight:600;
}
.theme-toggle:hover{background:var(--glass); color:var(--text)}
.theme-toggle .icon{font-size:16px}

/* Main content */
.content{
  width:100%;
  max-width:var(--max-width);
  display:block;
  flex:1 0 auto;
}

.hero{
  background:linear-gradient(90deg, color-mix(in srgb, var(--panel) 96%, transparent), transparent);
  padding:28px;
  border-radius:12px;
  text-align:left;
  box-shadow:0 10px 40px var(--shadow);
  margin-bottom:18px;
}

.hero h1{margin:0 0 6px 0; font-size:28px; color:var(--text)}
.hero p{margin:0 0 12px 0; color:var(--muted)}
.cta{
  display:inline-block;
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  color:var(--panel);
  padding:10px 14px;
  border-radius:8px;
  text-decoration:none;
  font-weight:700;
}

/* Cards */
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px;
  margin-top:12px;
}
.card{
  background:var(--card);
  padding:16px;
  border-radius:10px;
  box-shadow:0 6px 20px var(--shadow);
}
.card h3{margin:0 0 8px 0}
.card p{margin:0 0 12px;color:var(--muted)}
.card-link{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}
/* Article */article{  width:100%;  max-width:var(--max-width);  background:var(--card);  padding:40px;  border-radius:var(--radius);  box-shadow:0 6px 20px var(--shadow);  margin-bottom:28px;  text-align:left;}
article h1{  margin:0 0 0.3em 0;  font-size:2.2em;  color:var(--text);}
article h2{  margin:1.4em 0 0.4em 0;  font-size:1.6em;  color:var(--text);  border-bottom:2px solid var(--accent);  padding-bottom:0.3em;}
article h3{  margin:1.1em 0 0.5em 0;  font-size:1.2em;  color:var(--text);}
article p{  margin:0 0 1.2em 0;  color:var(--text);  line-height:1.7;}
article strong{  color:var(--accent);}
article ul,article ol{  margin:1em 0 1.2em 1.8em;  color:var(--text);  line-height:1.7;}
article li{  margin-bottom:0.7em;}
article a{  color:var(--accent);  text-decoration:none;  border-bottom:1px solid transparent;  transition:border-color .2s ease;}
article a:hover{  border-bottom-color:var(--accent);}
/* Footer */
.site-footer{
  width:100%;
  max-width:var(--max-width);
  margin-top:28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  color:var(--muted);
  font-size:14px;
  border-radius:8px;
  background:transparent;
}

.footer-links a{
  color:var(--muted);
  text-decoration:none;
  margin-right:14px;
}
.footer-links a:hover{color:var(--text)}

/* Responsive tweaks */
@media (max-width:780px){
  .site-header{flex-direction:column; gap:10px; align-items:flex-start}
  .main-nav .menu{flex-wrap:wrap}
  .dropdown-menu{right:auto; left:0}
}
