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

:root {
  --green: #caff2b;
  --darker: #2b2b2b;
  --text-white: #f0ede8;
  --text-muted: #9a9590;
  --text-dark: #1a1a1a;
  --text-creative: #f87275;
  --sidebar-w: 100px;
  --font-display: "Instrument Serif";
  --font-mono: "Inter", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  background: var(--light-bg);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* ---------- SIDEBAR ---------- */

.mobile-header,
.mobile-nav {
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--darker);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 32px;
  z-index: 100;
  transition: background 0.2s ease;
}

.sidebar-dark {
  background: var(--darker);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 65px;
  margin-bottom: auto;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-fallback {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 250px;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  opacity: 1;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

/* ---------- MAIN LAYOUT ---------- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- HERO ---------- */

.hero {
  background: var(--darker);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 60px 60px;
  position: relative;
}

/* HEADLINE — fades up on load */
.hero-text {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease 0.2s forwards;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-text h1 em {
  font-style: italic;
}

/* BIO — hidden by default, revealed on scroll */

.hero-bio {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  max-width: 420px;
  margin-top: 32px;
}

.hero-bio.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-bio p {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-muted);
}

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

/* ---------- SECTION DIVIDER ---------- */
.section-divider {
  width: 100%;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--text-muted) 0px,
    var(--text-muted) 4px,
    transparent 4px,
    transparent 10px
  );
  opacity: 0.25;
  margin: 0;
}

/* ---------- PROJECTS ---------- */
.projects {
  background: var(--darker);
}

.project {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 480px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.4s ease;
}

.project:hover {
  background: rgba(255, 255, 255, 0.015);
}

/* ---------- PROJECT INFO PANEL ---------- */
.project-info {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  position: relative;
}

.project-leaf {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

.project-leaf img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(76%) sepia(80%) saturate(600%)
    hue-rotate(40deg);
}

.project-title {
  font-family: var(--font-mono);
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.project-desc {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 280px;
}

.project-links {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 4px;
}

.link-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0;
  transition: color 0.25s ease;
}

.link-label:hover {
  color: var(--text-white);
}

.link-label.live {
  color: var(--green);
}

.link-label.live:hover {
  color: #fff;
}

.project-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  width: fit-content;
}
.ellipse {
  width: 175px; /* Adjust width as needed */
  height: 60px; /* Adjust height as needed */
  border: 2px solid var(--text-white);
  background-color: transparent;
  border-radius: 50%;
  margin-left: 0px;
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- PROJECT IMAGE PANEL ---------- */
.project-image {
  position: relative;
  overflow: hidden;
  background: #222;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: brightness(0.88);
}

.project:hover .project-image img {
  transform: scale(1.03);
  filter: brightness(1);
}

/* Placeholder when image is missing */
.project-image.img-placeholder {
  background: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image.img-placeholder::after {
  content: "Add your image here";
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ---------- CREATIVE SECTION SPECIFICS ---------- */
.creative-section {
  background: var(--darker);
}

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

.creative-section .project {
  border-bottom-color: rgba(200, 240, 0, 0.07);
}

.creative-divider {
  height: 300px;
  background: var(--darker);
  display: flex;
  align-items: center;
}

.project-title--creative {
  color: var(--text-creative);
}

.ellipse--creative {
  border-color: var(--text-creative);
  width: 200px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--darker);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-links {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 140px 50px 100px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: color 0.25s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.footer-links a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.copyright {
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 0 50px 0 0;
  justify-content: right;
  align-items: center;
}

.copyright p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.copyright span {
  color: var(--text-muted);
  font-size: 24px;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.project-info,
.project-image {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.project-image {
  transition-delay: 0.12s;
}

.project.in-view .project-info,
.project.in-view .project-image {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--darker);
}
::-webkit-scrollbar-thumb {
  background: var(--green);
  border-radius: 2px;
}

/* ---------- SELECTION ---------- */
::selection {
  background: var(--green);
  color: var(--text-dark);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  /* Hide sidebar, show top bar instead */
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  /* Top mobile header */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 200;
  }

  .mobile-logo img {
    height: 36px;
    width: auto;
  }

  /* Hamburger button */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-white);
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  /* Hamburger open state */
  .hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav overlay */
  .mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-nav.open {
    opacity: 1;
    pointer-events: all;
  }

  .mobile-nav a {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    writing-mode: horizontal-tb;
    transform: none;
  }

  .mobile-nav a:hover {
    color: var(--text-white);
  }

  /* Push content below fixed header */
  .hero {
    padding-top: 100px;
    min-height: 100svh;
  }

  /* Stack project image above text */
  .project {
    grid-template-columns: 1fr;
    grid-template-rows: 280px auto;
    min-height: unset;
  }

  .project-image {
    grid-row: 1;
  }

  .project-info {
    grid-row: 2;
    padding: 32px 24px;
  }

  .project-desc {
    max-width: 100%;
  }

  /* Footer */
  .footer-links {
    flex-direction: column;
    gap: 24px;
    padding: 60px 24px;
  }

  /* Hero text size */
  .hero-text h1 {
    font-size: clamp(32px, 8vw, 52px);
  }
}
