@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* --- The Brutalist Palette --- */
  --bg: #1A1A1A;
  --text: #F5F5F5;
  --muted: #aaaaaa;
  --border: #444444; /* Darkened borders so they don't overpower the design */
  --accent: #F7FF00; /* Electric Yellow */
  --shadow-color: var(--accent);
  --radius: 0; /* NO rounded corners */
  --transition-speed: 0.3s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* Visible grid lines for brutalist aesthetic */
  background-image: 
    linear-gradient(rgba(245,245,245, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(245,245,245, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  line-height: 1.6;
}

/* Aurora Background */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
  background: 
    radial-gradient(circle at 50% 50%, rgba(247, 255, 0, 0.08), transparent 40%),
    radial-gradient(circle at 30% 70%, rgba(0, 255, 255, 0.05), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(255, 0, 255, 0.05), transparent 40%);
  filter: blur(80px);
  animation: aurora-shift 15s linear infinite alternate;
  pointer-events: none;
}

@keyframes aurora-shift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, 5%) rotate(5deg); }
}

/* Typography Overrides */
h1, h2, h3, h4, .big-name {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Layout */
.container { width: min(1100px, 92%); margin: 0 auto; }
section { padding: 90px 0; border-bottom: 2px solid var(--border); }
section:last-of-type { border-bottom: none; }

/* Header / Nav */
header {
  border-bottom: 2px solid var(--border);
  background: rgba(26, 26, 26, 0.85); /* Slightly transparent so grid shows */
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1001;
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.big-name {
  font-size: 1.6rem;
}
.nav-links { display: flex; gap: 32px; align-items: center; }

/* Desktop nav link styling - hide SVG icons here */
.nav-links a { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 500; 
  font-family: 'Fira Code', monospace; 
  padding: 4px 0; 
  border-bottom: 2px solid transparent; 
  transition: all var(--transition-speed); 
}
.nav-links a svg { display: none; }
.nav-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: var(--radius); border: 2px solid var(--text);
  background: var(--text); color: var(--bg);
  text-decoration: none; padding: 12px 24px;
  font-weight: 700; font-size: 1rem; font-family: 'Fira Code', monospace;
  box-shadow: 4px 4px 0px var(--shadow-color);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed); 
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn:hover, .btn:focus-visible {
  transform: translate(-2px, -2px); /* Makes the button pop UP on hover */
  box-shadow: 6px 6px 0px var(--shadow-color);
}
.btn.disabled, .btn[aria-disabled="true"] {
  background: transparent; border-color: var(--muted);
  color: var(--muted); cursor: not-allowed; pointer-events: none;
  box-shadow: none; transform: none;
}

/* Hero Section */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 100px 0 60px; }
.eyebrow { 
  color: var(--accent); font-weight: 600;
  letter-spacing: 1.5px; font-size: 1rem; margin-bottom: 16px; 
}
.hero h1 { 
  font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.2; 
  margin: 0 0 20px;
  /* Removed the solid background, added a text shadow to separate from grid */
  text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}
.subtitle { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; max-width: 50ch; }
.hero-cta { 
  display: flex; 
  gap: 24px;
  flex-wrap: wrap; 
}

/* Developer ID Card */
.id-card {
  border: 2px solid var(--border);
  font-family: 'Fira Code', monospace;
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(5px);
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.hero > .id-card {
  justify-self: end;
}
.id-card:hover {
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) scale(1.02);
  border-color: var(--accent);
  box-shadow: 10px 10px 0px rgba(247, 255, 0, 0.1);
}
.id-header {
  padding: 10px 15px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-align: center;
}
.id-body {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: flex-start;
}
.id-avatar {
  width: 80px;
  height: 80px;
  border: 2px solid var(--border);
  transition: transform var(--transition-speed), filter var(--transition-speed);
}
.id-info {
  width: 100%;
}
.id-field {
  margin-bottom: 16px;
}
.id-field:last-child {
  margin-bottom: 0;
}
.id-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.id-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.id-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: transparent;
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
}
.id-footer {
  padding: 12px 15px;
  border-top: 2px solid var(--border);
  background: rgba(42, 42, 42, 0.5);
  text-align: center;
}
.id-status {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 1rem;
  animation: blink-status 2s infinite ease-in-out;
}

@keyframes blink-status {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 8px var(--accent);
  }
  50% {
    opacity: 0.6;
    text-shadow: none;
  }
}

/* Section & Card Fixes */
.section-title { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 40px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }

/* Removed the blocky solid background on section descriptions */
.section-desc { 
  color: var(--muted); 
  font-size: 1.1rem; 
  max-width: 65ch; 
  margin-bottom: 32px;
}

