@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

:root {
  --void:      #0a0a0a;
  --deep:      #111111;
  --surface:   #161616;
  --border:    #1e1e1e;
  --border-mid:#2a2a2a;
  --parchment: #e8e2d0;
  --smoke:     #5a5a5a;
  --mist:      #3a3a3a;
  --volt:      #c8f135;
  --volt-dim:  rgba(200, 241, 53, 0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui:      'Space Grotesk', system-ui, sans-serif;
}
html, body {
    height: 100%;
    width: 100%;
    background: var(--void);
    color: var(--parchment);
    font-family: var(--font-ui);
    overflow-x: hidden;
    cursor: none;
}
/* Cursor */
#cursor {
  position: fixed;
  top: 0; 
  left: 0;
  width: 15px;
  height: 15px;
  background: var(--volt);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
  mix-blend-mode: difference;
  z-index: 10000;
}
#cursor-ring{
  position: fixed;
  top: 0; 
  left: 0;
  width: 40px;
  height: 40px;
  border: 2px solid var(--volt);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
  opacity: 0.5;
  mix-blend-mode: difference;
  z-index: 9999;
}

body.cursor-hover #cursor {
  width: 10px;
  height: 10px;
  background: var(--volt);
}
body.cursor-hover #cursor-ring{
  width: 50px;
  height: 50px;
  border-color: var(--volt);
}

/* Scanline Overlay */
#scanlines {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  pointer-events: none;
  z-index: 9990;
  background: repeating-linear-gradient(
  to bottom,
  transparent,
  transparent 2px,
  rgba(0,0,0,0.04) 2px,
  rgba(0,0,0,0.04) 4px
  );
}

/* Navigation */
#nav{
  position: fixed;
  top: 0;
  left:0; 
  right:0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 30px;
  border-bottom: 1.2px solid blueviolet;
  background: rgba(19, 18, 18, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#nav .nav-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--parchment);
}

#nav .nav-name span {
  color: var(--volt);
}

#nav .nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

#nav .nav-links{
  display: flex;
  list-style: none;
  gap: 15px;
}

#nav .nav-links a{
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 0.7px #c8f135;
  text-decoration: none;
  transition: color 0.7s ease-in-out;
}

#nav .nav-links a:hover{
  color: #c8f135;
}

/* LIQUID MORPHING NAV BADGE */
.nav-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 22px;
  cursor: none;
  
  color: var(--volt);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.9);
  user-select: none;

  background: linear-gradient(18deg, var(--volt), #00f5d4, #111111, #00f5d4, var(--volt));
  background-size: 300% 300%;
  
  border-radius: 15px 10px 20px 10px / 10px 15px 10px 20px;
  border: 1px solid rgba(200, 241, 53, 0.2);
  
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.3),
              0 0 15px rgba(200, 241, 53, 0.15);

  animation: morph-wide 6s ease-in-out infinite alternate,
             flow-gradient 10s linear infinite;
             
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.nav-date:hover {
  transform: scale(1.05);
  border-color: white;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.5),
              0 0 25px rgba(200, 241, 53, 0.45);
}

@keyframes morph-wide {
  0% {
    border-radius: 20px 15px 25px 12px / 12px 20px 15px 25px;
  }
  50% {
    border-radius: 12px 25px 12px 25px / 20px 12px 25px 12px;
  }
  100% {
    border-radius: 25px 12px 20px 15px / 15px 25px 12px 20px;
  }
}

@keyframes flow-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero Page */
#page {
  position: relative;
  height: 100vh;
  width: 100vw;
  background: var(--void);
  overflow: hidden;
  perspective: 1200px;
}

/* loop */
#loop {
  display: flex;
  position: absolute;
  top: 25%;
  height: auto;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  border-top: 0.5px solid white;
  border-bottom: 0.5px solid whitesmoke;
  padding: 20px 20px;
  z-index: 10;
}

#loop {
  -webkit-mask-image: linear-gradient(
  to right,
  transparent,
  black 15%,
  black 85%,
  transparent
  );

  mask-image: linear-gradient(
  to right,
  transparent,
  black 15%,
  black 85%,
  transparent
  );
  transform-style: preserve-3d;
  transform: rotateX(18deg) translateZ(0);
  transform-origin: center;
}

