/* ================================
   ROOT VARIABLES
================================ */
:root {
  --paper: #f5f4f0;
  --deep: #0B1724;
  --accent-cyan: #00A8FF;
  --accent-orange: #FF6B35;
  --accent-pink: #E91E63;
  --muted: #6B7280;
  --card-bg: #FFFFFF;
  --outline: #0B1724;
}

/* ================================
   BASE STYLES
================================ */
html, body {
  height: 100%;
  margin: 0;
  background: linear-gradient(180deg, var(--paper), #fbfaf8);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section {
  padding: 4rem 0;
}
@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
}

/* ================================
   COMMON COMPONENTS
================================ */
.brutal {
  border: 3px solid var(--outline);
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(11, 23, 36, 0.05);
}

.text-muted { color: var(--muted); }

/* ================================
   BUTTONS
================================ */
.btn-primary,
.btn-primary-lg,
.btn-ghost {
  border-radius: 8px;
  border: 3px solid var(--outline);
  display: inline-block;
  font-weight: 600;
  transition: transform 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-cyan));
  color: white;
  padding: 0.6rem 1rem;
}
.btn-primary-lg {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
  color: white;
  padding: 0.8rem 1.2rem;
}
.btn-ghost {
  background: transparent;
  color: var(--deep);
  padding: 0.5rem 0.9rem;
}

.btn-primary:hover,
.btn-primary-lg:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

/* Responsive button tweaks */
@media (max-width: 600px) {
  .btn-primary, .btn-primary-lg, .btn-ghost {
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem;
    border-width: 2px;
  }
}

/* ================================
   NAVBAR
================================ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(11, 23, 36, 0.08);
  box-shadow: 0 2px 10px rgba(11, 23, 36, 0.06);
  z-index: 50;
  padding: 0.6rem 1rem;
}

.nav-link {
  color: var(--deep);
  font-weight: 600;
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--accent-cyan); }

@media (max-width: 700px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .nav-link { font-size: 0.95rem; }
}



/* ================================
   HERO SECTION
================================ */
#home {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
@media (max-width: 900px) {
  #home {
    flex-direction: column-reverse;
    text-align: center;
  }
  #home h1 {
    font-size: 2.2rem;
    line-height: 1.25;
  }
  #home p {
    font-size: 1rem;
    max-width: 90%;
    margin-inline: auto;
  }
}

/* Responsive Hero Box */
#heroMedia {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  border-radius: 8px;
  overflow: hidden;
}
#heroVideo, #heroCarousel, .carousel-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Carousel Animation */
.carousel-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}
.carousel-item.active { opacity: 1; z-index: 1; }

@media (max-width: 768px) {
  #heroMedia { aspect-ratio: 4 / 3; max-height: 60vh; }
}
@media (max-width: 480px) {
  #heroMedia { aspect-ratio: 1 / 1; max-height: 50vh; }
}

/* ================================
   TOOLS SECTION - FIXED
================================ */
#tools {
  position: relative;
  overflow: visible;
}

#tools > div:first-of-type {
  position: relative;
  width: 100%;
  min-height: 400px;
  height: auto;
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  #tools > div:first-of-type {
    min-height: 500px;
  }
}

@media (max-width: 640px) {
  #tools > div:first-of-type {
    min-height: 450px;
  }
}

@media (max-width: 480px) {
  #tools > div:first-of-type {
    min-height: 400px;
  }
}

#toolsOrbit {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  align-items: start;
  justify-items: center;
  width: 100%;
}

@media (max-width: 768px) {
  #toolsOrbit {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.85rem;
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  #toolsOrbit { 
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  #toolsOrbit {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    padding: 0.5rem;
  }
}

.tool-card {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 3px solid var(--outline);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  background-size: 200% 100%;
  box-shadow: 6px 6px 0 rgba(11,23,36,0.06);
  position: relative;
  overflow: hidden;
  animation: softFloatTools 5.5s ease-in-out infinite;
  transition: transform .22s ease, box-shadow .22s ease;
}
.tool-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 10px 10px 0 rgba(11,23,36,0.08);
}

/* Tool Shimmer Effect */
.tool-card::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 180%;
  height: 180%;
  transform: rotate(25deg);
  background: linear-gradient(90deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02), rgba(255,255,255,0.10));
  mix-blend-mode: overlay;
  opacity: 0.35;
  pointer-events: none;
  animation: sheen 4s linear infinite;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-40%) rotate(25deg); opacity: 0.18; }
  50% { transform: translateX(40%) rotate(25deg); opacity: 0.32; }
}
@keyframes softFloatTools {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Mobile Tool Grid */
@media (max-width: 768px) {
  .tool-card {
    min-height: 58px;
    font-size: 0.95rem;
    padding: 0.55rem 0.8rem;
    border-width: 2px;
    box-shadow: 5px 5px 0 rgba(11,23,36,0.05);
  }
  .tool-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 7px 7px 0 rgba(11,23,36,0.07);
  }
}

@media (max-width: 640px) {
  .tool-card {
    min-height: 54px;
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
  }
}

@media (max-width: 480px) {
  .tool-card {
    min-height: 50px;
    font-size: 0.85rem;
    padding: 0.45rem 0.6rem;
    box-shadow: 4px 4px 0 rgba(11,23,36,0.05);
  }
  .tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 5px 5px 0 rgba(11,23,36,0.06);
  }
}

/* projects responsiveness */
.project-card p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}



/* ================================
   TIMELINE
================================ */
.timeline-card {
  background: var(--card-bg);
  border: 3px solid var(--outline);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 8px 8px 0 rgba(11,23,36,0.04);
  margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
  .timeline-card {
    width: 100%;
    margin-inline: auto;
    text-align: left;
  }
}

/* ================================
   FOOTER
================================ */
footer {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}
footer a {
  margin: 0 0.4rem;
  transition: opacity 0.25s;
}
footer a:hover { opacity: 0.7; }

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: transform 0.25s ease-out, background 0.25s ease-out;
  z-index: 9999;
  mix-blend-mode: difference;
}

#cursor.cursor-hover {
  transform: translate3d(-50%, -50%, 0) scale(1.6);
  background: var(--accent-pink);
}

#magicTap {
  z-index: 10;
  animation: floaty 3s ease-in-out infinite;
}

@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

#magicTap.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

