/* ============================================
   PORTFOLIO STYLES — Backend Developer
   ============================================ */

/* === RESET & VARIABLES === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0c0f;
  --bg2: #0f1318;
  --bg3: #151a22;
  --border: #1e2730;
  --accent: #00e5a0;
  --accent2: #0070f3;
  --text: #e2e8f0;
  --muted: #64748b;
  --card: #111720;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

/* === CUSTOM CURSOR === */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}

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

/* === NOISE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9990;
  opacity: 0.4;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 15, 0.85);
  backdrop-filter: blur(16px);
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.nav-logo span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

/* On smaller screens, remove the right padding (terminal is hidden anyway) */
@media (max-width: 900px) {
  .hero {
    padding: 8rem 3rem 4rem;
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 160, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 160, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.35s forwards;
}

.hero-name .highlight {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}

.hero-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--muted);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.hero-role .typed-text {
  color: var(--accent);
}

.hero-desc {
  max-width: 520px;
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.75;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.65s forwards;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.8s forwards;
}

/* === BUTTONS === */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.btn-primary:hover {
  background: #00ffc4;
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === FLOATING TERMINAL === */
.hero-terminal {
  position: absolute;
  right: 2%;
  top: 50%;
  transform: translateY(-50%);
  width: min(340px, 32vw);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 229, 160, 0.06), 0 40px 80px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeLeft 0.8s ease 1s forwards;
}

@media (max-width: 900px) {
  .hero-terminal { display: none; }
}

.terminal-bar {
  background: #1a2030;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #ffbd2e; }
.t-dot.g { background: #28c840; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.9;
}

.t-line   { display: flex; gap: 0.5rem; }
.t-prompt { color: var(--accent); }
.t-cmd    { color: #e2e8f0; }
.t-out    { color: var(--muted); padding-left: 1rem; }
.t-green  { color: var(--accent); }
.t-blue   { color: #60a5fa; }
.t-orange { color: #fbbf24; }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* === SHARED SECTION STYLES === */
section {
  padding: 6rem 3rem;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}

/* === STACK SECTION === */
.stack-section {
  background: var(--bg2);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.stack-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.stack-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.stack-item:hover {
  border-color: rgba(0, 229, 160, 0.25);
  transform: translateY(-4px);
}

.stack-item:hover::before {
  transform: scaleX(1);
}

.stack-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  display: block;
}

.stack-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

.stack-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* === PROJECTS SECTION === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── PROJECT IMAGE ── */
/* 
  To add a screenshot image to a project card:
  1. Place your image (e.g. pizza-docs.png) in the same folder as index.html
  2. Add this block inside the .project-card div, before the project-num div:

     <div class="project-image">
       <img src="pizza-docs.png" alt="Pizza API docs screenshot" />
     </div>

  The .project-image styles below will handle sizing and hover zoom.
*/
.project-image {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: rgba(0, 229, 160, 0.2);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card:hover::after {
  opacity: 1;
}

.project-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.project-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.tag.accent {
  border-color: rgba(0, 229, 160, 0.35);
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.proj-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  background: var(--bg3);
  border: 1px solid var(--accent);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
}

.proj-link:hover {
  background: var(--accent);
  color: #000;
}

.proj-link svg {
  width: 14px;
  height: 14px;
}

/* === ABOUT SECTION === */
.about-section {
  background: var(--bg2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.about-text p {
  color: #94a3b8;
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.about-text p span {
  color: var(--accent);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* === CONTACT SECTION === */
.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .section-label {
  justify-content: center;
}

.contact-inner .section-label::after {
  display: none;
}

.contact-inner .section-title {
  margin-bottom: 1rem;
}

.contact-inner p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
}

.contact-link:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 160, 0.3);
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

footer p span {
  color: var(--accent);
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translate(30px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ============================================
   MOBILE RESPONSIVE — max 768px
   ============================================ */
@media (max-width: 768px) {

  /* NAV */
  nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.65rem;
  }

  /* HERO */
  .hero {
    padding: 7rem 1.25rem 3rem;
    min-height: 100svh;
  }

  .hero-tag {
    font-size: 0.65rem;
  }

  .hero-name {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .hero-role {
    font-size: 0.9rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }

  .hero-btns {
    flex-direction: column;
  }

  .btn {
    text-align: center;
    width: 100%;
  }

  /* Hide terminal on mobile — too small to be useful */
  .hero-terminal {
    display: none;
  }

  /* SECTIONS */
  section {
    padding: 4rem 1.25rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* STACK */
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* PROJECTS */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  /* ABOUT */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-num {
    font-size: 2rem;
  }

  /* CONTACT */
  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }

  /* FOOTER */
  footer {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}


/* ============================================
   SMALL PHONES — max 400px
   ============================================ */
@media (max-width: 400px) {

  .hero-name {
    font-size: 2.5rem;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    gap: 0.6rem;
  }

  .nav-links a {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }
}