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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: #0a0a0c;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.5;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: #4a7fb5;
  color: #000;
}

.mono {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  padding-inline-start: max(clamp(1rem, 4vw, 1.5rem), env(safe-area-inset-left));
  padding-inline-end: max(clamp(1rem, 4vw, 1.5rem), env(safe-area-inset-right));
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section:first-of-type {
  border-top: none;
}

/* this will only work on desktops i havent figured out how to make it work in mobile devices */
#cursorLight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}

@media (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  #cursorLight::before {
    content: '';
    position: absolute;
    top: -250px;
    left: -250px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 127, 181, 0.14), transparent 70%);
    filter: blur(10px);
    animation: ambientDrift 18s ease-in-out infinite;
  }
}

@keyframes ambientDrift {
  0% {
    transform: translate(15vw, 20vh);
  }

  25% {
    transform: translate(65vw, 10vh);
  }

  50% {
    transform: translate(75vw, 65vh);
  }

  75% {
    transform: translate(20vw, 75vh);
  }

  100% {
    transform: translate(15vw, 20vh);
  }
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 12, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(0.75rem, 3vw, 1.15rem);
  gap: clamp(0.5rem, 2vw, 1rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 1;
}

.logo-text {
  font-weight: 700;
  font-size: clamp(0.95rem, 3vw, 1.125rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-text span {
  color: steelblue;
}

nav.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  order: 3;
  width: 100%;
  row-gap: 0.6rem;
  column-gap: clamp(1rem, 4vw, 2rem);
  font-size: 0.875rem;
  font-weight: 500;
  color: #a3a3a3;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  nav.main-nav {
    order: 0;
    width: auto;
    justify-content: flex-start;
    gap: clamp(1rem, 3vw, 2rem);
    padding-top: 0;
    border-top: none;
  }
}

nav.main-nav a:hover {
  color: #fff;
}

.btn-pill {
  flex-shrink: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  padding: clamp(0.45rem, 2vw, 0.6rem) clamp(0.75rem, 3vw, 1.1rem);
  font-size: clamp(0.6rem, 2vw, 0.7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-pill:hover {
  background: #7ba7d1;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

  50% {
    opacity: 0.4;
  }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.scale-in {
  animation: scaleIn 0.7s ease 0.2s forwards;
  opacity: 0;
}

.dot-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .scale-in,
  .dot-pulse {
    animation: none;
    opacity: 1;
  }
}

/* ---- Hero ---- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 127, 181, 0.3);
  background: rgba(74, 127, 181, 0.1);
  color: #7ba7d1;
  font-size: 0.7rem;
  font-weight: 500;
  max-width: 100%;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #7ba7d1;
  flex-shrink: 0;
}

h1.hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-block: 1.5rem;
  word-break: break-word;
}

.gradient-text {
  background: linear-gradient(90deg, #fff, #d4d4d4, #737373);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: #a3a3a3;
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 42rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  padding: 0.9rem 1.6rem;
  border-radius: 0.8rem;
  background: #4a7fb5;
  color: #000;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #7ba7d1;
}

.btn-secondary {
  padding: 0.9rem 1.6rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  color: #d4d4d4;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Glass card (hero preview) ---- */
.glass-card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.card-dots .dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
}

.dot.red {
  background: rgba(244, 63, 94, 0.8);
}

.dot.amber {
  background: rgba(245, 158, 11, 0.8);
}

.dot.green {
  background: rgba(74, 127, 181, 0.8);
}

.card-dots span.filename {
  font-size: 0.75rem;
  color: #a3a3a3;
}

.mini-card {
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(23, 23, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.75rem;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.7rem;
  color: #a3a3a3;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.progress-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: #262626;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  width: 99.8%;
  background: linear-gradient(90deg, #4a7fb5, #94a3b8);
}

.chip {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  background: rgba(74, 127, 181, 0.1);
  color: #7ba7d1;
  border: 1px solid rgba(74, 127, 181, 0.2);
}

/* ---- Section headers ---- */
.eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #7ba7d1;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.75rem;
}

.section-intro {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.section-intro p {
  color: #a3a3a3;
  margin-top: 1rem;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* ---- Bento grid ---- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bento-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  transition: border-color 0.2s;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.bento-card.span2 {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .bento-card.span2 {
    grid-column: span 2;
  }
}

.num-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.num-badge.emerald {
  background: rgba(74, 127, 181, 0.1);
  border: 1px solid rgba(74, 127, 181, 0.2);
  color: #7ba7d1;
}

.num-badge.teal {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.num-badge.cyan {
  background: rgba(184, 194, 204, 0.1);
  border: 1px solid rgba(184, 194, 204, 0.2);
  color: #b8c2cc;
}

.bento-card h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.bento-card p {
  color: #a3a3a3;
  font-size: 0.9rem;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.35rem 0.7rem;
  border-radius: 0.4rem;
  background: #171717;
  font-size: 0.7rem;
  font-family: monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d4d4d4;
}

/* ---- Projects ---- */
.projects-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 768px) {
  .projects-header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.tab-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-family: monospace;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: #a3a3a3;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: #4a7fb5;
  color: #000;
  font-weight: 700;
}

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

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0;
}

.project-card:hover {
  border-color: rgba(74, 127, 181, 0.4);
  transform: translateY(-4px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-category {
  font-size: 0.7rem;
  font-family: monospace;
  color: #7ba7d1;
  text-transform: uppercase;
}

.project-metric {
  font-size: 0.7rem;
  font-family: monospace;
  padding: 0.15rem 0.6rem;
  border-radius: 0.3rem;
  background: rgba(74, 127, 181, 0.1);
  color: #a8c4e0;
  border: 1px solid rgba(74, 127, 181, 0.2);
  white-space: nowrap;
}

.project-card h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1rem 0 0.75rem;
}

.project-card p {
  color: #a3a3a3;
  font-size: 0.875rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.project-tags span {
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  background: #171717;
  font-size: 0.65rem;
  font-family: monospace;
  color: #a3a3a3;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-family: monospace;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 1rem;
}

/* ---- Terminal ---- */
.terminal-wrap {
  max-width: 48rem;
  margin: 0 auto;
}

.terminal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.terminal-box {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #050507;
  padding: 1.5rem;
  font-size: 0.8rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.term-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
  color: #737373;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#terminalLogs {
  min-height: 160px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1rem;
  color: #d4d4d4;
}

#terminalLogs div {
  margin-bottom: 0.4rem;
  word-break: break-word;
}

.term-cmd {
  color: #7ba7d1;
  font-weight: 700;
}

.term-resp {
  color: #a3a3a3;
}

#terminalForm {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
}

#terminalInput {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: monospace;
  font-size: 16px;
  outline: none;
  min-width: 0;
}

@media (min-width: 768px) {
  #terminalInput {
    font-size: 0.8rem;
  }
}

/* ---- Contact ---- */
.contact-section {
  text-align: center;
}

.contact-inner {
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.contact-inner h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1rem 0;
}

.contact-inner p {
  color: #a3a3a3;
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn-lg {
  padding: 1rem 1.8rem;
  border-radius: 0.8rem;
  font-weight: 700;
}

.btn-lg.primary, .btn-lg.primary:focus {
  background: #4a7fb5;
  color: #000;
}

.btn-lg.primary:active {
    background: #021e39;
    transition: 2s ease;
    transform: translateY(10px);
}


.btn-lg.secondary {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.7rem;
  color: #737373;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: #fff;
}
