@font-face {
  font-family: 'Matcha';
  src: url('../assets/Matcha Vibes.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Super';
  src: url('../assets/Super Joyful.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Anton';
  src: url('../assets/Anton-Regular.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@import url("https://fonts.googleapis.com/css2?family=Oregano:ital@0;1&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500&display=swap');

.font-roboto {
  font-family: "Roboto", sans-serif;
}
.font-oregano {
  font-family: "Oregano", cursive;
}
.font-matcha {
  font-family: "Matcha";
}
.font-super-joy {
  font-family: "Super";
}
.font-anton {
  font-family: "Anton";
}

/* Layer 2: display / abstract font. Headings, statements, decorative accents only. */
.font-display {
  font-family: "Unbounded", "Anton", sans-serif;
  letter-spacing: -0.01em;
}

/* Layer 3: monospace font. Metadata, code, tech labels, technical info. */
.font-mono-tech {
  font-family: "Space Mono", ui-monospace, "SFMono-Regular", monospace;
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

::selection {
  background-color: rgba(34, 197, 94, 0.15);
  color: #fff;
}

::-moz-selection {
  background-color: rgba(34, 197, 94, 0.15);
  color: #fff;
}

* {
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root {
  --bg-black: #000000;
  --surface: #080808;
  --accent: #FFD700;
  --border-line: rgba(255, 255, 255, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  background-color: var(--bg-black);
  font-family: 'Inter', sans-serif;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
  padding-top: 70px;
}

@media (min-width: 768px) {
  body { padding-top: 90px; }
}

.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-line);
}

.premium-card {
  background-color: var(--surface);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  border-color: rgba(255, 215, 0, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 215, 0, 0.04) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (min-width: 768px) {
  .premium-card { border-radius: 32px; }
}

.banner-mask {
  background: linear-gradient(to bottom, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 1) 100%);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
}

.banner-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .banner-wrapper { height: 180px; }
}

@media (min-width: 768px) {
  .banner-wrapper { height: 220px; }
}

@media (min-width: 1024px) {
  .banner-wrapper { height: 260px; }
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.3;
}

.avatar-container {
  margin-top: -45px;
  position: relative;
  z-index: 20;
}

@media (min-width: 640px) {
  .avatar-container { margin-top: -55px; }
}

@media (min-width: 768px) {
  .avatar-container { margin-top: -65px; }
}

.avatar-frame {
  width: 90px;
  height: 90px;
  border: 5px solid var(--surface);
  border-radius: 50%;
  background: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.08);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: cover;
  object-position: center;
}

.avatar-container:hover .avatar-frame {
  box-shadow: 0 12px 34px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,215,0,0.25);
}

@media (min-width: 640px) {
  .avatar-frame { width: 110px; height: 110px; border-width: 6px; }
}

@media (min-width: 768px) {
  .avatar-frame { width: 135px; height: 135px; border-width: 8px; }
}

.status-pill {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #22c55e;
  border: 3px solid var(--surface);
  border-radius: 50%;
}

@media (min-width: 640px) {
  .status-pill { width: 20px; height: 20px; bottom: 6px; right: 6px; }
}

@media (min-width: 768px) {
  .status-pill { width: 26px; height: 26px; border-width: 4px; bottom: 8px; right: 8px; }
}

.profile-content {
  padding: 0 20px 24px 20px;
}

@media (min-width: 640px) {
  .profile-content { padding: 0 28px 32px 28px; }
}

@media (min-width: 768px) {
  .profile-content { padding: 0 40px 40px 40px; }
}

.hover-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-line);
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hover-box:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.section-label {
  font-size: 9px;
  font-weight: 800;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 20px;
  display: block;
  padding-left: 2px;
}

.reveal {
  animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scroll-reveal for sections below the fold: JS toggles .is-visible */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Project card clickable state */
.project-card {
  cursor: pointer;
}

.project-card:active {
  transform: scale(0.99);
}

/* Mobile nav */
/* No mobile menu button: at narrow widths every section stays reachable
   by scrolling the homepage, so no toggle/panel/scrim styles are needed. */

.fixed-header.is-scrolled {
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 30px rgba(0,0,0,0.35);
}

/* Buttons: consistent focus/active feedback used across the site */
.btn-feedback {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-feedback:active {
  transform: scale(0.97);
}

/* Desktop primary nav (Home / About / Projects / Lab / Contact) */
.nav-link {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  padding: 6px 2px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: #ccc;
}

.nav-link:hover::after {
  right: 0;
}

.nav-link.is-active {
  color: var(--accent);
}

.nav-link.is-active::after {
  right: 0;
}

/* Inner-page hero label (used on about, projects, lab) */
.page-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #444;
}

/* Filter chips (used on projects) */
.filter-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-line);
  background: rgba(255, 255, 255, 0.015);
  color: #777;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-chip:hover {
  color: #ccc;
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-chip.is-active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

/* Search field (used on projects) */
.search-field {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-field:focus-within {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.search-field input {
  background: transparent;
  color: #fff;
  outline: none;
  width: 100%;
  border: none;
}

.search-field input::placeholder {
  color: #555;
}

/* Project detail modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  align-items: flex-start;
  padding: max(4rem, 5vh) 1rem;
}

.modal-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-scrim.is-open .modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Lab experimental surface */
.lab-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

.lab-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.lab-card {
  position: relative;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-card:hover {
  border-color: rgba(255, 215, 0, 0.25);
  transform: translateY(-3px);
}

/* Page transition wrapper */
.page-enter {
  animation: pageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .page-enter { animation: none; }
}

/* Spotify widget equalizer bars */
@keyframes eqBar {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* Basic reset for elements that no longer get Next.js/Tailwind defaults */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

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

/*
 * Tailwind utility fallbacks.
 * These duplicate a handful of classes that the Tailwind Play CDN already
 * generates at runtime. They exist purely as a safety net: if the CDN
 * script fails to load (offline, blocked, or a future version change),
 * font sizes and letter-spacing critical to the layout still render
 * correctly instead of silently falling back to browser defaults.
 */
.text-\[8px\]  { font-size: 8px; }
.text-\[9px\]  { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[13px\] { font-size: 13px; }
.text-\[14px\] { font-size: 14px; }
.text-\[16px\] { font-size: 16px; }

.tracking-\[0\.15em\] { letter-spacing: 0.15em; }
.tracking-\[0\.2em\]  { letter-spacing: 0.2em; }
.tracking-\[0\.3em\]  { letter-spacing: 0.3em; }

.bg-\[\#22c55e26\] { background-color: #22c55e26; }
.skew-x-\[-6deg\]  { transform: skewX(-6deg); }

.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
