:root {
  --bg: #000000;
  --bg-2: #121212;
  --surface: #181818;
  --surface-2: #242424;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f4ef;
  --muted: #a9afa6;
  --green: #6765f1;
  --green-soft: #6ebae6;
  --cyan: #4ecdc4;
  --coral: #ff6b6b;
  --amber: #ffd166;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

ul {
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.45rem;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

#navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 5%;
  background: rgba(7, 8, 7, 0.76);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

#navbar.scrolled {
  background: rgba(7, 8, 7, 0.94);
  border-bottom-color: var(--line);
}

.logo {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu a {
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.menu a:hover,
.menu a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 86px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 7, 0.92), rgba(7, 8, 7, 0.52)),
    linear-gradient(180deg, rgba(7, 8, 7, 0.2), var(--bg)),
    url("assets/space1.png") center / cover;
  filter: saturate(0.8) contrast(1.1);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 52px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  font-size: 4.7rem;
  line-height: 0.95;
  margin-bottom: 1.15rem;
}

.hero-lede {
  max-width: 700px;
  color: #d7ddd2;
  font-size: 1.22rem;
  margin-bottom: 1.8rem;
}

.hero-actions,
.project-links,
.contact-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #041006;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.profile-player {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(39, 39, 39, 0.96), rgba(24, 24, 24, 0.96));
  box-shadow: 0 24px 70px var(--shadow);
  backdrop-filter: blur(10px);
}

.album-art {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 185, 84, 0.95), rgba(78, 205, 196, 0.9) 46%, rgba(255, 107, 107, 0.9)),
    url("assets/space2.png") center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.album-art span {
  color: #061008;
  font-size: 4rem;
  font-weight: 900;
}

.mix-label,
.item-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.player-body h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.player-body p:last-of-type {
  color: var(--muted);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.player-controls span {
  width: 26px;
  height: 2px;
  background: var(--muted);
}

.player-controls a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: #070807;
  cursor: pointer;
  font-size: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.player-controls a:hover {
  background: var(--green);
  transform: scale(1.04);
}

.player-controls a::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #070807;
}

.progress-bar {
  height: 5px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.progress-bar span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.equalizer span {
  width: 8px;
  border-radius: 8px 8px 2px 2px;
  background: var(--green);
  animation: bounce 1.1s ease-in-out infinite;
}

.equalizer span:nth-child(1) { height: 45%; }
.equalizer span:nth-child(2) { height: 85%; animation-delay: 0.12s; background: var(--cyan); }
.equalizer span:nth-child(3) { height: 60%; animation-delay: 0.24s; background: var(--amber); }
.equalizer span:nth-child(4) { height: 100%; animation-delay: 0.36s; background: var(--coral); }
.equalizer span:nth-child(5) { height: 55%; animation-delay: 0.48s; }

.section {
  padding: 96px 0;
  background: var(--bg);
}

.alt-section {
  background: var(--bg-2);
}

.section-grid,
.feature-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
}

.section-heading h2,
.contact-inner h2 {
  font-size: 2.6rem;
  line-height: 1.05;
}

.section-copy {
  color: #d8ddd4;
  font-size: 1.04rem;
}

.section-copy p + p {
  margin-top: 1rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stat-row div {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-row strong {
  display: block;
  color: var(--green-soft);
  font-size: 1.35rem;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.stat-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.experience-list,
.project-list {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.experience-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.track-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0b170f;
  color: var(--green);
  font-weight: 900;
}

.experience-item h3,
.project-content h3,
.publication-card h3,
.skill-group h3,
.hobby-item h3 {
  line-height: 1.2;
}

.experience-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.publication-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 185, 84, 0.16), rgba(78, 205, 196, 0.08)),
    var(--surface);
}

.publication-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.publication-card p {
  color: #d6ddd3;
  margin-bottom: 1.2rem;
}

.tag-list {
  margin-bottom: 1.3rem;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  padding: 7px 10px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 24px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  background: #202020;
  transform: translateY(-3px);
}

.project-card:nth-child(4n + 2) .project-content h3 {
  color: var(--cyan);
}

.project-card:nth-child(4n + 3) .project-content h3 {
  color: var(--amber);
}

.project-card:nth-child(4n + 4) .project-content h3 {
  color: var(--coral);
}

.project-media,
.project-art {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0b0d0b;
  
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-media video {
  background: #000;
  object-fit: contain;
}

.split-media {
  position: relative;
  min-height: 335px;
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
}

.split-media img {
  position: absolute;
  width: 82%;
  height: 82%;
  min-height: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #070807;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  object-fit: contain;
  transition: box-shadow 0.24s ease, transform 0.24s ease, z-index 0.24s ease;
}

.split-media img:first-child {
  left: 0;
  top: 0;
  z-index: 2;
  transform: rotate(-3deg);
}

.split-media img:nth-child(2) {
  right: 0;
  bottom: 0;
  z-index: 1;
  transform: rotate(3deg);
}

.split-media img:hover {
  z-index: 4;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  transform: translateY(-14px) scale(1.03) rotate(0deg);
}

.poster-preview {
  background: #202420;
}

.poster-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 330px;
  border: 0;
}

.paper-art {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(29, 185, 84, 0.9), rgba(255, 209, 102, 0.82)),
    url("assets/space2.png") center / cover;
}

.paper-art span {
  color: #091009;
  font-size: 4rem;
  font-weight: 900;
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 8px;
}

.project-content h3 {
  color: var(--green-soft);
  font-size: 1.55rem;
  margin-bottom: 0.8rem;
}

.project-content p {
  color: #d6ddd3;
  margin-bottom: 1rem;
}

.project-content ul {
  color: var(--muted);
  margin-bottom: 1rem;
}

