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

:root {
  --bg: #080808;
  --bg2: #0e0e0e;
  --bg3: #141414;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --green: #4afa8a;
  --green-dim: rgba(74, 250, 138, 0.08);
  --green-glow: 0 0 30px rgba(74, 250, 138, 0.15);
  --text: #e8e8e8;
  --text-muted: #555;
  --text-mid: #888;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #222;
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--green), 0 0 20px rgba(74, 250, 138, 0.3);
  transition: width 0.15s, height 0.15s, opacity 0.15s;
}

.cursor-ring {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(74, 250, 138, 0.5);
  border-radius: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s;
}

.cursor-dot.hover {
  width: 4px;
  height: 4px;
}

.cursor-ring.hover {
  width: 44px;
  height: 44px;
  border-color: rgba(74, 250, 138, 0.8);
}

a, button, .btn-primary, .btn-outline, .si, .tag, .stat-row, .project-item, .nav-links a {
  cursor: none;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s ease;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-mid);
}

.nav-logo .accent {
  color: var(--green);
}

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

.nav-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s;
}

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

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
#home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
  padding: 8rem 4rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-name {
  font-size: clamp(3.5rem, 6vw, 6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

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

.hero-sub {
  margin-top: 2rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 420px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-status {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

.status-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.hero-btns {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.1s forwards;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 0.75rem 1.5rem;
  background: var(--green);
  color: #000;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
  box-shadow: var(--green-glow);
}

.btn-outline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-hover);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ==========================================================================
   TERMINAL COMPONENT
   ========================================================================== */
.hero-terminal {
  opacity: 0;
  animation: fadeIn 0.8s 1.4s forwards;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.t-titlebar {
  background: var(--bg3);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

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

.t-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: auto;
}

.t-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.85;
  min-height: 220px;
}

.t-prompt-line {
  display: flex;
}

.t-ps {
  color: var(--green);
  margin-right: 4px;
}

.t-cmd {
  color: var(--text);
}

.t-out {
  color: var(--text-mid);
}

.t-out .v {
  color: var(--text);
}

.t-out .k {
  color: var(--green);
  opacity: 0.75;
}

.t-blank {
  height: 0.5rem;
}

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

/* ==========================================================================
   COMMON SECTIONS & UTILITIES
   ========================================================================== */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 4rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--green);
  letter-spacing: 3px;
  margin-bottom: 0.6rem;
}

.section-heading {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 3rem;
}

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

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

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-bio p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1rem;
}

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

.about-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.63rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 1px;
  border-radius: 3px;
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: var(--green);
  color: var(--green);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.stat-row {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.stat-row:hover {
  background: var(--bg2);
}

.stat-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

.stat-v {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-v.g {
  color: var(--green);
  font-size: 0.85rem;
}

.stack-wrap {
  margin-top: 2.5rem;
}

.stack-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.stack-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.si {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s;
}

.si:hover {
  transform: translateY(-3px);
}

.si img {
  width: 26px;
  height: 26px;
  filter: grayscale(1) brightness(0.35);
  transition: filter 0.3s;
}

.si:hover img {
  filter: grayscale(0) brightness(1);
}

.si span {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.project-item {
  background: var(--bg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 1.5rem;
  align-items: start;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
}

.project-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s ease;
}

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

.project-item:hover::before {
  transform: scaleY(1);
}

.project-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  padding-top: 3px;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.project-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.project-name a:hover {
  color: var(--green);
  border-color: rgba(74, 250, 138, 0.35);
}

.project-desc {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.p-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.p-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg3);
  color: var(--text-muted);
  border-radius: 2px;
}

.p-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  white-space: nowrap;
  align-self: start;
}

.badge-live {
  background: rgba(74, 250, 138, 0.08);
  color: var(--green);
  border: 1px solid rgba(74, 250, 138, 0.2);
}

.badge-wip {
  background: var(--bg3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-item.wip {
  opacity: 0.4;
}

.project-item.wip:hover {
  opacity: 0.6;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}

.contact-text p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.c-link {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  gap: 0.75rem;
  transition: color 0.2s;
}

.c-link:hover {
  color: var(--text);
}

.c-key {
  color: var(--green);
  min-width: 70px;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  padding: 0.75rem 1rem;
  outline: none;
  border-radius: 5px;
  transition: border-color 0.2s;
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(74, 250, 138, 0.35);
}

.form-field textarea {
  height: 110px;
}

.form-row {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#form-msg {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--green);
  letter-spacing: 1px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.f-left {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--text-muted);
}

.f-left .g {
  color: var(--green);
}

.f-right {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--text-muted);
}

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

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

/* ==========================================================================
   RESPONSIVE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 900px) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  a, button, .btn-primary, .btn-outline, .si, .tag, .stat-row, .project-item, .nav-links a {
    cursor: pointer;
  }

  nav {
    padding: 1.1rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  #home {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 3rem;
    gap: 3rem;
  }

  .hero-terminal {
    display: none;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-item {
    grid-template-columns: 36px 1fr;
  }

  .p-badge {
    display: none;
  }

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