@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap");

/* Design Tokens */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-soft: #94a3b8;

  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);

  --border: rgba(15, 23, 42, 0.08);
  --shadow: rgba(15, 23, 42, 0.1);

  --accent: #0284c7;
  --accent-dim: rgba(2, 132, 199, 0.1);
  --accent-glow: rgba(2, 132, 199, 0.22);
  --accent-text: #ffffff;

  --grid-color: rgba(2, 132, 199, 0.04);
  --blob-1: rgba(2, 132, 199, 0.09);
  --blob-2: rgba(2, 132, 199, 0.06);
}

html[data-theme="dark"] {
  --bg-primary: #05080f;
  --bg-secondary: #090d18;
  --bg-tertiary: #0d1220;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-soft: #64748b;

  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.07);

  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.65);

  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.1);
  --accent-glow: rgba(56, 189, 248, 0.22);
  --accent-text: #05080f;

  --grid-color: rgba(56, 189, 248, 0.025);
  --blob-1: rgba(56, 189, 248, 0.08);
  --blob-2: rgba(56, 189, 248, 0.05);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body & Background */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 64px 64px;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Accent-tinted ambient blobs */
.background-blur {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.blur-one {
  top: -180px;
  right: -180px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle at center, var(--blob-1) 0%, transparent 70%);
  filter: blur(60px);
}

.blur-two {
  bottom: -180px;
  left: -180px;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle at center, var(--blob-2) 0%, transparent 70%);
  filter: blur(60px);
}

/* Header */
header {
  width: min(1120px, 90%);
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.logo,
.github,
nav a,
.theme-toggle {
  color: var(--text-primary);
  text-decoration: none;
}

.logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  gap: 34px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 40px var(--shadow);
}

nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.25s ease;
}

nav a:hover {
  color: var(--text-primary);
}

nav a.active {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.github,
.linkedin,
.theme-toggle {
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px var(--shadow);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: 0.25s ease;
}

.linkedin {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.linkedin:hover {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px var(--shadow),
    0 0 24px var(--accent-glow);
}

.github:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px var(--shadow),
    0 0 0 1px var(--accent-dim);
}

/* Hero */
.hero {
  width: min(1120px, 90%);
  flex: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
  padding: 48px 0 64px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 24px var(--accent-glow);
}

h1 {
  max-width: 660px;
  font-size: clamp(58px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.08em;
  font-weight: 800;
}

h2 {
  margin-top: 22px;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.01em;
}

.prefix {
  color: var(--text-soft);
  user-select: none;
}

.cursor {
  color: var(--accent);
  animation: blink 0.75s step-end infinite;
}

.description {
  max-width: 520px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.75;
}

/* Buttons */
.buttons {
  margin-top: 34px;
  display: flex;
  gap: 14px;
}

.btn {
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: 0.25s ease;
}

.primary {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px var(--accent-glow);
}

.secondary {
  color: var(--text-primary);
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.secondary:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.ghost {
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
}

.ghost:hover {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: var(--accent);
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
}

.image-card {
  width: min(420px, 100%);
  aspect-ratio: 1 / 1.15;
  padding: 14px;
  border-radius: 42px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 34px 90px var(--shadow);
  backdrop-filter: blur(24px);
  transition: 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.image-card:hover {
  transform: translateY(-10px) scale(1.015);
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 40px 100px var(--shadow),
    0 0 60px var(--accent-glow);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  width: min(1120px, 90%);
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  color: var(--text-soft);
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeInUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.fade-in.delay {
  animation-delay: 0.2s;
}

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

@keyframes blink {
  50% { opacity: 0; }
}

/* Particle Canvas */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 10000;
  transition: width 0.08s linear;
}

/* Custom Cursor */
@media (pointer: fine) {
  *, *::before, *::after { cursor: none !important; }
}

#cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, opacity 0.2s ease;
  box-shadow: 0 0 12px var(--accent-glow);
  will-change: left, top;
}

#cursor-ring {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  will-change: left, top;
}

#cursor.cursor-hover {
  transform: translate(-50%, -50%) scale(2.5);
  opacity: 0.4;
}

#cursor-ring.ring-hover {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 0.25;
}

/* Blob Movement */
.blur-one {
  animation: blobDrift1 14s ease-in-out infinite;
}

.blur-two {
  animation: blobDrift2 18s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(40px, 30px); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-35px, -40px); }
}

/* Gradient Shimmer on H1 */
h1 {
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent) 45%,
    var(--text-primary) 75%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* Eyebrow Glow Pulse */
.eyebrow {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 16px var(--accent-glow); }
  50%       { text-shadow: 0 0 40px var(--accent-glow), 0 0 70px var(--accent-dim); }
}

/* Primary Button Pulse */
.primary {
  animation: btnPulse 3.5s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 8px 32px var(--accent-glow); }
  50%       { box-shadow: 0 8px 48px var(--accent-glow), 0 0 0 5px var(--accent-dim); }
}

/* Nav Underline Hover */
nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
  left: 0;
}

/* Mobile Nav */
.mobile-nav { display: none; }

/* Responsive */

/* Tablet (600–850px): pill nav stays, just gets compact */
@media (max-width: 850px) {
  header {
    width: 100%;
    padding: 14px 5%;
    border-bottom: 1px solid var(--border);
  }

  nav { gap: 18px; padding: 8px 16px; }
  nav a { font-size: 13px; }
  .github { display: none; } /* save space; still in footer */

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 36px 0 56px;
    gap: 32px;
    min-height: unset;
  }

  .hero-image { order: -1; }

  .image-card {
    width: min(300px, 80vw);
    aspect-ratio: 1 / 1.1;
  }

  h1 { font-size: clamp(42px, 12vw, 92px); }

  .description {
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }

  .buttons { justify-content: center; flex-wrap: wrap; gap: 12px; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

/* Phone (≤600px): hide pill, show mobile nav bar */
@media (max-width: 600px) {
  nav { display: none; }

  .mobile-nav {
    display: flex;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav a {
    flex: 1;
    text-align: center;
    padding: 13px 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-right: 1px solid var(--border);
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-nav a:last-child { border-right: none; }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav a:hover { color: var(--text-primary); background: var(--accent-dim); }

  .hero { padding: 24px 0 44px; gap: 24px; }
  h2 { font-size: 15px; }
}

@media (max-width: 480px) {
  .github { display: none; }

  .image-card { width: min(240px, 85vw); }

  .buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
    justify-content: center;
  }
}

/* Scroll To Top */
#scroll-top {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px var(--shadow);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#scroll-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-50%) translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px var(--shadow),
    0 0 0 1px var(--accent-dim),
    0 0 20px var(--accent-glow);
}