.grid { display: grid; gap: 32px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

.card, .tech-group {
  background: rgba(26, 26, 26, 0.7); /* Slightly translucent */
  backdrop-filter: blur(5px);
  border: 2px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}
.card:hover, .tech-group:hover {
  transform: translate(-4px, -4px);
  border-color: var(--accent);
  box-shadow: 6px 6px 0px rgba(247, 255, 0, 0.2);
}
.card h3 {
  margin: -24px 0 24px -24px;
  padding: 12px 24px;
  border-bottom: 2px solid var(--border);
  display: inline-block;
  width: calc(100% + 48px);
}
.card ul { padding-left: 20px; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Tech Stack */
.tech-group h4 {
  color: var(--accent);
  margin-bottom: 16px;
}
.tech-list { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.chip { 
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 0;
  background: none; border: none; border-bottom: 2px solid var(--border);
  color: var(--text); font-weight: 500; font-size: 1rem;
  transition: all var(--transition-speed);
}
.chip:hover {
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent);
}
.chip strong { font-weight: 500; }
.tech-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Projects Card */
.proj { display: flex; flex-direction: column; height: 100%; }
.proj h4 { margin: 20px 0 8px; font-size: 0.9rem; color: var(--accent); letter-spacing: 1px; }
.proj .actions { margin-top: auto; padding-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Contact Block */
.contact-block {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; padding: 2.5rem; flex-wrap: wrap;
  border: 2px solid var(--border);
  background: rgba(26, 26, 26, 0.7);
}
.email-row {
  display: inline-flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--text);
  font-weight: 500; font-size: 1.1rem;
  transition: color var(--transition-speed);
}
.email-row:hover {
  color: var(--accent);
}
.email-icon { color: var(--accent); }
.contact-social { display: flex; gap: 1rem; }

.social-icon-btn {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: all var(--transition-speed);
}
.social-icon-btn:hover {
  transform: translate(-4px, -4px);
  border-color: var(--accent);
  box-shadow: 4px 4px 0px rgba(247, 255, 0, 0.2);
}
.social-icon-btn .icon {
  width: 28px; height: 28px; filter: invert(1);
}

/* Footer */
footer { border-top: 2px solid var(--border); padding: 32px 0; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero > .id-card { justify-self: center; }
}

@media (max-width: 700px) {
  section { padding: 60px 0; }
  .contact-block { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-social { justify-content: center; }

  /* Add padding to body so bottom nav doesn't hide footer */
  body { padding-bottom: 90px; }

  /* 1. FREE THE NAV TRAP: Remove backdrop-filter from header on mobile */
  header {
    backdrop-filter: none;
    background: var(--bg);
  }
.nav {
    justify-content: center;
  }
  /* 2. Fix the Bottom Navigation Bar */
  .nav-links {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.85); 
    backdrop-filter: blur(10px); /* Move the blur down to the nav */
    border-top: 2px solid var(--border);
    display: flex;
    flex-direction: row; 
    justify-content: space-around;
    align-items: center;
    /* iOS Safe Area fix prevents iPhone home bar from covering icons */
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom)) 0; 
    z-index: 9999;
    gap: 0;
  }

  /* Show SVG icons and restyle links for mobile */
  .nav-links a {
    font-size: 0.75rem; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-bottom: none;
    padding: 4px 8px;
    font-family: 'Inter', system-ui, sans-serif; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
  }
  
  .nav-links a svg {
    display: block; 
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform var(--transition-speed);
  }

  .nav-links a:hover {
    border-bottom: none;
    color: var(--accent);
  }

  .nav-links a:hover svg {
    transform: translateY(-3px); 
  }
}

/* Custom Brutalist Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 2px solid var(--border);
}
::-webkit-scrollbar-thumb {
  background: var(--text);
  border-radius: 0; /* Keeping it sharp */
  border-left: 2px solid var(--border);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
/* Glitch Effect on Hover */
.brand:hover .big-name {
  animation: text-glitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite;
  color: var(--accent);
}

@keyframes text-glitch {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 2px); text-shadow: 2px 0 red, -2px 0 cyan; }
  40% { transform: translate(-2px, -2px); text-shadow: -2px 0 red, 2px 0 cyan; }
  60% { transform: translate(2px, 2px); text-shadow: 2px 0 red, -2px 0 cyan; }
  80% { transform: translate(2px, -2px); text-shadow: -2px 0 red, 2px 0 cyan; }
  100% { transform: translate(0) }
}
