:root {
  --ink: #e5edf7;
  --muted: #94a3b8;
  --paper: #070b12;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #14b8a6;
  --accent-2: #f59e0b;
  --panel: #0d1421;
  --panel-2: #101a2b;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(20, 184, 166, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 72%, transparent);
}

.portfolio-nav {
  background: rgba(7, 11, 18, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(14px);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.navbar-brand,
.nav-link {
  color: rgba(229, 237, 247, 0.88);
}

.navbar-brand:hover,
.nav-link:hover {
  color: #fff;
}

.navbar-toggler {
  border-color: rgba(229, 237, 247, 0.22);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-section {
  position: relative;
  min-height: 92vh;
  padding: 9rem 0 5rem;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.22), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(245, 158, 11, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(2, 6, 14, 0.98), rgba(7, 17, 31, 0.95)),
    url("https://images.unsplash.com/photo-1515879218367-8466d910aaa4?auto=format&fit=crop&w=1800&q=80") center/cover;
  isolation: isolate;
  overflow: hidden;
}

.hero-section::after {
  position: absolute;
  inset: auto -10% -40% -10%;
  height: 55%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.12), transparent);
  filter: blur(36px);
  animation: sweep 8s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow,
.auth-kicker,
.admin-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.hero-section h1 {
  max-width: 920px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.96;
  font-weight: 900;
  animation: fadeUp 700ms ease both;
}

.hero-section .lead {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.82);
  animation: fadeUp 800ms 90ms ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: fadeUp 850ms 150ms ease both;
}

.minimal-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
  transition: color 220ms ease, border-color 220ms ease, transform 220ms ease, background 220ms ease;
}

.minimal-btn::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--btn-fill, currentColor);
  transform: translateY(102%);
  transition: transform 260ms ease;
}

.minimal-btn span {
  position: relative;
  z-index: 1;
}

.minimal-btn:hover {
  transform: translateY(-2px);
}

.minimal-btn:hover::before {
  transform: translateY(0);
}

.minimal-btn-light {
  --btn-fill: #0f172a;
  --btn-hover: #fff;
  color: #0f172a;
  background: #fff;
  border-color: #fff;
}

.minimal-btn-light:hover {
  color: var(--btn-hover);
}

.minimal-btn-ghost {
  --btn-fill: #fff;
  --btn-hover: #0f172a;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.36);
}

.minimal-btn-ghost:hover,
.minimal-btn-outline:hover {
  color: var(--btn-hover);
}

.minimal-btn-dark {
  --btn-fill: #e5edf7;
  --btn-hover: #070b12;
  color: #070b12;
  background: #e5edf7;
  border-color: #e5edf7;
}

.minimal-btn-dark:hover {
  color: var(--btn-hover);
}

.minimal-btn-outline {
  --btn-fill: #e5edf7;
  --btn-hover: #070b12;
  color: rgba(229, 237, 247, 0.9);
  border-color: rgba(229, 237, 247, 0.28);
}

.code-window {
  position: relative;
  padding: 0;
  color: #d1fae5;
  background: rgba(7, 17, 31, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 180ms ease, border-color 220ms ease;
  animation: floatCard 6s ease-in-out infinite, fadeUp 800ms 180ms ease both;
}

.code-window:hover {
  border-color: rgba(20, 184, 166, 0.64);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.window-bar span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
}

.window-bar span:nth-child(1) { background: #fb7185; }
.window-bar span:nth-child(2) { background: #fbbf24; }
.window-bar span:nth-child(3) { background: #34d399; }

.window-bar small {
  margin-left: auto;
  color: #94a3b8;
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.code-window pre {
  margin: 0;
  padding: 1.4rem;
  white-space: pre-wrap;
}

.code-window code {
  color: #a7f3d0;
  font: 0.95rem/1.7 Consolas, Monaco, "Courier New", monospace;
}

.code-muted {
  color: #38bdf8;
}

.terminal-line {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.4rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.88rem;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.16);
}

.section-band,
.skills-section,
.contact-section {
  padding: 5.5rem 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2,
.skills-section h2,
.contact-section h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 900;
}

.project-viewer {
  position: relative;
}

.project-track {
  display: grid;
  grid-auto-columns: minmax(310px, 72%);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.25rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(94, 234, 212, 0.7) rgba(15, 23, 42, 0.9);
}

.project-track:focus {
  outline: 1px solid rgba(94, 234, 212, 0.5);
  outline-offset: 6px;
}

.viewer-btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #e5edf7;
  background: rgba(7, 11, 18, 0.82);
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.viewer-btn:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: rgba(94, 234, 212, 0.8);
  transform: translateY(-2px);
}

.viewer-btn-prev {
  left: -0.8rem;
}

.viewer-btn-next {
  right: -0.8rem;
}

.project-card {
  min-height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 26, 43, 0.96), rgba(13, 20, 33, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.project-card:hover {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transform: translateY(-6px);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.project-thumb {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 150px;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1rem;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #0f172a, #0f766e);
  background-size: 22px 22px, 22px 22px, auto;
}

.project-thumb span {
  color: rgba(255, 255, 255, 0.7);
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.project-thumb strong {
  font-size: 3rem;
  font-weight: 900;
}

.project-body {
  flex: 1;
  padding: 1.25rem;
}

.project-body h3 {
  margin-top: 0.9rem;
  font-size: 1.35rem;
  font-weight: 850;
  color: #f8fafc;
}

.project-body p,
.skills-section p,
.contact-section p {
  color: var(--muted);
}

.tech-list,
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tech-list span,
.skills-grid span {
  padding: 0.45rem 0.7rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 700;
}

.skills-grid span {
  padding: 0.8rem 1rem;
  background: rgba(16, 26, 43, 0.92);
  border-radius: 8px;
  transition: border-color 220ms ease, transform 220ms ease;
}

.skills-grid span:hover {
  border-color: rgba(20, 184, 166, 0.64);
  transform: translateY(-3px);
}

.project-actions {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem 1.25rem;
}

.project-actions a {
  color: #5eead4;
  font-weight: 800;
  text-decoration: none;
}

.minimal-link {
  position: relative;
  padding-bottom: 0.2rem;
}

.minimal-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.minimal-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.skills-section {
  background: #090f19;
}

.contact-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(16, 26, 43, 0.98), rgba(7, 17, 31, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.site-footer {
  position: relative;
  padding: 2rem 0;
  color: #dbeafe;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.12), transparent 34%, rgba(245, 158, 11, 0.1)),
    #030712;
  border-top: 1px solid rgba(94, 234, 212, 0.28);
}

.site-footer::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.9), transparent);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-grid div {
  display: grid;
  gap: 0.25rem;
}

.footer-grid strong {
  color: #fff;
  font-size: 1rem;
}

.footer-grid span {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-grid nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-grid a {
  color: #5eead4;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms ease;
}

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCard {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes sweep {
  0%, 100% {
    transform: translateX(-8%);
    opacity: 0.35;
  }
  50% {
    transform: translateX(8%);
    opacity: 0.75;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 7rem;
  }

  .code-window {
    animation: fadeUp 700ms ease both;
  }

  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .project-track {
    grid-auto-columns: 88%;
  }

  .viewer-btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
