@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Fira+Code:wght@300;400;500;600;700&display=swap");

/* ════════════════════════════════════════════════════════════
   DESIGN TOKENS — Carbon Terminal
════════════════════════════════════════════════════════════ */
:root {
  /* Palette */
  --bg-base:        #0b0e14;
  --bg-surface:     #0d1117;
  --bg-elevated:    #161b22;
  --accent:         #00ffc3;
  --accent-dim:     rgba(0,255,195,0.12);
  --accent-blue:    #2f81f7;
  --accent-purple:  #bc8cff;
  --accent-orange:  #ffa657;

  /* Text */
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary:  #484f58;

  /* Glass */
  --glass:          rgba(13,17,23,0.85);
  --border:         rgba(255,255,255,0.06);
  --border-accent:  rgba(0,255,195,0.2);

  /* Shadows */
  --shadow-card:    0 8px 32px rgba(0,0,0,0.55);
  --glow:           0 0 24px rgba(0,255,195,0.1);

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --ease-inout:cubic-bezier(0.65, 0, 0.35, 1);
}


/* ════════════════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--bg-base);
}


/* ════════════════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-left: 1px solid rgba(0,255,195,0.1);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ════════════════════════════════════════════════════════════
   BASE
════════════════════════════════════════════════════════════ */
html {
  font-size: 16px;
  scroll-behavior: auto;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  letter-spacing: -0.005em;
}


/* ════════════════════════════════════════════════════════════
   TYPOGRAPHY SYSTEM
════════════════════════════════════════════════════════════ */

/* Display / Hero */
.display-text {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

/* Section Titles */
section h2.section-title {
  font-family: "Fira Code", monospace;
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Card headings */
h3 {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Body text */
p {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.75;
  color: var(--text-secondary);
}

/* Monospace utility */
.mono { font-family: "Fira Code", monospace; }

/* Glow gradient text */
.glow-text {
  background: linear-gradient(120deg, #ffffff 20%, var(--accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: inherit;
}

/* Scannable reading text */
.scannable-text {
  max-width: 60ch;
  margin-inline: auto;
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  line-height: 1.8;
  color: var(--text-secondary);
}


/* ════════════════════════════════════════════════════════════
   SECTION LABEL (CLI Prompt)
════════════════════════════════════════════════════════════ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Fira Code", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--accent);
  background: rgba(0,255,195,0.04);
  border-left: 2px solid var(--accent);
  padding: 3px 10px 3px 8px;
  border-radius: 0 3px 3px 0;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}


/* ════════════════════════════════════════════════════════════
   CURSOR
════════════════════════════════════════════════════════════ */
#custom-cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 0 8px var(--accent);
  transition: width .25s var(--ease-out),
              height .25s var(--ease-out),
              background .25s linear;
}
#custom-cursor::after {
  content: '';
  position: absolute;
  top:50%; left:50%;
  transform: translate(-50%,-50%);
  width: 26px; height: 26px;
  border: 1px solid rgba(0,255,195,0.15);
  border-radius: 50%;
  transition: all .5s var(--ease-out);
}
body.cursor-active #custom-cursor {
  width: 10px; height: 10px;
  background: #fff;
  box-shadow: 0 0 18px rgba(255,255,255,0.5);
}
body.cursor-active #custom-cursor::after {
  width: 44px; height: 44px;
  border-color: rgba(255,255,255,0.25);
}


/* ════════════════════════════════════════════════════════════
   BACKGROUND — Layered Carbon Terminal
════════════════════════════════════════════════════════════ */
.luxury-bg {
  position: fixed; inset: 0;
  z-index: -10;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%,   rgba(0,255,195,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(47,129,247,0.04) 0%, transparent 60%),
    var(--bg-base);
  overflow: hidden;
  pointer-events: none;
}

/* Faint binary stream */
.luxury-bg::before {
  content: "01 10 11 00 01 10 11 00 01 10 11 00";
  position: absolute;
  top: -10%; left: 0;
  width: 100%; height: 120%;
  font-family: "Fira Code", monospace;
  font-size: 10px; line-height: 2.2;
  color: var(--accent);
  opacity: 0.016;
  word-break: break-all;
  animation: logScroll 90s linear infinite;
  pointer-events: none;
}
@keyframes logScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(20%); }
}

/* Micro grid */
.luxury-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,195,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,195,0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,195,0.055) 0%, transparent 70%);
  filter: blur(90px);
  top: -15%; left: -10%;
  animation: blobDrift 35s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(100px, 60px) scale(1.1); }
}


/* ════════════════════════════════════════════════════════════
   NAVBAR
════════════════════════════════════════════════════════════ */
#navbar .nav-link {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: color .3s var(--ease-out), background .3s var(--ease-out);
}
#navbar .nav-link span {
  display: inline-block;
  max-width: 0; overflow: hidden; white-space: nowrap;
  transition: max-width .4s var(--ease-out), opacity .3s, margin .3s;
  opacity: 0; margin-left: 0;
}
#navbar .nav-link:hover,
#navbar .nav-link.active {
  color: var(--accent);
  background: rgba(0,255,195,0.04);
}
#navbar .nav-link:hover span,
#navbar .nav-link.active span {
  max-width: 80px; opacity: 1; margin-left: 0.4rem;
}

.social-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-secondary);
  transition: all .3s var(--ease-out);
}
.social-icon:hover {
  background: var(--accent);
  color: var(--bg-base);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,255,195,0.18);
}


