/* ============================================
    PORTFOLIO
   style.css
   ============================================ */

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

:root {
  --bg:      #0a0b0d;
  --bg2:     #111318;
  --bg3:     #181c24;
  --border:  rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.12);
  --accent:  #00e5a0;
  --accent2: #00b8ff;
  --accent3: #ff4d6d;
  --text:    #e8eaf0;
  --muted:   #6b7280;
  --muted2:  #9ca3af;
  --mono:    'JetBrains Mono', monospace;
  --sans:    'Syne', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.018;
  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)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}


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

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

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

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

.nav-links a {
  color: var(--muted2);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

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


/* --- HERO ------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 900px;
}

.hero-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-label::before {
  content: '// ';
  color: var(--muted);
}

h1.hero-name {
  font-family: var(--sans);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
}

h1.hero-name .line2 {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
}

h1.hero-name .accent-word {
  color: var(--accent);
  -webkit-text-stroke: 0;
}

.hero-desc {
  font-size: 15px;
  color: var(--muted2);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

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


/* --- BUTTONS ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #00ffb3;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 229, 160, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--muted2);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}


/* --- TERMINAL WIDGET -------------------------- */
.hero-terminal {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.8s 0.8s forwards;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

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

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

.terminal-title {
  margin: 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.terminal-body {
  padding: 16px;
  font-size: 12px;
  line-height: 2;
}

.t-prompt  { color: var(--accent); }
.t-cmd     { color: var(--text); }
.t-out     { color: var(--muted2); padding-left: 1rem; }
.t-out.highlight { color: var(--accent2); }
.t-out.warn      { color: var(--accent3); }

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


/* --- LAYOUT HELPERS --------------------------- */
section {
  padding: 80px 3rem;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-label::before {
  content: '// ';
  color: var(--muted);
}

h2.section-title {
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.1;
}

.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border2) 30%,
    var(--border2) 70%,
    transparent
  );
  margin: 0 3rem;
}


/* --- SKILLS ----------------------------------- */
#skills {
  background: var(--bg2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.skill-cell {
  background: var(--bg2);
  padding: 20px;
  transition: background 0.2s;
}

.skill-cell:hover {
  background: var(--bg3);
}

.skill-cat {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 8px;
}

.skill-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.skill-bar {
  margin-top: 10px;
  height: 2px;
  background: var(--border2);
  border-radius: 1px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 1px;
  transition: width 1s ease;
}


/* --- PROJECTS --------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
  cursor: default;
}

.project-card:hover {
  background: var(--bg2);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-num {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.project-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.2;
}

.project-desc {
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--border2);
  color: var(--muted2);
  border-radius: 1px;
}

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


/* --- ABOUT ------------------------------------ */
#about {
  background: var(--bg2);
}

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

.about-text {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.9;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg2);
  padding: 14px 18px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.stat-val {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}


/* --- CONTACT ---------------------------------- */
#contact {
  text-align: center;
}

.contact-box {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border2);
  padding: 48px;
  position: relative;
}

/* Corner accents */
.contact-box::before,
.contact-box::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
}

.contact-box::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.contact-box::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.contact-center {
  text-align: center;
  margin-bottom: 1rem;
}

.contact-tagline {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.contact-sub {
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}


/* --- FOOTER ----------------------------------- */
footer {
  padding: 24px 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.footer-ascii {
  letter-spacing: 0.05em;
  color: rgba(0, 229, 160, 0.3);
}

.footer-school {
  color: rgba(0, 229, 160, 0.4);
}


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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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


/* --- RESPONSIVE ------------------------------- */
@media (max-width: 900px) {
  nav {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  #hero {
    padding: 100px 1.5rem 4rem;
    flex-direction: column;
  }

  .hero-terminal {
    display: none;
  }

  section {
    padding: 60px 1.5rem;
  }

  .divider {
    margin: 0 1.5rem;
  }

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

  footer {
    padding: 20px 1.5rem;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
/* CLICKABLE PROJECT CARDS FIX */
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Hover arrow indicator */
.project-card::after {
  content: "→";
  position: absolute;
  right: 20px;
  bottom: 20px;
  opacity: 0;
  transition: 0.2s ease;
}

/* Hover effect */
.project-card:hover::after {
  opacity: 1;
  transform: translateX(6px);
}

/* Slight lift effect */
.project-card:hover {
  transform: translateY(-3px);
}