/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }

/* ===== theme tokens ===== */
:root {
  --bg: #0f172a;        /* slate-900 */
  --card: #111827;      /* gray-900 */
  --text: #e5e7eb;      /* gray-200 */
  --muted: #94a3b8;     /* slate-400 */
  --accent: #22d3ee;    /* cyan-400 */
  --accent-2: #a78bfa;  /* violet-400 */
  --ring: rgba(34, 211, 238, 0.35);
}

[data-theme="light"] {
  --bg: #f8fafc;        /* slate-50 */
  --card: #ffffff;
  --text: #0f172a;      /* slate-900 */
  --muted: #334155;     /* slate-700 */
}

body { background: linear-gradient(180deg, #0b1020, var(--bg)); color: var(--text); }
.container { width: min(1100px, 92vw); margin-inline: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ===== layout ===== */
header.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: rgba(15,23,42,0.65); border-bottom: 1px solid rgba(255,255,255,0.06); }
nav.navbar { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .75rem 0; }
.brand { font-weight: 700; letter-spacing: .4px; }
.navlinks { display: flex; gap: .9rem; flex-wrap: wrap; }
.navlinks a { padding: .45rem .7rem; border-radius: .6rem; }
.navlinks a:hover { background: rgba(255,255,255,0.06); }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: .8rem; border: 1px solid rgba(255,255,255,0.12); background: #0b1327; color: var(--text); cursor: pointer; transition: transform .15s ease, background .2s; }
.btn:hover { transform: translateY(-1px); background: #0e1831; }

main { padding: 2rem 0 4rem; display: grid; gap: 3rem; }
section { scroll-margin-top: 84px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); border-radius: 1.2rem; padding: 1.3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.grid { display: grid; gap: 1.2rem; }

/* hero */
.hero { display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1.2fr .8fr; }
.title { font-size: clamp(1.6rem, 2.8vw + .5rem, 3rem); margin: 0; line-height: 1.2; }
.subtitle { color: var(--muted); margin: .3rem 0 1rem; }
.avatar { border-radius: 1rem; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }

/* skills */
.skills { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.skill { padding: 1rem; border-radius: 1rem; background: var(--card); border: 1px solid rgba(255,255,255,0.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.skill:hover,
.skill:focus-within { transform: translateY(-2px) scale(1.02); border-color: rgba(34,211,238,0.35); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }

/* projects */
.project-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.project { background: var(--card); border-radius: 1rem; border: 1px solid rgba(255,255,255,0.06); padding: 1rem; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.project:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(0,0,0,0.45); }
.project-media { border-radius: 12px; overflow: hidden; margin: 0 0 .75rem; border:1px solid rgba(255,255,255,0.08); }
.project-media img { width:100%; height:auto; transition: transform .35s ease; }
.project:hover .project-media img { transform: scale(1.03); }

/* professional edges for avatar */
.pro-edges {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pro-edges::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.pro-edges img { display:block; width:100%; height:auto; border-radius: 14px; }
.pro-edges:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,0,0,0.45); }

/* contact */
form { display: grid; gap: .8rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: .8rem; border-radius: .6rem;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04); color: var(--text);
}
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.error { color: #fecaca; font-size: .9rem; }

/* footer */
footer { padding: 2rem 0; color: var(--muted); text-align: center; }

/* responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

/* ==== PROFESSIONAL LIGHT MODE FIXES ==== */
[data-theme="light"] body { background: #f6f7fb !important; color: #0f172a; animation: none !important; background-size: auto !important; }
[data-theme="light"] .card,
[data-theme="light"] .project,
[data-theme="light"] .avatar { background: #ffffff; border: 1px solid #e6e8ee; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
[data-theme="light"] header.site-header { background: #ffffffd9; border-bottom: 1px solid #e6e8ee; backdrop-filter: blur(6px); }
[data-theme="light"] a { color: #0f172a; text-decoration: underline; }
[data-theme="light"] .btn { background: #ffffff; color: #0f172a; border: 1px solid #e6e8ee; box-shadow: none; transition: background .15s ease, border-color .15s ease; }
[data-theme="light"] .btn:hover { background: #f1f3f7; border-color: #d9dce5; }
[data-theme="light"] .subtitle,
[data-theme="light"] .muted { color: #475567; }
[data-theme="light"] .skill:hover,
[data-theme="light"] .skill:focus-within { border-color: #cbd5e1; box-shadow: 0 14px 30px rgba(2,6,23,0.08); }
[data-theme="light"] .project:hover { box-shadow: 0 14px 30px rgba(2,6,23,0.08); }
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .btn:focus { outline: none; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25); }

/* nav hover tweaks */
.navlinks a { position: relative; text-decoration: none; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: .6rem; padding: .4rem .7rem; transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease; }
.navlinks a:hover,
.navlinks a:focus-visible { background: rgba(255,255,255,0.06); color: #e2e8f0; border-color: rgba(255,255,255,0.10); transform: translateY(-1px) scale(1.04); outline: none; }
[data-theme="light"] .navlinks a:hover,
[data-theme="light"] .navlinks a:focus-visible { background: #f1f5f9; color: #0f172a; border-color: #e5e7eb; }

/* experience hover */
.experience-list li { padding: .35rem .2rem; border-radius: .5rem; transition: background .18s ease; }
.experience-list li:hover { background: rgba(255,255,255,0.04); }
[data-theme="light"] .experience-list li:hover { background:#f1f5f9; }


.bar, .bar > span { display: none !important; }


/* Dropdown Styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #1e293b;
  border-radius: 8px;
  padding: 0.5rem 0;
  list-style: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  top: 100%;
  left: 0;
  min-width: 160px;
  z-index: 10;
}

.dropdown-menu li a {
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  padding: 0.6rem 1rem;
  transition: background 0.2s ease;
}

.dropdown-menu li a:hover {
  background-color: #334155;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Align "More" with rest of nav */
.navlinks {
  display: flex;
  gap: .9rem;
  align-items: center;
}

/* Ensure dropdown clickable over sticky header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000; /* ensures header stays above content */
}

.navbar {
  position: relative; /* anchor for dropdown stacking */
  z-index: 1001;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #1e293b;
  border-radius: 8px;
  padding: 0.5rem 0;
  list-style: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  top: 100%;
  left: 0;
  min-width: 160px;
  z-index: 2000; /* make sure dropdown is above everything */
}

.dropdown:hover .dropdown-menu {
  display: block;
}
/* Keep dropdown open while moving into it (mouse & keyboard) */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Stop the 'More' link from jumping up and creating a gap */
.dropdown > .dropdown-toggle:hover,
.dropdown > .dropdown-toggle:focus-visible {
  transform: none;                 /* override the global nav hover lift */
}

/* Ensure the menu sits flush under the trigger (no gap) */
.dropdown-menu {
  top: 100%;
  margin-top: 0;                   /* no extra spacing that causes hover loss */
}

/* (Optional) make the hit area a tad taller so it's forgiving */
.dropdown { padding-bottom: 2px; } /* tiny buffer without creating a visual gap */

