:root{
    --bg: #FFF3E0;
    --card: #ffffff;
    --accent: #ff7043;
    --text: #2d2d2d;
    --muted: #6b6b6b;
    --radius: 12px;
    --max-width: 1100px;
}

/* Dark theme overrides (applied via document attribute `data-theme="dark"`) */
[data-theme="dark"]{
    --bg: #0f1724; /* very dark navy */
    --card: #0b1220; /* dark card */
    --accent: #ff8a65; /* slightly brighter accent */
    --text: #e6eef3; /* light text */
    --muted: #9aa4b2; /* muted light */
}

/* Make project titles fully black in dark mode for maximum contrast */
[data-theme="dark"] .project-card h3{
    color: #000000;
    font-weight: 800;
}

/* Theme toggle button */
.theme-toggle{
    margin-left:0.8rem;
    padding:0.35rem 0.7rem;
    border-radius:999px;
    border:1px solid rgba(0,0,0,0.06);
    background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    color:var(--text);
    font-weight:700;
    cursor:pointer;
    transition:transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.theme-toggle:focus{ outline: 3px solid rgba(255,112,67,0.12); }
.theme-toggle:hover{ transform:translateY(-3px); box-shadow:0 12px 24px rgba(0,0,0,0.08); }

@media(min-width:900px){
    .toggle-wrap{ margin-left:auto; }
}


/* ...existing code... */
*{box-sizing:border-box}
body{
    margin:0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background:var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    line-height:1.45;
}

.container{
    max-width:var(--max-width);
    margin:0 auto;
    padding:1.5rem;
}

/* Header */
.site-header{
    padding-top:1.5rem;
    padding-bottom:0.8rem;
}
.header-inner{ display:grid; grid-template-columns: 100px 1fr; gap:1rem; align-items:center; }
.hero h1{ margin:0; font-size:1.6rem; }
.profile-img{
    width:100px;
    height:100px;
    object-fit:cover;
    border-radius:50%;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
    transition:transform 200ms ease, box-shadow 200ms ease;
    border:4px solid rgba(255,255,255,0.6);
}
.profile-img:hover,
.profile-img:focus{ transform:translateY(-4px) scale(1.02); box-shadow:0 12px 28px rgba(0,0,0,0.12); }

.lead{ color:var(--muted); margin:0.4rem 0 0; }

/* PAGE GRID */
.page-grid{
    display:grid;
    grid-template-columns: 1fr;
    gap:1rem;
    align-items:start;
    margin-top:0.8rem;
    margin-bottom:1.4rem;
}

/* Sidebar (nav) */
.sidebar{
    padding:0.8rem;
}
.site-nav{ display:flex; gap:0.6rem; flex-wrap:wrap; }
.site-nav a{
    padding:0.45rem 0.7rem;
    border-radius:8px;
    background:transparent;
    color:var(--text);
    text-decoration:none;
    font-weight:700;
    transition:background 160ms ease, transform 160ms ease;
}
.site-nav a:hover, .site-nav a:focus{
    background:rgba(255,112,67,0.08);
    transform:translateY(-3px);
    color:var(--accent);
}

/* Main content and sections */
.main-content{ display:flex; flex-direction:column; gap:1rem; }
.card{
    background:var(--card);
    border-radius:var(--radius);
    padding:1.1rem;
    box-shadow:0 6px 18px rgba(0,0,0,0.04);
    transition:transform 180ms ease, box-shadow 180ms ease;
}
.card:hover{ transform:translateY(-6px); box-shadow:0 20px 40px rgba(0,0,0,0.06); }

/* Project grid */
.project-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap:0.9rem;
    margin-top:0.6rem;
}
.project-card{
    padding:0.9rem;
    border-radius:10px;
    background:linear-gradient(180deg,#fff,#fff);
    display:flex;
    flex-direction:column;
    gap:0.6rem;
}
.project-card h3{ margin:0; font-size:1.05rem; }
.project-card p{ margin:0; color:var(--muted); font-size:0.95rem; }

/* Skills list */
.skill-list{
    list-style:none;
    padding:0;
    margin:0.6rem 0 0;
    display:flex;
    flex-wrap:wrap;
    gap:0.5rem;
}
.skill-list li{
    background:linear-gradient(90deg, rgba(255,112,67,0.12), rgba(255,112,67,0.06));
    padding:0.45rem 0.8rem;
    border-radius:999px;
    font-weight:600;
    color:var(--accent);
    transition:transform 160ms ease, box-shadow 160ms ease;
    cursor:default;
}
.skill-list li:hover{ transform:translateY(-3px); box-shadow:0 6px 12px rgba(0,0,0,0.06); }

/* Links */
a{
    color:var(--accent);
    text-decoration:none;
}
a:hover, a:focus{
    text-decoration:underline;
    outline: none;
}

/* Footer */
.site-footer{
    text-align:center;
    padding:1.2rem 0 2rem;
    color:var(--muted);
    font-size:0.95rem;
}

/* Responsive layout */
@media(min-width:900px){
    .page-grid{ grid-template-columns: 260px 1fr; gap:1.2rem; }
    .header-inner{ grid-template-columns: 140px 1fr; }
    .profile-img{ width:140px; height:140px; }
}

/* Small screens tweaks */
@media(max-width:420px){
    .container{ padding:1rem; }
    .lead{ font-size:0.95rem; }
    .site-nav{ gap:0.4rem; }
}