/* -------- Theme Variables -------- */
:root {
  --bg: #f5f7fa;
  --text: #222;
  --muted: #667085;
  --accent: #0ea5e9;
  --accent-2: #8b5cf6;
  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
}
body.dark {
  --bg: #0b0f17;
  --text: #edf2f7;
  --muted: #9aa4b2;
  --accent: #69a7ff;
  --accent-2: #a78bfa;
  --card: #151c2a;
  --border: rgba(255,255,255,0.08);
}

/* -------- Base -------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

h1, h2, h3, h4 { margin: 0 0 .6rem 0; line-height: 1.25; }
h2 { font-size: 2rem; }
/*h3 { font-size: 1.25rem; color: var(--muted); }*/
h3 {
  color: #f8fafc;             /* uses your electric-blue accent */
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0,0,0,0.4); /* adds slight contrast glow */
}

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

/* -------- Hero -------- */
header.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
header .subtitle { opacity: .95; margin-top: .5rem; }
header .buttons { margin-top: 1rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }
header .buttons a, #theme-toggle {
  background: white;
  color: #0b0f17;
  border: none;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
#theme-toggle { cursor: pointer; }
header .buttons a:hover, #theme-toggle:hover { transform: translateY(-2px); }

/* -------- Sections -------- */
.section { max-width: 1000px; margin: 2rem auto; padding: 0 1.25rem; }
.inline-links { margin-top: .75rem; }

/* -------- Cards -------- */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--card);
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .2s ease, background .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-4px); }
.card a { font-weight: 600; }

/* -------- Buttons -------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: .6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: #0b7cd6; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: white; }

/* -------- Timeline -------- */
.timeline { position: relative; margin: 2rem 0; padding-left: 2rem; border-left: 3px solid var(--accent); }
.timeline-item { position: relative; margin: 2rem 0; opacity: 0; transform: translateY(30px); transition: all .8s ease-out; }
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item::before {
  content: ""; position: absolute; left: -10px; top: 10px;
  width: 15px; height: 15px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline-content {
  background: var(--card);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: transform .3s ease, background .3s ease, color .3s ease, border-color .3s ease;
}
.timeline h3 { margin-top: 0; color: var(--accent); }
.timeline-content:hover { transform: translateY(-4px); background: var(--accent); color: white; border-color: transparent; }
.timeline-content:hover h3 { color: white; }

/* -------- News -------- */
.news { list-style: none; padding-left: 0; }
.news li { padding: .5rem 0; border-bottom: 1px dashed var(--border); }
.news li:last-child { border-bottom: none; }

/* -------- Contact -------- */
.contact-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.icon-link {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--card); border: 1px solid var(--border);
  padding: .5rem .75rem; border-radius: 10px;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.icon-link img { width: 18px; height: 18px; }
.icon-link:hover { transform: translateY(-2px); border-color: var(--accent); }

/* -------- Footer -------- */
footer { text-align: center; padding: 1rem; font-size: .95rem; border-top: 1px solid var(--border); margin-top: 2rem; }


/* -------- Dynamic Parallax Background -------- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('background.png');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  opacity: 0.45;
  z-index: -1;
  animation: shimmer 18s linear infinite alternate;
  transition: opacity 0.4s ease;
}

@keyframes shimmer {
  0% { filter: brightness(100%) hue-rotate(0deg); }
  50% { filter: brightness(120%) hue-rotate(25deg); }
  100% { filter: brightness(100%) hue-rotate(0deg); }
}

/* Enhanced hero section for legibility */
/*header.hero {
  background: linear-gradient(135deg, rgba(14,165,233,0.85), rgba(139,92,246,0.85));
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
} */


/* -------- Particle Network Canvas -------- */
/* Parallax image behind everything, but not "too behind" */
body::before {
  content: "";
  position: fixed;
  inset: 0;               /* shorthand for top/left/right/bottom: 0 */
  background-image: url('background.png');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  opacity: 0.45;          /* bump for visibility; adjust to taste */
  z-index: -1;            /* was -2 (too far back in some browsers) */
  animation: shimmer 18s linear infinite alternate;
}

/* Particle network above the image, below content */
#networkCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;             /* sits above the -1 background */
  pointer-events: none;
  opacity: 0.3;
}

/* Ensure your actual content layers above both */
header.hero, main, footer {
  position: relative;
  z-index: 1;
}


/* -------- Fade-in on Scroll -------- */
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Profile photo beside name --- */
/* --- Balanced asymmetric hero layout --- */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;   /* align content from the left */
  flex-wrap: wrap;
  gap: 2.5rem;                   /* more space between photo and text */
  text-align: left;
  max-width: 900px;              /* limit overall width */
  margin: 0 auto;                /* center whole group in page */
  padding: 2rem 1rem;
}

/* Keep the circular image */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;                /* prevent the image from shrinking */
}

.profile-pic:hover {
  transform: scale(1.05);
}

.hero-text {
  flex: 1;                       /* text fills remaining space */
  min-width: 250px;
}

.hero-text h1 {
  font-size: 2.3rem;
  margin-bottom: 0.3rem;
}

@media (max-width: 700px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .profile-pic {
    margin-bottom: 1rem;
  }
}