.project-links a,
.contact-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.project-links a:hover,
.contact-links a:hover {
  background: rgba(29, 185, 84, 0.12);
  border-color: rgba(29, 185, 84, 0.55);
}

.skill-groups {
  display: grid;
  gap: 26px;
  margin-top: 32px;
}

.skill-group h3 {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101010;
  color: #d5dbd1;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 6px 11px 6px 9px;
}

.skill-chip img,
.skill-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.skill-chip img {
  object-fit: contain;
}

.skill-mark {
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(29, 185, 84, 0.16);
  color: var(--green-soft);
  font-size: 0.54rem;
  font-weight: 900;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.playlist-grid iframe {
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hobby-item {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hobby-item:nth-child(2) {
  border-color: rgba(255, 209, 102, 0.32);
}

.hobby-item:nth-child(3) {
  border-color: rgba(255, 107, 107, 0.32);
}

.hobby-item:nth-child(4) {
  border-color: rgba(78, 205, 196, 0.32);
}

.hobby-item:nth-child(6),
.hobby-item:nth-child(7),
.hobby-item:nth-child(8) {
  border-color: rgba(29, 185, 84, 0.32);
}

.hobby-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.hobby-item p {
  color: var(--muted);
}

.contact-section {
  background:
    linear-gradient(180deg, rgba(7, 8, 7, 0.78), var(--bg)),
    url("assets/space2.png") center / cover;
}

.contact-inner {
  text-align: center;
}

.contact-inner p {
  max-width: 640px;
  margin: 1rem auto 1.6rem;
  color: #d9dfd5;
}

.contact-links {
  justify-content: center;
}

footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

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

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

@keyframes bounce {
  0%, 100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .equalizer span,
  .player-controls a,
  .progress-bar span,
  .button {
    animation: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .feature-grid,
  .project-card,
  .playlist-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3.6rem;
  }

  .project-card {
    gap: 18px;
  }
}

@media (max-width: 760px) {
  #navbar {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 15, 12, 0.98);
  }

  .menu.open {
    display: flex;
  }

  .menu a {
    padding: 12px;
  }

  .hero {
    min-height: auto;
    padding-top: 110px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-lede {
    font-size: 1.05rem;
  }

  .profile-player {
    grid-template-columns: 92px 1fr;
    padding: 16px;
  }

  .album-art span {
    font-size: 2.6rem;
  }

  .section {
    padding: 72px 0;
  }

  .section-heading h2,
  .contact-inner h2 {
    font-size: 2.1rem;
  }

  .stat-row,
  .hobby-grid,
  .playlist-grid {
    grid-template-columns: 1fr;
  }

  .experience-item {
    grid-template-columns: 1fr;
  }

  .project-media,
  .project-art {
    min-height: 220px;
  }

  .split-media {
    min-height: 285px;
  }
}

@media (max-width: 460px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .button,
  .contact-links a {
    width: 100%;
  }

  .profile-player {
    grid-template-columns: 1fr;
  }

  .album-art {
    max-width: 150px;
  }
}

/* =========================================================
   FEATURED PROJECTS
   ========================================================= */

.featured-projects {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.featured-project {
  display: grid;
  grid-template-columns: 42% 58%;
  align-items: center;
  overflow: hidden;
}

/* IMAGE AREA */
.featured-project .project-image {
  width: 100%;
  padding: 1.25rem;
  overflow: hidden;

  /* REMOVE any old fixed/min height */
  height: auto !important;
  min-height: 0 !important;
}

/* Let screenshot keep its real proportions */
.featured-project .project-image img {
  position: static !important;

  display: block;
  width: 100%;
  height: auto !important;

  object-fit: contain;

  border-radius: 8px;

  filter: grayscale(100%);
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.featured-project:hover .project-image img {
  transform: scale(1.015);
  filter: grayscale(20%);
}

.featured-project .project-content {
  padding: 1.75rem 2rem;
}


/* =========================================================
   COMPACT PROJECT GRID
   ========================================================= */

.mini-project-grid {
  display: grid;

  /* 3 cards per row */
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 1rem;
  margin-top: 1rem;

  /* CRITICAL: don't stretch cards */
  align-items: start;
}


/* Individual card */
.mini-project {
  min-height: 0 !important;
  height: auto !important;
  align-self: start;
}


/* Content */
.mini-project .project-content {
  display: block !important;

  height: auto !important;
  min-height: 0 !important;

  padding: 1.35rem 1.5rem;
}


/* Category */
.mini-project .item-meta {
  margin: 0 0 0.65rem;

  font-size: 0.72rem;
}


/* Title */
.mini-project h3 {
  margin: 0 0 0.7rem;

  font-size: clamp(1.25rem, 1.6vw, 1.65rem);
  line-height: 1.12;
}


/* Description */
.mini-project p {
  margin: 0 0 0.75rem;

  font-size: 0.9rem;
  line-height: 1.5;
}


/* Technology/result line */
.mini-project .mini-tech {
  margin: 0.8rem 0 0 !important;

  font-size: 0.75rem !important;
  line-height: 1.4;

  opacity: 0.65;
}


/* GitHub / project button */
.mini-project .project-links {
  /* IMPORTANT:
     prevents button being pushed to card bottom */
  margin-top: 1rem !important;

  padding: 0 !important;
}


/* Slightly smaller button */
.mini-project .project-links a {
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 1000px) {

  .mini-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* Featured projects stack */
@media (max-width: 850px) {

  .featured-project {
    grid-template-columns: 1fr;
  }

  .featured-project .project-image {
    padding: 1rem;
  }

  .featured-project .project-content {
    padding: 1.5rem;
  }

}


/* Phone */
@media (max-width: 650px) {

  .mini-project-grid {
    grid-template-columns: 1fr;
  }

}