/* The Back Loop */
#loop h1 {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  color:#a0c826;
  letter-spacing: 0.03em;
  animation: marquee-anim 15s linear infinite;
  padding-right: 8px;
  white-space: nowrap;
}

#loop h1 b{
  color:#c8f135;
  font-weight: 900;
}

#loop h1 i{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color:#878383;
}

#loop h1 span {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--parchment);
  font-weight: 700;
}

#loop h1 .volt-word {
  color: var(--volt);
  -webkit-text-stroke: 0;
}

@keyframes float3d {
  0% {
    transform: rotateX(18deg) translateY(0px);
  }
  50% {
    transform: rotateX(18deg) translateY(-6px);
  }
  100% {
    transform: rotateX(18deg) translateY(0px);
  }
}

#loop {
  animation: float3d 15s ease infinite;
}

@keyframes marquee-anim {
  from {
    transform: translateX(0) translateZ(40px);
  }
  to {
    transform: translateX(-50%) translateZ(40px);
  }
}

/* Canvas */
canvas{
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Sub-copy */
#page .hero-copy{
  position: absolute;
  bottom: 15%;
  left: 2%;
  z-index: 5;
  max-width: 480px;
}

#page .hero-copy h4{
  font-family:var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  color:var(--parchment);
  z-index: 9999;
}

#page .hero-copy i{
  font-style: italic;
  color:#c8f135;
}

#page .hero-copy b{
  font-style: oblique;
  color: #a067aa;
  font-weight: 500;
}

.hero-copy {
  z-index: 10;
  position: absolute;
}

/* Scroll Effect */
#page .sec-index   { top: 12%; right: 5%; }
#page1 .sec-index  { top: 8%;  left: 5%;  }
#page2 .sec-index  { top: 8%;  right: 5%; }
#page3 .sec-index  { top: 8%;  left: 5%;  }
#page4 .sec-index  { top: 8%;  right: 5%; }

/* Page 1 */
#page1{
  position: flex;
  height: 100vh;
  width: 100vw;
  background: var(--void);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6%;
  box-sizing: border-box;
  overflow: hidden;
}

#page1::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 60%;
  background: var(--border);
}

.text-column{
  display: flex;
  flex-direction: column;
  width: 42%;
  max-width: 50%;
  z-index: 10;
}

.text-column.left-side {
  text-align: left;
  align-items: flex-start;
  margin-bottom: 20%;
  transform: translateY(-15%);
}

.text-column.right-side {
  text-align: right;
  align-items: flex-end;
  margin-top: 20%;
  transform: translateY(15%);
}
.bold-phrase {
  font-family: var(--font-ui);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.0;
  margin: 3px 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--parchment);
  white-space: nowrap;
}

.bold-phrase.accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--volt);
}

.bold-phrase .volt-word {
  color: transparent;
  -webkit-text-stroke:2px var(--volt);
}

#page1 h3.col-label b{
  font-size: 12px;
  font-weight: bolder;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--volt);
  -webkit-text-stroke: 0.9px var(--volt);
}

#page1 h3.col-footer {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--volt);
  margin-top: 14px;
}
canvas{
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Page 2 */
#page2 {
  position: relative;
  height: 100vh;
  width: 100vw;
  background:var(--deep);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5%;
}

#page2 .work-header{
  position: absolute;
  top: 11%;
  left: 5%;
}

#page2 .work-header h3 {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 0.7px var(--volt);
  margin-bottom: 10px;
}

#page2 .work-header h1{
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.1;
  color: var(--parchment);
  text-decoration: underline;
}

/* Page 2 Grid */
.work-grid{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 40%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--volt);
}

.work-card{
  border-right: 0.5px solid var(--border-mid);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: background 1.35s ease;
  cursor: none;
  z-index: 1;
}

.work-card:last-child{
  border-right: none;
}

