@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

/* ============================================================
   DESIGN TOKENS — Dark Fusion Theme
   ============================================================ */
:root {
  --bg:        #1a1a14;
  --bg-surface:#222219;
  --cream:     #e8e4d0;
  --cream-dim: #9e9a88;
  --accent-a:  #e8622a;
  --accent-b:  #4603cd;
  --sidebar-w: 180px;
  --gradient: linear-gradient(135deg, var(--accent-a), #e8952a 40%, var(--accent-b));
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  padding-left: var(--sidebar-w);
  max-width: 1300px;
  margin: 0 auto;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 0 0 28px;
  gap: 36px;
  z-index: 100;
}

body:not(.home) .sidebar {
  border-right: 1px solid rgba(232,228,208,0.1);
  background: linear-gradient(to right, rgba(232,228,208,0.04), transparent);
}

.nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--cream);
}

.nav-link:hover::before {
  opacity: 1;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  padding: 80px 60px 80px 40px;
  max-width: 860px;
}

body:not(.home) .main-content {
  padding-left: 48px;
}

/* ============================================================
   HOME HERO
   ============================================================ */
.home .main-content {
  display: flex;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

.home-hero {
  position: relative;
  z-index: 2;
}

.hero-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--cream-dim);
  line-height: 1.6;
  max-width: 40ch;
  margin: 0;
}

/* Rotating star fixed to right side on home */
.home .main-content::after {
  content: '';
  position: fixed;
  top: 50%;
  right: 7%;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  background: var(--gradient);
  clip-path: polygon(
    50% 0%, 56% 35%, 79% 9%, 65% 40%,
    100% 38%, 68% 52%, 100% 65%, 65% 60%,
    79% 91%, 56% 65%, 50% 100%, 44% 65%,
    21% 91%, 35% 60%, 0% 65%, 32% 52%,
    0% 38%, 35% 40%, 21% 9%, 44% 35%
  );
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
  animation: star-spin 30s linear infinite;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}

h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--cream-dim);
  max-width: 65ch;
  margin-bottom: 1.2rem;
}

a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(232,228,208,0.3);
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: var(--accent-a);
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid rgba(232,228,208,0.1);
  border-radius: 4px;
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.doc-container {
  width: 100%;
  height: 90vh;
  margin: 20px 0;
  border: 1px solid rgba(232,228,208,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.doc-container iframe {
  width: 100%; height: 100%;
  border: none;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-links {
  display: flex;
  gap: 24px;
  margin-top: 1rem;
}

.contact-links a {
  font-size: 1.8rem;
  text-decoration: none;
  color: var(--cream-dim);
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--accent-a);
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(232,228,208,0.2);
  border-radius: 2px;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 2rem;
}

.resume-link:hover {
  background: rgba(232,228,208,0.06);
  border-color: rgba(232,228,208,0.4);
  text-decoration: none;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes star-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}



/* Blob wave header — inner pages */
.blob-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 280px;
  pointer-events: none;
  z-index: 0;
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  :root { --sidebar-w: 0px; }

  body {
    padding-left: 0;
    flex-direction: column;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    width: 100%;
    height: auto;
    padding: 16px 20px;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(232,228,208,0.1);
    background: rgba(26,26,20,0.95);
    position: sticky;
    top: 0;
    z-index: 999;
  }

  .nav-link {
    font-size: 0.65rem;
  }

  .main-content {
    padding: 32px 20px 60px;
    max-width: 100%;
  }

  .hero-name {
    font-size: 3.5rem;
  }

  .about-flex {
    flex-direction: column !important;
    gap: 32px !important;
  }

  .about-flex img {
    width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
  }

  .blob-waves {
    height: 180px;
  }

  .home .main-content::after {
    display: none;
  }
}