/* ─────────────────────────────────────────────
   TOKENS
───────────────────────────────────────────── */
:root {
  --bg: #08090d;
  --bg-alt: #0e1017;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #eef1fa;
  --muted: #8a90ab;
  --cyan: #57e6ff;
  --violet: #b57bff;
  --pink: #ff6fd8;
  --green: #6ffcb0;

  --gradient: linear-gradient(115deg, var(--cyan) 0%, var(--violet) 55%, var(--pink) 100%);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: rgba(181, 123, 255, 0.35); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ─────────────────────────────────────────────
   AMBIENT BACKGROUND
───────────────────────────────────────────── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.glow-a { width: 46vw; height: 46vw; top: -14vw; left: -10vw; background: var(--cyan); }
.glow-b { width: 40vw; height: 40vw; top: 10vh; right: -12vw; background: var(--violet); }
.glow-c { width: 34vw; height: 34vw; bottom: -16vw; left: 24vw; background: var(--pink); opacity: 0.22; }

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 6vw;
  background: rgba(8, 9, 13, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}
.nav-logo span::before { content: "~ "; color: var(--muted); }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.nav-links a:hover { color: var(--cyan); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: inline-block;
}
.btn:hover { transform: translateY(-1px); }

.btn-ghost {
  background: var(--panel);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-primary {
  background: var(--gradient);
  color: #08090d;
  font-weight: 600;
  border: none;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--panel-border);
}
.btn-outline:hover { border-color: var(--violet); color: var(--violet); }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 9vh 6vw 10vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.fetch-card {
  width: 100%;
  max-width: 600px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.fetch-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.02);
}
.fetch-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fetch-dot.r { background: #ff5f57; }
.fetch-dot.y { background: #febc2e; }
.fetch-dot.g { background: #28c840; }
.fetch-card-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Modified existing rule */
.fetch-card-body {
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--muted);
  min-height: 148px;

  /* --- NEW FLEXBOX RULES --- */
  display: flex;
  align-items: stretch; /* Stretches both columns to match height */
  justify-content: space-between;
  gap: 20px; /* Space between text and image */
}

/* --- NEW RULES TO ADD --- */

/* Wrapper for the left-side text lines */
.fetch-lines {
  flex: 1; /* Takes up remaining space */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centers lines vertically */
}

/* Wrapper for the right-side image */
.fetch-avatar-wrap {
  width: 140px; /* Set width of the image column */
  flex-shrink: 0; /* Prevents image from shrinking */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* Starts hidden */
  animation: fetchIn 0.4s ease forwards;
  animation-delay: 0.3s; /* Fades in smoothly after text starts */
}

/* The actual profile image */
.fetch-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Stretches to cover entire area without distortion */
  border-radius: 8px; /* Slightly less rounded than the card */
  border: none;
}

.fetch-line { opacity: 0; transform: translateY(4px); animation: fetchIn 0.4s ease forwards; margin: 4px 0; }
.fetch-line b { color: var(--text); font-weight: 500; }
.fetch-line .k { color: var(--cyan); }

@keyframes fetchIn { to { opacity: 1; transform: translateY(0); } }

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.05;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ─────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8vh 6vw;
}

.section-head { margin-bottom: 34px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
}
.section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 6px 0 0;
}

.about-text {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 68ch;
}

/* stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.stack-group {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stack-group h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--violet);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stack-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.project-card h3 { font-family: var(--font-display); margin: 0; font-size: 1.15rem; }
.project-card p { color: var(--muted); margin: 0; font-size: 0.92rem; flex-grow: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--panel-border);
  padding: 3px 8px;
  border-radius: 6px;
}
.project-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
}

/* contact */
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.socials a {
  font-family: var(--font-mono);
  padding: 10px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel);
}
.socials a:hover { border-color: var(--pink); color: var(--pink); }

/* footer */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 6vw 60px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.footer-sep { margin: 0 8px; }

/* ─────────────────────────────────────────────
   LOGIN MODAL
───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal .fetch-card-head { position: relative; }
.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
}
.modal-close:hover { color: var(--pink); }

.login-form { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.login-form h3 { font-family: var(--font-display); margin: 0; }
.login-note { color: var(--muted); font-size: 0.8rem; margin: 0; line-height: 1.4; }
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.login-form input {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.9rem;
}
.login-error { color: var(--pink); font-size: 0.8rem; margin: 0; }
.login-submit { width: 100%; text-align: center; }
