/* 
   Base + Reset
*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b1220;
  --surface: #0f1a33;
  --card: #111f3d;
  --text: #eaf0ff;
  --muted: #b9c4e2;
  --accent: #7c3aed;
  --accent2: #22c55e;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  --link: #c2a0fc;
  --link-hover: #a98dfc;
  --link-active: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 700px at 20% 10%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(900px 600px at 90% 30%, rgba(34, 197, 94, 0.18), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  text-align: center;
  padding-bottom: 6rem;
}

/* Scroll Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: var(--accent);
  z-index: 99999;
  transition: width 0.15s ease-out;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin-top: 1.2rem;
}

p {
  max-width: 70ch;
  margin: 0.75rem auto;
  text-align: left;
}

/* Layout Utility */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #111;
  border-radius: 10px;
}

.skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
  z-index: 999;
}

/* Header */
.site-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 26, 51, 0.95), rgba(15, 26, 51, 0.35));
}

.eyebrow {
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Navigation */
.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav-list a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

/* Sections */
section {
  background: rgba(15, 26, 51, 0.55);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow);
}

/* Lists */
ul, ol {
  display: inline-block;
  text-align: left;
  margin: 1rem auto;
  padding-left: 1.5rem;
}

li {
  margin: 0.45rem 0;
}

/* Project Cards */
.projects-intro {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: rgba(17, 31, 61, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
}

.card .status {
  margin-top: auto;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text);
  font-style: italic;
}

/* Contact Card */
.contact-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  display: inline-block;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  text-align: center;
}

/* Links */
a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

a:active {
  color: var(--link-active);
}

/* Email link */
a[href^="mailto:"] {
  font-weight: bold;
}

/* Fade-in Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
  border: 2px solid var(--surface);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent2);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface);
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

#backToTop:hover {
  transform: translateY(-4px);
  background: var(--accent2);
}

#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }

  section {
    padding: 1.5rem;
  }
}