.work-card::before{
  content: '';
  position: absolute;
  inset: 0;
  background: var(--volt-dim);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.work-card:hover::before{
  opacity: 1;
}
.work-title{
  position: relative;
  z-index: 2;
  transition: color 1s ease;
}
.work-card:hover .work-title{
  color:#c8f135;
}

.work-num{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color:#c8f135;
  margin-bottom: 10px;
}

.work-title{
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 0.6px var(--parchment);
  transition: color 1s ease-in-out;
  margin-bottom: 12px;
}
.work-stack{
  font-family: var(--font-ui);
  font-size:medium;
  text-transform: uppercase;
  font-weight: 600;
  color:var(--parchment);
  text-decoration: underline;
}

.work-desc{
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color:beige;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.work-card:hover .work-desc{
  opacity: 1;
  max-height: 200px;
}

.work-arrow{
  font-size: 18px;
  color: var(--parchment);
  align-self: flex-end;
  transition: transform 0.3s ease, color 0.3s ease;
}

.work-card:hover .work-arrow {
  transform: translate3d(4px, 4px, 4px);
  color: var(--volt);
}

.work-actions {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  z-index: 5;
  position: relative;
}

.work-actions a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--void);
  background: var(--parchment);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.work-actions a:hover {
  background: var(--volt);
  color: var(--void);
  box-shadow: 0 0 15px var(--volt);
}

/* page 3 */
#page3 {
  position: relative;
  height: 100vh;
  width: 100vw;
  background: var(--void);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8%;
}

#page3 .field-content {
  text-align: right;
  z-index: 10;
}

#page3 .field-content h1 {
  font-family: var(--font-ui);
  font-size: 56px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--parchment);
  position: relative;
}

#page3 .field-content h1::before,
#page3 .field-content h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  clip: rect(0, 900px, 0 ,0);
}

#page3 .field-content h1::before {
  left: 2px;
  color: var(--volt);
  animation: glitch-1 4s infinite linear alternate-reverse;
  opacity: 0.7;
}

#page3 .field-content h1::after {
  left: 2px;
  color: var(--volt);
  animation: glitch-2 3.5s infinite linear alternate-reverse;
  opacity: 0.5;
}

@keyframes glitch-1 {
  0%   { clip: rect(132px, 900px, 124px, 0); }
  5%   { clip: rect(68px, 900px, 90px, 0); }
  10%  { clip: rect(10px, 900px, 38px, 0); }
  20%  { clip: rect(0, 0, 0, 0); }
  80%  { clip: rect(0, 0, 0, 0); }
  90%  { clip: rect(82px, 900px, 100px, 0); }
  95%  { clip: rect(44px, 900px, 54px, 0); }
  100% { clip: rect(20px, 900px, 30px, 0); }
}

@keyframes glitch-2 {
  0%   { clip: rect(40px, 900px, 52px, 0); }
  8%   { clip: rect(80px, 900px, 96px, 0); }
  15%  { clip: rect(0, 0, 0, 0); }
  75%  { clip: rect(0, 0, 0, 0); }
  88%  { clip: rect(60px, 900px, 74px, 0); }
  100% { clip: rect(30px, 900px, 42px, 0); }
}

#page3 .field-sub {
  color: rgba(244, 244, 244, 0.472);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.9;
  margin-left: auto;  
  margin-top: 10px;
  max-width: 420px;
  margin-bottom: 30px;
}

#page3 .stack-grid{
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

#page3 .stack-group{
  display: grid;
  grid-template-columns: 100px repeat(4, max-content);
  gap: 15px;
  align-items: center;
}

#page3 .stack-group h3{
  width: 90px;
  font-size: 16px;
  font-weight: 700;
  color: var(--volt);
}

.badge{
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.043);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 6px;
  border-color: #252524;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  width: fit-content;
  cursor: none;
  transition: transform 0.3s ease, background-color 0.5s ease;
  box-shadow: 1px 1px 5px white;
}

/* Tools */
.vscode-badge:hover{
  background-color: #0c7b7b;
  transform: scale(1.2);
}

.github-badge:hover{
  background-color: grey;
  transform: scale(1.2);
}

.git-badge:hover{
  background-color: rgb(158, 109, 17);
  transform: scale(1.2);
}

.figma-badge:hover{
  background-color: purple;
  transform: scale(1.2);
}

/* Backend */
.python-badge:hover{
  background-color: rgba(110, 166, 27, 0.87);
  transform: scale(1.2);
}
.sql-badge:hover{
  background-color: rgb(67, 67, 64);
  transform: scale(1.2);
}