/* ════════════════════════════════════════════════════════════
   GLASS CARDS
════════════════════════════════════════════════════════════ */
.liquid-glass-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  transition: transform .4s var(--ease-out),
              border-color .4s var(--ease-out),
              box-shadow .4s var(--ease-out);
  box-shadow: var(--shadow-card);
}
.liquid-glass-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}
.liquid-glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 24px 60px rgba(0,0,0,0.65), var(--glow);
}


/* ════════════════════════════════════════════════════════════
   BLUEPRINT BRACKET CORNERS
════════════════════════════════════════════════════════════ */
[class*="blueprint"] {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
}
[class*="blueprint"]::before,
[class*="blueprint"]::after,
[class*="blueprint"] > span::before,
[class*="blueprint"] > span::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border: 1px solid var(--accent);
  opacity: 0.15;
  z-index: 5;
  transition: all .35s var(--ease-out);
}
[class*="blueprint"]::before { top:-1px; left:-1px; border-right:0; border-bottom:0; }
[class*="blueprint"]::after  { top:-1px; right:-1px; border-left:0; border-bottom:0; }
[class*="blueprint"] > span::before { bottom:-1px; left:-1px; border-right:0; border-top:0; }
[class*="blueprint"] > span::after  { bottom:-1px; right:-1px; border-left:0; border-top:0; }
[class*="blueprint"]:hover::before,
[class*="blueprint"]:hover::after,
[class*="blueprint"]:hover > span::before,
[class*="blueprint"]:hover > span::after {
  opacity: 0.85; width: 12px; height: 12px;
  box-shadow: 0 0 6px var(--accent);
}


/* ════════════════════════════════════════════════════════════
   GRID COORDINATES
════════════════════════════════════════════════════════════ */
.grid-coord {
  position: absolute;
  font-family: "Fira Code", monospace;
  font-size: 7.5px; letter-spacing: .12em;
  color: var(--accent); opacity: 0.1;
  pointer-events: none; z-index: 2;
}
.grid-coord.tl { top: 1rem; left: 1rem; }
.grid-coord.br { bottom: 1rem; right: 1rem; }


/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */
a[class*="px-5"],
button[class*="px-5"] {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: all .3s var(--ease-out);
}


/* ════════════════════════════════════════════════════════════
   SPOTLIGHT / MOUSE GLOW
════════════════════════════════════════════════════════════ */
.spotlight {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,255,195,0.06) 0%, transparent 70%);
  top: var(--mouse-y); left: var(--mouse-x);
  transform: translate(-50%,-50%);
  pointer-events: none; z-index: 0;
}


/* ════════════════════════════════════════════════════════════
   DIVIDERS
════════════════════════════════════════════════════════════ */
.gradient-line {
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  height: 1px; opacity: 0.12;
}
.right-line {
  background: linear-gradient(to left, transparent, var(--accent), transparent);
}


/* ════════════════════════════════════════════════════════════
   CONTACT CARDS
════════════════════════════════════════════════════════════ */
.contact-card {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 1.1rem;
  transition: all .35s var(--ease-out);
}
.contact-card:hover {
  border-color: var(--border-accent);
  background: rgba(0,255,195,0.02);
  transform: translateX(5px);
}


/* ════════════════════════════════════════════════════════════
   TECHNICAL SECTION GRID BG
════════════════════════════════════════════════════════════ */
.technical-grid-bg {
  background-image:
    linear-gradient(rgba(0,255,195,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,195,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
}


/* ════════════════════════════════════════════════════════════
   READING PROGRESS
════════════════════════════════════════════════════════════ */
#reading-progress {
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  height: 2px;
}


/* ════════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════════ */

/* Entrance */
.animate-fadeIn {
  opacity: 0;
  transform: translateY(16px);
}
.animate-slide-up-initial {
  opacity: 0;
  transform: translateY(28px);
}

/* Terminal cursor blink */
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}
.cursor-blink { animation: blink 1s step-end infinite; }

/* Text flicker */
@keyframes textFlicker {
  0%,100% { opacity: .5; }
  50%      { opacity: .12; }
  52%      { opacity: .7; }
}

/* Floating glow orb */
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}
.float { animation: float 4s ease-in-out infinite; }

/* Live pulse ring */
@keyframes pulseRing {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(0,255,195,.4); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 8px rgba(0,255,195,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(0,255,195,0); }
}
.pulse-ring { animation: pulseRing 2.2s ease-out infinite; }


/* ════════════════════════════════════════════════════════════
   LOADER
════════════════════════════════════════════════════════════ */
#loader {
  transition: opacity .8s var(--ease-out), visibility .8s;
  background: var(--bg-base);
}
#loader.loaded {
  opacity: 0; visibility: hidden; pointer-events: none;
}
#loader-text {
  font-family: "Fira Code", monospace;
  font-size: 10px; letter-spacing: .25em;
  animation: textFlicker 2.5s infinite linear;
}
#loader-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  box-shadow: 0 0 12px var(--accent);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  html { font-size: 15px; }
}
@media (max-width: 1024px) {
  html { font-size: 14.5px; }
}
@media (max-width: 768px) {
  body { cursor: auto; }
  #custom-cursor { display: none !important; }
  .grid-coord { display: none; }
  section { padding: 52px 16px !important; }
  .liquid-glass-card { border-radius: 10px; }
  section h2.section-title { font-size: clamp(1.35rem, 7vw, 1.9rem); }
}
@media (max-width: 480px) {
  html { font-size: 13.5px; }
  .section-label { font-size: 9px; padding: 2px 8px; }
  .scannable-text { font-size: .88rem; }
  .hero-right { padding-top:40px; }
}