/* ================================
   Global Styles + Smooth Scrolling
================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&display=swap');

:root {
    /* Light mode colors */
    --bg: #f7f7f8;
    --text: #222;
    --heading: #1d1d1f;
    --nav-bg: #ececf1;
    --nav-border: #d3d3da;
    --link: #333366;
    --link-hover: #000055;
    --hover-bg: #dcdce5;
    --active-bg: #4a4a6a;
    --active-text: #ffffff;
    --card-border: #cccccc;
    --img-border: #cccccc;
    --img-border-hover: #888888;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Dark mode colors (toggled by adding .dark-mode to body) */
body.dark-mode {
    --bg: #0f1115;
    --text: #e7e7ea;
    --heading: #ffffff;
    --nav-bg: #161a22;
    --nav-border: #2a3242;
    --link: #b7c2ff;
    --link-hover: #dde2ff;
    --hover-bg: #242b3a;
    --active-bg: #b7c2ff;
    --active-text: #0f1115;
    --card-border: #2a3242;
    --img-border: #2a3242;
    --img-border-hover: #515d78;
    --shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* Smooth scrolling (works for links like href="#top") */
html {
    scroll-behavior: smooth;
}

/* Base page */
body {
    font-family: "Merriweather", serif;
    margin: 0;
    padding: 0 0 60px 0;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    animation: fadeIn 0.7s ease-in-out;
}

/* Headings */
h1, h2, h3 {
    font-weight: 700;
    color: var(--heading);
    letter-spacing: 0.5px;
}

/* ================================
   Navigation Bar
================================ */

nav {
    background-color: var(--nav-bg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 2px solid var(--nav-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Push toggle button to the right */
nav .spacer {
    margin-left: auto;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.25s;
}

nav a:hover {
    background-color: var(--hover-bg);
}

nav a.active {
    background-color: var(--active-bg);
    color: var(--active-text);
    font-weight: 700;
}

/* Dark mode toggle button */
#theme-toggle {
    border: 1px solid var(--nav-border);
    background: transparent;
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}

#theme-toggle:hover {
    background-color: var(--hover-bg);
}

/* ================================
   Page Content Layout
================================ */

body > *:not(nav) {
    max-width: 880px;
    margin: 28px auto;
    padding: 0 20px;
}

/* Paragraphs */
p {
    font-size: 18px;
    margin-bottom: 16px;
}

/* Links */
a {
    color: var(--link);
    transition: 0.2s;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Lists */
ul {
    font-size: 18px;
    line-height: 1.7;
}
li {
    margin-bottom: 10px;
}

/* Images */
img {
    width: 100%;
    max-width: 650px;
    display: block;
    margin: 15px 0 30px;
    border-radius: 12px;
    border: 2px solid var(--img-border);
    box-shadow: var(--shadow);
    transition: 0.3s;
}

img:hover {
    transform: scale(1.015);
    border-color: var(--img-border-hover);
}

/* Optional: “card” look if you wrap content in <section> */
section {
    padding: 18px 18px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

body.dark-mode section {
    background: rgba(22,26,34,0.6);
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Smaller project images */
.project-image {
    width: 300px;        /* adjust size here */
    max-width: 100%;
    height: auto;
    display: block;
   margin: 20px auto;

}

/* ================================
   Hobbies Page Layout
================================ */

.hobby-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
}

.hobby-img {
  width: 100%;
  max-width: 260px;
  margin: 0;
}

.hobby-text h2 {
  margin-top: 0;
}

/* Mobile-friendly: stack image above text */
@media (max-width: 700px) {
  .hobby-row {
    grid-template-columns: 1fr;
  }

  .hobby-img {
    max-width: 100%;
  }
}