.cpp-badge:hover{
  background: linear-gradient(90deg, #ffffff 50%, #007bff 50%);
  transform: scale(1.2);
}

/* Frontend */
.js-badge:hover{
  background-color: rgb(175, 175, 19);
  transform: scale(1.2);
}

.html-badge:hover{
  background-color: orangered;
  transform: scale(1.2);
}

.css-badge:hover{
  background-color: purple;
  transform: scale(1.2);
}

.gsap-badge:hover{
  background-color: green;
  transform: scale(1.2);
}

/* Page 4 */
#page4 {
  position: relative;
  height: 100vh;
  width: 100vw;
  background: var(--deep);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-top: 0.5px solid var(--border);
}

#page4 .contact-label {
  font-size: 15px;
  font-weight: 700;
  font-family:var(--font-ui);
  text-transform: uppercase;
  color: #c8f135;
  margin-bottom: 2px;
}

#page4 .contact-heading {
  font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 65px;
  text-transform: uppercase;
  font-weight: 900;
}

#page4 .contact-heading span {
  color: transparent;
  -webkit-text-stroke: 1.25px #c8f135;
}

#page4 .contact-email {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 100;
  font-style: italic;
  color: var(--smoke);
  margin-bottom: 40px;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  text-align: center;
}

#page4 .contact-email:hover {
  color: var(--volt);
  text-shadow: 0px 0px 5px #eded12;
}

.social {
  display: flex;
  gap: 2px;
  border: 0.5px solid var(--border-mid);
  border-radius: 4px;
  overflow: hidden;
}

.social-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
  text-decoration: none;
  padding: 12px 24px;
  border-right: 0.5px solid var(--border-mid);
  transition: background 0.2s ease, color 0.2s ease;
}

.social-link:last-child {
  border-right: none;
}

.social-link:hover {
  background: var(--volt-dim);
  color: var(--volt);
  text-shadow: 0px 0px 18px #c8f135;
}

#page4 .footer-line {
  position: absolute;
  display: flex;
  bottom: 40px;
  left: 0; 
  right: 0;
  gap: 10px;
  justify-content: space-between;
  padding: 0 40px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: white;
  border-top: 0.5px solid #c8f135;
  padding-top: 20px;
  flex-wrap: wrap;
}

#page4 .footer-line .btn-coffee {
  margin: 0 auto;
  max-width: max-content;
}

/*BUY ME A COFFEE */
.footer-line .btn-coffee {
  display: inline-flex; /* Fixed from relative */
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 11px; 
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--parchment);
  background: var(--deep);
  border: 1px solid var(--deep); /* Given an explicit border width */
  padding: 8px 16px;
  border-radius: 4px;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Coffee Emoji */
.footer-line .btn-coffee .btn-text {
  display: inline-block;
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),letter-spacing 0.3s ease;
}

/* Emoji bounce controls */
.footer-line .btn-coffee .btn-emoji {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* INTERACTIVE HOVER STATES */
.footer-line .btn-coffee:hover {
  color: var(--void);
  background: var(--volt);
  border-color: var(--parchment);
  box-shadow: 0 0 25px var(--parchment);
}

/* Hover to match the emoji's energy */
.footer-line .btn-coffee:hover .btn-text {
  transform: translateY(-1px);
  letter-spacing: 0.18em;
}

/* Tilts and scales the coffee cup on hover */
.footer-line .btn-coffee:hover .btn-emoji {
  transform: translateY(-2px) rotate(12deg) scale(1.5);
}

/* Click feedback compression */
.footer-line .btn-coffee:active {
  transform: scale(0.85);
  background-color: #00f5d4;
  box-shadow: 0 1px 25px #ffffff;
}

/* ScanLine Sweep */
#page2::after,
#page4::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Media Queries */
@media (max-width: 780px) {
  #nav {
    padding: 16px 20px;
  }

  #nav .nav-links {
    display: none;
  }

  #page1 {
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 0 8%;
  }

  #page1::before { display: none; }

  .text-column {
    max-width: 100%;
  }

  .text-column.right-side {
    margin-top: 0;
    text-align: left;
    align-items: flex-start;
  }

  .bold-phrase { white-space: normal; }

  .works-grid {
    grid-template-columns: 1fr;
    top: 42%;
  }

  .work-card { border-right: none; border-bottom: 0.5px solid var(--border); }

  #page4 .contact-heading { font-size: 36px; }
}