/*CSS VARIABLES*/
  
:root {
  --bg:      #080b0f;
  --bg2:     #0d1117;
  --surface: #111820;
  --border:  #1e2d3d;
  --accent:  #00d9ff;
  --text:    #e8f0fe;
  --muted:   #546e7a;
  --green:   #00ffaa;
}


*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}


/* CUSTOM CURSOR*/
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
  mix-blend-mode: screen;
}

.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 217, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}


/*Backgrnd Effcts */
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: 1000;
  opacity: 0.5;
}

body::after {
  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: 999;
}


/* Nav-Desktop */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  background: linear-gradient(to bottom, rgba(8,11,15,0.95), transparent);
  backdrop-filter: blur(10px);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  position: relative;
  z-index: 600;
}
.nav-logo span { color: var(--text); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }


/*Nav Mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 600;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.nav-hamburger span:nth-child(2) { width: 70%; } 

/* Hamburger animates into an X when menu is open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Full-screen overlay — hidden by default */
.nav-mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}


.nav-mobile-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.mobile-link {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--accent); }


/*heroo*/
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,217,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,217,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,217,255,0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,217,255,0.2);
  padding: 6px 14px;
  margin-bottom: 32px;
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  animation: fadeUp 0.8s 0.2s ease forwards;
  opacity: 0;
}
h1 .line2  { color: transparent; -webkit-text-stroke: 1px rgba(232,240,254,0.3); }
h1 .accent { color: var(--accent); }

.hero-desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s 0.4s ease forwards;
  opacity: 0;
}

.hero-cta {
  display: flex;
  gap: 16px;
  animation: fadeUp 0.8s 0.6s ease forwards;
  opacity: 0;
}


.hero-stats-mobile {
  display: none;
  gap: 32px;
  margin-top: 40px;
  animation: fadeUp 0.8s 0.8s ease forwards;
  opacity: 0;
}
.hero-stats-mobile .stat { text-align: left; }
.hero-stats-mobile .stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.hero-stats-mobile .stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}


.hero-stats {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeUp 0.8s 0.8s ease forwards;
  opacity: 0;
}
.stat { text-align: right; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  transform: translateX(-101%);
  transition: transform 0.3s ease;
}
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary:hover { color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }



section {
  padding: 120px 60px;
  position: relative;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 60px;
}
.section-label::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--accent);
}

h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 60px;
}


/*about */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  font-size: 0.85rem;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 20px;
}
.about-text p strong { color: var(--text); font-weight: 400; }


/*terminal sec*/
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.terminal::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,217,255,0.03) 0%, transparent 60%);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28ca40; }

.terminal-body { padding: 24px; font-size: 0.78rem; line-height: 2; }
.line { display: flex; gap: 12px; }
.prompt  { color: var(--green); }
.cmd     { color: var(--text); }
.output  { color: var(--muted); padding-left: 28px; }
.output.highlight { color: var(--accent); }

.blink-cursor { animation: blink 1s step-end infinite; }


/* projects*/
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
}
.project-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,217,255,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none; /* Don't block clicks on elements inside the card */
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(0,217,255,0.3); }
.project-card:hover::before { opacity: 1; }

.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, #0d1a2a 0%, var(--surface) 100%);
}

.project-num   { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 24px; }
.project-title { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
.project-desc  { font-size: 0.78rem; line-height: 1.8; color: var(--muted); margin-bottom: 28px; }

.project-tags  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(0,217,255,0.2); padding: 4px 10px;
}

.project-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  transition: color 0.2s, gap 0.2s;
  position: relative; 
  z-index: 10;
  cursor: pointer;
}
.project-link:hover { color: var(--accent); gap: 12px; }


/* skills */
#skills { background: var(--bg2); }

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
}

.skills-intro p { font-size: 0.82rem; line-height: 2; color: var(--muted); margin-bottom: 24px; }

.skills-categories { display: flex; flex-direction: column; gap: 48px; }

.skills-category-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

.skills-list { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 18px; font-size: 0.75rem;
  transition: all 0.25s; cursor: pointer;
}
.skill-pill:hover { border-color: rgba(0,217,255,0.4); color: var(--accent); background: rgba(0,217,255,0.05); }

.skill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }


/*contact*/
#contact-section { }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 20px; }
.contact-info p  { font-size: 0.82rem; line-height: 2; color: var(--muted); margin-bottom: 48px; }

.contact-links { display: flex; flex-direction: column; gap: 16px; }

.contact-link {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--muted);
  font-size: 0.8rem; padding: 16px;
  border: 1px solid transparent; transition: all 0.3s;
}
.contact-link:hover { border-color: var(--border); color: var(--text); }
.contact-link:hover .contact-icon { color: var(--accent); }
.contact-icon { font-size: 1.1rem; transition: color 0.3s; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
}

.form-input, .form-textarea {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; padding: 14px 16px;
  outline: none; transition: border-color 0.2s; resize: none;
}
.form-input:focus, .form-textarea:focus { border-color: rgba(0,217,255,0.4); }
.form-textarea { height: 120px; }

.btn-send { align-self: flex-start; }


/*footer*/
footer {
  padding: 40px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer p { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.05em; }

.footer-status { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; color: var(--green); }

.status-dot {
  width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  animation: blink 2s infinite;
}


/* scroll reveal*/
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* respon on Tablets */
@media (max-width: 900px) {

  /* Nav */
  nav { padding: 18px 24px; }
  .nav-links { display: none; }          
  .nav-hamburger { display: flex; }    

  /* Sections */
  section { padding: 80px 24px; }
  #hero   { padding: 110px 24px 70px; min-height: 100svh; }


  .hero-stats        { display: none; }
  .hero-stats-mobile { display: flex; }


  .about-grid,
  .skills-layout,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.featured { grid-column: span 2; }

  /* Footer */
  footer { padding: 30px 24px; flex-direction: column; gap: 12px; text-align: center; }
}


/* respon on mobile */
@media (max-width: 600px) {

  nav { padding: 16px 20px; }

  #hero { padding: 100px 20px 60px; }

  
  h1 { font-size: clamp(2.4rem, 12vw, 4rem); margin-bottom: 20px; }
  h2 { font-size: clamp(1.8rem, 8vw, 2.8rem); margin-bottom: 36px; }

  .hero-tag  { font-size: 0.65rem; margin-bottom: 24px; }
  .hero-desc { font-size: 0.8rem; margin-bottom: 32px; }

 
  .hero-cta { flex-direction: column; gap: 12px; }
  .btn      { width: 100%; text-align: center; padding: 16px 24px; }

 
  .hero-stats-mobile          { gap: 20px; }
  .hero-stats-mobile .stat-num { font-size: 1.5rem; }


  section        { padding: 64px 20px; }
  .section-label { margin-bottom: 36px; }

  /* Terminal */
  .terminal      { overflow-x: auto; }
  .terminal-body { font-size: 0.72rem; min-width: 280px; }

  /* Projects*/
  .projects-grid          { grid-template-columns: 1fr; gap: 10px; }
  .project-card.featured  { grid-column: auto; }
  .project-card           { padding: 24px; }

  /* Skills */
  .skill-pill { padding: 10px 14px; font-size: 0.72rem; }

  /* Contact */
  .contact-link  { padding: 14px 12px; }
  .form-input,
  .form-textarea { font-size: 16px; } /* Prevents iOS zoom on focus */
  .btn-send      { width: 100%; text-align: center; align-self: stretch; }

  
  .mobile-link { font-size: 2rem; }

  footer { padding: 28px 20px; }
}


/*touch devices */
@media (hover: none) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}